Changeset 2887107
- Timestamp:
- 03/26/2023 01:36:45 PM (3 years ago)
- Location:
- wp-widget-disable
- Files:
-
- 26 edited
- 1 copied
-
tags/3.0.0 (copied) (copied from wp-widget-disable/trunk)
-
tags/3.0.0/CHANGELOG.md (modified) (2 diffs)
-
tags/3.0.0/vendor/autoload.php (modified) (1 diff)
-
tags/3.0.0/vendor/composer/ClassLoader.php (modified) (4 diffs)
-
tags/3.0.0/vendor/composer/InstalledVersions.php (modified) (12 diffs)
-
tags/3.0.0/vendor/composer/autoload_classmap.php (modified) (1 diff)
-
tags/3.0.0/vendor/composer/autoload_namespaces.php (modified) (1 diff)
-
tags/3.0.0/vendor/composer/autoload_psr4.php (modified) (1 diff)
-
tags/3.0.0/vendor/composer/autoload_real.php (modified) (2 diffs)
-
tags/3.0.0/vendor/composer/autoload_static.php (modified) (2 diffs)
-
tags/3.0.0/vendor/composer/installed.php (modified) (2 diffs)
-
tags/3.0.0/vendor/composer/platform_check.php (modified) (1 diff)
-
tags/3.0.0/views/admin.php (modified) (2 diffs)
-
tags/3.0.0/wp-widget-disable.php (modified) (2 diffs)
-
trunk/CHANGELOG.md (modified) (2 diffs)
-
trunk/vendor/autoload.php (modified) (1 diff)
-
trunk/vendor/composer/ClassLoader.php (modified) (4 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) (2 diffs)
-
trunk/vendor/composer/platform_check.php (modified) (1 diff)
-
trunk/views/admin.php (modified) (2 diffs)
-
trunk/wp-widget-disable.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wp-widget-disable/tags/3.0.0/CHANGELOG.md
r2695407 r2887107 5 5 and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). 6 6 7 ### [3.0.0] - 2022-03-17 8 * Fixed: Replace use of jQuery to avoid deprecation warnings. 9 * Changed: Requires at least PHP 7.4 and WordPress 6.0. 10 7 11 ### [2.1.0] - 2022-03-17 8 12 9 * Enhancement: Hide dis baled sidebar widgets when widget block editor is enabled.13 * Enhancement: Hide disabled sidebar widgets when widget block editor is enabled. 10 14 * Changed: Requires at least PHP 5.6 and WordPress 4.7. 11 15 … … 84 88 * German (de_DE) translations added. 85 89 86 [Unreleased]: https://github.com/wearerequired/WP-Widget-Disable/compare/2.0.0...master 90 [Unreleased]: https://github.com/wearerequired/WP-Widget-Disable/compare/3.0.0...master 91 [3.0.0]: https://github.com/wearerequired/WP-Widget-Disable/compare/2.1.0...3.0.0 87 92 [2.1.0]: https://github.com/wearerequired/WP-Widget-Disable/compare/2.0.0...2.1.0 88 93 [2.0.0]: https://github.com/wearerequired/WP-Widget-Disable/compare/1.9.0...2.0.0 -
wp-widget-disable/tags/3.0.0/vendor/autoload.php
r2695407 r2887107 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 914942eb63a3b2b6fe068eb2b363a597::getLoader();25 return ComposerAutoloaderInitfc830ce5553f798caa2f884b466c6301::getLoader(); -
wp-widget-disable/tags/3.0.0/vendor/composer/ClassLoader.php
r2695407 r2887107 43 43 class ClassLoader 44 44 { 45 /** @var \Closure(string):void */ 46 private static $includeFile; 47 45 48 /** @var ?string */ 46 49 private $vendorDir; … … 107 110 { 108 111 $this->vendorDir = $vendorDir; 112 self::initializeIncludeClosure(); 109 113 } 110 114 … … 426 430 { 427 431 if ($file = $this->findFile($class)) { 428 includeFile($file); 432 $includeFile = self::$includeFile; 433 $includeFile($file); 429 434 430 435 return true; … … 556 561 return false; 557 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 } 558 585 } 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 } -
wp-widget-disable/tags/3.0.0/vendor/composer/InstalledVersions.php
r2695407 r2887107 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 … … 27 29 /** 28 30 * @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{}|null31 * @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 32 */ 31 33 private static $installed; … … 38 40 /** 39 41 * @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}>}>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[]}>}> 41 43 */ 42 44 private static $installedByVendor = array(); … … 97 99 foreach (self::getInstalled() as $installed) { 98 100 if (isset($installed['versions'][$packageName])) { 99 return $includeDevRequirements || empty($installed['versions'][$packageName]['dev_requirement']);101 return $includeDevRequirements || !isset($installed['versions'][$packageName]['dev_requirement']) || $installed['versions'][$packageName]['dev_requirement'] === false; 100 102 } 101 103 } … … 118 120 public static function satisfies(VersionParser $parser, $packageName, $constraint) 119 121 { 120 $constraint = $parser->parseConstraints( $constraint);122 $constraint = $parser->parseConstraints((string) $constraint); 121 123 $provided = $parser->parseConstraints(self::getVersionRanges($packageName)); 122 124 … … 242 244 /** 243 245 * @return array 244 * @psalm-return array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}246 * @psalm-return array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool} 245 247 */ 246 248 public static function getRootPackage() … … 256 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. 257 259 * @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}>}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[]}>} 259 261 */ 260 262 public static function getRawData() … … 279 281 * 280 282 * @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}>}>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[]}>}> 282 284 */ 283 285 public static function getAllRawData() … … 302 304 * @return void 303 305 * 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}>} $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 305 307 */ 306 308 public static function reload($data) … … 312 314 /** 313 315 * @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}>}>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[]}>}> 315 317 */ 316 318 private static function getInstalled() … … 327 329 $installed[] = self::$installedByVendor[$vendorDir]; 328 330 } elseif (is_file($vendorDir.'/composer/installed.php')) { 329 $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; 330 334 if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) { 331 335 self::$installed = $installed[count($installed) - 1]; … … 339 343 // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937 340 344 if (substr(__DIR__, -8, 1) !== 'C') { 341 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; 342 348 } else { 343 349 self::$installed = array(); 344 350 } 345 351 } 346 $installed[] = self::$installed; 352 353 if (self::$installed !== array()) { 354 $installed[] = self::$installed; 355 } 347 356 348 357 return $installed; -
wp-widget-disable/tags/3.0.0/vendor/composer/autoload_classmap.php
r2695407 r2887107 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 -
wp-widget-disable/tags/3.0.0/vendor/composer/autoload_namespaces.php
r1487873 r2887107 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 -
wp-widget-disable/tags/3.0.0/vendor/composer/autoload_psr4.php
r1487873 r2887107 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 -
wp-widget-disable/tags/3.0.0/vendor/composer/autoload_real.php
r2695407 r2887107 3 3 // autoload_real.php @generated by Composer 4 4 5 class ComposerAutoloaderInit 914942eb63a3b2b6fe068eb2b363a5975 class ComposerAutoloaderInitfc830ce5553f798caa2f884b466c6301 6 6 { 7 7 private static $loader; … … 25 25 require __DIR__ . '/platform_check.php'; 26 26 27 spl_autoload_register(array('ComposerAutoloaderInit 914942eb63a3b2b6fe068eb2b363a597', 'loadClassLoader'), true, true);28 self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname( \dirname(__FILE__)));29 spl_autoload_unregister(array('ComposerAutoloaderInit 914942eb63a3b2b6fe068eb2b363a597', 'loadClassLoader'));27 spl_autoload_register(array('ComposerAutoloaderInitfc830ce5553f798caa2f884b466c6301', 'loadClassLoader'), true, true); 28 self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); 29 spl_autoload_unregister(array('ComposerAutoloaderInitfc830ce5553f798caa2f884b466c6301', '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\ComposerStaticInit914942eb63a3b2b6fe068eb2b363a597::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\ComposerStaticInitfc830ce5553f798caa2f884b466c6301::getInitializer($loader)); 52 33 53 34 $loader->register(true); -
wp-widget-disable/tags/3.0.0/vendor/composer/autoload_static.php
r2695407 r2887107 5 5 namespace Composer\Autoload; 6 6 7 class ComposerStaticInit 914942eb63a3b2b6fe068eb2b363a5977 class ComposerStaticInitfc830ce5553f798caa2f884b466c6301 8 8 { 9 9 public static $classMap = array ( … … 15 15 { 16 16 return \Closure::bind(function () use ($loader) { 17 $loader->classMap = ComposerStaticInit 914942eb63a3b2b6fe068eb2b363a597::$classMap;17 $loader->classMap = ComposerStaticInitfc830ce5553f798caa2f884b466c6301::$classMap; 18 18 19 19 }, null, ClassLoader::class); -
wp-widget-disable/tags/3.0.0/vendor/composer/installed.php
r2695407 r2887107 1 1 <?php return array( 2 2 'root' => array( 3 'pretty_version' => '2.1.0', 4 'version' => '2.1.0.0', 3 'name' => 'wearerequired/wp-widget-disable', 4 'pretty_version' => '3.0.0', 5 'version' => '3.0.0.0', 6 'reference' => '7b52c2f91b9b31427dbc784cba00965c6e62c7e8', 5 7 'type' => 'wordpress-plugin', 6 8 'install_path' => __DIR__ . '/../../', 7 9 'aliases' => array(), 8 'reference' => '351c3de5dd4cb1cc5a24712afb95b58cd0550c5c',9 'name' => 'wearerequired/wp-widget-disable',10 10 'dev' => false, 11 11 ), … … 14 14 'pretty_version' => '1.1.0', 15 15 'version' => '1.1.0.0', 16 'reference' => '82b8a6c4b953f59e7e534df2d4287e34af950812', 16 17 'type' => 'library', 17 18 'install_path' => __DIR__ . '/../wearerequired/wp-requirements-check', 18 19 'aliases' => array(), 19 'reference' => '82b8a6c4b953f59e7e534df2d4287e34af950812',20 20 'dev_requirement' => false, 21 21 ), 22 22 'wearerequired/wp-widget-disable' => array( 23 'pretty_version' => '2.1.0', 24 'version' => '2.1.0.0', 23 'pretty_version' => '3.0.0', 24 'version' => '3.0.0.0', 25 'reference' => '7b52c2f91b9b31427dbc784cba00965c6e62c7e8', 25 26 'type' => 'wordpress-plugin', 26 27 'install_path' => __DIR__ . '/../../', 27 28 'aliases' => array(), 28 'reference' => '351c3de5dd4cb1cc5a24712afb95b58cd0550c5c',29 29 'dev_requirement' => false, 30 30 ), -
wp-widget-disable/tags/3.0.0/vendor/composer/platform_check.php
r2695407 r2887107 5 5 $issues = array(); 6 6 7 if (!(PHP_VERSION_ID >= 50600)) {8 $issues[] = 'Your Composer dependencies require a PHP version ">= 5.6.0". You are running ' . PHP_VERSION . '.';7 if (!(PHP_VERSION_ID >= 70400)) { 8 $issues[] = 'Your Composer dependencies require a PHP version ">= 7.4.0". You are running ' . PHP_VERSION . '.'; 9 9 } 10 10 -
wp-widget-disable/tags/3.0.0/views/admin.php
r2048125 r2887107 48 48 <?php endif; ?> 49 49 50 <script type="text/javascript">51 jQuery( document ).ready( function( $ ) {52 $( '#wp_widget_disable_select_all, #wp_widget_disable_deselect_all' ).click( function() {53 var isChecked = 'wp_widget_disable_select_all' === $( this ).attr( 'id' );54 $( this ).parents( 'td' ).find( 'input' ).each( function() {55 $( this ).get( 0 ).checked = isChecked;56 } );57 } );58 } );59 </script>60 61 50 <form method="post" action="<?php echo esc_url( $form_action ); ?>" class="wp-widget-disable-form"> 62 51 <?php … … 67 56 </form> 68 57 </div> 58 59 <script> 60 const toggleButtons = document.querySelectorAll( '#wp_widget_disable_select_all, #wp_widget_disable_deselect_all' ); 61 toggleButtons.forEach( function( button ) { 62 button.addEventListener( 'click', function() { 63 const isChecked = 'wp_widget_disable_select_all' === button.id; 64 const inputs = button.closest( 'td' ).querySelectorAll( 'input' ); 65 inputs.forEach( function( input ) { 66 input.checked = isChecked; 67 } ); 68 } ); 69 } ); 70 </script> -
wp-widget-disable/tags/3.0.0/wp-widget-disable.php
r2695407 r2887107 1 1 <?php 2 2 /** 3 * Plugin Name: Widget Disable 4 * Plugin URI: https://required.com/services/wordpress-plugins/wp-widget-disable/ 5 * Description: Disable sidebar and dashboard widgets with an easy to use interface. Simply use the checkboxes provided under <strong>Appearance -> Disable Widgets</strong> and select the widgets you'd like to hide. 6 * Version: 2.1.0 7 * Author: required 8 * Author URI: https://required.com 9 * License: GPLv2+ 10 * Text Domain: wp-widget-disable 3 * Plugin Name: Widget Disable 4 * Plugin URI: https://required.com/services/wordpress-plugins/wp-widget-disable/ 5 * Description: Disable sidebar and dashboard widgets with an easy to use interface. Simply use the checkboxes provided under <strong>Appearance -> Disable Widgets</strong> and select the widgets you'd like to hide. 6 * Version: 3.0.0 7 * Requires at least: 6.0 8 * Requires PHP: 7.4 9 * Author: required 10 * Author URI: https://required.com 11 * License: GPLv2+ 12 * Text Domain: wp-widget-disable 11 13 * 12 * Copyright (c) 2015-202 2required (email: support@required.ch)14 * Copyright (c) 2015-2023 required (email: support@required.ch) 13 15 * 14 16 * This program is free software; you can redistribute it and/or modify … … 37 39 array( 38 40 'title' => 'WP Widget Disable', 39 'php' => ' 5.6',40 'wp' => ' 4.7',41 'php' => '7.4', 42 'wp' => '6.0', 41 43 'file' => __FILE__, 42 44 ) -
wp-widget-disable/trunk/CHANGELOG.md
r2695407 r2887107 5 5 and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). 6 6 7 ### [3.0.0] - 2022-03-17 8 * Fixed: Replace use of jQuery to avoid deprecation warnings. 9 * Changed: Requires at least PHP 7.4 and WordPress 6.0. 10 7 11 ### [2.1.0] - 2022-03-17 8 12 9 * Enhancement: Hide dis baled sidebar widgets when widget block editor is enabled.13 * Enhancement: Hide disabled sidebar widgets when widget block editor is enabled. 10 14 * Changed: Requires at least PHP 5.6 and WordPress 4.7. 11 15 … … 84 88 * German (de_DE) translations added. 85 89 86 [Unreleased]: https://github.com/wearerequired/WP-Widget-Disable/compare/2.0.0...master 90 [Unreleased]: https://github.com/wearerequired/WP-Widget-Disable/compare/3.0.0...master 91 [3.0.0]: https://github.com/wearerequired/WP-Widget-Disable/compare/2.1.0...3.0.0 87 92 [2.1.0]: https://github.com/wearerequired/WP-Widget-Disable/compare/2.0.0...2.1.0 88 93 [2.0.0]: https://github.com/wearerequired/WP-Widget-Disable/compare/1.9.0...2.0.0 -
wp-widget-disable/trunk/vendor/autoload.php
r2695407 r2887107 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 914942eb63a3b2b6fe068eb2b363a597::getLoader();25 return ComposerAutoloaderInitfc830ce5553f798caa2f884b466c6301::getLoader(); -
wp-widget-disable/trunk/vendor/composer/ClassLoader.php
r2695407 r2887107 43 43 class ClassLoader 44 44 { 45 /** @var \Closure(string):void */ 46 private static $includeFile; 47 45 48 /** @var ?string */ 46 49 private $vendorDir; … … 107 110 { 108 111 $this->vendorDir = $vendorDir; 112 self::initializeIncludeClosure(); 109 113 } 110 114 … … 426 430 { 427 431 if ($file = $this->findFile($class)) { 428 includeFile($file); 432 $includeFile = self::$includeFile; 433 $includeFile($file); 429 434 430 435 return true; … … 556 561 return false; 557 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 } 558 585 } 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 } -
wp-widget-disable/trunk/vendor/composer/InstalledVersions.php
r2695407 r2887107 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 … … 27 29 /** 28 30 * @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{}|null31 * @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 32 */ 31 33 private static $installed; … … 38 40 /** 39 41 * @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}>}>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[]}>}> 41 43 */ 42 44 private static $installedByVendor = array(); … … 97 99 foreach (self::getInstalled() as $installed) { 98 100 if (isset($installed['versions'][$packageName])) { 99 return $includeDevRequirements || empty($installed['versions'][$packageName]['dev_requirement']);101 return $includeDevRequirements || !isset($installed['versions'][$packageName]['dev_requirement']) || $installed['versions'][$packageName]['dev_requirement'] === false; 100 102 } 101 103 } … … 118 120 public static function satisfies(VersionParser $parser, $packageName, $constraint) 119 121 { 120 $constraint = $parser->parseConstraints( $constraint);122 $constraint = $parser->parseConstraints((string) $constraint); 121 123 $provided = $parser->parseConstraints(self::getVersionRanges($packageName)); 122 124 … … 242 244 /** 243 245 * @return array 244 * @psalm-return array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}246 * @psalm-return array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool} 245 247 */ 246 248 public static function getRootPackage() … … 256 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. 257 259 * @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}>}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[]}>} 259 261 */ 260 262 public static function getRawData() … … 279 281 * 280 282 * @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}>}>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[]}>}> 282 284 */ 283 285 public static function getAllRawData() … … 302 304 * @return void 303 305 * 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}>} $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 305 307 */ 306 308 public static function reload($data) … … 312 314 /** 313 315 * @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}>}>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[]}>}> 315 317 */ 316 318 private static function getInstalled() … … 327 329 $installed[] = self::$installedByVendor[$vendorDir]; 328 330 } elseif (is_file($vendorDir.'/composer/installed.php')) { 329 $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; 330 334 if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) { 331 335 self::$installed = $installed[count($installed) - 1]; … … 339 343 // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937 340 344 if (substr(__DIR__, -8, 1) !== 'C') { 341 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; 342 348 } else { 343 349 self::$installed = array(); 344 350 } 345 351 } 346 $installed[] = self::$installed; 352 353 if (self::$installed !== array()) { 354 $installed[] = self::$installed; 355 } 347 356 348 357 return $installed; -
wp-widget-disable/trunk/vendor/composer/autoload_classmap.php
r2695407 r2887107 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 -
wp-widget-disable/trunk/vendor/composer/autoload_namespaces.php
r1487873 r2887107 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 -
wp-widget-disable/trunk/vendor/composer/autoload_psr4.php
r1487873 r2887107 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 -
wp-widget-disable/trunk/vendor/composer/autoload_real.php
r2695407 r2887107 3 3 // autoload_real.php @generated by Composer 4 4 5 class ComposerAutoloaderInit 914942eb63a3b2b6fe068eb2b363a5975 class ComposerAutoloaderInitfc830ce5553f798caa2f884b466c6301 6 6 { 7 7 private static $loader; … … 25 25 require __DIR__ . '/platform_check.php'; 26 26 27 spl_autoload_register(array('ComposerAutoloaderInit 914942eb63a3b2b6fe068eb2b363a597', 'loadClassLoader'), true, true);28 self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname( \dirname(__FILE__)));29 spl_autoload_unregister(array('ComposerAutoloaderInit 914942eb63a3b2b6fe068eb2b363a597', 'loadClassLoader'));27 spl_autoload_register(array('ComposerAutoloaderInitfc830ce5553f798caa2f884b466c6301', 'loadClassLoader'), true, true); 28 self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); 29 spl_autoload_unregister(array('ComposerAutoloaderInitfc830ce5553f798caa2f884b466c6301', '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\ComposerStaticInit914942eb63a3b2b6fe068eb2b363a597::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\ComposerStaticInitfc830ce5553f798caa2f884b466c6301::getInitializer($loader)); 52 33 53 34 $loader->register(true); -
wp-widget-disable/trunk/vendor/composer/autoload_static.php
r2695407 r2887107 5 5 namespace Composer\Autoload; 6 6 7 class ComposerStaticInit 914942eb63a3b2b6fe068eb2b363a5977 class ComposerStaticInitfc830ce5553f798caa2f884b466c6301 8 8 { 9 9 public static $classMap = array ( … … 15 15 { 16 16 return \Closure::bind(function () use ($loader) { 17 $loader->classMap = ComposerStaticInit 914942eb63a3b2b6fe068eb2b363a597::$classMap;17 $loader->classMap = ComposerStaticInitfc830ce5553f798caa2f884b466c6301::$classMap; 18 18 19 19 }, null, ClassLoader::class); -
wp-widget-disable/trunk/vendor/composer/installed.php
r2695407 r2887107 1 1 <?php return array( 2 2 'root' => array( 3 'pretty_version' => '2.1.0', 4 'version' => '2.1.0.0', 3 'name' => 'wearerequired/wp-widget-disable', 4 'pretty_version' => '3.0.0', 5 'version' => '3.0.0.0', 6 'reference' => '7b52c2f91b9b31427dbc784cba00965c6e62c7e8', 5 7 'type' => 'wordpress-plugin', 6 8 'install_path' => __DIR__ . '/../../', 7 9 'aliases' => array(), 8 'reference' => '351c3de5dd4cb1cc5a24712afb95b58cd0550c5c',9 'name' => 'wearerequired/wp-widget-disable',10 10 'dev' => false, 11 11 ), … … 14 14 'pretty_version' => '1.1.0', 15 15 'version' => '1.1.0.0', 16 'reference' => '82b8a6c4b953f59e7e534df2d4287e34af950812', 16 17 'type' => 'library', 17 18 'install_path' => __DIR__ . '/../wearerequired/wp-requirements-check', 18 19 'aliases' => array(), 19 'reference' => '82b8a6c4b953f59e7e534df2d4287e34af950812',20 20 'dev_requirement' => false, 21 21 ), 22 22 'wearerequired/wp-widget-disable' => array( 23 'pretty_version' => '2.1.0', 24 'version' => '2.1.0.0', 23 'pretty_version' => '3.0.0', 24 'version' => '3.0.0.0', 25 'reference' => '7b52c2f91b9b31427dbc784cba00965c6e62c7e8', 25 26 'type' => 'wordpress-plugin', 26 27 'install_path' => __DIR__ . '/../../', 27 28 'aliases' => array(), 28 'reference' => '351c3de5dd4cb1cc5a24712afb95b58cd0550c5c',29 29 'dev_requirement' => false, 30 30 ), -
wp-widget-disable/trunk/vendor/composer/platform_check.php
r2695407 r2887107 5 5 $issues = array(); 6 6 7 if (!(PHP_VERSION_ID >= 50600)) {8 $issues[] = 'Your Composer dependencies require a PHP version ">= 5.6.0". You are running ' . PHP_VERSION . '.';7 if (!(PHP_VERSION_ID >= 70400)) { 8 $issues[] = 'Your Composer dependencies require a PHP version ">= 7.4.0". You are running ' . PHP_VERSION . '.'; 9 9 } 10 10 -
wp-widget-disable/trunk/views/admin.php
r2048125 r2887107 48 48 <?php endif; ?> 49 49 50 <script type="text/javascript">51 jQuery( document ).ready( function( $ ) {52 $( '#wp_widget_disable_select_all, #wp_widget_disable_deselect_all' ).click( function() {53 var isChecked = 'wp_widget_disable_select_all' === $( this ).attr( 'id' );54 $( this ).parents( 'td' ).find( 'input' ).each( function() {55 $( this ).get( 0 ).checked = isChecked;56 } );57 } );58 } );59 </script>60 61 50 <form method="post" action="<?php echo esc_url( $form_action ); ?>" class="wp-widget-disable-form"> 62 51 <?php … … 67 56 </form> 68 57 </div> 58 59 <script> 60 const toggleButtons = document.querySelectorAll( '#wp_widget_disable_select_all, #wp_widget_disable_deselect_all' ); 61 toggleButtons.forEach( function( button ) { 62 button.addEventListener( 'click', function() { 63 const isChecked = 'wp_widget_disable_select_all' === button.id; 64 const inputs = button.closest( 'td' ).querySelectorAll( 'input' ); 65 inputs.forEach( function( input ) { 66 input.checked = isChecked; 67 } ); 68 } ); 69 } ); 70 </script> -
wp-widget-disable/trunk/wp-widget-disable.php
r2695407 r2887107 1 1 <?php 2 2 /** 3 * Plugin Name: Widget Disable 4 * Plugin URI: https://required.com/services/wordpress-plugins/wp-widget-disable/ 5 * Description: Disable sidebar and dashboard widgets with an easy to use interface. Simply use the checkboxes provided under <strong>Appearance -> Disable Widgets</strong> and select the widgets you'd like to hide. 6 * Version: 2.1.0 7 * Author: required 8 * Author URI: https://required.com 9 * License: GPLv2+ 10 * Text Domain: wp-widget-disable 3 * Plugin Name: Widget Disable 4 * Plugin URI: https://required.com/services/wordpress-plugins/wp-widget-disable/ 5 * Description: Disable sidebar and dashboard widgets with an easy to use interface. Simply use the checkboxes provided under <strong>Appearance -> Disable Widgets</strong> and select the widgets you'd like to hide. 6 * Version: 3.0.0 7 * Requires at least: 6.0 8 * Requires PHP: 7.4 9 * Author: required 10 * Author URI: https://required.com 11 * License: GPLv2+ 12 * Text Domain: wp-widget-disable 11 13 * 12 * Copyright (c) 2015-202 2required (email: support@required.ch)14 * Copyright (c) 2015-2023 required (email: support@required.ch) 13 15 * 14 16 * This program is free software; you can redistribute it and/or modify … … 37 39 array( 38 40 'title' => 'WP Widget Disable', 39 'php' => ' 5.6',40 'wp' => ' 4.7',41 'php' => '7.4', 42 'wp' => '6.0', 41 43 'file' => __FILE__, 42 44 )
Note: See TracChangeset
for help on using the changeset viewer.