Changeset 3473914
- Timestamp:
- 03/03/2026 06:25:09 PM (4 weeks ago)
- Location:
- kagg-pagespeed-module
- Files:
-
- 16 edited
- 1 copied
-
tags/2.2.0 (copied) (copied from kagg-pagespeed-module/trunk)
-
tags/2.2.0/mod-pagespeed.php (modified) (3 diffs)
-
tags/2.2.0/readme.txt (modified) (3 diffs)
-
tags/2.2.0/src/php/Main.php (modified) (15 diffs)
-
tags/2.2.0/vendor/autoload.php (modified) (1 diff)
-
tags/2.2.0/vendor/composer/InstalledVersions.php (modified) (5 diffs)
-
tags/2.2.0/vendor/composer/autoload_real.php (modified) (2 diffs)
-
tags/2.2.0/vendor/composer/autoload_static.php (modified) (3 diffs)
-
tags/2.2.0/vendor/composer/installed.php (modified) (2 diffs)
-
trunk/mod-pagespeed.php (modified) (3 diffs)
-
trunk/readme.txt (modified) (3 diffs)
-
trunk/src/php/Main.php (modified) (15 diffs)
-
trunk/vendor/autoload.php (modified) (1 diff)
-
trunk/vendor/composer/InstalledVersions.php (modified) (5 diffs)
-
trunk/vendor/composer/autoload_real.php (modified) (2 diffs)
-
trunk/vendor/composer/autoload_static.php (modified) (3 diffs)
-
trunk/vendor/composer/installed.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
kagg-pagespeed-module/tags/2.2.0/mod-pagespeed.php
r3048396 r3473914 11 11 * Plugin URI: https://wordpress.org/plugins/kagg-pagespeed-module/ 12 12 * Description: Support of PageSpeed Module for Apache or Nginx. 13 * Version: 2. 1.014 * Requires at least: 4.415 * Requires PHP: 7. 013 * Version: 2.2.0 14 * Requires at least: 6.0 15 * Requires PHP: 7.4 16 16 * Author: KAGG Design 17 17 * Author URI: https://kagg.eu/en/ … … 28 28 } 29 29 30 if ( defined( 'MOD_PAGESPEED_VERSION' ) ) {31 return;32 }33 34 30 /** 35 31 * Plugin version. 36 32 */ 37 const MOD_PAGESPEED_VERSION = '2. 1.0';33 const MOD_PAGESPEED_VERSION = '2.2.0'; 38 34 39 35 /** … … 55 51 56 52 /** 57 * Get main class instance.53 * Get a main class instance. 58 54 * 59 55 * @return Main 60 56 */ 61 function kagg_pagespeed_module() {57 function kagg_pagespeed_module(): Main { 62 58 static $mod_pagespeed; 63 59 -
kagg-pagespeed-module/tags/2.2.0/readme.txt
r3048396 r3473914 3 3 Donate link: https://kagg.eu/en/ 4 4 Tags: PageSpeed Module, mod_pagespeed, Apache, Nginx, cache 5 Requires at least: 5.06 Tested up to: 6. 57 Requires PHP: 7. 08 Stable tag: 2. 1.05 Requires at least: 6.0 6 Tested up to: 6.9 7 Requires PHP: 7.4 8 Stable tag: 2.2.0 9 9 License: GPLv2 or later 10 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 24 24 = Minimum Requirements = 25 25 26 * PHP version 7. 0or greater (PHP 8.0 or greater is recommended)26 * PHP version 7.4 or greater (PHP 8.0 or greater is recommended) 27 27 * MySQL version 5.5 or greater (MySQL 5.6 or greater is recommended) 28 28 * PageSpeed Module for Apache or Nginx … … 45 45 46 46 == Changelog == 47 48 = 2.2.0 = 49 * The minimal required PHP version is now 7.4. 50 * The minimum required WordPress version is now 6.0. 51 * Tested with WordPress 6.9. 47 52 48 53 = 2.1.0 = -
kagg-pagespeed-module/tags/2.2.0/src/php/Main.php
r3048396 r3473914 18 18 * @var array 19 19 */ 20 private $options;20 private array $options; 21 21 22 22 /** 23 23 * Admin screen id. 24 24 */ 25 const SCREEN_ID = 'settings_page_mod-pagespeed';25 private const SCREEN_ID = 'settings_page_mod-pagespeed'; 26 26 27 27 /** 28 28 * Option page. 29 29 */ 30 const PAGE = 'mod-pagespeed';30 private const PAGE = 'mod-pagespeed'; 31 31 32 32 /** 33 33 * Ajax action name. 34 34 */ 35 const ACTION = 'mod-pagespeed-action';35 private const ACTION = 'mod-pagespeed-action'; 36 36 37 37 /** 38 38 * Admin script handle. 39 39 */ 40 const HANDLE = 'mod-pagespeed-admin';40 private const HANDLE = 'mod-pagespeed-admin'; 41 41 42 42 /** 43 43 * Init class. 44 44 */ 45 public function init() {46 $this->options = get_option( 'mod_pagespeed_settings', [] );45 public function init(): void { 46 $this->options = (array) get_option( 'mod_pagespeed_settings', [] ); 47 47 48 48 $this->hooks(); … … 54 54 * @return void 55 55 */ 56 private function hooks() {56 private function hooks(): void { 57 57 add_action( 'admin_menu', [ $this, 'add_settings_page' ] ); 58 58 add_filter( … … 72 72 * Add the settings page to the menu. 73 73 */ 74 public function add_settings_page() {74 public function add_settings_page(): void { 75 75 $page_title = __( 'PageSpeed', 'kagg-pagespeed-module' ); 76 76 $menu_title = __( 'PageSpeed', 'kagg-pagespeed-module' ); … … 88 88 * Options page. 89 89 */ 90 public function mod_pagespeed_settings_page() {90 public function mod_pagespeed_settings_page(): void { 91 91 ?> 92 92 <div class="wrap"> … … 111 111 * Setup options fields. 112 112 */ 113 public function setup_fields() {113 public function setup_fields(): void { 114 114 add_settings_section( 115 115 'purge_section', … … 129 129 * Purge Cache section. 130 130 */ 131 public function mod_pagespeed_purge_section() {131 public function mod_pagespeed_purge_section(): void { 132 132 $title = __( 'Purge Styles', 'kagg-pagespeed-module' ); 133 $text = __( 'Clear cached version of the current WordPress theme style.css file.<br><br>This is useful when styles were changed.', 'kagg-pagespeed-module' );133 $text = __( 'Clear cached version of the current WordPress theme style.css file.<br><br>This is useful when styles are changed.', 'kagg-pagespeed-module' ); 134 134 $button_text = __( 'Purge Styles', 'kagg-pagespeed-module' ); 135 135 136 $this->card_section( $title, $text, $button_text, 'purge_styles' ); 136 137 137 138 $title = __( 'Purge Entire Cache', 'kagg-pagespeed-module' ); 138 $text = __( 'Clear the entire PageSpeed cache on site. This action fetches fresh versions of all pages, images, and scripts on your website.<br><br>Please note that PageSpeed module will take some time to re-create cache after several page visits.', 'kagg-pagespeed-module' );139 $text = __( 'Clear the entire PageSpeed cache on site. This action fetches fresh versions of all pages, images, and scripts on your website.<br><br>Please note that the PageSpeed module will take some time to re-create the cache after several page visits.', 'kagg-pagespeed-module' ); 139 140 $button_text = __( 'Purge Entire Cache', 'kagg-pagespeed-module' ); 141 140 142 $this->card_section( $title, $text, $button_text, 'purge_entire_cache' ); 141 143 } … … 149 151 * @param string $button_id Button id. 150 152 */ 151 private function card_section( $title, $text, $button_text, $button_id ){153 private function card_section( string $title, string $text, string $button_text, string $button_id ): void { 152 154 ?> 153 155 <section class="ps-card"> … … 170 172 * Development Mode section. 171 173 */ 172 public function mod_pagespeed_development_section() {174 public function mod_pagespeed_development_section(): void { 173 175 $title = __( 'Development Mode', 'kagg-pagespeed-module' ); 174 176 $text = … … 201 203 </section> 202 204 <?php 205 203 206 echo '<div id="ps-success"></div>'; 204 207 echo '<div id="ps-error"></div>'; … … 208 211 * Load plugin text domain. 209 212 */ 210 public function load_textdomain() {213 public function load_textdomain(): void { 211 214 load_plugin_textdomain( 212 215 'kagg-pagespeed-module', … … 219 222 * Enqueue plugin scripts. 220 223 */ 221 public function admin_enqueue_scripts() {224 public function admin_enqueue_scripts(): void { 222 225 if ( ! is_admin() ) { 223 226 return; … … 267 270 * Process ajax request. 268 271 */ 269 public function ajax_action() {272 public function ajax_action(): void { 270 273 if ( 271 274 ! wp_verify_nonce( … … 308 311 * Purge cache for $link. 309 312 * 310 * @param string $link a link to file or * to be purged.311 */ 312 private function purge_link( $link ){313 * @param string $link a link to the file or * to be purged. 314 */ 315 private function purge_link( string $link ): void { 313 316 $result = wp_remote_request( site_url() ); 314 317 … … 373 376 * For any site url, add or remove ?ModPagespeed argument. 374 377 */ 375 public function mod_pagespeed_arg() {378 public function mod_pagespeed_arg(): void { 376 379 if ( wp_doing_ajax() || is_admin() || $this->is_rest() ) { 377 380 return; … … 417 420 418 421 /** 419 * Add link to plugin setting page onplugins page.422 * Add a link to the plugin setting page on the plugins page. 420 423 * 421 424 * @param array|mixed $links Plugin links. -
kagg-pagespeed-module/tags/2.2.0/vendor/autoload.php
r3048396 r3473914 15 15 } 16 16 } 17 trigger_error( 18 $err, 19 E_USER_ERROR 20 ); 17 throw new RuntimeException($err); 21 18 } 22 19 23 20 require_once __DIR__ . '/composer/autoload_real.php'; 24 21 25 return ComposerAutoloaderInit 03ce483e1e15a7655bd7af9251265c6d::getLoader();22 return ComposerAutoloaderInit24a70a51a122ec3bcea93c270850275b::getLoader(); -
kagg-pagespeed-module/tags/2.2.0/vendor/composer/InstalledVersions.php
r2947379 r3473914 28 28 { 29 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 /** 30 36 * @var mixed[]|null 31 37 * @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 38 */ 33 39 private static $installed; 40 41 /** 42 * @var bool 43 */ 44 private static $installedIsLocalDir; 34 45 35 46 /** … … 310 321 self::$installed = $data; 311 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; 312 341 } 313 342 … … 323 352 324 353 $installed = array(); 354 $copiedLocalDir = false; 325 355 326 356 if (self::$canGetVendors) { 357 $selfDir = self::getSelfDir(); 327 358 foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) { 359 $vendorDir = strtr($vendorDir, '\\', '/'); 328 360 if (isset(self::$installedByVendor[$vendorDir])) { 329 361 $installed[] = self::$installedByVendor[$vendorDir]; … … 331 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 */ 332 364 $required = require $vendorDir.'/composer/installed.php'; 333 $installed[] = self::$installedByVendor[$vendorDir] = $required; 334 if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) { 335 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; 336 370 } 371 } 372 if (self::$installedIsLocalDir && $vendorDir.'/composer' === $selfDir) { 373 $copiedLocalDir = true; 337 374 } 338 375 } … … 351 388 } 352 389 353 if (self::$installed !== array() ) {390 if (self::$installed !== array() && !$copiedLocalDir) { 354 391 $installed[] = self::$installed; 355 392 } -
kagg-pagespeed-module/tags/2.2.0/vendor/composer/autoload_real.php
r3048396 r3473914 3 3 // autoload_real.php @generated by Composer 4 4 5 class ComposerAutoloaderInit 03ce483e1e15a7655bd7af9251265c6d5 class ComposerAutoloaderInit24a70a51a122ec3bcea93c270850275b 6 6 { 7 7 private static $loader; … … 23 23 } 24 24 25 spl_autoload_register(array('ComposerAutoloaderInit 03ce483e1e15a7655bd7af9251265c6d', 'loadClassLoader'), true, true);25 spl_autoload_register(array('ComposerAutoloaderInit24a70a51a122ec3bcea93c270850275b', 'loadClassLoader'), true, true); 26 26 self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); 27 spl_autoload_unregister(array('ComposerAutoloaderInit 03ce483e1e15a7655bd7af9251265c6d', 'loadClassLoader'));27 spl_autoload_unregister(array('ComposerAutoloaderInit24a70a51a122ec3bcea93c270850275b', 'loadClassLoader')); 28 28 29 29 require __DIR__ . '/autoload_static.php'; 30 call_user_func(\Composer\Autoload\ComposerStaticInit 03ce483e1e15a7655bd7af9251265c6d::getInitializer($loader));30 call_user_func(\Composer\Autoload\ComposerStaticInit24a70a51a122ec3bcea93c270850275b::getInitializer($loader)); 31 31 32 32 $loader->setClassMapAuthoritative(true); -
kagg-pagespeed-module/tags/2.2.0/vendor/composer/autoload_static.php
r3048396 r3473914 5 5 namespace Composer\Autoload; 6 6 7 class ComposerStaticInit 03ce483e1e15a7655bd7af9251265c6d7 class ComposerStaticInit24a70a51a122ec3bcea93c270850275b 8 8 { 9 9 public static $prefixLengthsPsr4 = array ( 10 'K' => 10 'K' => 11 11 array ( 12 12 'KAGG\\PagespeedModule\\' => 21, … … 15 15 16 16 public static $prefixDirsPsr4 = array ( 17 'KAGG\\PagespeedModule\\' => 17 'KAGG\\PagespeedModule\\' => 18 18 array ( 19 19 0 => __DIR__ . '/../..' . '/src/php', … … 29 29 { 30 30 return \Closure::bind(function () use ($loader) { 31 $loader->prefixLengthsPsr4 = ComposerStaticInit 03ce483e1e15a7655bd7af9251265c6d::$prefixLengthsPsr4;32 $loader->prefixDirsPsr4 = ComposerStaticInit 03ce483e1e15a7655bd7af9251265c6d::$prefixDirsPsr4;33 $loader->classMap = ComposerStaticInit 03ce483e1e15a7655bd7af9251265c6d::$classMap;31 $loader->prefixLengthsPsr4 = ComposerStaticInit24a70a51a122ec3bcea93c270850275b::$prefixLengthsPsr4; 32 $loader->prefixDirsPsr4 = ComposerStaticInit24a70a51a122ec3bcea93c270850275b::$prefixDirsPsr4; 33 $loader->classMap = ComposerStaticInit24a70a51a122ec3bcea93c270850275b::$classMap; 34 34 35 35 }, null, ClassLoader::class); -
kagg-pagespeed-module/tags/2.2.0/vendor/composer/installed.php
r3048396 r3473914 2 2 'root' => array( 3 3 'name' => 'kagg/pagespeed-module', 4 'pretty_version' => '2. 1.0',5 'version' => '2. 1.0.0',6 'reference' => ' 8a3027be44a1e24da6acfb2bccc03a519fe95a27',4 'pretty_version' => '2.2.0', 5 'version' => '2.2.0.0', 6 'reference' => 'd4f11585291becd2b5377fc981753699a5149ad3', 7 7 'type' => 'wordpress-plugin', 8 8 'install_path' => __DIR__ . '/../../', … … 12 12 'versions' => array( 13 13 'kagg/pagespeed-module' => array( 14 'pretty_version' => '2. 1.0',15 'version' => '2. 1.0.0',16 'reference' => ' 8a3027be44a1e24da6acfb2bccc03a519fe95a27',14 'pretty_version' => '2.2.0', 15 'version' => '2.2.0.0', 16 'reference' => 'd4f11585291becd2b5377fc981753699a5149ad3', 17 17 'type' => 'wordpress-plugin', 18 18 'install_path' => __DIR__ . '/../../', -
kagg-pagespeed-module/trunk/mod-pagespeed.php
r3048396 r3473914 11 11 * Plugin URI: https://wordpress.org/plugins/kagg-pagespeed-module/ 12 12 * Description: Support of PageSpeed Module for Apache or Nginx. 13 * Version: 2. 1.014 * Requires at least: 4.415 * Requires PHP: 7. 013 * Version: 2.2.0 14 * Requires at least: 6.0 15 * Requires PHP: 7.4 16 16 * Author: KAGG Design 17 17 * Author URI: https://kagg.eu/en/ … … 28 28 } 29 29 30 if ( defined( 'MOD_PAGESPEED_VERSION' ) ) {31 return;32 }33 34 30 /** 35 31 * Plugin version. 36 32 */ 37 const MOD_PAGESPEED_VERSION = '2. 1.0';33 const MOD_PAGESPEED_VERSION = '2.2.0'; 38 34 39 35 /** … … 55 51 56 52 /** 57 * Get main class instance.53 * Get a main class instance. 58 54 * 59 55 * @return Main 60 56 */ 61 function kagg_pagespeed_module() {57 function kagg_pagespeed_module(): Main { 62 58 static $mod_pagespeed; 63 59 -
kagg-pagespeed-module/trunk/readme.txt
r3048396 r3473914 3 3 Donate link: https://kagg.eu/en/ 4 4 Tags: PageSpeed Module, mod_pagespeed, Apache, Nginx, cache 5 Requires at least: 5.06 Tested up to: 6. 57 Requires PHP: 7. 08 Stable tag: 2. 1.05 Requires at least: 6.0 6 Tested up to: 6.9 7 Requires PHP: 7.4 8 Stable tag: 2.2.0 9 9 License: GPLv2 or later 10 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 24 24 = Minimum Requirements = 25 25 26 * PHP version 7. 0or greater (PHP 8.0 or greater is recommended)26 * PHP version 7.4 or greater (PHP 8.0 or greater is recommended) 27 27 * MySQL version 5.5 or greater (MySQL 5.6 or greater is recommended) 28 28 * PageSpeed Module for Apache or Nginx … … 45 45 46 46 == Changelog == 47 48 = 2.2.0 = 49 * The minimal required PHP version is now 7.4. 50 * The minimum required WordPress version is now 6.0. 51 * Tested with WordPress 6.9. 47 52 48 53 = 2.1.0 = -
kagg-pagespeed-module/trunk/src/php/Main.php
r3048396 r3473914 18 18 * @var array 19 19 */ 20 private $options;20 private array $options; 21 21 22 22 /** 23 23 * Admin screen id. 24 24 */ 25 const SCREEN_ID = 'settings_page_mod-pagespeed';25 private const SCREEN_ID = 'settings_page_mod-pagespeed'; 26 26 27 27 /** 28 28 * Option page. 29 29 */ 30 const PAGE = 'mod-pagespeed';30 private const PAGE = 'mod-pagespeed'; 31 31 32 32 /** 33 33 * Ajax action name. 34 34 */ 35 const ACTION = 'mod-pagespeed-action';35 private const ACTION = 'mod-pagespeed-action'; 36 36 37 37 /** 38 38 * Admin script handle. 39 39 */ 40 const HANDLE = 'mod-pagespeed-admin';40 private const HANDLE = 'mod-pagespeed-admin'; 41 41 42 42 /** 43 43 * Init class. 44 44 */ 45 public function init() {46 $this->options = get_option( 'mod_pagespeed_settings', [] );45 public function init(): void { 46 $this->options = (array) get_option( 'mod_pagespeed_settings', [] ); 47 47 48 48 $this->hooks(); … … 54 54 * @return void 55 55 */ 56 private function hooks() {56 private function hooks(): void { 57 57 add_action( 'admin_menu', [ $this, 'add_settings_page' ] ); 58 58 add_filter( … … 72 72 * Add the settings page to the menu. 73 73 */ 74 public function add_settings_page() {74 public function add_settings_page(): void { 75 75 $page_title = __( 'PageSpeed', 'kagg-pagespeed-module' ); 76 76 $menu_title = __( 'PageSpeed', 'kagg-pagespeed-module' ); … … 88 88 * Options page. 89 89 */ 90 public function mod_pagespeed_settings_page() {90 public function mod_pagespeed_settings_page(): void { 91 91 ?> 92 92 <div class="wrap"> … … 111 111 * Setup options fields. 112 112 */ 113 public function setup_fields() {113 public function setup_fields(): void { 114 114 add_settings_section( 115 115 'purge_section', … … 129 129 * Purge Cache section. 130 130 */ 131 public function mod_pagespeed_purge_section() {131 public function mod_pagespeed_purge_section(): void { 132 132 $title = __( 'Purge Styles', 'kagg-pagespeed-module' ); 133 $text = __( 'Clear cached version of the current WordPress theme style.css file.<br><br>This is useful when styles were changed.', 'kagg-pagespeed-module' );133 $text = __( 'Clear cached version of the current WordPress theme style.css file.<br><br>This is useful when styles are changed.', 'kagg-pagespeed-module' ); 134 134 $button_text = __( 'Purge Styles', 'kagg-pagespeed-module' ); 135 135 136 $this->card_section( $title, $text, $button_text, 'purge_styles' ); 136 137 137 138 $title = __( 'Purge Entire Cache', 'kagg-pagespeed-module' ); 138 $text = __( 'Clear the entire PageSpeed cache on site. This action fetches fresh versions of all pages, images, and scripts on your website.<br><br>Please note that PageSpeed module will take some time to re-create cache after several page visits.', 'kagg-pagespeed-module' );139 $text = __( 'Clear the entire PageSpeed cache on site. This action fetches fresh versions of all pages, images, and scripts on your website.<br><br>Please note that the PageSpeed module will take some time to re-create the cache after several page visits.', 'kagg-pagespeed-module' ); 139 140 $button_text = __( 'Purge Entire Cache', 'kagg-pagespeed-module' ); 141 140 142 $this->card_section( $title, $text, $button_text, 'purge_entire_cache' ); 141 143 } … … 149 151 * @param string $button_id Button id. 150 152 */ 151 private function card_section( $title, $text, $button_text, $button_id ){153 private function card_section( string $title, string $text, string $button_text, string $button_id ): void { 152 154 ?> 153 155 <section class="ps-card"> … … 170 172 * Development Mode section. 171 173 */ 172 public function mod_pagespeed_development_section() {174 public function mod_pagespeed_development_section(): void { 173 175 $title = __( 'Development Mode', 'kagg-pagespeed-module' ); 174 176 $text = … … 201 203 </section> 202 204 <?php 205 203 206 echo '<div id="ps-success"></div>'; 204 207 echo '<div id="ps-error"></div>'; … … 208 211 * Load plugin text domain. 209 212 */ 210 public function load_textdomain() {213 public function load_textdomain(): void { 211 214 load_plugin_textdomain( 212 215 'kagg-pagespeed-module', … … 219 222 * Enqueue plugin scripts. 220 223 */ 221 public function admin_enqueue_scripts() {224 public function admin_enqueue_scripts(): void { 222 225 if ( ! is_admin() ) { 223 226 return; … … 267 270 * Process ajax request. 268 271 */ 269 public function ajax_action() {272 public function ajax_action(): void { 270 273 if ( 271 274 ! wp_verify_nonce( … … 308 311 * Purge cache for $link. 309 312 * 310 * @param string $link a link to file or * to be purged.311 */ 312 private function purge_link( $link ){313 * @param string $link a link to the file or * to be purged. 314 */ 315 private function purge_link( string $link ): void { 313 316 $result = wp_remote_request( site_url() ); 314 317 … … 373 376 * For any site url, add or remove ?ModPagespeed argument. 374 377 */ 375 public function mod_pagespeed_arg() {378 public function mod_pagespeed_arg(): void { 376 379 if ( wp_doing_ajax() || is_admin() || $this->is_rest() ) { 377 380 return; … … 417 420 418 421 /** 419 * Add link to plugin setting page onplugins page.422 * Add a link to the plugin setting page on the plugins page. 420 423 * 421 424 * @param array|mixed $links Plugin links. -
kagg-pagespeed-module/trunk/vendor/autoload.php
r3048396 r3473914 15 15 } 16 16 } 17 trigger_error( 18 $err, 19 E_USER_ERROR 20 ); 17 throw new RuntimeException($err); 21 18 } 22 19 23 20 require_once __DIR__ . '/composer/autoload_real.php'; 24 21 25 return ComposerAutoloaderInit 03ce483e1e15a7655bd7af9251265c6d::getLoader();22 return ComposerAutoloaderInit24a70a51a122ec3bcea93c270850275b::getLoader(); -
kagg-pagespeed-module/trunk/vendor/composer/InstalledVersions.php
r2947379 r3473914 28 28 { 29 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 /** 30 36 * @var mixed[]|null 31 37 * @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 38 */ 33 39 private static $installed; 40 41 /** 42 * @var bool 43 */ 44 private static $installedIsLocalDir; 34 45 35 46 /** … … 310 321 self::$installed = $data; 311 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; 312 341 } 313 342 … … 323 352 324 353 $installed = array(); 354 $copiedLocalDir = false; 325 355 326 356 if (self::$canGetVendors) { 357 $selfDir = self::getSelfDir(); 327 358 foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) { 359 $vendorDir = strtr($vendorDir, '\\', '/'); 328 360 if (isset(self::$installedByVendor[$vendorDir])) { 329 361 $installed[] = self::$installedByVendor[$vendorDir]; … … 331 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 */ 332 364 $required = require $vendorDir.'/composer/installed.php'; 333 $installed[] = self::$installedByVendor[$vendorDir] = $required; 334 if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) { 335 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; 336 370 } 371 } 372 if (self::$installedIsLocalDir && $vendorDir.'/composer' === $selfDir) { 373 $copiedLocalDir = true; 337 374 } 338 375 } … … 351 388 } 352 389 353 if (self::$installed !== array() ) {390 if (self::$installed !== array() && !$copiedLocalDir) { 354 391 $installed[] = self::$installed; 355 392 } -
kagg-pagespeed-module/trunk/vendor/composer/autoload_real.php
r3048396 r3473914 3 3 // autoload_real.php @generated by Composer 4 4 5 class ComposerAutoloaderInit 03ce483e1e15a7655bd7af9251265c6d5 class ComposerAutoloaderInit24a70a51a122ec3bcea93c270850275b 6 6 { 7 7 private static $loader; … … 23 23 } 24 24 25 spl_autoload_register(array('ComposerAutoloaderInit 03ce483e1e15a7655bd7af9251265c6d', 'loadClassLoader'), true, true);25 spl_autoload_register(array('ComposerAutoloaderInit24a70a51a122ec3bcea93c270850275b', 'loadClassLoader'), true, true); 26 26 self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); 27 spl_autoload_unregister(array('ComposerAutoloaderInit 03ce483e1e15a7655bd7af9251265c6d', 'loadClassLoader'));27 spl_autoload_unregister(array('ComposerAutoloaderInit24a70a51a122ec3bcea93c270850275b', 'loadClassLoader')); 28 28 29 29 require __DIR__ . '/autoload_static.php'; 30 call_user_func(\Composer\Autoload\ComposerStaticInit 03ce483e1e15a7655bd7af9251265c6d::getInitializer($loader));30 call_user_func(\Composer\Autoload\ComposerStaticInit24a70a51a122ec3bcea93c270850275b::getInitializer($loader)); 31 31 32 32 $loader->setClassMapAuthoritative(true); -
kagg-pagespeed-module/trunk/vendor/composer/autoload_static.php
r3048396 r3473914 5 5 namespace Composer\Autoload; 6 6 7 class ComposerStaticInit 03ce483e1e15a7655bd7af9251265c6d7 class ComposerStaticInit24a70a51a122ec3bcea93c270850275b 8 8 { 9 9 public static $prefixLengthsPsr4 = array ( 10 'K' => 10 'K' => 11 11 array ( 12 12 'KAGG\\PagespeedModule\\' => 21, … … 15 15 16 16 public static $prefixDirsPsr4 = array ( 17 'KAGG\\PagespeedModule\\' => 17 'KAGG\\PagespeedModule\\' => 18 18 array ( 19 19 0 => __DIR__ . '/../..' . '/src/php', … … 29 29 { 30 30 return \Closure::bind(function () use ($loader) { 31 $loader->prefixLengthsPsr4 = ComposerStaticInit 03ce483e1e15a7655bd7af9251265c6d::$prefixLengthsPsr4;32 $loader->prefixDirsPsr4 = ComposerStaticInit 03ce483e1e15a7655bd7af9251265c6d::$prefixDirsPsr4;33 $loader->classMap = ComposerStaticInit 03ce483e1e15a7655bd7af9251265c6d::$classMap;31 $loader->prefixLengthsPsr4 = ComposerStaticInit24a70a51a122ec3bcea93c270850275b::$prefixLengthsPsr4; 32 $loader->prefixDirsPsr4 = ComposerStaticInit24a70a51a122ec3bcea93c270850275b::$prefixDirsPsr4; 33 $loader->classMap = ComposerStaticInit24a70a51a122ec3bcea93c270850275b::$classMap; 34 34 35 35 }, null, ClassLoader::class); -
kagg-pagespeed-module/trunk/vendor/composer/installed.php
r3048396 r3473914 2 2 'root' => array( 3 3 'name' => 'kagg/pagespeed-module', 4 'pretty_version' => '2. 1.0',5 'version' => '2. 1.0.0',6 'reference' => ' 8a3027be44a1e24da6acfb2bccc03a519fe95a27',4 'pretty_version' => '2.2.0', 5 'version' => '2.2.0.0', 6 'reference' => 'd4f11585291becd2b5377fc981753699a5149ad3', 7 7 'type' => 'wordpress-plugin', 8 8 'install_path' => __DIR__ . '/../../', … … 12 12 'versions' => array( 13 13 'kagg/pagespeed-module' => array( 14 'pretty_version' => '2. 1.0',15 'version' => '2. 1.0.0',16 'reference' => ' 8a3027be44a1e24da6acfb2bccc03a519fe95a27',14 'pretty_version' => '2.2.0', 15 'version' => '2.2.0.0', 16 'reference' => 'd4f11585291becd2b5377fc981753699a5149ad3', 17 17 'type' => 'wordpress-plugin', 18 18 'install_path' => __DIR__ . '/../../',
Note: See TracChangeset
for help on using the changeset viewer.