Changeset 3221117
- Timestamp:
- 01/12/2025 03:58:39 PM (15 months ago)
- Location:
- ns-category-widget
- Files:
-
- 2 added
- 4 deleted
- 36 edited
- 1 copied
-
assets/banner-772x250.png (modified) (1 prop) (previous)
-
assets/screenshot-1.png (modified) (1 prop) (previous)
-
tags/4.1.4 (copied) (copied from ns-category-widget/trunk)
-
tags/4.1.4/app/Admin/SettingsPage.php (modified) (3 diffs)
-
tags/4.1.4/app/Admin/Widget.php (modified) (1 diff)
-
tags/4.1.4/app/Core/Core.php (modified) (1 diff)
-
tags/4.1.4/app/Widgets/CategoryWidget.php (modified) (2 diffs)
-
tags/4.1.4/composer.json (added)
-
tags/4.1.4/languages (deleted)
-
tags/4.1.4/ns-category-widget.php (modified) (3 diffs)
-
tags/4.1.4/readme.txt (modified) (2 diffs)
-
tags/4.1.4/vendor/autoload.php (modified) (1 diff)
-
tags/4.1.4/vendor/composer/ClassLoader.php (modified) (25 diffs)
-
tags/4.1.4/vendor/composer/InstalledVersions.php (modified) (13 diffs)
-
tags/4.1.4/vendor/composer/autoload_classmap.php (modified) (1 diff)
-
tags/4.1.4/vendor/composer/autoload_namespaces.php (modified) (1 diff)
-
tags/4.1.4/vendor/composer/autoload_psr4.php (modified) (1 diff)
-
tags/4.1.4/vendor/composer/autoload_real.php (modified) (2 diffs)
-
tags/4.1.4/vendor/composer/autoload_static.php (modified) (2 diffs)
-
tags/4.1.4/vendor/composer/installed.json (modified) (3 diffs)
-
tags/4.1.4/vendor/composer/installed.php (modified) (2 diffs)
-
tags/4.1.4/vendor/ernilambar/wp-admin-notice/composer.json (modified) (2 diffs)
-
tags/4.1.4/vendor/ernilambar/wp-admin-notice/composer.lock (deleted)
-
trunk/app/Admin/SettingsPage.php (modified) (3 diffs)
-
trunk/app/Admin/Widget.php (modified) (1 diff)
-
trunk/app/Core/Core.php (modified) (1 diff)
-
trunk/app/Widgets/CategoryWidget.php (modified) (2 diffs)
-
trunk/composer.json (added)
-
trunk/languages (deleted)
-
trunk/ns-category-widget.php (modified) (3 diffs)
-
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) (13 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.json (modified) (3 diffs)
-
trunk/vendor/composer/installed.php (modified) (2 diffs)
-
trunk/vendor/ernilambar/wp-admin-notice/composer.json (modified) (2 diffs)
-
trunk/vendor/ernilambar/wp-admin-notice/composer.lock (deleted)
Legend:
- Unmodified
- Added
- Removed
-
ns-category-widget/assets/banner-772x250.png
-
Property
svn:mime-type
changed from
application/octet-streamtoimage/png
-
Property
svn:mime-type
changed from
-
ns-category-widget/assets/screenshot-1.png
-
Property
svn:mime-type
changed from
application/octet-streamtoimage/png
-
Property
svn:mime-type
changed from
-
ns-category-widget/tags/4.1.4/app/Admin/SettingsPage.php
r3109937 r3221117 8 8 namespace NSCW\Admin; 9 9 10 use Nilambar\Optioner\Optioner; 10 11 use NSCW\Core\Option; 11 use Nilambar\Optioner\Optioner;12 12 13 13 /** … … 122 122 * @since 4.0.0 123 123 * 124 * @param Optioner $o ptioner_objectInstance of Optioner.125 */ 126 public function render_sidebar( $o ptioner_object) {127 $o ptioner_object->render_sidebar_box(124 * @param Optioner $obj Instance of Optioner. 125 */ 126 public function render_sidebar( $obj ) { 127 $obj->render_sidebar_box( 128 128 array( 129 129 'title' => 'Help & Support', … … 134 134 <p><a href="https://wordpress.org/support/plugin/ns-category-widget/reviews/#new-post" target="_blank">Review and rate this plugin on WordPress.org</a></p>', 135 135 ), 136 $o ptioner_object137 ); 138 139 $o ptioner_object->render_sidebar_box(136 $obj 137 ); 138 139 $obj->render_sidebar_box( 140 140 array( 141 141 'title' => 'Recommended Plugins', 142 'content' => $this->get_recommended_plugins_content(), 142 'content' => '<ul> 143 <li><a href="https://wordpress.org/plugins/ns-featured-posts/" target="_blank">NS Featured Posts</a></li> 144 <li><a href="https://wordpress.org/plugins/ns-category-widget/" target="_blank">NS Category Widget</a></li> 145 <li><a href="https://wordpress.org/plugins/admin-customizer/" target="_blank">Admin Customizer</a></li> 146 <li><a href="https://wordpress.org/plugins/date-today-nepali/" target="_blank">Date Today Nepali</a></li> 147 </ul>', 143 148 ), 144 $o ptioner_object145 ); 146 147 $o ptioner_object->render_sidebar_box(149 $obj 150 ); 151 152 $obj->render_sidebar_box( 148 153 array( 149 154 'title' => 'Recent Blog Posts', 150 155 'content' => '<div class="ns-blog-list"></div>', 151 156 ), 152 $optioner_object 153 ); 154 } 155 156 /** 157 * Returns recommended plugins markup. 158 * 159 * @since 4.0.0 160 * 161 * @return string Markup. 162 */ 163 public function get_recommended_plugins_content() { 164 return '<ul> 165 <li><a href="https://wordpress.org/plugins/ns-featured-posts/" target="_blank">NS Featured Posts</a></li> 166 <li><a href="https://wordpress.org/plugins/ns-category-widget/" target="_blank">NS Category Widget</a></li> 167 <li><a href="https://wordpress.org/plugins/admin-customizer/" target="_blank">Admin Customizer</a></li> 168 <li><a href="https://wordpress.org/plugins/date-today-nepali/" target="_blank">Date Today Nepali</a></li> 169 </ul>'; 157 $obj 158 ); 170 159 } 171 160 -
ns-category-widget/tags/4.1.4/app/Admin/Widget.php
r3109937 r3221117 7 7 8 8 namespace NSCW\Admin; 9 10 use NSCW\Widgets\CategoryWidget;11 9 12 10 /** -
ns-category-widget/tags/4.1.4/app/Core/Core.php
r3109937 r3221117 8 8 namespace NSCW\Core; 9 9 10 use NSCW\Core\Option;11 10 use NSCW\Widgets\CategoryWidget; 12 11 -
ns-category-widget/tags/4.1.4/app/Widgets/CategoryWidget.php
r3109937 r3221117 42 42 */ 43 43 public function widget( $args, $instance ) { 44 if ( ! isset( $args['widget_id'] ) ) { 45 $args['widget_id'] = $this->id; 46 } 47 44 48 $title = apply_filters( 'widget_title', empty( $instance['title'] ) ? '' : $instance['title'], $instance, $this->id_base ); 45 49 … … 209 213 ); 210 214 211 $title = htmlspecialchars( $instance['title'] );212 $taxonomy = htmlspecialchars( $instance['taxonomy'] );215 $title = htmlspecialchars( $instance['title'], ENT_COMPAT ); 216 $taxonomy = htmlspecialchars( $instance['taxonomy'], ENT_COMPAT ); 213 217 $parent_category = isset( $instance['parent_category'] ) ? esc_attr( $instance['parent_category'] ) : ''; 214 218 $depth = isset( $instance['depth'] ) ? esc_attr( $instance['depth'] ) : ''; 215 219 $orderby = isset( $instance['orderby'] ) ? esc_attr( $instance['orderby'] ) : ''; 216 220 $order = isset( $instance['order'] ) ? esc_attr( $instance['order'] ) : ''; 217 $number = htmlspecialchars( $instance['number'] );218 $include_category = htmlspecialchars( $instance['include_category'] );219 $exclude_category = htmlspecialchars( $instance['exclude_category'] );221 $number = htmlspecialchars( $instance['number'], ENT_COMPAT ); 222 $include_category = htmlspecialchars( $instance['include_category'], ENT_COMPAT ); 223 $exclude_category = htmlspecialchars( $instance['exclude_category'], ENT_COMPAT ); 220 224 ?> 221 225 -
ns-category-widget/tags/4.1.4/ns-category-widget.php
r3127992 r3221117 4 4 * Plugin URI: https://www.nilambar.net/2013/12/ns-category-widget-wordpress-plugin.html 5 5 * Description: A widget plugin for listing categories and taxonomies in the way you want. 6 * Version: 4.1. 36 * Version: 4.1.4 7 7 * Requires at least: 6.0 8 * Requires PHP: 7.2 8 * Requires PHP: 7.2.24 9 9 * Author: Nilambar Sharma 10 10 * Author URI: https://www.nilambar.net 11 * License: GPL -2.0+12 * License URI: http ://www.gnu.org/licenses/gpl-2.0.txt11 * License: GPLv2 or later 12 * License URI: https://www.gnu.org/licenses/old-licenses/gpl-2.0.txt 13 13 * Text Domain: ns-category-widget 14 * Domain Path: /languages15 14 * 16 15 * @package NS_Category_Widget 17 16 */ 17 18 use NSCW\Init; 18 19 19 20 // If this file is called directly, abort. … … 22 23 } 23 24 24 define( 'NS_CATEGORY_WIDGET_VERSION', '4.1. 3' );25 define( 'NS_CATEGORY_WIDGET_VERSION', '4.1.4' ); 25 26 define( 'NS_CATEGORY_WIDGET_SLUG', 'ns-category-widget' ); 26 27 define( 'NS_CATEGORY_WIDGET_BASE_FILEPATH', __FILE__ ); … … 36 37 37 38 if ( class_exists( 'NSCW\Init' ) ) { 38 \NSCW\Init::register_services();39 Init::register_services(); 39 40 } -
ns-category-widget/tags/4.1.4/readme.txt
r3127992 r3221117 4 4 Donate link: https://www.nilambar.net/2013/12/ns-category-widget-wordpress-plugin.html 5 5 Tags: category, listing, widget, sidebar, taxonomy 6 Tested up to: 6. 67 Stable tag: 4.1. 36 Tested up to: 6.7 7 Stable tag: 4.1.4 8 8 License: GPLv2 or later 9 License URI: http ://www.gnu.org/licenses/gpl-2.0.html9 License URI: https://www.gnu.org/licenses/old-licenses/gpl-2.0.txt 10 10 11 11 A plugin to add widget for listing Categories and Taxonomies. Extending Default WordPress Category Widget. … … 46 46 47 47 == Changelog == 48 49 = 4.1.4 - 12 Jan 2025 = 50 * Update packages 48 51 49 52 = 4.1.3 - 30 Jul 2024 = -
ns-category-widget/tags/4.1.4/vendor/autoload.php
r3127992 r3221117 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 ComposerAutoloaderInitc ca94b813f6e384d9ae973182b6ffb5f::getLoader();25 return ComposerAutoloaderInitc70dbf6f6c1641253aec607e5c50aa26::getLoader(); -
ns-category-widget/tags/4.1.4/vendor/composer/ClassLoader.php
r3109937 r3221117 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 } -
ns-category-widget/tags/4.1.4/vendor/composer/InstalledVersions.php
r3109937 r3221117 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() … … 321 323 322 324 $installed = array(); 325 $copiedLocalDir = false; 323 326 324 327 if (self::$canGetVendors) { … … 329 332 /** @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 333 $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]; 334 self::$installedByVendor[$vendorDir] = $required; 335 $installed[] = $required; 336 if (strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) { 337 self::$installed = $required; 338 $copiedLocalDir = true; 334 339 } 335 340 } … … 349 354 } 350 355 351 if (self::$installed !== array() ) {356 if (self::$installed !== array() && !$copiedLocalDir) { 352 357 $installed[] = self::$installed; 353 358 } -
ns-category-widget/tags/4.1.4/vendor/composer/autoload_classmap.php
r3113194 r3221117 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 -
ns-category-widget/tags/4.1.4/vendor/composer/autoload_namespaces.php
r2327825 r3221117 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 -
ns-category-widget/tags/4.1.4/vendor/composer/autoload_psr4.php
r3109937 r3221117 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 -
ns-category-widget/tags/4.1.4/vendor/composer/autoload_real.php
r3127992 r3221117 3 3 // autoload_real.php @generated by Composer 4 4 5 class ComposerAutoloaderInitc ca94b813f6e384d9ae973182b6ffb5f5 class ComposerAutoloaderInitc70dbf6f6c1641253aec607e5c50aa26 6 6 { 7 7 private static $loader; … … 25 25 require __DIR__ . '/platform_check.php'; 26 26 27 spl_autoload_register(array('ComposerAutoloaderInitc ca94b813f6e384d9ae973182b6ffb5f', 'loadClassLoader'), true, true);28 self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname( \dirname(__FILE__)));29 spl_autoload_unregister(array('ComposerAutoloaderInitc ca94b813f6e384d9ae973182b6ffb5f', 'loadClassLoader'));27 spl_autoload_register(array('ComposerAutoloaderInitc70dbf6f6c1641253aec607e5c50aa26', 'loadClassLoader'), true, true); 28 self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); 29 spl_autoload_unregister(array('ComposerAutoloaderInitc70dbf6f6c1641253aec607e5c50aa26', '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\ComposerStaticInitcca94b813f6e384d9ae973182b6ffb5f::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\ComposerStaticInitc70dbf6f6c1641253aec607e5c50aa26::getInitializer($loader)); 52 33 53 34 $loader->register(true); -
ns-category-widget/tags/4.1.4/vendor/composer/autoload_static.php
r3127992 r3221117 5 5 namespace Composer\Autoload; 6 6 7 class ComposerStaticInitc ca94b813f6e384d9ae973182b6ffb5f7 class ComposerStaticInitc70dbf6f6c1641253aec607e5c50aa26 8 8 { 9 9 public static $prefixLengthsPsr4 = array ( … … 43 43 { 44 44 return \Closure::bind(function () use ($loader) { 45 $loader->prefixLengthsPsr4 = ComposerStaticInitc ca94b813f6e384d9ae973182b6ffb5f::$prefixLengthsPsr4;46 $loader->prefixDirsPsr4 = ComposerStaticInitc ca94b813f6e384d9ae973182b6ffb5f::$prefixDirsPsr4;47 $loader->classMap = ComposerStaticInitc ca94b813f6e384d9ae973182b6ffb5f::$classMap;45 $loader->prefixLengthsPsr4 = ComposerStaticInitc70dbf6f6c1641253aec607e5c50aa26::$prefixLengthsPsr4; 46 $loader->prefixDirsPsr4 = ComposerStaticInitc70dbf6f6c1641253aec607e5c50aa26::$prefixDirsPsr4; 47 $loader->classMap = ComposerStaticInitc70dbf6f6c1641253aec607e5c50aa26::$classMap; 48 48 49 49 }, null, ClassLoader::class); -
ns-category-widget/tags/4.1.4/vendor/composer/installed.json
r3127992 r3221117 54 54 { 55 55 "name": "ernilambar/wp-admin-notice", 56 "version": "2.0. 0",57 "version_normalized": "2.0. 0.0",56 "version": "2.0.1", 57 "version_normalized": "2.0.1.0", 58 58 "source": { 59 59 "type": "git", 60 60 "url": "https://github.com/ernilambar/wp-admin-notice.git", 61 "reference": " ef71e83f6e82d3224783756426ddb209991e30cb"61 "reference": "1649810056fe4072ab470973c61c33182ae7c4aa" 62 62 }, 63 63 "dist": { 64 64 "type": "zip", 65 "url": "https://api.github.com/repos/ernilambar/wp-admin-notice/zipball/ ef71e83f6e82d3224783756426ddb209991e30cb",66 "reference": " ef71e83f6e82d3224783756426ddb209991e30cb",65 "url": "https://api.github.com/repos/ernilambar/wp-admin-notice/zipball/1649810056fe4072ab470973c61c33182ae7c4aa", 66 "reference": "1649810056fe4072ab470973c61c33182ae7c4aa", 67 67 "shasum": "" 68 68 }, … … 77 77 "wp-coding-standards/wpcs": "^3.1" 78 78 }, 79 "time": "2024-0 7-26T10:24:55+00:00",79 "time": "2024-08-02T09:51:55+00:00", 80 80 "type": "library", 81 81 "installation-source": "dist", … … 105 105 "support": { 106 106 "issues": "https://github.com/ernilambar/wp-admin-notice/issues/", 107 "source": "https://github.com/ernilambar/wp-admin-notice/tree/2.0. 0"107 "source": "https://github.com/ernilambar/wp-admin-notice/tree/2.0.1" 108 108 }, 109 109 "install-path": "../ernilambar/wp-admin-notice" -
ns-category-widget/tags/4.1.4/vendor/composer/installed.php
r3127992 r3221117 1 1 <?php return array( 2 2 'root' => array( 3 'pretty_version' => 'dev-main', 4 'version' => 'dev-main', 3 'name' => 'ernilambar/ns-category-widget', 4 'pretty_version' => '4.1.4', 5 'version' => '4.1.4.0', 6 'reference' => '97a2f2c7ae4cab535484b12f1acf6d3e982cdd87', 5 7 'type' => 'library', 6 8 'install_path' => __DIR__ . '/../../', 7 9 'aliases' => array(), 8 'reference' => 'ec7085bb71198158c9bd76caa1695a26e0934a5a',9 'name' => 'ernilambar/ns-category-widget',10 10 'dev' => false, 11 11 ), 12 12 'versions' => array( 13 13 'ernilambar/ns-category-widget' => array( 14 'pretty_version' => 'dev-main', 15 'version' => 'dev-main', 14 'pretty_version' => '4.1.4', 15 'version' => '4.1.4.0', 16 'reference' => '97a2f2c7ae4cab535484b12f1acf6d3e982cdd87', 16 17 'type' => 'library', 17 18 'install_path' => __DIR__ . '/../../', 18 19 'aliases' => array(), 19 'reference' => 'ec7085bb71198158c9bd76caa1695a26e0934a5a',20 20 'dev_requirement' => false, 21 21 ), … … 23 23 'pretty_version' => '3.0.0', 24 24 'version' => '3.0.0.0', 25 'reference' => '858361d4a6fcd77764b8abfa7b17d43b39bd9a24', 25 26 'type' => 'library', 26 27 'install_path' => __DIR__ . '/../ernilambar/optioner', 27 28 'aliases' => array(), 28 'reference' => '858361d4a6fcd77764b8abfa7b17d43b39bd9a24',29 29 'dev_requirement' => false, 30 30 ), 31 31 'ernilambar/wp-admin-notice' => array( 32 'pretty_version' => '2.0.0', 33 'version' => '2.0.0.0', 32 'pretty_version' => '2.0.1', 33 'version' => '2.0.1.0', 34 'reference' => '1649810056fe4072ab470973c61c33182ae7c4aa', 34 35 'type' => 'library', 35 36 'install_path' => __DIR__ . '/../ernilambar/wp-admin-notice', 36 37 'aliases' => array(), 37 'reference' => 'ef71e83f6e82d3224783756426ddb209991e30cb',38 38 'dev_requirement' => false, 39 39 ), -
ns-category-widget/tags/4.1.4/vendor/ernilambar/wp-admin-notice/composer.json
r3127992 r3221117 47 47 }, 48 48 "scripts": { 49 "format": "@php ./vendor/bin/phpcbf --report-full --report-summary", 49 50 "lint": [ 50 51 "@lint-php", … … 52 53 ], 53 54 "lint-php": "@php ./vendor/bin/parallel-lint --colors --exclude .git --exclude vendor .", 54 "phpcbf": "@php ./vendor/bin/phpcbf --report-full --report-summary .", 55 "phpcs": "@php ./vendor/bin/phpcs --report-full --report-summary ." 55 "phpcs": "@php ./vendor/bin/phpcs --report-full --report-summary" 56 56 } 57 57 } -
ns-category-widget/trunk/app/Admin/SettingsPage.php
r3109937 r3221117 8 8 namespace NSCW\Admin; 9 9 10 use Nilambar\Optioner\Optioner; 10 11 use NSCW\Core\Option; 11 use Nilambar\Optioner\Optioner;12 12 13 13 /** … … 122 122 * @since 4.0.0 123 123 * 124 * @param Optioner $o ptioner_objectInstance of Optioner.125 */ 126 public function render_sidebar( $o ptioner_object) {127 $o ptioner_object->render_sidebar_box(124 * @param Optioner $obj Instance of Optioner. 125 */ 126 public function render_sidebar( $obj ) { 127 $obj->render_sidebar_box( 128 128 array( 129 129 'title' => 'Help & Support', … … 134 134 <p><a href="https://wordpress.org/support/plugin/ns-category-widget/reviews/#new-post" target="_blank">Review and rate this plugin on WordPress.org</a></p>', 135 135 ), 136 $o ptioner_object137 ); 138 139 $o ptioner_object->render_sidebar_box(136 $obj 137 ); 138 139 $obj->render_sidebar_box( 140 140 array( 141 141 'title' => 'Recommended Plugins', 142 'content' => $this->get_recommended_plugins_content(), 142 'content' => '<ul> 143 <li><a href="https://wordpress.org/plugins/ns-featured-posts/" target="_blank">NS Featured Posts</a></li> 144 <li><a href="https://wordpress.org/plugins/ns-category-widget/" target="_blank">NS Category Widget</a></li> 145 <li><a href="https://wordpress.org/plugins/admin-customizer/" target="_blank">Admin Customizer</a></li> 146 <li><a href="https://wordpress.org/plugins/date-today-nepali/" target="_blank">Date Today Nepali</a></li> 147 </ul>', 143 148 ), 144 $o ptioner_object145 ); 146 147 $o ptioner_object->render_sidebar_box(149 $obj 150 ); 151 152 $obj->render_sidebar_box( 148 153 array( 149 154 'title' => 'Recent Blog Posts', 150 155 'content' => '<div class="ns-blog-list"></div>', 151 156 ), 152 $optioner_object 153 ); 154 } 155 156 /** 157 * Returns recommended plugins markup. 158 * 159 * @since 4.0.0 160 * 161 * @return string Markup. 162 */ 163 public function get_recommended_plugins_content() { 164 return '<ul> 165 <li><a href="https://wordpress.org/plugins/ns-featured-posts/" target="_blank">NS Featured Posts</a></li> 166 <li><a href="https://wordpress.org/plugins/ns-category-widget/" target="_blank">NS Category Widget</a></li> 167 <li><a href="https://wordpress.org/plugins/admin-customizer/" target="_blank">Admin Customizer</a></li> 168 <li><a href="https://wordpress.org/plugins/date-today-nepali/" target="_blank">Date Today Nepali</a></li> 169 </ul>'; 157 $obj 158 ); 170 159 } 171 160 -
ns-category-widget/trunk/app/Admin/Widget.php
r3109937 r3221117 7 7 8 8 namespace NSCW\Admin; 9 10 use NSCW\Widgets\CategoryWidget;11 9 12 10 /** -
ns-category-widget/trunk/app/Core/Core.php
r3109937 r3221117 8 8 namespace NSCW\Core; 9 9 10 use NSCW\Core\Option;11 10 use NSCW\Widgets\CategoryWidget; 12 11 -
ns-category-widget/trunk/app/Widgets/CategoryWidget.php
r3109937 r3221117 42 42 */ 43 43 public function widget( $args, $instance ) { 44 if ( ! isset( $args['widget_id'] ) ) { 45 $args['widget_id'] = $this->id; 46 } 47 44 48 $title = apply_filters( 'widget_title', empty( $instance['title'] ) ? '' : $instance['title'], $instance, $this->id_base ); 45 49 … … 209 213 ); 210 214 211 $title = htmlspecialchars( $instance['title'] );212 $taxonomy = htmlspecialchars( $instance['taxonomy'] );215 $title = htmlspecialchars( $instance['title'], ENT_COMPAT ); 216 $taxonomy = htmlspecialchars( $instance['taxonomy'], ENT_COMPAT ); 213 217 $parent_category = isset( $instance['parent_category'] ) ? esc_attr( $instance['parent_category'] ) : ''; 214 218 $depth = isset( $instance['depth'] ) ? esc_attr( $instance['depth'] ) : ''; 215 219 $orderby = isset( $instance['orderby'] ) ? esc_attr( $instance['orderby'] ) : ''; 216 220 $order = isset( $instance['order'] ) ? esc_attr( $instance['order'] ) : ''; 217 $number = htmlspecialchars( $instance['number'] );218 $include_category = htmlspecialchars( $instance['include_category'] );219 $exclude_category = htmlspecialchars( $instance['exclude_category'] );221 $number = htmlspecialchars( $instance['number'], ENT_COMPAT ); 222 $include_category = htmlspecialchars( $instance['include_category'], ENT_COMPAT ); 223 $exclude_category = htmlspecialchars( $instance['exclude_category'], ENT_COMPAT ); 220 224 ?> 221 225 -
ns-category-widget/trunk/ns-category-widget.php
r3127992 r3221117 4 4 * Plugin URI: https://www.nilambar.net/2013/12/ns-category-widget-wordpress-plugin.html 5 5 * Description: A widget plugin for listing categories and taxonomies in the way you want. 6 * Version: 4.1. 36 * Version: 4.1.4 7 7 * Requires at least: 6.0 8 * Requires PHP: 7.2 8 * Requires PHP: 7.2.24 9 9 * Author: Nilambar Sharma 10 10 * Author URI: https://www.nilambar.net 11 * License: GPL -2.0+12 * License URI: http ://www.gnu.org/licenses/gpl-2.0.txt11 * License: GPLv2 or later 12 * License URI: https://www.gnu.org/licenses/old-licenses/gpl-2.0.txt 13 13 * Text Domain: ns-category-widget 14 * Domain Path: /languages15 14 * 16 15 * @package NS_Category_Widget 17 16 */ 17 18 use NSCW\Init; 18 19 19 20 // If this file is called directly, abort. … … 22 23 } 23 24 24 define( 'NS_CATEGORY_WIDGET_VERSION', '4.1. 3' );25 define( 'NS_CATEGORY_WIDGET_VERSION', '4.1.4' ); 25 26 define( 'NS_CATEGORY_WIDGET_SLUG', 'ns-category-widget' ); 26 27 define( 'NS_CATEGORY_WIDGET_BASE_FILEPATH', __FILE__ ); … … 36 37 37 38 if ( class_exists( 'NSCW\Init' ) ) { 38 \NSCW\Init::register_services();39 Init::register_services(); 39 40 } -
ns-category-widget/trunk/readme.txt
r3127992 r3221117 4 4 Donate link: https://www.nilambar.net/2013/12/ns-category-widget-wordpress-plugin.html 5 5 Tags: category, listing, widget, sidebar, taxonomy 6 Tested up to: 6. 67 Stable tag: 4.1. 36 Tested up to: 6.7 7 Stable tag: 4.1.4 8 8 License: GPLv2 or later 9 License URI: http ://www.gnu.org/licenses/gpl-2.0.html9 License URI: https://www.gnu.org/licenses/old-licenses/gpl-2.0.txt 10 10 11 11 A plugin to add widget for listing Categories and Taxonomies. Extending Default WordPress Category Widget. … … 46 46 47 47 == Changelog == 48 49 = 4.1.4 - 12 Jan 2025 = 50 * Update packages 48 51 49 52 = 4.1.3 - 30 Jul 2024 = -
ns-category-widget/trunk/vendor/autoload.php
r3127992 r3221117 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 ComposerAutoloaderInitc ca94b813f6e384d9ae973182b6ffb5f::getLoader();25 return ComposerAutoloaderInitc70dbf6f6c1641253aec607e5c50aa26::getLoader(); -
ns-category-widget/trunk/vendor/composer/ClassLoader.php
r3109937 r3221117 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 } -
ns-category-widget/trunk/vendor/composer/InstalledVersions.php
r3109937 r3221117 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() … … 321 323 322 324 $installed = array(); 325 $copiedLocalDir = false; 323 326 324 327 if (self::$canGetVendors) { … … 329 332 /** @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 333 $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]; 334 self::$installedByVendor[$vendorDir] = $required; 335 $installed[] = $required; 336 if (strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) { 337 self::$installed = $required; 338 $copiedLocalDir = true; 334 339 } 335 340 } … … 349 354 } 350 355 351 if (self::$installed !== array() ) {356 if (self::$installed !== array() && !$copiedLocalDir) { 352 357 $installed[] = self::$installed; 353 358 } -
ns-category-widget/trunk/vendor/composer/autoload_classmap.php
r3113194 r3221117 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 -
ns-category-widget/trunk/vendor/composer/autoload_namespaces.php
r2327825 r3221117 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 -
ns-category-widget/trunk/vendor/composer/autoload_psr4.php
r3109937 r3221117 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 -
ns-category-widget/trunk/vendor/composer/autoload_real.php
r3127992 r3221117 3 3 // autoload_real.php @generated by Composer 4 4 5 class ComposerAutoloaderInitc ca94b813f6e384d9ae973182b6ffb5f5 class ComposerAutoloaderInitc70dbf6f6c1641253aec607e5c50aa26 6 6 { 7 7 private static $loader; … … 25 25 require __DIR__ . '/platform_check.php'; 26 26 27 spl_autoload_register(array('ComposerAutoloaderInitc ca94b813f6e384d9ae973182b6ffb5f', 'loadClassLoader'), true, true);28 self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname( \dirname(__FILE__)));29 spl_autoload_unregister(array('ComposerAutoloaderInitc ca94b813f6e384d9ae973182b6ffb5f', 'loadClassLoader'));27 spl_autoload_register(array('ComposerAutoloaderInitc70dbf6f6c1641253aec607e5c50aa26', 'loadClassLoader'), true, true); 28 self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); 29 spl_autoload_unregister(array('ComposerAutoloaderInitc70dbf6f6c1641253aec607e5c50aa26', '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\ComposerStaticInitcca94b813f6e384d9ae973182b6ffb5f::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\ComposerStaticInitc70dbf6f6c1641253aec607e5c50aa26::getInitializer($loader)); 52 33 53 34 $loader->register(true); -
ns-category-widget/trunk/vendor/composer/autoload_static.php
r3127992 r3221117 5 5 namespace Composer\Autoload; 6 6 7 class ComposerStaticInitc ca94b813f6e384d9ae973182b6ffb5f7 class ComposerStaticInitc70dbf6f6c1641253aec607e5c50aa26 8 8 { 9 9 public static $prefixLengthsPsr4 = array ( … … 43 43 { 44 44 return \Closure::bind(function () use ($loader) { 45 $loader->prefixLengthsPsr4 = ComposerStaticInitc ca94b813f6e384d9ae973182b6ffb5f::$prefixLengthsPsr4;46 $loader->prefixDirsPsr4 = ComposerStaticInitc ca94b813f6e384d9ae973182b6ffb5f::$prefixDirsPsr4;47 $loader->classMap = ComposerStaticInitc ca94b813f6e384d9ae973182b6ffb5f::$classMap;45 $loader->prefixLengthsPsr4 = ComposerStaticInitc70dbf6f6c1641253aec607e5c50aa26::$prefixLengthsPsr4; 46 $loader->prefixDirsPsr4 = ComposerStaticInitc70dbf6f6c1641253aec607e5c50aa26::$prefixDirsPsr4; 47 $loader->classMap = ComposerStaticInitc70dbf6f6c1641253aec607e5c50aa26::$classMap; 48 48 49 49 }, null, ClassLoader::class); -
ns-category-widget/trunk/vendor/composer/installed.json
r3127992 r3221117 54 54 { 55 55 "name": "ernilambar/wp-admin-notice", 56 "version": "2.0. 0",57 "version_normalized": "2.0. 0.0",56 "version": "2.0.1", 57 "version_normalized": "2.0.1.0", 58 58 "source": { 59 59 "type": "git", 60 60 "url": "https://github.com/ernilambar/wp-admin-notice.git", 61 "reference": " ef71e83f6e82d3224783756426ddb209991e30cb"61 "reference": "1649810056fe4072ab470973c61c33182ae7c4aa" 62 62 }, 63 63 "dist": { 64 64 "type": "zip", 65 "url": "https://api.github.com/repos/ernilambar/wp-admin-notice/zipball/ ef71e83f6e82d3224783756426ddb209991e30cb",66 "reference": " ef71e83f6e82d3224783756426ddb209991e30cb",65 "url": "https://api.github.com/repos/ernilambar/wp-admin-notice/zipball/1649810056fe4072ab470973c61c33182ae7c4aa", 66 "reference": "1649810056fe4072ab470973c61c33182ae7c4aa", 67 67 "shasum": "" 68 68 }, … … 77 77 "wp-coding-standards/wpcs": "^3.1" 78 78 }, 79 "time": "2024-0 7-26T10:24:55+00:00",79 "time": "2024-08-02T09:51:55+00:00", 80 80 "type": "library", 81 81 "installation-source": "dist", … … 105 105 "support": { 106 106 "issues": "https://github.com/ernilambar/wp-admin-notice/issues/", 107 "source": "https://github.com/ernilambar/wp-admin-notice/tree/2.0. 0"107 "source": "https://github.com/ernilambar/wp-admin-notice/tree/2.0.1" 108 108 }, 109 109 "install-path": "../ernilambar/wp-admin-notice" -
ns-category-widget/trunk/vendor/composer/installed.php
r3127992 r3221117 1 1 <?php return array( 2 2 'root' => array( 3 'pretty_version' => 'dev-main', 4 'version' => 'dev-main', 3 'name' => 'ernilambar/ns-category-widget', 4 'pretty_version' => '4.1.4', 5 'version' => '4.1.4.0', 6 'reference' => '97a2f2c7ae4cab535484b12f1acf6d3e982cdd87', 5 7 'type' => 'library', 6 8 'install_path' => __DIR__ . '/../../', 7 9 'aliases' => array(), 8 'reference' => 'ec7085bb71198158c9bd76caa1695a26e0934a5a',9 'name' => 'ernilambar/ns-category-widget',10 10 'dev' => false, 11 11 ), 12 12 'versions' => array( 13 13 'ernilambar/ns-category-widget' => array( 14 'pretty_version' => 'dev-main', 15 'version' => 'dev-main', 14 'pretty_version' => '4.1.4', 15 'version' => '4.1.4.0', 16 'reference' => '97a2f2c7ae4cab535484b12f1acf6d3e982cdd87', 16 17 'type' => 'library', 17 18 'install_path' => __DIR__ . '/../../', 18 19 'aliases' => array(), 19 'reference' => 'ec7085bb71198158c9bd76caa1695a26e0934a5a',20 20 'dev_requirement' => false, 21 21 ), … … 23 23 'pretty_version' => '3.0.0', 24 24 'version' => '3.0.0.0', 25 'reference' => '858361d4a6fcd77764b8abfa7b17d43b39bd9a24', 25 26 'type' => 'library', 26 27 'install_path' => __DIR__ . '/../ernilambar/optioner', 27 28 'aliases' => array(), 28 'reference' => '858361d4a6fcd77764b8abfa7b17d43b39bd9a24',29 29 'dev_requirement' => false, 30 30 ), 31 31 'ernilambar/wp-admin-notice' => array( 32 'pretty_version' => '2.0.0', 33 'version' => '2.0.0.0', 32 'pretty_version' => '2.0.1', 33 'version' => '2.0.1.0', 34 'reference' => '1649810056fe4072ab470973c61c33182ae7c4aa', 34 35 'type' => 'library', 35 36 'install_path' => __DIR__ . '/../ernilambar/wp-admin-notice', 36 37 'aliases' => array(), 37 'reference' => 'ef71e83f6e82d3224783756426ddb209991e30cb',38 38 'dev_requirement' => false, 39 39 ), -
ns-category-widget/trunk/vendor/ernilambar/wp-admin-notice/composer.json
r3127992 r3221117 47 47 }, 48 48 "scripts": { 49 "format": "@php ./vendor/bin/phpcbf --report-full --report-summary", 49 50 "lint": [ 50 51 "@lint-php", … … 52 53 ], 53 54 "lint-php": "@php ./vendor/bin/parallel-lint --colors --exclude .git --exclude vendor .", 54 "phpcbf": "@php ./vendor/bin/phpcbf --report-full --report-summary .", 55 "phpcs": "@php ./vendor/bin/phpcs --report-full --report-summary ." 55 "phpcs": "@php ./vendor/bin/phpcs --report-full --report-summary" 56 56 } 57 57 }
Note: See TracChangeset
for help on using the changeset viewer.