Changeset 3339097
- Timestamp:
- 08/04/2025 03:04:52 PM (8 months ago)
- Location:
- disable-media-pages
- Files:
-
- 26 edited
- 1 copied
-
tags/4.0.0 (copied) (copied from disable-media-pages/trunk)
-
tags/4.0.0/README.md (modified) (1 diff)
-
tags/4.0.0/composer.json (modified) (1 diff)
-
tags/4.0.0/disable-media-pages.php (modified) (1 diff)
-
tags/4.0.0/readme.txt (modified) (2 diffs)
-
tags/4.0.0/vendor/autoload.php (modified) (1 diff)
-
tags/4.0.0/vendor/composer/ClassLoader.php (modified) (25 diffs)
-
tags/4.0.0/vendor/composer/InstalledVersions.php (modified) (12 diffs)
-
tags/4.0.0/vendor/composer/autoload_classmap.php (modified) (1 diff)
-
tags/4.0.0/vendor/composer/autoload_namespaces.php (modified) (1 diff)
-
tags/4.0.0/vendor/composer/autoload_psr4.php (modified) (1 diff)
-
tags/4.0.0/vendor/composer/autoload_real.php (modified) (2 diffs)
-
tags/4.0.0/vendor/composer/autoload_static.php (modified) (2 diffs)
-
tags/4.0.0/vendor/composer/installed.php (modified) (1 diff)
-
trunk/README.md (modified) (1 diff)
-
trunk/composer.json (modified) (1 diff)
-
trunk/disable-media-pages.php (modified) (1 diff)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/vendor/autoload.php (modified) (1 diff)
-
trunk/vendor/composer/ClassLoader.php (modified) (25 diffs)
-
trunk/vendor/composer/InstalledVersions.php (modified) (12 diffs)
-
trunk/vendor/composer/autoload_classmap.php (modified) (1 diff)
-
trunk/vendor/composer/autoload_namespaces.php (modified) (1 diff)
-
trunk/vendor/composer/autoload_psr4.php (modified) (1 diff)
-
trunk/vendor/composer/autoload_real.php (modified) (2 diffs)
-
trunk/vendor/composer/autoload_static.php (modified) (2 diffs)
-
trunk/vendor/composer/installed.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
disable-media-pages/tags/4.0.0/README.md
r3059109 r3339097 57 57 ## Requirements 58 58 59 * WordPress 5.2or later60 * PHP 7.1or later59 * WordPress 6.0 or later 60 * PHP 8.0 or later 61 61 62 62 ## Installation -
disable-media-pages/tags/4.0.0/composer.json
r3057803 r3339097 13 13 }, 14 14 "require-dev": { 15 "lucatume/wp-browser": "3.2.3", 16 "codeception/module-asserts": "^1.3", 17 "codeception/module-phpbrowser": "^1.0", 18 "codeception/module-webdriver": "^1.2", 19 "codeception/module-db": "^1.1", 20 "codeception/module-filesystem": "^1.0", 21 "codeception/module-cli": "^1.1", 22 "codeception/util-universalframework": "^1.0", 23 "wp-cli/wp-cli-bundle": "^2.5", 15 "lucatume/wp-browser": "^4.0", 24 16 "codeception/c3": "^2.6" 25 17 }, -
disable-media-pages/tags/4.0.0/disable-media-pages.php
r3125327 r3339097 6 6 * Author: Johannes Siipola 7 7 * Author URI: https://siipo.la 8 * Version: 3.1.38 * Version: 4.0.0 9 9 * License: GPL v2 or later 10 10 * Text Domain: disable-media-pages -
disable-media-pages/tags/4.0.0/readme.txt
r3125327 r3339097 3 3 Tags: remove, disable, hide, media, attachment, image, permalink 4 4 Contributors: joppuyo 5 Requires at least: 5.26 Tested up to: 6. 67 Requires PHP: 7.15 Requires at least: 6.0 6 Tested up to: 6.8 7 Requires PHP: 8.0 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html 10 10 Donate link: https://github.com/sponsors/joppuyo 11 Stable tag: 3.1.311 Stable tag: 4.0.0 12 12 13 13 Completely remove "attachment" pages for WordPress media. Improve SEO and prevent conflicts between page and image permalinks. … … 104 104 105 105 ## Changelog 106 107 ### 4.0.0 (2025‐08‐04) 108 * Breaking change: Minimum supported WordPress version is now 6.0 and the minimum PHP version is now 8.0. This is because wp-browser, which is used for testing no longer supports PHP 7. If you are using an older version of WordPress or PHP, please use the last 3.x version of this plugin. 109 * Fix: Tested in WP 6.8 106 110 107 111 ### 3.1.3 (2024‐07‐25) -
disable-media-pages/tags/4.0.0/vendor/autoload.php
r3125327 r3339097 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 throw new RuntimeException($err); 18 } 19 5 20 require_once __DIR__ . '/composer/autoload_real.php'; 6 21 7 return ComposerAutoloaderInit 04671f280aada7196646eb7bb7269f25::getLoader();22 return ComposerAutoloaderInit5300e49fe86bd50f95b88ce4db036dcb::getLoader(); -
disable-media-pages/tags/4.0.0/vendor/composer/ClassLoader.php
r2653561 r3339097 43 43 class ClassLoader 44 44 { 45 /** @var ?string */ 45 /** @var \Closure(string):void */ 46 private static $includeFile; 47 48 /** @var string|null */ 46 49 private $vendorDir; 47 50 48 51 // PSR-4 49 52 /** 50 * @var array[] 51 * @psalm-var array<string, array<string, int>> 53 * @var array<string, array<string, int>> 52 54 */ 53 55 private $prefixLengthsPsr4 = array(); 54 56 /** 55 * @var array[] 56 * @psalm-var array<string, array<int, string>> 57 * @var array<string, list<string>> 57 58 */ 58 59 private $prefixDirsPsr4 = array(); 59 60 /** 60 * @var array[] 61 * @psalm-var array<string, string> 61 * @var list<string> 62 62 */ 63 63 private $fallbackDirsPsr4 = array(); … … 65 65 // PSR-0 66 66 /** 67 * @var array[] 68 * @psalm-var array<string, array<string, string[]>> 67 * List of PSR-0 prefixes 68 * 69 * Structured as array('F (first letter)' => array('Foo\Bar (full prefix)' => array('path', 'path2'))) 70 * 71 * @var array<string, array<string, list<string>>> 69 72 */ 70 73 private $prefixesPsr0 = array(); 71 74 /** 72 * @var array[] 73 * @psalm-var array<string, string> 75 * @var list<string> 74 76 */ 75 77 private $fallbackDirsPsr0 = array(); … … 79 81 80 82 /** 81 * @var string[] 82 * @psalm-var array<string, string> 83 * @var array<string, string> 83 84 */ 84 85 private $classMap = array(); … … 88 89 89 90 /** 90 * @var bool[] 91 * @psalm-var array<string, bool> 91 * @var array<string, bool> 92 92 */ 93 93 private $missingClasses = array(); 94 94 95 /** @var ?string*/95 /** @var string|null */ 96 96 private $apcuPrefix; 97 97 98 98 /** 99 * @var self[]99 * @var array<string, self> 100 100 */ 101 101 private static $registeredLoaders = array(); 102 102 103 103 /** 104 * @param ?string$vendorDir104 * @param string|null $vendorDir 105 105 */ 106 106 public function __construct($vendorDir = null) 107 107 { 108 108 $this->vendorDir = $vendorDir; 109 } 110 111 /** 112 * @return string[] 109 self::initializeIncludeClosure(); 110 } 111 112 /** 113 * @return array<string, list<string>> 113 114 */ 114 115 public function getPrefixes() … … 122 123 123 124 /** 124 * @return array[] 125 * @psalm-return array<string, array<int, string>> 125 * @return array<string, list<string>> 126 126 */ 127 127 public function getPrefixesPsr4() … … 131 131 132 132 /** 133 * @return array[] 134 * @psalm-return array<string, string> 133 * @return list<string> 135 134 */ 136 135 public function getFallbackDirs() … … 140 139 141 140 /** 142 * @return array[] 143 * @psalm-return array<string, string> 141 * @return list<string> 144 142 */ 145 143 public function getFallbackDirsPsr4() … … 149 147 150 148 /** 151 * @return string[] Array of classname => path 152 * @psalm-return array<string, string> 149 * @return array<string, string> Array of classname => path 153 150 */ 154 151 public function getClassMap() … … 158 155 159 156 /** 160 * @param string[] $classMap Class to filename map 161 * @psalm-param array<string, string> $classMap 157 * @param array<string, string> $classMap Class to filename map 162 158 * 163 159 * @return void … … 176 172 * appending or prepending to the ones previously set for this prefix. 177 173 * 178 * @param string $prefix The prefix179 * @param string[]|string $paths The PSR-0 root directories180 * @param bool $prepend Whether to prepend the directories174 * @param string $prefix The prefix 175 * @param list<string>|string $paths The PSR-0 root directories 176 * @param bool $prepend Whether to prepend the directories 181 177 * 182 178 * @return void … … 184 180 public function add($prefix, $paths, $prepend = false) 185 181 { 182 $paths = (array) $paths; 186 183 if (!$prefix) { 187 184 if ($prepend) { 188 185 $this->fallbackDirsPsr0 = array_merge( 189 (array)$paths,186 $paths, 190 187 $this->fallbackDirsPsr0 191 188 ); … … 193 190 $this->fallbackDirsPsr0 = array_merge( 194 191 $this->fallbackDirsPsr0, 195 (array)$paths192 $paths 196 193 ); 197 194 } … … 202 199 $first = $prefix[0]; 203 200 if (!isset($this->prefixesPsr0[$first][$prefix])) { 204 $this->prefixesPsr0[$first][$prefix] = (array)$paths;201 $this->prefixesPsr0[$first][$prefix] = $paths; 205 202 206 203 return; … … 208 205 if ($prepend) { 209 206 $this->prefixesPsr0[$first][$prefix] = array_merge( 210 (array)$paths,207 $paths, 211 208 $this->prefixesPsr0[$first][$prefix] 212 209 ); … … 214 211 $this->prefixesPsr0[$first][$prefix] = array_merge( 215 212 $this->prefixesPsr0[$first][$prefix], 216 (array)$paths213 $paths 217 214 ); 218 215 } … … 223 220 * appending or prepending to the ones previously set for this namespace. 224 221 * 225 * @param string $prefix The prefix/namespace, with trailing '\\'226 * @param string[]|string $paths The PSR-4 base directories227 * @param bool $prepend Whether to prepend the directories222 * @param string $prefix The prefix/namespace, with trailing '\\' 223 * @param list<string>|string $paths The PSR-4 base directories 224 * @param bool $prepend Whether to prepend the directories 228 225 * 229 226 * @throws \InvalidArgumentException … … 233 230 public function addPsr4($prefix, $paths, $prepend = false) 234 231 { 232 $paths = (array) $paths; 235 233 if (!$prefix) { 236 234 // Register directories for the root namespace. 237 235 if ($prepend) { 238 236 $this->fallbackDirsPsr4 = array_merge( 239 (array)$paths,237 $paths, 240 238 $this->fallbackDirsPsr4 241 239 ); … … 243 241 $this->fallbackDirsPsr4 = array_merge( 244 242 $this->fallbackDirsPsr4, 245 (array)$paths243 $paths 246 244 ); 247 245 } … … 253 251 } 254 252 $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; 255 $this->prefixDirsPsr4[$prefix] = (array)$paths;253 $this->prefixDirsPsr4[$prefix] = $paths; 256 254 } elseif ($prepend) { 257 255 // Prepend directories for an already registered namespace. 258 256 $this->prefixDirsPsr4[$prefix] = array_merge( 259 (array)$paths,257 $paths, 260 258 $this->prefixDirsPsr4[$prefix] 261 259 ); … … 264 262 $this->prefixDirsPsr4[$prefix] = array_merge( 265 263 $this->prefixDirsPsr4[$prefix], 266 (array)$paths264 $paths 267 265 ); 268 266 } … … 273 271 * replacing any others previously set for this prefix. 274 272 * 275 * @param string $prefix The prefix276 * @param string[]|string $paths The PSR-0 base directories273 * @param string $prefix The prefix 274 * @param list<string>|string $paths The PSR-0 base directories 277 275 * 278 276 * @return void … … 291 289 * replacing any others previously set for this namespace. 292 290 * 293 * @param string $prefix The prefix/namespace, with trailing '\\'294 * @param string[]|string $paths The PSR-4 base directories291 * @param string $prefix The prefix/namespace, with trailing '\\' 292 * @param list<string>|string $paths The PSR-4 base directories 295 293 * 296 294 * @throws \InvalidArgumentException … … 426 424 { 427 425 if ($file = $this->findFile($class)) { 428 includeFile($file); 426 $includeFile = self::$includeFile; 427 $includeFile($file); 429 428 430 429 return true; … … 477 476 478 477 /** 479 * Returns the currently registered loaders indexed by their corresponding vendor directories.480 * 481 * @return self[]478 * Returns the currently registered loaders keyed by their corresponding vendor directories. 479 * 480 * @return array<string, self> 482 481 */ 483 482 public static function getRegisteredLoaders() … … 556 555 return false; 557 556 } 557 558 /** 559 * @return void 560 */ 561 private static function initializeIncludeClosure() 562 { 563 if (self::$includeFile !== null) { 564 return; 565 } 566 567 /** 568 * Scope isolated include. 569 * 570 * Prevents access to $this/self from included files. 571 * 572 * @param string $file 573 * @return void 574 */ 575 self::$includeFile = \Closure::bind(static function($file) { 576 include $file; 577 }, null, null); 578 } 558 579 } 559 560 /**561 * Scope isolated include.562 *563 * Prevents access to $this/self from included files.564 *565 * @param string $file566 * @return void567 * @private568 */569 function includeFile($file)570 {571 include $file;572 } -
disable-media-pages/tags/4.0.0/vendor/composer/InstalledVersions.php
r2993018 r3339097 22 22 * 23 23 * To require its presence, you can require `composer-runtime-api ^2.0` 24 * 25 * @final 24 26 */ 25 27 class InstalledVersions 26 28 { 27 29 /** 30 * @var string|null if set (by reflection by Composer), this should be set to the path where this class is being copied to 31 * @internal 32 */ 33 private static $selfDir = null; 34 35 /** 28 36 * @var mixed[]|null 29 * @psalm-var array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}|array{}|null37 * @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 30 38 */ 31 39 private static $installed; 32 40 33 41 /** 42 * @var bool 43 */ 44 private static $installedIsLocalDir; 45 46 /** 34 47 * @var bool|null 35 48 */ … … 38 51 /** 39 52 * @var array[] 40 * @psalm-var array<string, array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>53 * @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[]}>}> 41 54 */ 42 55 private static $installedByVendor = array(); … … 97 110 foreach (self::getInstalled() as $installed) { 98 111 if (isset($installed['versions'][$packageName])) { 99 return $includeDevRequirements || empty($installed['versions'][$packageName]['dev_requirement']);112 return $includeDevRequirements || !isset($installed['versions'][$packageName]['dev_requirement']) || $installed['versions'][$packageName]['dev_requirement'] === false; 100 113 } 101 114 } … … 118 131 public static function satisfies(VersionParser $parser, $packageName, $constraint) 119 132 { 120 $constraint = $parser->parseConstraints( $constraint);133 $constraint = $parser->parseConstraints((string) $constraint); 121 134 $provided = $parser->parseConstraints(self::getVersionRanges($packageName)); 122 135 … … 242 255 /** 243 256 * @return array 244 * @psalm-return array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}257 * @psalm-return array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool} 245 258 */ 246 259 public static function getRootPackage() … … 256 269 * @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. 257 270 * @return array[] 258 * @psalm-return array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}271 * @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[]}>} 259 272 */ 260 273 public static function getRawData() … … 279 292 * 280 293 * @return array[] 281 * @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>294 * @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[]}>}> 282 295 */ 283 296 public static function getAllRawData() … … 302 315 * @return void 303 316 * 304 * @psalm-param array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>} $data317 * @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 305 318 */ 306 319 public static function reload($data) … … 308 321 self::$installed = $data; 309 322 self::$installedByVendor = array(); 323 324 // when using reload, we disable the duplicate protection to ensure that self::$installed data is 325 // always returned, but we cannot know whether it comes from the installed.php in __DIR__ or not, 326 // so we have to assume it does not, and that may result in duplicate data being returned when listing 327 // all installed packages for example 328 self::$installedIsLocalDir = false; 329 } 330 331 /** 332 * @return string 333 */ 334 private static function getSelfDir() 335 { 336 if (self::$selfDir === null) { 337 self::$selfDir = strtr(__DIR__, '\\', '/'); 338 } 339 340 return self::$selfDir; 310 341 } 311 342 312 343 /** 313 344 * @return array[] 314 * @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>345 * @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[]}>}> 315 346 */ 316 347 private static function getInstalled() … … 321 352 322 353 $installed = array(); 354 $copiedLocalDir = false; 323 355 324 356 if (self::$canGetVendors) { 357 $selfDir = self::getSelfDir(); 325 358 foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) { 359 $vendorDir = strtr($vendorDir, '\\', '/'); 326 360 if (isset(self::$installedByVendor[$vendorDir])) { 327 361 $installed[] = self::$installedByVendor[$vendorDir]; … … 329 363 /** @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 */ 330 364 $required = require $vendorDir.'/composer/installed.php'; 331 $installed[] = self::$installedByVendor[$vendorDir] = $required; 332 if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) { 333 self::$installed = $installed[count($installed) - 1]; 365 self::$installedByVendor[$vendorDir] = $required; 366 $installed[] = $required; 367 if (self::$installed === null && $vendorDir.'/composer' === $selfDir) { 368 self::$installed = $required; 369 self::$installedIsLocalDir = true; 334 370 } 371 } 372 if (self::$installedIsLocalDir && $vendorDir.'/composer' === $selfDir) { 373 $copiedLocalDir = true; 335 374 } 336 375 } … … 349 388 } 350 389 351 if (self::$installed !== array() ) {390 if (self::$installed !== array() && !$copiedLocalDir) { 352 391 $installed[] = self::$installed; 353 392 } -
disable-media-pages/tags/4.0.0/vendor/composer/autoload_classmap.php
r3057803 r3339097 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 -
disable-media-pages/tags/4.0.0/vendor/composer/autoload_namespaces.php
r2448679 r3339097 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 -
disable-media-pages/tags/4.0.0/vendor/composer/autoload_psr4.php
r2668395 r3339097 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 -
disable-media-pages/tags/4.0.0/vendor/composer/autoload_real.php
r3125327 r3339097 3 3 // autoload_real.php @generated by Composer 4 4 5 class ComposerAutoloaderInit 04671f280aada7196646eb7bb7269f255 class ComposerAutoloaderInit5300e49fe86bd50f95b88ce4db036dcb 6 6 { 7 7 private static $loader; … … 23 23 } 24 24 25 spl_autoload_register(array('ComposerAutoloaderInit 04671f280aada7196646eb7bb7269f25', 'loadClassLoader'), true, true);26 self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname( \dirname(__FILE__)));27 spl_autoload_unregister(array('ComposerAutoloaderInit 04671f280aada7196646eb7bb7269f25', 'loadClassLoader'));25 spl_autoload_register(array('ComposerAutoloaderInit5300e49fe86bd50f95b88ce4db036dcb', 'loadClassLoader'), true, true); 26 self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); 27 spl_autoload_unregister(array('ComposerAutoloaderInit5300e49fe86bd50f95b88ce4db036dcb', 'loadClassLoader')); 28 28 29 $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); 30 if ($useStaticLoader) { 31 require __DIR__ . '/autoload_static.php'; 32 33 call_user_func(\Composer\Autoload\ComposerStaticInit04671f280aada7196646eb7bb7269f25::getInitializer($loader)); 34 } else { 35 $map = require __DIR__ . '/autoload_namespaces.php'; 36 foreach ($map as $namespace => $path) { 37 $loader->set($namespace, $path); 38 } 39 40 $map = require __DIR__ . '/autoload_psr4.php'; 41 foreach ($map as $namespace => $path) { 42 $loader->setPsr4($namespace, $path); 43 } 44 45 $classMap = require __DIR__ . '/autoload_classmap.php'; 46 if ($classMap) { 47 $loader->addClassMap($classMap); 48 } 49 } 29 require __DIR__ . '/autoload_static.php'; 30 call_user_func(\Composer\Autoload\ComposerStaticInit5300e49fe86bd50f95b88ce4db036dcb::getInitializer($loader)); 50 31 51 32 $loader->register(true); -
disable-media-pages/tags/4.0.0/vendor/composer/autoload_static.php
r3125327 r3339097 5 5 namespace Composer\Autoload; 6 6 7 class ComposerStaticInit 04671f280aada7196646eb7bb7269f257 class ComposerStaticInit5300e49fe86bd50f95b88ce4db036dcb 8 8 { 9 9 public static $prefixLengthsPsr4 = array ( … … 34 34 { 35 35 return \Closure::bind(function () use ($loader) { 36 $loader->prefixLengthsPsr4 = ComposerStaticInit 04671f280aada7196646eb7bb7269f25::$prefixLengthsPsr4;37 $loader->prefixDirsPsr4 = ComposerStaticInit 04671f280aada7196646eb7bb7269f25::$prefixDirsPsr4;38 $loader->classMap = ComposerStaticInit 04671f280aada7196646eb7bb7269f25::$classMap;36 $loader->prefixLengthsPsr4 = ComposerStaticInit5300e49fe86bd50f95b88ce4db036dcb::$prefixLengthsPsr4; 37 $loader->prefixDirsPsr4 = ComposerStaticInit5300e49fe86bd50f95b88ce4db036dcb::$prefixDirsPsr4; 38 $loader->classMap = ComposerStaticInit5300e49fe86bd50f95b88ce4db036dcb::$classMap; 39 39 40 40 }, null, ClassLoader::class); -
disable-media-pages/tags/4.0.0/vendor/composer/installed.php
r3125327 r3339097 1 1 <?php return array( 2 2 'root' => array( 3 'pretty_version' => 'v3.1.3', 4 'version' => '3.1.3.0', 3 'name' => 'joppuyo/disable-media-pages', 4 'pretty_version' => 'v4.0.0', 5 'version' => '4.0.0.0', 6 'reference' => '715ff3c7eddfd8bf5044c8135084404faec80181', 5 7 'type' => 'library', 6 8 'install_path' => __DIR__ . '/../../', 7 9 'aliases' => array(), 8 'reference' => 'cdaae68e2e09834c1af02e6a62a0fdbc4d81986b',9 'name' => 'joppuyo/disable-media-pages',10 10 'dev' => false, 11 11 ), 12 12 'versions' => array( 13 13 'joppuyo/disable-media-pages' => array( 14 'pretty_version' => 'v3.1.3', 15 'version' => '3.1.3.0', 14 'pretty_version' => 'v4.0.0', 15 'version' => '4.0.0.0', 16 'reference' => '715ff3c7eddfd8bf5044c8135084404faec80181', 16 17 'type' => 'library', 17 18 'install_path' => __DIR__ . '/../../', 18 19 'aliases' => array(), 19 'reference' => 'cdaae68e2e09834c1af02e6a62a0fdbc4d81986b',20 20 'dev_requirement' => false, 21 21 ), -
disable-media-pages/trunk/README.md
r3059109 r3339097 57 57 ## Requirements 58 58 59 * WordPress 5.2or later60 * PHP 7.1or later59 * WordPress 6.0 or later 60 * PHP 8.0 or later 61 61 62 62 ## Installation -
disable-media-pages/trunk/composer.json
r3057803 r3339097 13 13 }, 14 14 "require-dev": { 15 "lucatume/wp-browser": "3.2.3", 16 "codeception/module-asserts": "^1.3", 17 "codeception/module-phpbrowser": "^1.0", 18 "codeception/module-webdriver": "^1.2", 19 "codeception/module-db": "^1.1", 20 "codeception/module-filesystem": "^1.0", 21 "codeception/module-cli": "^1.1", 22 "codeception/util-universalframework": "^1.0", 23 "wp-cli/wp-cli-bundle": "^2.5", 15 "lucatume/wp-browser": "^4.0", 24 16 "codeception/c3": "^2.6" 25 17 }, -
disable-media-pages/trunk/disable-media-pages.php
r3125327 r3339097 6 6 * Author: Johannes Siipola 7 7 * Author URI: https://siipo.la 8 * Version: 3.1.38 * Version: 4.0.0 9 9 * License: GPL v2 or later 10 10 * Text Domain: disable-media-pages -
disable-media-pages/trunk/readme.txt
r3125327 r3339097 3 3 Tags: remove, disable, hide, media, attachment, image, permalink 4 4 Contributors: joppuyo 5 Requires at least: 5.26 Tested up to: 6. 67 Requires PHP: 7.15 Requires at least: 6.0 6 Tested up to: 6.8 7 Requires PHP: 8.0 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html 10 10 Donate link: https://github.com/sponsors/joppuyo 11 Stable tag: 3.1.311 Stable tag: 4.0.0 12 12 13 13 Completely remove "attachment" pages for WordPress media. Improve SEO and prevent conflicts between page and image permalinks. … … 104 104 105 105 ## Changelog 106 107 ### 4.0.0 (2025‐08‐04) 108 * Breaking change: Minimum supported WordPress version is now 6.0 and the minimum PHP version is now 8.0. This is because wp-browser, which is used for testing no longer supports PHP 7. If you are using an older version of WordPress or PHP, please use the last 3.x version of this plugin. 109 * Fix: Tested in WP 6.8 106 110 107 111 ### 3.1.3 (2024‐07‐25) -
disable-media-pages/trunk/vendor/autoload.php
r3125327 r3339097 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 throw new RuntimeException($err); 18 } 19 5 20 require_once __DIR__ . '/composer/autoload_real.php'; 6 21 7 return ComposerAutoloaderInit 04671f280aada7196646eb7bb7269f25::getLoader();22 return ComposerAutoloaderInit5300e49fe86bd50f95b88ce4db036dcb::getLoader(); -
disable-media-pages/trunk/vendor/composer/ClassLoader.php
r2653561 r3339097 43 43 class ClassLoader 44 44 { 45 /** @var ?string */ 45 /** @var \Closure(string):void */ 46 private static $includeFile; 47 48 /** @var string|null */ 46 49 private $vendorDir; 47 50 48 51 // PSR-4 49 52 /** 50 * @var array[] 51 * @psalm-var array<string, array<string, int>> 53 * @var array<string, array<string, int>> 52 54 */ 53 55 private $prefixLengthsPsr4 = array(); 54 56 /** 55 * @var array[] 56 * @psalm-var array<string, array<int, string>> 57 * @var array<string, list<string>> 57 58 */ 58 59 private $prefixDirsPsr4 = array(); 59 60 /** 60 * @var array[] 61 * @psalm-var array<string, string> 61 * @var list<string> 62 62 */ 63 63 private $fallbackDirsPsr4 = array(); … … 65 65 // PSR-0 66 66 /** 67 * @var array[] 68 * @psalm-var array<string, array<string, string[]>> 67 * List of PSR-0 prefixes 68 * 69 * Structured as array('F (first letter)' => array('Foo\Bar (full prefix)' => array('path', 'path2'))) 70 * 71 * @var array<string, array<string, list<string>>> 69 72 */ 70 73 private $prefixesPsr0 = array(); 71 74 /** 72 * @var array[] 73 * @psalm-var array<string, string> 75 * @var list<string> 74 76 */ 75 77 private $fallbackDirsPsr0 = array(); … … 79 81 80 82 /** 81 * @var string[] 82 * @psalm-var array<string, string> 83 * @var array<string, string> 83 84 */ 84 85 private $classMap = array(); … … 88 89 89 90 /** 90 * @var bool[] 91 * @psalm-var array<string, bool> 91 * @var array<string, bool> 92 92 */ 93 93 private $missingClasses = array(); 94 94 95 /** @var ?string*/95 /** @var string|null */ 96 96 private $apcuPrefix; 97 97 98 98 /** 99 * @var self[]99 * @var array<string, self> 100 100 */ 101 101 private static $registeredLoaders = array(); 102 102 103 103 /** 104 * @param ?string$vendorDir104 * @param string|null $vendorDir 105 105 */ 106 106 public function __construct($vendorDir = null) 107 107 { 108 108 $this->vendorDir = $vendorDir; 109 } 110 111 /** 112 * @return string[] 109 self::initializeIncludeClosure(); 110 } 111 112 /** 113 * @return array<string, list<string>> 113 114 */ 114 115 public function getPrefixes() … … 122 123 123 124 /** 124 * @return array[] 125 * @psalm-return array<string, array<int, string>> 125 * @return array<string, list<string>> 126 126 */ 127 127 public function getPrefixesPsr4() … … 131 131 132 132 /** 133 * @return array[] 134 * @psalm-return array<string, string> 133 * @return list<string> 135 134 */ 136 135 public function getFallbackDirs() … … 140 139 141 140 /** 142 * @return array[] 143 * @psalm-return array<string, string> 141 * @return list<string> 144 142 */ 145 143 public function getFallbackDirsPsr4() … … 149 147 150 148 /** 151 * @return string[] Array of classname => path 152 * @psalm-return array<string, string> 149 * @return array<string, string> Array of classname => path 153 150 */ 154 151 public function getClassMap() … … 158 155 159 156 /** 160 * @param string[] $classMap Class to filename map 161 * @psalm-param array<string, string> $classMap 157 * @param array<string, string> $classMap Class to filename map 162 158 * 163 159 * @return void … … 176 172 * appending or prepending to the ones previously set for this prefix. 177 173 * 178 * @param string $prefix The prefix179 * @param string[]|string $paths The PSR-0 root directories180 * @param bool $prepend Whether to prepend the directories174 * @param string $prefix The prefix 175 * @param list<string>|string $paths The PSR-0 root directories 176 * @param bool $prepend Whether to prepend the directories 181 177 * 182 178 * @return void … … 184 180 public function add($prefix, $paths, $prepend = false) 185 181 { 182 $paths = (array) $paths; 186 183 if (!$prefix) { 187 184 if ($prepend) { 188 185 $this->fallbackDirsPsr0 = array_merge( 189 (array)$paths,186 $paths, 190 187 $this->fallbackDirsPsr0 191 188 ); … … 193 190 $this->fallbackDirsPsr0 = array_merge( 194 191 $this->fallbackDirsPsr0, 195 (array)$paths192 $paths 196 193 ); 197 194 } … … 202 199 $first = $prefix[0]; 203 200 if (!isset($this->prefixesPsr0[$first][$prefix])) { 204 $this->prefixesPsr0[$first][$prefix] = (array)$paths;201 $this->prefixesPsr0[$first][$prefix] = $paths; 205 202 206 203 return; … … 208 205 if ($prepend) { 209 206 $this->prefixesPsr0[$first][$prefix] = array_merge( 210 (array)$paths,207 $paths, 211 208 $this->prefixesPsr0[$first][$prefix] 212 209 ); … … 214 211 $this->prefixesPsr0[$first][$prefix] = array_merge( 215 212 $this->prefixesPsr0[$first][$prefix], 216 (array)$paths213 $paths 217 214 ); 218 215 } … … 223 220 * appending or prepending to the ones previously set for this namespace. 224 221 * 225 * @param string $prefix The prefix/namespace, with trailing '\\'226 * @param string[]|string $paths The PSR-4 base directories227 * @param bool $prepend Whether to prepend the directories222 * @param string $prefix The prefix/namespace, with trailing '\\' 223 * @param list<string>|string $paths The PSR-4 base directories 224 * @param bool $prepend Whether to prepend the directories 228 225 * 229 226 * @throws \InvalidArgumentException … … 233 230 public function addPsr4($prefix, $paths, $prepend = false) 234 231 { 232 $paths = (array) $paths; 235 233 if (!$prefix) { 236 234 // Register directories for the root namespace. 237 235 if ($prepend) { 238 236 $this->fallbackDirsPsr4 = array_merge( 239 (array)$paths,237 $paths, 240 238 $this->fallbackDirsPsr4 241 239 ); … … 243 241 $this->fallbackDirsPsr4 = array_merge( 244 242 $this->fallbackDirsPsr4, 245 (array)$paths243 $paths 246 244 ); 247 245 } … … 253 251 } 254 252 $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; 255 $this->prefixDirsPsr4[$prefix] = (array)$paths;253 $this->prefixDirsPsr4[$prefix] = $paths; 256 254 } elseif ($prepend) { 257 255 // Prepend directories for an already registered namespace. 258 256 $this->prefixDirsPsr4[$prefix] = array_merge( 259 (array)$paths,257 $paths, 260 258 $this->prefixDirsPsr4[$prefix] 261 259 ); … … 264 262 $this->prefixDirsPsr4[$prefix] = array_merge( 265 263 $this->prefixDirsPsr4[$prefix], 266 (array)$paths264 $paths 267 265 ); 268 266 } … … 273 271 * replacing any others previously set for this prefix. 274 272 * 275 * @param string $prefix The prefix276 * @param string[]|string $paths The PSR-0 base directories273 * @param string $prefix The prefix 274 * @param list<string>|string $paths The PSR-0 base directories 277 275 * 278 276 * @return void … … 291 289 * replacing any others previously set for this namespace. 292 290 * 293 * @param string $prefix The prefix/namespace, with trailing '\\'294 * @param string[]|string $paths The PSR-4 base directories291 * @param string $prefix The prefix/namespace, with trailing '\\' 292 * @param list<string>|string $paths The PSR-4 base directories 295 293 * 296 294 * @throws \InvalidArgumentException … … 426 424 { 427 425 if ($file = $this->findFile($class)) { 428 includeFile($file); 426 $includeFile = self::$includeFile; 427 $includeFile($file); 429 428 430 429 return true; … … 477 476 478 477 /** 479 * Returns the currently registered loaders indexed by their corresponding vendor directories.480 * 481 * @return self[]478 * Returns the currently registered loaders keyed by their corresponding vendor directories. 479 * 480 * @return array<string, self> 482 481 */ 483 482 public static function getRegisteredLoaders() … … 556 555 return false; 557 556 } 557 558 /** 559 * @return void 560 */ 561 private static function initializeIncludeClosure() 562 { 563 if (self::$includeFile !== null) { 564 return; 565 } 566 567 /** 568 * Scope isolated include. 569 * 570 * Prevents access to $this/self from included files. 571 * 572 * @param string $file 573 * @return void 574 */ 575 self::$includeFile = \Closure::bind(static function($file) { 576 include $file; 577 }, null, null); 578 } 558 579 } 559 560 /**561 * Scope isolated include.562 *563 * Prevents access to $this/self from included files.564 *565 * @param string $file566 * @return void567 * @private568 */569 function includeFile($file)570 {571 include $file;572 } -
disable-media-pages/trunk/vendor/composer/InstalledVersions.php
r2993018 r3339097 22 22 * 23 23 * To require its presence, you can require `composer-runtime-api ^2.0` 24 * 25 * @final 24 26 */ 25 27 class InstalledVersions 26 28 { 27 29 /** 30 * @var string|null if set (by reflection by Composer), this should be set to the path where this class is being copied to 31 * @internal 32 */ 33 private static $selfDir = null; 34 35 /** 28 36 * @var mixed[]|null 29 * @psalm-var array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}|array{}|null37 * @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 30 38 */ 31 39 private static $installed; 32 40 33 41 /** 42 * @var bool 43 */ 44 private static $installedIsLocalDir; 45 46 /** 34 47 * @var bool|null 35 48 */ … … 38 51 /** 39 52 * @var array[] 40 * @psalm-var array<string, array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>53 * @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[]}>}> 41 54 */ 42 55 private static $installedByVendor = array(); … … 97 110 foreach (self::getInstalled() as $installed) { 98 111 if (isset($installed['versions'][$packageName])) { 99 return $includeDevRequirements || empty($installed['versions'][$packageName]['dev_requirement']);112 return $includeDevRequirements || !isset($installed['versions'][$packageName]['dev_requirement']) || $installed['versions'][$packageName]['dev_requirement'] === false; 100 113 } 101 114 } … … 118 131 public static function satisfies(VersionParser $parser, $packageName, $constraint) 119 132 { 120 $constraint = $parser->parseConstraints( $constraint);133 $constraint = $parser->parseConstraints((string) $constraint); 121 134 $provided = $parser->parseConstraints(self::getVersionRanges($packageName)); 122 135 … … 242 255 /** 243 256 * @return array 244 * @psalm-return array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}257 * @psalm-return array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool} 245 258 */ 246 259 public static function getRootPackage() … … 256 269 * @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. 257 270 * @return array[] 258 * @psalm-return array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}271 * @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[]}>} 259 272 */ 260 273 public static function getRawData() … … 279 292 * 280 293 * @return array[] 281 * @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>294 * @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[]}>}> 282 295 */ 283 296 public static function getAllRawData() … … 302 315 * @return void 303 316 * 304 * @psalm-param array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>} $data317 * @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 305 318 */ 306 319 public static function reload($data) … … 308 321 self::$installed = $data; 309 322 self::$installedByVendor = array(); 323 324 // when using reload, we disable the duplicate protection to ensure that self::$installed data is 325 // always returned, but we cannot know whether it comes from the installed.php in __DIR__ or not, 326 // so we have to assume it does not, and that may result in duplicate data being returned when listing 327 // all installed packages for example 328 self::$installedIsLocalDir = false; 329 } 330 331 /** 332 * @return string 333 */ 334 private static function getSelfDir() 335 { 336 if (self::$selfDir === null) { 337 self::$selfDir = strtr(__DIR__, '\\', '/'); 338 } 339 340 return self::$selfDir; 310 341 } 311 342 312 343 /** 313 344 * @return array[] 314 * @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>345 * @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[]}>}> 315 346 */ 316 347 private static function getInstalled() … … 321 352 322 353 $installed = array(); 354 $copiedLocalDir = false; 323 355 324 356 if (self::$canGetVendors) { 357 $selfDir = self::getSelfDir(); 325 358 foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) { 359 $vendorDir = strtr($vendorDir, '\\', '/'); 326 360 if (isset(self::$installedByVendor[$vendorDir])) { 327 361 $installed[] = self::$installedByVendor[$vendorDir]; … … 329 363 /** @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 */ 330 364 $required = require $vendorDir.'/composer/installed.php'; 331 $installed[] = self::$installedByVendor[$vendorDir] = $required; 332 if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) { 333 self::$installed = $installed[count($installed) - 1]; 365 self::$installedByVendor[$vendorDir] = $required; 366 $installed[] = $required; 367 if (self::$installed === null && $vendorDir.'/composer' === $selfDir) { 368 self::$installed = $required; 369 self::$installedIsLocalDir = true; 334 370 } 371 } 372 if (self::$installedIsLocalDir && $vendorDir.'/composer' === $selfDir) { 373 $copiedLocalDir = true; 335 374 } 336 375 } … … 349 388 } 350 389 351 if (self::$installed !== array() ) {390 if (self::$installed !== array() && !$copiedLocalDir) { 352 391 $installed[] = self::$installed; 353 392 } -
disable-media-pages/trunk/vendor/composer/autoload_classmap.php
r3057803 r3339097 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 -
disable-media-pages/trunk/vendor/composer/autoload_namespaces.php
r2448679 r3339097 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 -
disable-media-pages/trunk/vendor/composer/autoload_psr4.php
r2668395 r3339097 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 -
disable-media-pages/trunk/vendor/composer/autoload_real.php
r3125327 r3339097 3 3 // autoload_real.php @generated by Composer 4 4 5 class ComposerAutoloaderInit 04671f280aada7196646eb7bb7269f255 class ComposerAutoloaderInit5300e49fe86bd50f95b88ce4db036dcb 6 6 { 7 7 private static $loader; … … 23 23 } 24 24 25 spl_autoload_register(array('ComposerAutoloaderInit 04671f280aada7196646eb7bb7269f25', 'loadClassLoader'), true, true);26 self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname( \dirname(__FILE__)));27 spl_autoload_unregister(array('ComposerAutoloaderInit 04671f280aada7196646eb7bb7269f25', 'loadClassLoader'));25 spl_autoload_register(array('ComposerAutoloaderInit5300e49fe86bd50f95b88ce4db036dcb', 'loadClassLoader'), true, true); 26 self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); 27 spl_autoload_unregister(array('ComposerAutoloaderInit5300e49fe86bd50f95b88ce4db036dcb', 'loadClassLoader')); 28 28 29 $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); 30 if ($useStaticLoader) { 31 require __DIR__ . '/autoload_static.php'; 32 33 call_user_func(\Composer\Autoload\ComposerStaticInit04671f280aada7196646eb7bb7269f25::getInitializer($loader)); 34 } else { 35 $map = require __DIR__ . '/autoload_namespaces.php'; 36 foreach ($map as $namespace => $path) { 37 $loader->set($namespace, $path); 38 } 39 40 $map = require __DIR__ . '/autoload_psr4.php'; 41 foreach ($map as $namespace => $path) { 42 $loader->setPsr4($namespace, $path); 43 } 44 45 $classMap = require __DIR__ . '/autoload_classmap.php'; 46 if ($classMap) { 47 $loader->addClassMap($classMap); 48 } 49 } 29 require __DIR__ . '/autoload_static.php'; 30 call_user_func(\Composer\Autoload\ComposerStaticInit5300e49fe86bd50f95b88ce4db036dcb::getInitializer($loader)); 50 31 51 32 $loader->register(true); -
disable-media-pages/trunk/vendor/composer/autoload_static.php
r3125327 r3339097 5 5 namespace Composer\Autoload; 6 6 7 class ComposerStaticInit 04671f280aada7196646eb7bb7269f257 class ComposerStaticInit5300e49fe86bd50f95b88ce4db036dcb 8 8 { 9 9 public static $prefixLengthsPsr4 = array ( … … 34 34 { 35 35 return \Closure::bind(function () use ($loader) { 36 $loader->prefixLengthsPsr4 = ComposerStaticInit 04671f280aada7196646eb7bb7269f25::$prefixLengthsPsr4;37 $loader->prefixDirsPsr4 = ComposerStaticInit 04671f280aada7196646eb7bb7269f25::$prefixDirsPsr4;38 $loader->classMap = ComposerStaticInit 04671f280aada7196646eb7bb7269f25::$classMap;36 $loader->prefixLengthsPsr4 = ComposerStaticInit5300e49fe86bd50f95b88ce4db036dcb::$prefixLengthsPsr4; 37 $loader->prefixDirsPsr4 = ComposerStaticInit5300e49fe86bd50f95b88ce4db036dcb::$prefixDirsPsr4; 38 $loader->classMap = ComposerStaticInit5300e49fe86bd50f95b88ce4db036dcb::$classMap; 39 39 40 40 }, null, ClassLoader::class); -
disable-media-pages/trunk/vendor/composer/installed.php
r3125327 r3339097 1 1 <?php return array( 2 2 'root' => array( 3 'pretty_version' => 'v3.1.3', 4 'version' => '3.1.3.0', 3 'name' => 'joppuyo/disable-media-pages', 4 'pretty_version' => 'v4.0.0', 5 'version' => '4.0.0.0', 6 'reference' => '715ff3c7eddfd8bf5044c8135084404faec80181', 5 7 'type' => 'library', 6 8 'install_path' => __DIR__ . '/../../', 7 9 'aliases' => array(), 8 'reference' => 'cdaae68e2e09834c1af02e6a62a0fdbc4d81986b',9 'name' => 'joppuyo/disable-media-pages',10 10 'dev' => false, 11 11 ), 12 12 'versions' => array( 13 13 'joppuyo/disable-media-pages' => array( 14 'pretty_version' => 'v3.1.3', 15 'version' => '3.1.3.0', 14 'pretty_version' => 'v4.0.0', 15 'version' => '4.0.0.0', 16 'reference' => '715ff3c7eddfd8bf5044c8135084404faec80181', 16 17 'type' => 'library', 17 18 'install_path' => __DIR__ . '/../../', 18 19 'aliases' => array(), 19 'reference' => 'cdaae68e2e09834c1af02e6a62a0fdbc4d81986b',20 20 'dev_requirement' => false, 21 21 ),
Note: See TracChangeset
for help on using the changeset viewer.