PluginProbe
VikBooking Hotel Booking Engine & PMS / trunk
VikBooking Hotel Booking Engine & PMS vtrunk
1.8.15 1.8.14 1.8.13 1.8.12 1.8.11 1.8.10 1.8.9 1.8.6 1.8.7 1.8.8 trunk 1.6.0 1.6.1 1.6.2 1.6.3 1.6.4 1.6.5 1.6.6 1.6.7 1.6.8 1.6.9 1.7.0 1.7.1 1.7.2 1.7.3 All 36 releases
vikbooking / libraries / adapter / application / version.php

version.php in VikBooking Hotel Booking Engine & PMS trunk, at libraries/adapter/application/version.php

60 lines 1.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * @package VikWP - Libraries
4 * @subpackage adapter.application
5 * @author E4J s.r.l.
6 * @copyright Copyright (C) 2023 E4J s.r.l. All Rights Reserved.
7 * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
8 * @link https://vikwp.com
9 */
10
11 // No direct access
12 defined('ABSPATH') or die('No script kiddies please!');
13
14 /**
15 * Version information class for the Joomla CMS.
16 *
17 * @since 10.1.16
18 */
19 final class JVersion
20 {
21 /**
22 * Gets a "PHP standardized" version string for the current WordPress.
23 *
24 * @return string Version string.
25 *
26 * @uses getLongVersion()
27 */
28 public function getShortVersion()
29 {
30 /**
31 * Try to extract the short version from the default one.
32 *
33 * @since 10.1.26
34 */
35 $version = $this->getLongVersion();
36
37 if (preg_match("/^[\d\.]+/", $version, $match))
38 {
39 // return initial version only (strip all nightly information)
40 return $match[0];
41 }
42
43 // return default version
44 return $version;
45 }
46
47 /**
48 * Gets a version string for the current WordPress with all release information.
49 *
50 * @return string Complete version string.
51 */
52 public function getLongVersion()
53 {
54 // obtain WP version from global var and return it
55 global $wp_version;
56
57 return $wp_version;
58 }
59 }
60