File "version.php"

Full Path: /home/romayxjt/public_html/wp-content/plugins/vikbooking/libraries/adapter/application/version.php
File size: 1.24 KB
MIME-type: text/x-php
Charset: utf-8

<?php
/** 
 * @package     VikWP - Libraries
 * @subpackage  adapter.application
 * @author      E4J s.r.l.
 * @copyright   Copyright (C) 2023 E4J s.r.l. All Rights Reserved.
 * @license     http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
 * @link        https://vikwp.com
 */

// No direct access
defined('ABSPATH') or die('No script kiddies please!');

/**
 * Version information class for the Joomla CMS.
 *
 * @since 10.1.16
 */
final class JVersion
{
	/**
	 * Gets a "PHP standardized" version string for the current WordPress.
	 *
	 * @return  string  Version string.
	 *
	 * @uses 	getLongVersion()
	 */
	public function getShortVersion()
	{
		/**
		 * Try to extract the short version from the default one.
		 *
		 * @since 10.1.26
		 */
		$version = $this->getLongVersion();

		if (preg_match("/^[\d\.]+/", $version, $match))
		{
			// return initial version only (strip all nightly information)
			return $match[0];
		}
		
		// return default version
		return $version;
	}

	/**
	 * Gets a version string for the current WordPress with all release information.
	 *
	 * @return  string  Complete version string.
	 */
	public function getLongVersion()
	{
		// obtain WP version from global var and return it
		global $wp_version;

		return $wp_version;
	}
}