Changeset 2907790
- Timestamp:
- 05/04/2023 05:18:27 AM (23 months ago)
- Location:
- shortcode-options
- Files:
-
- 2 added
- 24 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
shortcode-options/tags/12/readme.txt
r2838290 r2907790 5 5 Requires at least: 3.4 6 6 Tested up to: 6.1 7 Stable tag: 2. 0.137 Stable tag: 2.1.0 8 8 Requires PHP: 7.3 9 9 License: GPLv2 -
shortcode-options/tags/12/shortcode-options.php
r2838290 r2907790 11 11 * Plugin URI: https://urielwilson.com/ 12 12 * Description: The Shortcode Options plugin is a simple way to display WordPress Options using shortcode <strong>[wpoption opt="blogname"]</strong>, you can reference list of options here:<a href="https://codex.wordpress.org/Option_Reference"> Option Reference </a>. 13 * Version: 2. 0.1313 * Version: 2.1.0 14 14 * Requires at least: 3.4 15 15 * Requires PHP: 7.3 … … 27 27 } 28 28 29 // Setup access to the plugin dir path. 30 \define( 'SCO_DIR_PATH', plugin_dir_path( __FILE__ ) ); 31 29 32 // Load composer. 30 33 require_once plugin_dir_path( __FILE__ ) . 'vendor/autoload.php'; -
shortcode-options/tags/12/src/ShortcodeOptions/Plugin.php
r2838290 r2907790 23 23 { 24 24 add_shortcode( 'wpoption', [ $this, 'wpoption_shortcode' ] ); 25 26 /** 27 * Loading the plugin translations. 28 */ 29 add_action( 'init', [ Lang::class, 'i18n' ] ); 25 30 } 26 31 -
shortcode-options/tags/12/vendor/autoload.php
r2838290 r2907790 3 3 // autoload.php @generated by Composer 4 4 5 if (PHP_VERSION_ID < 50600) { 6 if (!headers_sent()) { 7 header('HTTP/1.1 500 Internal Server Error'); 8 } 9 $err = 'Composer 2.3.0 dropped support for autoloading on PHP <5.6 and you are running '.PHP_VERSION.', please upgrade PHP or use Composer 2.2 LTS via "composer self-update --2.2". Aborting.'.PHP_EOL; 10 if (!ini_get('display_errors')) { 11 if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') { 12 fwrite(STDERR, $err); 13 } elseif (!headers_sent()) { 14 echo $err; 15 } 16 } 17 trigger_error( 18 $err, 19 E_USER_ERROR 20 ); 21 } 22 5 23 require_once __DIR__ . '/composer/autoload_real.php'; 6 24 7 return ComposerAutoloaderInit 5adac176bff846fbca7cee73ceb1525c::getLoader();25 return ComposerAutoloaderInit465f3ce075f6414feb18ddf48082d5de::getLoader(); -
shortcode-options/tags/12/vendor/composer/ClassLoader.php
r2838290 r2907790 43 43 class ClassLoader 44 44 { 45 /** @var \Closure(string):void */ 46 private static $includeFile; 47 48 /** @var ?string */ 45 49 private $vendorDir; 46 50 47 51 // PSR-4 52 /** 53 * @var array[] 54 * @psalm-var array<string, array<string, int>> 55 */ 48 56 private $prefixLengthsPsr4 = array(); 57 /** 58 * @var array[] 59 * @psalm-var array<string, array<int, string>> 60 */ 49 61 private $prefixDirsPsr4 = array(); 62 /** 63 * @var array[] 64 * @psalm-var array<string, string> 65 */ 50 66 private $fallbackDirsPsr4 = array(); 51 67 52 68 // PSR-0 69 /** 70 * @var array[] 71 * @psalm-var array<string, array<string, string[]>> 72 */ 53 73 private $prefixesPsr0 = array(); 74 /** 75 * @var array[] 76 * @psalm-var array<string, string> 77 */ 54 78 private $fallbackDirsPsr0 = array(); 55 79 80 /** @var bool */ 56 81 private $useIncludePath = false; 82 83 /** 84 * @var string[] 85 * @psalm-var array<string, string> 86 */ 57 87 private $classMap = array(); 88 89 /** @var bool */ 58 90 private $classMapAuthoritative = false; 91 92 /** 93 * @var bool[] 94 * @psalm-var array<string, bool> 95 */ 59 96 private $missingClasses = array(); 97 98 /** @var ?string */ 60 99 private $apcuPrefix; 61 100 101 /** 102 * @var self[] 103 */ 62 104 private static $registeredLoaders = array(); 63 105 106 /** 107 * @param ?string $vendorDir 108 */ 64 109 public function __construct($vendorDir = null) 65 110 { 66 111 $this->vendorDir = $vendorDir; 67 } 68 112 self::initializeIncludeClosure(); 113 } 114 115 /** 116 * @return string[] 117 */ 69 118 public function getPrefixes() 70 119 { … … 76 125 } 77 126 127 /** 128 * @return array[] 129 * @psalm-return array<string, array<int, string>> 130 */ 78 131 public function getPrefixesPsr4() 79 132 { … … 81 134 } 82 135 136 /** 137 * @return array[] 138 * @psalm-return array<string, string> 139 */ 83 140 public function getFallbackDirs() 84 141 { … … 86 143 } 87 144 145 /** 146 * @return array[] 147 * @psalm-return array<string, string> 148 */ 88 149 public function getFallbackDirsPsr4() 89 150 { … … 91 152 } 92 153 154 /** 155 * @return string[] Array of classname => path 156 * @psalm-return array<string, string> 157 */ 93 158 public function getClassMap() 94 159 { … … 97 162 98 163 /** 99 * @param array $classMap Class to filename map 164 * @param string[] $classMap Class to filename map 165 * @psalm-param array<string, string> $classMap 166 * 167 * @return void 100 168 */ 101 169 public function addClassMap(array $classMap) … … 112 180 * appending or prepending to the ones previously set for this prefix. 113 181 * 114 * @param string $prefix The prefix 115 * @param array|string $paths The PSR-0 root directories 116 * @param bool $prepend Whether to prepend the directories 182 * @param string $prefix The prefix 183 * @param string[]|string $paths The PSR-0 root directories 184 * @param bool $prepend Whether to prepend the directories 185 * 186 * @return void 117 187 */ 118 188 public function add($prefix, $paths, $prepend = false) … … 157 227 * appending or prepending to the ones previously set for this namespace. 158 228 * 159 * @param string $prefix The prefix/namespace, with trailing '\\'160 * @param array|string $paths The PSR-4 base directories161 * @param bool $prepend Whether to prepend the directories229 * @param string $prefix The prefix/namespace, with trailing '\\' 230 * @param string[]|string $paths The PSR-4 base directories 231 * @param bool $prepend Whether to prepend the directories 162 232 * 163 233 * @throws \InvalidArgumentException 234 * 235 * @return void 164 236 */ 165 237 public function addPsr4($prefix, $paths, $prepend = false) … … 205 277 * replacing any others previously set for this prefix. 206 278 * 207 * @param string $prefix The prefix 208 * @param array|string $paths The PSR-0 base directories 279 * @param string $prefix The prefix 280 * @param string[]|string $paths The PSR-0 base directories 281 * 282 * @return void 209 283 */ 210 284 public function set($prefix, $paths) … … 221 295 * replacing any others previously set for this namespace. 222 296 * 223 * @param string $prefix The prefix/namespace, with trailing '\\'224 * @param array|string $paths The PSR-4 base directories297 * @param string $prefix The prefix/namespace, with trailing '\\' 298 * @param string[]|string $paths The PSR-4 base directories 225 299 * 226 300 * @throws \InvalidArgumentException 301 * 302 * @return void 227 303 */ 228 304 public function setPsr4($prefix, $paths) … … 244 320 * 245 321 * @param bool $useIncludePath 322 * 323 * @return void 246 324 */ 247 325 public function setUseIncludePath($useIncludePath) … … 266 344 * 267 345 * @param bool $classMapAuthoritative 346 * 347 * @return void 268 348 */ 269 349 public function setClassMapAuthoritative($classMapAuthoritative) … … 286 366 * 287 367 * @param string|null $apcuPrefix 368 * 369 * @return void 288 370 */ 289 371 public function setApcuPrefix($apcuPrefix) … … 306 388 * 307 389 * @param bool $prepend Whether to prepend the autoloader or not 390 * 391 * @return void 308 392 */ 309 393 public function register($prepend = false) … … 325 409 /** 326 410 * Unregisters this instance as an autoloader. 411 * 412 * @return void 327 413 */ 328 414 public function unregister() … … 344 430 { 345 431 if ($file = $this->findFile($class)) { 346 includeFile($file); 432 $includeFile = self::$includeFile; 433 $includeFile($file); 347 434 348 435 return true; … … 404 491 } 405 492 493 /** 494 * @param string $class 495 * @param string $ext 496 * @return string|false 497 */ 406 498 private function findFileWithExtension($class, $ext) 407 499 { … … 469 561 return false; 470 562 } 563 564 /** 565 * @return void 566 */ 567 private static function initializeIncludeClosure() 568 { 569 if (self::$includeFile !== null) { 570 return; 571 } 572 573 /** 574 * Scope isolated include. 575 * 576 * Prevents access to $this/self from included files. 577 * 578 * @param string $file 579 * @return void 580 */ 581 self::$includeFile = \Closure::bind(static function($file) { 582 include $file; 583 }, null, null); 584 } 471 585 } 472 473 /**474 * Scope isolated include.475 *476 * Prevents access to $this/self from included files.477 */478 function includeFile($file)479 {480 include $file;481 } -
shortcode-options/tags/12/vendor/composer/InstalledVersions.php
r2838290 r2907790 21 21 * See also https://getcomposer.org/doc/07-runtime.md#installed-versions 22 22 * 23 * To require it's presence, you can require `composer-runtime-api ^2.0` 23 * To require its presence, you can require `composer-runtime-api ^2.0` 24 * 25 * @final 24 26 */ 25 27 class InstalledVersions 26 28 { 29 /** 30 * @var mixed[]|null 31 * @psalm-var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}|array{}|null 32 */ 27 33 private static $installed; 34 35 /** 36 * @var bool|null 37 */ 28 38 private static $canGetVendors; 39 40 /** 41 * @var array[] 42 * @psalm-var array<string, array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}> 43 */ 29 44 private static $installedByVendor = array(); 30 45 … … 84 99 foreach (self::getInstalled() as $installed) { 85 100 if (isset($installed['versions'][$packageName])) { 86 return $includeDevRequirements || empty($installed['versions'][$packageName]['dev_requirement']);101 return $includeDevRequirements || !isset($installed['versions'][$packageName]['dev_requirement']) || $installed['versions'][$packageName]['dev_requirement'] === false; 87 102 } 88 103 } … … 105 120 public static function satisfies(VersionParser $parser, $packageName, $constraint) 106 121 { 107 $constraint = $parser->parseConstraints( $constraint);122 $constraint = $parser->parseConstraints((string) $constraint); 108 123 $provided = $parser->parseConstraints(self::getVersionRanges($packageName)); 109 124 … … 229 244 /** 230 245 * @return array 231 * @psalm-return array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string}246 * @psalm-return array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool} 232 247 */ 233 248 public static function getRootPackage() … … 243 258 * @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect. 244 259 * @return array[] 245 * @psalm-return array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string}>}260 * @psalm-return array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} 246 261 */ 247 262 public static function getRawData() … … 266 281 * 267 282 * @return array[] 268 * @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string}>}>283 * @psalm-return list<array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}> 269 284 */ 270 285 public static function getAllRawData() … … 289 304 * @return void 290 305 * 291 * @psalm-param array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string}>} $data306 * @psalm-param array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $data 292 307 */ 293 308 public static function reload($data) … … 299 314 /** 300 315 * @return array[] 301 * @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string}>}>316 * @psalm-return list<array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}> 302 317 */ 303 318 private static function getInstalled() … … 314 329 $installed[] = self::$installedByVendor[$vendorDir]; 315 330 } elseif (is_file($vendorDir.'/composer/installed.php')) { 316 $installed[] = self::$installedByVendor[$vendorDir] = require $vendorDir.'/composer/installed.php'; 331 /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */ 332 $required = require $vendorDir.'/composer/installed.php'; 333 $installed[] = self::$installedByVendor[$vendorDir] = $required; 317 334 if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) { 318 335 self::$installed = $installed[count($installed) - 1]; … … 326 343 // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937 327 344 if (substr(__DIR__, -8, 1) !== 'C') { 328 self::$installed = require __DIR__ . '/installed.php'; 345 /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */ 346 $required = require __DIR__ . '/installed.php'; 347 self::$installed = $required; 329 348 } else { 330 349 self::$installed = array(); 331 350 } 332 351 } 333 $installed[] = self::$installed; 352 353 if (self::$installed !== array()) { 354 $installed[] = self::$installed; 355 } 334 356 335 357 return $installed; -
shortcode-options/tags/12/vendor/composer/autoload_classmap.php
r2838290 r2907790 3 3 // autoload_classmap.php @generated by Composer 4 4 5 $vendorDir = dirname( dirname(__FILE__));5 $vendorDir = dirname(__DIR__); 6 6 $baseDir = dirname($vendorDir); 7 7 8 8 return array( 9 9 'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php', 10 'ShortcodeOptions\\Lang' => $baseDir . '/src/ShortcodeOptions/Lang.php', 10 11 'ShortcodeOptions\\Plugin' => $baseDir . '/src/ShortcodeOptions/Plugin.php', 11 12 'ShortcodeOptions\\Traits\\Singleton' => $baseDir . '/src/ShortcodeOptions/Traits/Singleton.php', -
shortcode-options/tags/12/vendor/composer/autoload_namespaces.php
r2838290 r2907790 3 3 // autoload_namespaces.php @generated by Composer 4 4 5 $vendorDir = dirname( dirname(__FILE__));5 $vendorDir = dirname(__DIR__); 6 6 $baseDir = dirname($vendorDir); 7 7 -
shortcode-options/tags/12/vendor/composer/autoload_psr4.php
r2838290 r2907790 3 3 // autoload_psr4.php @generated by Composer 4 4 5 $vendorDir = dirname( dirname(__FILE__));5 $vendorDir = dirname(__DIR__); 6 6 $baseDir = dirname($vendorDir); 7 7 -
shortcode-options/tags/12/vendor/composer/autoload_real.php
r2838290 r2907790 3 3 // autoload_real.php @generated by Composer 4 4 5 class ComposerAutoloaderInit 5adac176bff846fbca7cee73ceb1525c5 class ComposerAutoloaderInit465f3ce075f6414feb18ddf48082d5de 6 6 { 7 7 private static $loader; … … 25 25 require __DIR__ . '/platform_check.php'; 26 26 27 spl_autoload_register(array('ComposerAutoloaderInit 5adac176bff846fbca7cee73ceb1525c', 'loadClassLoader'), true, true);28 self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname( \dirname(__FILE__)));29 spl_autoload_unregister(array('ComposerAutoloaderInit 5adac176bff846fbca7cee73ceb1525c', 'loadClassLoader'));27 spl_autoload_register(array('ComposerAutoloaderInit465f3ce075f6414feb18ddf48082d5de', 'loadClassLoader'), true, true); 28 self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); 29 spl_autoload_unregister(array('ComposerAutoloaderInit465f3ce075f6414feb18ddf48082d5de', 'loadClassLoader')); 30 30 31 $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); 32 if ($useStaticLoader) { 33 require __DIR__ . '/autoload_static.php'; 34 35 call_user_func(\Composer\Autoload\ComposerStaticInit5adac176bff846fbca7cee73ceb1525c::getInitializer($loader)); 36 } else { 37 $map = require __DIR__ . '/autoload_namespaces.php'; 38 foreach ($map as $namespace => $path) { 39 $loader->set($namespace, $path); 40 } 41 42 $map = require __DIR__ . '/autoload_psr4.php'; 43 foreach ($map as $namespace => $path) { 44 $loader->setPsr4($namespace, $path); 45 } 46 47 $classMap = require __DIR__ . '/autoload_classmap.php'; 48 if ($classMap) { 49 $loader->addClassMap($classMap); 50 } 51 } 31 require __DIR__ . '/autoload_static.php'; 32 call_user_func(\Composer\Autoload\ComposerStaticInit465f3ce075f6414feb18ddf48082d5de::getInitializer($loader)); 52 33 53 34 $loader->register(true); -
shortcode-options/tags/12/vendor/composer/autoload_static.php
r2838290 r2907790 5 5 namespace Composer\Autoload; 6 6 7 class ComposerStaticInit 5adac176bff846fbca7cee73ceb1525c7 class ComposerStaticInit465f3ce075f6414feb18ddf48082d5de 8 8 { 9 9 public static $prefixLengthsPsr4 = array ( … … 23 23 public static $classMap = array ( 24 24 'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php', 25 'ShortcodeOptions\\Lang' => __DIR__ . '/../..' . '/src/ShortcodeOptions/Lang.php', 25 26 'ShortcodeOptions\\Plugin' => __DIR__ . '/../..' . '/src/ShortcodeOptions/Plugin.php', 26 27 'ShortcodeOptions\\Traits\\Singleton' => __DIR__ . '/../..' . '/src/ShortcodeOptions/Traits/Singleton.php', … … 30 31 { 31 32 return \Closure::bind(function () use ($loader) { 32 $loader->prefixLengthsPsr4 = ComposerStaticInit 5adac176bff846fbca7cee73ceb1525c::$prefixLengthsPsr4;33 $loader->prefixDirsPsr4 = ComposerStaticInit 5adac176bff846fbca7cee73ceb1525c::$prefixDirsPsr4;34 $loader->classMap = ComposerStaticInit 5adac176bff846fbca7cee73ceb1525c::$classMap;33 $loader->prefixLengthsPsr4 = ComposerStaticInit465f3ce075f6414feb18ddf48082d5de::$prefixLengthsPsr4; 34 $loader->prefixDirsPsr4 = ComposerStaticInit465f3ce075f6414feb18ddf48082d5de::$prefixDirsPsr4; 35 $loader->classMap = ComposerStaticInit465f3ce075f6414feb18ddf48082d5de::$classMap; 35 36 36 37 }, null, ClassLoader::class); -
shortcode-options/tags/12/vendor/composer/installed.php
r2838290 r2907790 1 1 <?php return array( 2 2 'root' => array( 3 'pretty_version' => '2.0.13.x-dev', 4 'version' => '2.0.13.9999999-dev', 3 'name' => 'devuri/shortcode-options', 4 'pretty_version' => 'dev-master', 5 'version' => 'dev-master', 6 'reference' => '1c0a67093e1e649558840ddab87ebd76ddb17eee', 5 7 'type' => 'library', 6 8 'install_path' => __DIR__ . '/../../', 7 9 'aliases' => array(), 8 'reference' => '46a3b4a2db84929093e754381c2e3dda930c80a2',9 'name' => 'devuri/shortcode-options',10 10 'dev' => false, 11 11 ), 12 12 'versions' => array( 13 13 'devuri/shortcode-options' => array( 14 'pretty_version' => '2.0.13.x-dev', 15 'version' => '2.0.13.9999999-dev', 14 'pretty_version' => 'dev-master', 15 'version' => 'dev-master', 16 'reference' => '1c0a67093e1e649558840ddab87ebd76ddb17eee', 16 17 'type' => 'library', 17 18 'install_path' => __DIR__ . '/../../', 18 19 'aliases' => array(), 19 'reference' => '46a3b4a2db84929093e754381c2e3dda930c80a2',20 20 'dev_requirement' => false, 21 21 ), -
shortcode-options/trunk/readme.txt
r2838290 r2907790 5 5 Requires at least: 3.4 6 6 Tested up to: 6.1 7 Stable tag: 2. 0.137 Stable tag: 2.1.0 8 8 Requires PHP: 7.3 9 9 License: GPLv2 -
shortcode-options/trunk/shortcode-options.php
r2838290 r2907790 11 11 * Plugin URI: https://urielwilson.com/ 12 12 * Description: The Shortcode Options plugin is a simple way to display WordPress Options using shortcode <strong>[wpoption opt="blogname"]</strong>, you can reference list of options here:<a href="https://codex.wordpress.org/Option_Reference"> Option Reference </a>. 13 * Version: 2. 0.1313 * Version: 2.1.0 14 14 * Requires at least: 3.4 15 15 * Requires PHP: 7.3 … … 27 27 } 28 28 29 // Setup access to the plugin dir path. 30 \define( 'SCO_DIR_PATH', plugin_dir_path( __FILE__ ) ); 31 29 32 // Load composer. 30 33 require_once plugin_dir_path( __FILE__ ) . 'vendor/autoload.php'; -
shortcode-options/trunk/src/ShortcodeOptions/Plugin.php
r2838290 r2907790 23 23 { 24 24 add_shortcode( 'wpoption', [ $this, 'wpoption_shortcode' ] ); 25 26 /** 27 * Loading the plugin translations. 28 */ 29 add_action( 'init', [ Lang::class, 'i18n' ] ); 25 30 } 26 31 -
shortcode-options/trunk/vendor/autoload.php
r2838290 r2907790 3 3 // autoload.php @generated by Composer 4 4 5 if (PHP_VERSION_ID < 50600) { 6 if (!headers_sent()) { 7 header('HTTP/1.1 500 Internal Server Error'); 8 } 9 $err = 'Composer 2.3.0 dropped support for autoloading on PHP <5.6 and you are running '.PHP_VERSION.', please upgrade PHP or use Composer 2.2 LTS via "composer self-update --2.2". Aborting.'.PHP_EOL; 10 if (!ini_get('display_errors')) { 11 if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') { 12 fwrite(STDERR, $err); 13 } elseif (!headers_sent()) { 14 echo $err; 15 } 16 } 17 trigger_error( 18 $err, 19 E_USER_ERROR 20 ); 21 } 22 5 23 require_once __DIR__ . '/composer/autoload_real.php'; 6 24 7 return ComposerAutoloaderInit 5adac176bff846fbca7cee73ceb1525c::getLoader();25 return ComposerAutoloaderInit465f3ce075f6414feb18ddf48082d5de::getLoader(); -
shortcode-options/trunk/vendor/composer/ClassLoader.php
r2838290 r2907790 43 43 class ClassLoader 44 44 { 45 /** @var \Closure(string):void */ 46 private static $includeFile; 47 48 /** @var ?string */ 45 49 private $vendorDir; 46 50 47 51 // PSR-4 52 /** 53 * @var array[] 54 * @psalm-var array<string, array<string, int>> 55 */ 48 56 private $prefixLengthsPsr4 = array(); 57 /** 58 * @var array[] 59 * @psalm-var array<string, array<int, string>> 60 */ 49 61 private $prefixDirsPsr4 = array(); 62 /** 63 * @var array[] 64 * @psalm-var array<string, string> 65 */ 50 66 private $fallbackDirsPsr4 = array(); 51 67 52 68 // PSR-0 69 /** 70 * @var array[] 71 * @psalm-var array<string, array<string, string[]>> 72 */ 53 73 private $prefixesPsr0 = array(); 74 /** 75 * @var array[] 76 * @psalm-var array<string, string> 77 */ 54 78 private $fallbackDirsPsr0 = array(); 55 79 80 /** @var bool */ 56 81 private $useIncludePath = false; 82 83 /** 84 * @var string[] 85 * @psalm-var array<string, string> 86 */ 57 87 private $classMap = array(); 88 89 /** @var bool */ 58 90 private $classMapAuthoritative = false; 91 92 /** 93 * @var bool[] 94 * @psalm-var array<string, bool> 95 */ 59 96 private $missingClasses = array(); 97 98 /** @var ?string */ 60 99 private $apcuPrefix; 61 100 101 /** 102 * @var self[] 103 */ 62 104 private static $registeredLoaders = array(); 63 105 106 /** 107 * @param ?string $vendorDir 108 */ 64 109 public function __construct($vendorDir = null) 65 110 { 66 111 $this->vendorDir = $vendorDir; 67 } 68 112 self::initializeIncludeClosure(); 113 } 114 115 /** 116 * @return string[] 117 */ 69 118 public function getPrefixes() 70 119 { … … 76 125 } 77 126 127 /** 128 * @return array[] 129 * @psalm-return array<string, array<int, string>> 130 */ 78 131 public function getPrefixesPsr4() 79 132 { … … 81 134 } 82 135 136 /** 137 * @return array[] 138 * @psalm-return array<string, string> 139 */ 83 140 public function getFallbackDirs() 84 141 { … … 86 143 } 87 144 145 /** 146 * @return array[] 147 * @psalm-return array<string, string> 148 */ 88 149 public function getFallbackDirsPsr4() 89 150 { … … 91 152 } 92 153 154 /** 155 * @return string[] Array of classname => path 156 * @psalm-return array<string, string> 157 */ 93 158 public function getClassMap() 94 159 { … … 97 162 98 163 /** 99 * @param array $classMap Class to filename map 164 * @param string[] $classMap Class to filename map 165 * @psalm-param array<string, string> $classMap 166 * 167 * @return void 100 168 */ 101 169 public function addClassMap(array $classMap) … … 112 180 * appending or prepending to the ones previously set for this prefix. 113 181 * 114 * @param string $prefix The prefix 115 * @param array|string $paths The PSR-0 root directories 116 * @param bool $prepend Whether to prepend the directories 182 * @param string $prefix The prefix 183 * @param string[]|string $paths The PSR-0 root directories 184 * @param bool $prepend Whether to prepend the directories 185 * 186 * @return void 117 187 */ 118 188 public function add($prefix, $paths, $prepend = false) … … 157 227 * appending or prepending to the ones previously set for this namespace. 158 228 * 159 * @param string $prefix The prefix/namespace, with trailing '\\'160 * @param array|string $paths The PSR-4 base directories161 * @param bool $prepend Whether to prepend the directories229 * @param string $prefix The prefix/namespace, with trailing '\\' 230 * @param string[]|string $paths The PSR-4 base directories 231 * @param bool $prepend Whether to prepend the directories 162 232 * 163 233 * @throws \InvalidArgumentException 234 * 235 * @return void 164 236 */ 165 237 public function addPsr4($prefix, $paths, $prepend = false) … … 205 277 * replacing any others previously set for this prefix. 206 278 * 207 * @param string $prefix The prefix 208 * @param array|string $paths The PSR-0 base directories 279 * @param string $prefix The prefix 280 * @param string[]|string $paths The PSR-0 base directories 281 * 282 * @return void 209 283 */ 210 284 public function set($prefix, $paths) … … 221 295 * replacing any others previously set for this namespace. 222 296 * 223 * @param string $prefix The prefix/namespace, with trailing '\\'224 * @param array|string $paths The PSR-4 base directories297 * @param string $prefix The prefix/namespace, with trailing '\\' 298 * @param string[]|string $paths The PSR-4 base directories 225 299 * 226 300 * @throws \InvalidArgumentException 301 * 302 * @return void 227 303 */ 228 304 public function setPsr4($prefix, $paths) … … 244 320 * 245 321 * @param bool $useIncludePath 322 * 323 * @return void 246 324 */ 247 325 public function setUseIncludePath($useIncludePath) … … 266 344 * 267 345 * @param bool $classMapAuthoritative 346 * 347 * @return void 268 348 */ 269 349 public function setClassMapAuthoritative($classMapAuthoritative) … … 286 366 * 287 367 * @param string|null $apcuPrefix 368 * 369 * @return void 288 370 */ 289 371 public function setApcuPrefix($apcuPrefix) … … 306 388 * 307 389 * @param bool $prepend Whether to prepend the autoloader or not 390 * 391 * @return void 308 392 */ 309 393 public function register($prepend = false) … … 325 409 /** 326 410 * Unregisters this instance as an autoloader. 411 * 412 * @return void 327 413 */ 328 414 public function unregister() … … 344 430 { 345 431 if ($file = $this->findFile($class)) { 346 includeFile($file); 432 $includeFile = self::$includeFile; 433 $includeFile($file); 347 434 348 435 return true; … … 404 491 } 405 492 493 /** 494 * @param string $class 495 * @param string $ext 496 * @return string|false 497 */ 406 498 private function findFileWithExtension($class, $ext) 407 499 { … … 469 561 return false; 470 562 } 563 564 /** 565 * @return void 566 */ 567 private static function initializeIncludeClosure() 568 { 569 if (self::$includeFile !== null) { 570 return; 571 } 572 573 /** 574 * Scope isolated include. 575 * 576 * Prevents access to $this/self from included files. 577 * 578 * @param string $file 579 * @return void 580 */ 581 self::$includeFile = \Closure::bind(static function($file) { 582 include $file; 583 }, null, null); 584 } 471 585 } 472 473 /**474 * Scope isolated include.475 *476 * Prevents access to $this/self from included files.477 */478 function includeFile($file)479 {480 include $file;481 } -
shortcode-options/trunk/vendor/composer/InstalledVersions.php
r2838290 r2907790 21 21 * See also https://getcomposer.org/doc/07-runtime.md#installed-versions 22 22 * 23 * To require it's presence, you can require `composer-runtime-api ^2.0` 23 * To require its presence, you can require `composer-runtime-api ^2.0` 24 * 25 * @final 24 26 */ 25 27 class InstalledVersions 26 28 { 29 /** 30 * @var mixed[]|null 31 * @psalm-var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}|array{}|null 32 */ 27 33 private static $installed; 34 35 /** 36 * @var bool|null 37 */ 28 38 private static $canGetVendors; 39 40 /** 41 * @var array[] 42 * @psalm-var array<string, array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}> 43 */ 29 44 private static $installedByVendor = array(); 30 45 … … 84 99 foreach (self::getInstalled() as $installed) { 85 100 if (isset($installed['versions'][$packageName])) { 86 return $includeDevRequirements || empty($installed['versions'][$packageName]['dev_requirement']);101 return $includeDevRequirements || !isset($installed['versions'][$packageName]['dev_requirement']) || $installed['versions'][$packageName]['dev_requirement'] === false; 87 102 } 88 103 } … … 105 120 public static function satisfies(VersionParser $parser, $packageName, $constraint) 106 121 { 107 $constraint = $parser->parseConstraints( $constraint);122 $constraint = $parser->parseConstraints((string) $constraint); 108 123 $provided = $parser->parseConstraints(self::getVersionRanges($packageName)); 109 124 … … 229 244 /** 230 245 * @return array 231 * @psalm-return array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string}246 * @psalm-return array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool} 232 247 */ 233 248 public static function getRootPackage() … … 243 258 * @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect. 244 259 * @return array[] 245 * @psalm-return array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string}>}260 * @psalm-return array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} 246 261 */ 247 262 public static function getRawData() … … 266 281 * 267 282 * @return array[] 268 * @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string}>}>283 * @psalm-return list<array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}> 269 284 */ 270 285 public static function getAllRawData() … … 289 304 * @return void 290 305 * 291 * @psalm-param array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string}>} $data306 * @psalm-param array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $data 292 307 */ 293 308 public static function reload($data) … … 299 314 /** 300 315 * @return array[] 301 * @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string}>}>316 * @psalm-return list<array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}> 302 317 */ 303 318 private static function getInstalled() … … 314 329 $installed[] = self::$installedByVendor[$vendorDir]; 315 330 } elseif (is_file($vendorDir.'/composer/installed.php')) { 316 $installed[] = self::$installedByVendor[$vendorDir] = require $vendorDir.'/composer/installed.php'; 331 /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */ 332 $required = require $vendorDir.'/composer/installed.php'; 333 $installed[] = self::$installedByVendor[$vendorDir] = $required; 317 334 if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) { 318 335 self::$installed = $installed[count($installed) - 1]; … … 326 343 // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937 327 344 if (substr(__DIR__, -8, 1) !== 'C') { 328 self::$installed = require __DIR__ . '/installed.php'; 345 /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */ 346 $required = require __DIR__ . '/installed.php'; 347 self::$installed = $required; 329 348 } else { 330 349 self::$installed = array(); 331 350 } 332 351 } 333 $installed[] = self::$installed; 352 353 if (self::$installed !== array()) { 354 $installed[] = self::$installed; 355 } 334 356 335 357 return $installed; -
shortcode-options/trunk/vendor/composer/autoload_classmap.php
r2838290 r2907790 3 3 // autoload_classmap.php @generated by Composer 4 4 5 $vendorDir = dirname( dirname(__FILE__));5 $vendorDir = dirname(__DIR__); 6 6 $baseDir = dirname($vendorDir); 7 7 8 8 return array( 9 9 'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php', 10 'ShortcodeOptions\\Lang' => $baseDir . '/src/ShortcodeOptions/Lang.php', 10 11 'ShortcodeOptions\\Plugin' => $baseDir . '/src/ShortcodeOptions/Plugin.php', 11 12 'ShortcodeOptions\\Traits\\Singleton' => $baseDir . '/src/ShortcodeOptions/Traits/Singleton.php', -
shortcode-options/trunk/vendor/composer/autoload_namespaces.php
r2838290 r2907790 3 3 // autoload_namespaces.php @generated by Composer 4 4 5 $vendorDir = dirname( dirname(__FILE__));5 $vendorDir = dirname(__DIR__); 6 6 $baseDir = dirname($vendorDir); 7 7 -
shortcode-options/trunk/vendor/composer/autoload_psr4.php
r2838290 r2907790 3 3 // autoload_psr4.php @generated by Composer 4 4 5 $vendorDir = dirname( dirname(__FILE__));5 $vendorDir = dirname(__DIR__); 6 6 $baseDir = dirname($vendorDir); 7 7 -
shortcode-options/trunk/vendor/composer/autoload_real.php
r2838290 r2907790 3 3 // autoload_real.php @generated by Composer 4 4 5 class ComposerAutoloaderInit 5adac176bff846fbca7cee73ceb1525c5 class ComposerAutoloaderInit465f3ce075f6414feb18ddf48082d5de 6 6 { 7 7 private static $loader; … … 25 25 require __DIR__ . '/platform_check.php'; 26 26 27 spl_autoload_register(array('ComposerAutoloaderInit 5adac176bff846fbca7cee73ceb1525c', 'loadClassLoader'), true, true);28 self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname( \dirname(__FILE__)));29 spl_autoload_unregister(array('ComposerAutoloaderInit 5adac176bff846fbca7cee73ceb1525c', 'loadClassLoader'));27 spl_autoload_register(array('ComposerAutoloaderInit465f3ce075f6414feb18ddf48082d5de', 'loadClassLoader'), true, true); 28 self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); 29 spl_autoload_unregister(array('ComposerAutoloaderInit465f3ce075f6414feb18ddf48082d5de', 'loadClassLoader')); 30 30 31 $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); 32 if ($useStaticLoader) { 33 require __DIR__ . '/autoload_static.php'; 34 35 call_user_func(\Composer\Autoload\ComposerStaticInit5adac176bff846fbca7cee73ceb1525c::getInitializer($loader)); 36 } else { 37 $map = require __DIR__ . '/autoload_namespaces.php'; 38 foreach ($map as $namespace => $path) { 39 $loader->set($namespace, $path); 40 } 41 42 $map = require __DIR__ . '/autoload_psr4.php'; 43 foreach ($map as $namespace => $path) { 44 $loader->setPsr4($namespace, $path); 45 } 46 47 $classMap = require __DIR__ . '/autoload_classmap.php'; 48 if ($classMap) { 49 $loader->addClassMap($classMap); 50 } 51 } 31 require __DIR__ . '/autoload_static.php'; 32 call_user_func(\Composer\Autoload\ComposerStaticInit465f3ce075f6414feb18ddf48082d5de::getInitializer($loader)); 52 33 53 34 $loader->register(true); -
shortcode-options/trunk/vendor/composer/autoload_static.php
r2838290 r2907790 5 5 namespace Composer\Autoload; 6 6 7 class ComposerStaticInit 5adac176bff846fbca7cee73ceb1525c7 class ComposerStaticInit465f3ce075f6414feb18ddf48082d5de 8 8 { 9 9 public static $prefixLengthsPsr4 = array ( … … 23 23 public static $classMap = array ( 24 24 'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php', 25 'ShortcodeOptions\\Lang' => __DIR__ . '/../..' . '/src/ShortcodeOptions/Lang.php', 25 26 'ShortcodeOptions\\Plugin' => __DIR__ . '/../..' . '/src/ShortcodeOptions/Plugin.php', 26 27 'ShortcodeOptions\\Traits\\Singleton' => __DIR__ . '/../..' . '/src/ShortcodeOptions/Traits/Singleton.php', … … 30 31 { 31 32 return \Closure::bind(function () use ($loader) { 32 $loader->prefixLengthsPsr4 = ComposerStaticInit 5adac176bff846fbca7cee73ceb1525c::$prefixLengthsPsr4;33 $loader->prefixDirsPsr4 = ComposerStaticInit 5adac176bff846fbca7cee73ceb1525c::$prefixDirsPsr4;34 $loader->classMap = ComposerStaticInit 5adac176bff846fbca7cee73ceb1525c::$classMap;33 $loader->prefixLengthsPsr4 = ComposerStaticInit465f3ce075f6414feb18ddf48082d5de::$prefixLengthsPsr4; 34 $loader->prefixDirsPsr4 = ComposerStaticInit465f3ce075f6414feb18ddf48082d5de::$prefixDirsPsr4; 35 $loader->classMap = ComposerStaticInit465f3ce075f6414feb18ddf48082d5de::$classMap; 35 36 36 37 }, null, ClassLoader::class); -
shortcode-options/trunk/vendor/composer/installed.php
r2838290 r2907790 1 1 <?php return array( 2 2 'root' => array( 3 'pretty_version' => '2.0.13.x-dev', 4 'version' => '2.0.13.9999999-dev', 3 'name' => 'devuri/shortcode-options', 4 'pretty_version' => 'dev-master', 5 'version' => 'dev-master', 6 'reference' => '1c0a67093e1e649558840ddab87ebd76ddb17eee', 5 7 'type' => 'library', 6 8 'install_path' => __DIR__ . '/../../', 7 9 'aliases' => array(), 8 'reference' => '46a3b4a2db84929093e754381c2e3dda930c80a2',9 'name' => 'devuri/shortcode-options',10 10 'dev' => false, 11 11 ), 12 12 'versions' => array( 13 13 'devuri/shortcode-options' => array( 14 'pretty_version' => '2.0.13.x-dev', 15 'version' => '2.0.13.9999999-dev', 14 'pretty_version' => 'dev-master', 15 'version' => 'dev-master', 16 'reference' => '1c0a67093e1e649558840ddab87ebd76ddb17eee', 16 17 'type' => 'library', 17 18 'install_path' => __DIR__ . '/../../', 18 19 'aliases' => array(), 19 'reference' => '46a3b4a2db84929093e754381c2e3dda930c80a2',20 20 'dev_requirement' => false, 21 21 ),
Note: See TracChangeset
for help on using the changeset viewer.