PluginProbe
User Access Manager / 2.3.16
User Access Manager v2.3.16
2.3.20 2.3.19 2.3.18 2.3.17 2.3.16 2.3.15 2.3.14 2.3.13 trunk 0.6 0.6.1 0.6.2 0.7 0.7 Beta 0.7.0.1 0.8 0.8.0.1 0.8.0.2 0.9 0.9.1 0.9.1.1 0.9.1.2 0.9.1.3 0.9.1.4 1.0 All 136 releases
user-access-manager / includes / version.php

version.php in User Access Manager 2.3.16, at includes/version.php

26 lines 679 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 declare(strict_types=1);
4
5 /**
6 * Reads the plugin version from the plugin header, the only place where it is maintained.
7 */
8
9 if (defined('UAM_VERSION') === false) {
10 $pluginFile = fopen(__DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'user-access-manager.php', 'r');
11 $pluginHeader = '';
12
13 if ($pluginFile !== false) {
14 $pluginHeader = (string) fread($pluginFile, 8192);
15 fclose($pluginFile);
16 }
17
18 define(
19 'UAM_VERSION',
20 preg_match('/^[ \t\/*#@]*Version:(.*)$/mi', $pluginHeader, $versionMatches) === 1 ?
21 trim($versionMatches[1]) : ''
22 );
23
24 unset($pluginFile, $pluginHeader, $versionMatches);
25 }
26