Changeset 3382950
- Timestamp:
- 10/22/2025 10:19:41 PM (3 months ago)
- Location:
- tweakmaster
- Files:
-
- 2 added
- 4 deleted
- 112 edited
- 1 copied
-
tags/1.1.1 (copied) (copied from tweakmaster/trunk)
-
tags/1.1.1/composer.lock (modified) (4 diffs)
-
tags/1.1.1/php/fn-settings.php (modified) (11 diffs)
-
tags/1.1.1/php/tweaks-standalone/convert-jpeg-to-avif.php (modified) (1 diff)
-
tags/1.1.1/php/tweaks-standalone/dequeue-jquery-migrate.php (modified) (2 diffs)
-
tags/1.1.1/php/tweaks-standalone/disable-comments.php (modified) (1 diff)
-
tags/1.1.1/php/tweaks-standalone/disable-emojis.php (modified) (2 diffs)
-
tags/1.1.1/php/tweaks-standalone/disable-feeds.php (modified) (1 diff)
-
tags/1.1.1/php/tweaks-standalone/disable-non-production-emails.php (modified) (1 diff)
-
tags/1.1.1/php/tweaks-standalone/disable-ssl-verify-self.php (modified) (1 diff)
-
tags/1.1.1/php/tweaks-standalone/disable-success-update-emails.php (modified) (2 diffs)
-
tags/1.1.1/php/tweaks-standalone/disable-xmlrpc-allow-jetpack-ips.php (modified) (6 diffs)
-
tags/1.1.1/php/tweaks-standalone/enable-duplicate-post.php (modified) (1 diff)
-
tags/1.1.1/php/tweaks-standalone/enable-fonts-to-uploads.php (modified) (4 diffs)
-
tags/1.1.1/php/tweaks-standalone/enable-maintenance-mode.php (modified) (2 diffs)
-
tags/1.1.1/php/tweaks-standalone/enable-script-optimizer.php (modified) (1 diff)
-
tags/1.1.1/php/tweaks-standalone/remove-exif.php (modified) (2 diffs)
-
tags/1.1.1/php/tweaks/admin-bar-greeting.php (modified) (2 diffs)
-
tags/1.1.1/php/tweaks/image-quality.php (modified) (1 diff)
-
tags/1.1.1/phpstan.neon (added)
-
tags/1.1.1/readme-src.md (modified) (1 diff)
-
tags/1.1.1/readme.txt (modified) (1 diff)
-
tags/1.1.1/tweakmaster.php (modified) (2 diffs)
-
tags/1.1.1/vendor/autoload_packages.php (modified) (1 diff)
-
tags/1.1.1/vendor/automattic/jetpack-autoloader/CHANGELOG.md (modified) (2 diffs)
-
tags/1.1.1/vendor/automattic/jetpack-autoloader/src/AutoloadGenerator.php (modified) (1 diff)
-
tags/1.1.1/vendor/composer/installed.json (modified) (5 diffs)
-
tags/1.1.1/vendor/composer/installed.php (modified) (4 diffs)
-
tags/1.1.1/vendor/composer/jetpack_autoload_classmap.php (modified) (1 diff)
-
tags/1.1.1/vendor/jetpack-autoloader/class-autoloader-handler.php (modified) (1 diff)
-
tags/1.1.1/vendor/jetpack-autoloader/class-autoloader-locator.php (modified) (1 diff)
-
tags/1.1.1/vendor/jetpack-autoloader/class-autoloader.php (modified) (1 diff)
-
tags/1.1.1/vendor/jetpack-autoloader/class-container.php (modified) (1 diff)
-
tags/1.1.1/vendor/jetpack-autoloader/class-hook-manager.php (modified) (1 diff)
-
tags/1.1.1/vendor/jetpack-autoloader/class-latest-autoloader-guard.php (modified) (1 diff)
-
tags/1.1.1/vendor/jetpack-autoloader/class-manifest-reader.php (modified) (1 diff)
-
tags/1.1.1/vendor/jetpack-autoloader/class-path-processor.php (modified) (1 diff)
-
tags/1.1.1/vendor/jetpack-autoloader/class-php-autoloader.php (modified) (1 diff)
-
tags/1.1.1/vendor/jetpack-autoloader/class-plugin-locator.php (modified) (1 diff)
-
tags/1.1.1/vendor/jetpack-autoloader/class-plugins-handler.php (modified) (1 diff)
-
tags/1.1.1/vendor/jetpack-autoloader/class-shutdown-handler.php (modified) (1 diff)
-
tags/1.1.1/vendor/jetpack-autoloader/class-version-loader.php (modified) (1 diff)
-
tags/1.1.1/vendor/jetpack-autoloader/class-version-selector.php (modified) (1 diff)
-
tags/1.1.1/vendor/nextgenthemes/wp-settings/build/settings.asset.php (modified) (1 diff)
-
tags/1.1.1/vendor/nextgenthemes/wp-settings/build/settings.css (modified) (1 diff)
-
tags/1.1.1/vendor/nextgenthemes/wp-settings/includes/WP/Admin/EDD/ThemeUpdater.php (deleted)
-
tags/1.1.1/vendor/nextgenthemes/wp-settings/includes/WP/Admin/Notices.php (modified) (17 diffs)
-
tags/1.1.1/vendor/nextgenthemes/wp-settings/includes/WP/Admin/fn-licensing.php (modified) (3 diffs)
-
tags/1.1.1/vendor/nextgenthemes/wp-settings/includes/WP/Admin/fn-settings.php (modified) (3 diffs)
-
tags/1.1.1/vendor/nextgenthemes/wp-settings/includes/WP/Admin/settings-maybe-later.js (deleted)
-
tags/1.1.1/vendor/nextgenthemes/wp-settings/includes/WP/SettingValidator.php (modified) (3 diffs)
-
tags/1.1.1/vendor/nextgenthemes/wp-settings/includes/WP/Settings.php (modified) (10 diffs)
-
tags/1.1.1/vendor/nextgenthemes/wp-settings/includes/WP/SettingsData.php (modified) (1 diff)
-
tags/1.1.1/vendor/nextgenthemes/wp-settings/includes/WP/fn-asset-helpers.php (modified) (1 diff)
-
tags/1.1.1/vendor/nextgenthemes/wp-settings/includes/WP/fn-license.php (modified) (2 diffs)
-
tags/1.1.1/vendor/nextgenthemes/wp-settings/includes/WP/fn-misc.php (modified) (3 diffs)
-
tags/1.1.1/vendor/nextgenthemes/wp-settings/includes/WP/fn-remote-get.php (modified) (14 diffs)
-
tags/1.1.1/vendor/nextgenthemes/wp-settings/includes/WP/fn-settings.php (modified) (5 diffs)
-
tags/1.1.1/vendor/nextgenthemes/wp-settings/includes/WP/fn-string.php (modified) (7 diffs)
-
tags/1.1.1/vendor/nextgenthemes/wp-settings/src/settings.scss (modified) (1 diff)
-
trunk/composer.lock (modified) (4 diffs)
-
trunk/php/fn-settings.php (modified) (11 diffs)
-
trunk/php/tweaks-standalone/convert-jpeg-to-avif.php (modified) (1 diff)
-
trunk/php/tweaks-standalone/dequeue-jquery-migrate.php (modified) (2 diffs)
-
trunk/php/tweaks-standalone/disable-comments.php (modified) (1 diff)
-
trunk/php/tweaks-standalone/disable-emojis.php (modified) (2 diffs)
-
trunk/php/tweaks-standalone/disable-feeds.php (modified) (1 diff)
-
trunk/php/tweaks-standalone/disable-non-production-emails.php (modified) (1 diff)
-
trunk/php/tweaks-standalone/disable-ssl-verify-self.php (modified) (1 diff)
-
trunk/php/tweaks-standalone/disable-success-update-emails.php (modified) (2 diffs)
-
trunk/php/tweaks-standalone/disable-xmlrpc-allow-jetpack-ips.php (modified) (6 diffs)
-
trunk/php/tweaks-standalone/enable-duplicate-post.php (modified) (1 diff)
-
trunk/php/tweaks-standalone/enable-fonts-to-uploads.php (modified) (4 diffs)
-
trunk/php/tweaks-standalone/enable-maintenance-mode.php (modified) (2 diffs)
-
trunk/php/tweaks-standalone/enable-script-optimizer.php (modified) (1 diff)
-
trunk/php/tweaks-standalone/remove-exif.php (modified) (2 diffs)
-
trunk/php/tweaks/admin-bar-greeting.php (modified) (2 diffs)
-
trunk/php/tweaks/image-quality.php (modified) (1 diff)
-
trunk/phpstan.neon (added)
-
trunk/readme-src.md (modified) (1 diff)
-
trunk/readme.txt (modified) (1 diff)
-
trunk/tweakmaster.php (modified) (2 diffs)
-
trunk/vendor/autoload_packages.php (modified) (1 diff)
-
trunk/vendor/automattic/jetpack-autoloader/CHANGELOG.md (modified) (2 diffs)
-
trunk/vendor/automattic/jetpack-autoloader/src/AutoloadGenerator.php (modified) (1 diff)
-
trunk/vendor/composer/installed.json (modified) (5 diffs)
-
trunk/vendor/composer/installed.php (modified) (4 diffs)
-
trunk/vendor/composer/jetpack_autoload_classmap.php (modified) (1 diff)
-
trunk/vendor/jetpack-autoloader/class-autoloader-handler.php (modified) (1 diff)
-
trunk/vendor/jetpack-autoloader/class-autoloader-locator.php (modified) (1 diff)
-
trunk/vendor/jetpack-autoloader/class-autoloader.php (modified) (1 diff)
-
trunk/vendor/jetpack-autoloader/class-container.php (modified) (1 diff)
-
trunk/vendor/jetpack-autoloader/class-hook-manager.php (modified) (1 diff)
-
trunk/vendor/jetpack-autoloader/class-latest-autoloader-guard.php (modified) (1 diff)
-
trunk/vendor/jetpack-autoloader/class-manifest-reader.php (modified) (1 diff)
-
trunk/vendor/jetpack-autoloader/class-path-processor.php (modified) (1 diff)
-
trunk/vendor/jetpack-autoloader/class-php-autoloader.php (modified) (1 diff)
-
trunk/vendor/jetpack-autoloader/class-plugin-locator.php (modified) (1 diff)
-
trunk/vendor/jetpack-autoloader/class-plugins-handler.php (modified) (1 diff)
-
trunk/vendor/jetpack-autoloader/class-shutdown-handler.php (modified) (1 diff)
-
trunk/vendor/jetpack-autoloader/class-version-loader.php (modified) (1 diff)
-
trunk/vendor/jetpack-autoloader/class-version-selector.php (modified) (1 diff)
-
trunk/vendor/nextgenthemes/wp-settings/build/settings.asset.php (modified) (1 diff)
-
trunk/vendor/nextgenthemes/wp-settings/build/settings.css (modified) (1 diff)
-
trunk/vendor/nextgenthemes/wp-settings/includes/WP/Admin/EDD/ThemeUpdater.php (deleted)
-
trunk/vendor/nextgenthemes/wp-settings/includes/WP/Admin/Notices.php (modified) (17 diffs)
-
trunk/vendor/nextgenthemes/wp-settings/includes/WP/Admin/fn-licensing.php (modified) (3 diffs)
-
trunk/vendor/nextgenthemes/wp-settings/includes/WP/Admin/fn-settings.php (modified) (3 diffs)
-
trunk/vendor/nextgenthemes/wp-settings/includes/WP/Admin/settings-maybe-later.js (deleted)
-
trunk/vendor/nextgenthemes/wp-settings/includes/WP/SettingValidator.php (modified) (3 diffs)
-
trunk/vendor/nextgenthemes/wp-settings/includes/WP/Settings.php (modified) (10 diffs)
-
trunk/vendor/nextgenthemes/wp-settings/includes/WP/SettingsData.php (modified) (1 diff)
-
trunk/vendor/nextgenthemes/wp-settings/includes/WP/fn-asset-helpers.php (modified) (1 diff)
-
trunk/vendor/nextgenthemes/wp-settings/includes/WP/fn-license.php (modified) (2 diffs)
-
trunk/vendor/nextgenthemes/wp-settings/includes/WP/fn-misc.php (modified) (3 diffs)
-
trunk/vendor/nextgenthemes/wp-settings/includes/WP/fn-remote-get.php (modified) (14 diffs)
-
trunk/vendor/nextgenthemes/wp-settings/includes/WP/fn-settings.php (modified) (5 diffs)
-
trunk/vendor/nextgenthemes/wp-settings/includes/WP/fn-string.php (modified) (7 diffs)
-
trunk/vendor/nextgenthemes/wp-settings/src/settings.scss (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
tweakmaster/tags/1.1.1/composer.lock
r3362812 r3382950 10 10 { 11 11 "name": "automattic/jetpack-autoloader", 12 "version": "v5.0.1 0",12 "version": "v5.0.11", 13 13 "source": { 14 14 "type": "git", 15 15 "url": "https://github.com/Automattic/jetpack-autoloader.git", 16 "reference": " f7e2142139b925fac0a167ed0cbc71e2592bd9a0"16 "reference": "90bf7b3bc29cb7be74105ac99afab4c21bc47e29" 17 17 }, 18 18 "dist": { 19 19 "type": "zip", 20 "url": "https://api.github.com/repos/Automattic/jetpack-autoloader/zipball/ f7e2142139b925fac0a167ed0cbc71e2592bd9a0",21 "reference": " f7e2142139b925fac0a167ed0cbc71e2592bd9a0",20 "url": "https://api.github.com/repos/Automattic/jetpack-autoloader/zipball/90bf7b3bc29cb7be74105ac99afab4c21bc47e29", 21 "reference": "90bf7b3bc29cb7be74105ac99afab4c21bc47e29", 22 22 "shasum": "" 23 23 }, … … 69 69 ], 70 70 "support": { 71 "source": "https://github.com/Automattic/jetpack-autoloader/tree/v5.0.1 0"71 "source": "https://github.com/Automattic/jetpack-autoloader/tree/v5.0.11" 72 72 }, 73 "time": "2025- 09-15T14:36:53+00:00"73 "time": "2025-10-06T10:32:52+00:00" 74 74 }, 75 75 { … … 79 79 "type": "git", 80 80 "url": "https://github.com/nextgenthemes/wp-settings.git", 81 "reference": " 4e26cd875e2ba18f6f1bb523ef51d01ec7f7869d"81 "reference": "c899134604cca1d2cbea92ccebc8acdb2eb84429" 82 82 }, 83 83 "dist": { 84 84 "type": "zip", 85 "url": "https://api.github.com/repos/nextgenthemes/wp-settings/zipball/ 4e26cd875e2ba18f6f1bb523ef51d01ec7f7869d",86 "reference": " 4e26cd875e2ba18f6f1bb523ef51d01ec7f7869d",85 "url": "https://api.github.com/repos/nextgenthemes/wp-settings/zipball/c899134604cca1d2cbea92ccebc8acdb2eb84429", 86 "reference": "c899134604cca1d2cbea92ccebc8acdb2eb84429", 87 87 "shasum": "" 88 88 }, … … 109 109 "source": "https://github.com/nextgenthemes/wp-settings/tree/master" 110 110 }, 111 "time": "2025- 08-03T12:18:07+00:00"111 "time": "2025-10-21T22:59:15+00:00" 112 112 } 113 113 ], -
tweakmaster/tags/1.1.1/php/fn-settings.php
r3362812 r3382950 40 40 } 41 41 42 /** 43 * @return array<string, mixed> 44 */ 42 45 function options(): array { 43 46 return settings_instance()->get_options(); 44 47 } 45 48 49 /** 50 * @return array<string, mixed> 51 */ 46 52 function default_options(): array { 47 53 return settings_instance()->get_options_defaults(); … … 63 69 } 64 70 71 /** 72 * @return array<string, array<string, mixed>> 73 */ 65 74 function general_settings(): array { 66 75 return array( … … 231 240 } 232 241 242 /** 243 * @return array<string, array<string, string|int|bool|float>> 244 */ 233 245 function security_settings(): array { 234 246 … … 274 286 } 275 287 288 /** 289 * @return array<string, array<string, string|int|bool|float>> 290 */ 276 291 function performance_settings(): array { 277 292 return array( … … 300 315 } 301 316 317 /** 318 * @return array<string, array<string, string|int|bool|float>> 319 */ 302 320 function media_settings(): array { 303 321 return array( … … 340 358 } 341 359 360 /** 361 * @return array<string, array<string, string|int|bool|float>> 362 */ 342 363 function privacy_settings(): array { 343 364 … … 378 399 } 379 400 401 /** 402 * @return array<string, array<string, string|int|bool|float>> 403 */ 380 404 function plugins_settings(): array { 381 405 … … 407 431 } 408 432 433 /** 434 * @return array<string, array<string, string|int|bool|float>> 435 */ 409 436 function revision_settings(): array { 410 437 … … 434 461 } 435 462 463 /** 464 * @return array<string, array<string, string|int|bool|float>> 465 */ 436 466 function tools_settings(): array { 437 467 … … 459 489 } 460 490 491 /** 492 * @param array<string> $options_keys 493 */ 461 494 function any_option_is_set( array $options_keys ): bool { 462 495 … … 472 505 /** 473 506 * Get post types which support revisions. 507 * 508 * @return array<string, string> 474 509 */ 475 510 function get_revision_post_types(): array { -
tweakmaster/tags/1.1.1/php/tweaks-standalone/convert-jpeg-to-avif.php
r3338568 r3382950 22 22 add_filter( 'image_editor_output_format', __NAMESPACE__ . '\convert_jpeg_to_avif' ); 23 23 24 // Output AVIFs for uploaded JPEGs 24 /** 25 * Output AVIFs for uploaded JPEGs 26 * 27 * @param array<string, string> $formats 28 * @return array<string, string> 29 */ 25 30 function convert_jpeg_to_avif( array $formats ): array { 26 31 $formats['image/jpeg'] = 'image/avif'; -
tweakmaster/tags/1.1.1/php/tweaks-standalone/dequeue-jquery-migrate.php
r3338568 r3382950 20 20 namespace Nextgenthemes\TweakMaster; 21 21 22 use WP_Scripts; 23 24 add_action( 'wp_default_scripts', __NAMESPACE__ . '\dequeue_jquery_migrate', 20 ); 22 add_action( 'wp_enqueue_scripts', __NAMESPACE__ . '\dequeue_jquery_migrate', 15 ); 25 23 /** 26 24 * Dequeue jQuery Migrate from the jQuery script dependencies on the frontend. 27 *28 * @param WP_Scripts $scripts The WP_Scripts object containing registered scripts.29 25 * 30 26 * This function checks if the current request is not for the admin area and if … … 32 28 * the dependencies of the 'jquery' script. 33 29 */ 34 function dequeue_jquery_migrate( WP_Scripts $scripts): void {30 function dequeue_jquery_migrate(): void { 35 31 36 if ( ! is_admin() && ! empty( $scripts->registered['jquery'] ) ) { 32 $scripts = wp_scripts(); 33 34 if ( ! empty( $scripts->registered['jquery'] ) ) { 37 35 $jquery_dependencies = $scripts->registered['jquery']->deps; 38 36 $scripts->registered['jquery']->deps = array_diff( $jquery_dependencies, array( 'jquery-migrate' ) ); -
tweakmaster/tags/1.1.1/php/tweaks-standalone/disable-comments.php
r3338568 r3382950 25 25 26 26 // Close comments on the front-end 27 add_filter( 'comments_open', '__return_false', 20, 2);28 add_filter( 'pings_open', '__return_false', 20, 2);27 add_filter( 'comments_open', '__return_false', 20, 0 ); 28 add_filter( 'pings_open', '__return_false', 20, 0 ); 29 29 30 30 // Hide existing comments 31 add_filter( 'comments_array', '__return_empty_array', 10, 2);31 add_filter( 'comments_array', '__return_empty_array', 10, 0 ); 32 32 33 33 add_action( 'admin_menu', __NAMESPACE__ . '\remove_comments_page_menu' ); -
tweakmaster/tags/1.1.1/php/tweaks-standalone/disable-emojis.php
r3338568 r3382950 44 44 * Filter function used to remove the tinymce emoji plugin. 45 45 * 46 * @return array Difference between the two arrays 46 * @param array<string> $plugins Array of plugins 47 * @return array<string> Array of plugins (wpemoji removed) 47 48 */ 48 49 function disable_emojis_tinymce( array $plugins ): array { 49 if ( is_array( $plugins ) ) { 50 return array_diff( $plugins, array( 'wpemoji' ) ); 51 } 52 53 return array(); 50 return array_diff( $plugins, array( 'wpemoji' ) ); 54 51 } 55 52 … … 57 54 * Remove emoji CDN hostname from DNS prefetching hints. 58 55 * 59 * @param array $urls URLs to print for resource hints.60 * @param string $relation_type The relation type the URLs are printed for.61 * @return array Difference between the two arrays.56 * @param array<string> $urls URLs to print for resource hints. 57 * @param string $relation_type The relation type the URLs are printed for. 58 * @return array<string> Difference between the two arrays. 62 59 */ 63 60 function disable_emojis_remove_dns_prefetch( array $urls, string $relation_type ): array { -
tweakmaster/tags/1.1.1/php/tweaks-standalone/disable-feeds.php
r3338568 r3382950 20 20 namespace Nextgenthemes\TweakMaster; 21 21 22 add_action( 'do_feed_rdf', __NAMESPACE__ . '\kill_feed', 1 ); 23 add_action( 'do_feed_rss', __NAMESPACE__ . '\kill_feed', 1 ); 24 add_action( 'do_feed_rss2', __NAMESPACE__ . '\kill_feed', 1 ); 25 add_action( 'do_feed_atom', __NAMESPACE__ . '\kill_feed', 1 ); 22 add_action( 'do_feed_rdf', __NAMESPACE__ . '\kill_feed', 1 ); // @phpstan-ignore-line 23 add_action( 'do_feed_rss', __NAMESPACE__ . '\kill_feed', 1 ); // @phpstan-ignore-line 24 add_action( 'do_feed_rss2', __NAMESPACE__ . '\kill_feed', 1 ); // @phpstan-ignore-line 25 add_action( 'do_feed_atom', __NAMESPACE__ . '\kill_feed', 1 ); // @phpstan-ignore-line 26 26 27 27 function kill_rss(): void { -
tweakmaster/tags/1.1.1/php/tweaks-standalone/disable-non-production-emails.php
r3338568 r3382950 23 23 add_filter( 'wp_mail', __NAMESPACE__ . '\disable_non_production_emails', 9999 ); 24 24 25 /** 26 * Disable all emails by filtering wp_mail 27 * 28 * @param array<string, mixed> $args Array of arguments for wp_mail. 29 * @return array<string, mixed> Modified array of arguments. 30 */ 25 31 function disable_non_production_emails( array $args ): array { 26 32 -
tweakmaster/tags/1.1.1/php/tweaks-standalone/disable-ssl-verify-self.php
r3338568 r3382950 22 22 add_filter( 'http_request_args', __NAMESPACE__ . '\disable_ssl_verify_for_dev', 10, 2 ); 23 23 24 /** 25 * Disable SSL verification for development sites 26 * 27 * @param array<string, mixed> $args Array of arguments for http_request_args. 28 * @param string $url URL to make the request to. 29 * 30 * @return array<string, mixed> Modified array of arguments. 31 */ 24 32 function disable_ssl_verify_for_dev( array $args, string $url ): array { 25 33 -
tweakmaster/tags/1.1.1/php/tweaks-standalone/disable-success-update-emails.php
r3338568 r3382950 26 26 * @param bool $send Whether to send an email. 27 27 * @param string $type The type of email to send. 28 * @param object $core_update The update offer. 29 * @param array $result The result of the update. 30 * 31 * @return bool Whether to send an email. 28 * @return bool Whether to send an email. 32 29 */ 33 30 function disable_core_auto_update_emails_on_success( bool $send, string $type ): bool { … … 45 42 * Disable auto-update email notifications if all of the updates were successful. 46 43 * 47 * @param bool $enabled Whether to send an email. 48 * @param array $update_results The result of the update. 49 * 50 * @return bool Whether to send an email. 44 * @param bool $enabled Whether to send an email. 45 * @param array<object> $update_results The result of the update. 46 * @return bool Whether to send an email. 51 47 */ 52 48 function disable_auto_update_emails_on_success( bool $enabled, array $update_results ): bool { -
tweakmaster/tags/1.1.1/php/tweaks-standalone/disable-xmlrpc-allow-jetpack-ips.php
r3338568 r3382950 21 21 22 22 namespace Nextgenthemes\TweakMaster; 23 24 use WP_Error;25 23 26 24 const JETPACK_IPS = array( … … 49 47 function is_ip_in_range( string $ip, string $cidr ): bool { 50 48 list($subnet, $bits) = explode( '/', $cidr ); 49 $bits = (int) $bits; 51 50 $ip = ip2long( $ip ); 52 51 $subnet = ip2long( $subnet ); … … 56 55 } 57 56 58 // Fetch and cache Jetpack IP ranges 57 /** 58 * Fetch and cache Jetpack IP ranges 59 * 60 * @return array<string> Array of IP ranges. 61 */ 59 62 function get_jetpack_ips(): array { 60 63 $transient_key = 'tweakmaster_jetpack_ips'; … … 113 116 * Retrieves the body content from a remote URL. 114 117 * 115 * @param string $urlThe URL of the remote resource.116 * @param array$args Optional. Additional arguments for wp_safe_remote_get.117 * @return string| WP_ErrorThe response body content from the remote URL, or a WP_Error on failure.118 * @param string $url The URL of the remote resource. 119 * @param array<string, mixed> $args Optional. Additional arguments for wp_safe_remote_get. 120 * @return string|\WP_Error The response body content from the remote URL, or a WP_Error on failure. 118 121 */ 119 122 function remote_get_body( string $url, array $args = array() ) { … … 128 131 if ( 200 !== $response_code ) { 129 132 130 return new WP_Error(133 return new \WP_Error( 131 134 $response_code, 132 135 sprintf( … … 142 145 143 146 if ( '' === $response ) { 144 return new WP_Error(147 return new \WP_Error( 145 148 'empty-body', 146 149 sprintf( -
tweakmaster/tags/1.1.1/php/tweaks-standalone/enable-duplicate-post.php
r3338568 r3382950 28 28 add_filter( 'page_row_actions', __NAMESPACE__ . '\duplicate_post_link', 10, 2 ); 29 29 /** 30 * @param array$actions The actions added as links to the admin.31 * @param WP_Post $postThe post object.32 * 30 * @param array<int|string, string> $actions The actions added as links to the admin. 31 * @param \WP_Post $post The post object. 32 * @return array<int|string, string> The actions added as links to the admin. 33 33 */ 34 34 function duplicate_post_link( array $actions, \WP_Post $post ): array { -
tweakmaster/tags/1.1.1/php/tweaks-standalone/enable-fonts-to-uploads.php
r3338568 r3382950 25 25 bootstrap(); 26 26 27 28 29 27 30 /** 28 31 * Bootstrap the plugin. … … 37 40 * custom upload directory file handlers. 38 41 */ 39 add_action( 'init', __NAMESPACE__ . '\\cached_wp_get_upload_dir', 20 ); 42 add_action( 'init', __NAMESPACE__ . '\\cached_wp_get_upload_dir_primer', 20 ); 43 } 44 45 /** 46 * Prime the uploads directory cache. Exists to phpstan does not complain about hook function having a return value. 47 * 48 * This runs late on the `init` hook to allow time for plugins to register 49 * custom upload directory file handlers. 50 * 51 */ 52 function cached_wp_get_upload_dir_primer(): void { 53 cached_wp_get_upload_dir(); 40 54 } 41 55 … … 52 66 * @see https://github.com/pantheon-systems/pantheon-mu-plugin/blob/main/inc/fonts.php for inspiration. 53 67 * 54 * @return array Result of wp_get_upload_dir(). 68 * Returns the cached upload directory information. 69 * 70 * This function stores the uploads directory in a static variable to prevent 71 * potential infinite loops that could occur if an extender includes 72 * `add_filter( 'upload_dir', 'wp_get_font_dir' );` in their code base. 73 * 74 * Without a primed cache, `wp_get_upload_dir()` would trigger a call to 75 * `wp_get_font_dir()` which would trigger a call to `wp_get_upload_dir()`. 76 * 77 * @return array<string, string|false> 55 78 */ 56 79 function cached_wp_get_upload_dir(): array { … … 70 93 * sub-directory of the uploads folder. 71 94 * 72 * @param array$font_directory The default in which to store fonts.73 * @return array The modified fonts directory.95 * @param array<string, string|false> $font_directory The default in which to store fonts. 96 * @return array<string, string|false> The modified fonts directory. 74 97 */ 75 98 function filter_default_font_directory( array $font_directory ): array { -
tweakmaster/tags/1.1.1/php/tweaks-standalone/enable-maintenance-mode.php
r3338568 r3382950 27 27 add_action( 'wp_authenticate_user', __NAMESPACE__ . '\check_user_capability' ); 28 28 29 function check_user_capability( \WP_User $user ): \WP_User{29 function check_user_capability( \WP_User $user ): void { 30 30 31 if ( ! $user || !user_can( $user, CAPABILITY ) ) {31 if ( ! user_can( $user, CAPABILITY ) ) { 32 32 33 33 // Deny the user 34 34 wp_clear_auth_cookie(); 35 wp_set_auth_cookie( '', false );35 wp_set_auth_cookie( $user->ID, false ); 36 36 do_action( 'wp_logout' ); 37 37 wp_safe_redirect( wp_login_url() ); 38 38 exit; 39 39 } 40 41 return $user;42 40 } 43 41 … … 68 66 * This is only shown to users who are not logged in or do not have the CAPABILITY. 69 67 * 70 * @param WP_Admin_Bar $wp_admin_bar The admin bar object.68 * @param \WP_Admin_Bar $wp_admin_bar The admin bar object. 71 69 */ 72 70 function add_maintenance_mode_notice( \WP_Admin_Bar $wp_admin_bar ): void { -
tweakmaster/tags/1.1.1/php/tweaks-standalone/enable-script-optimizer.php
r3338568 r3382950 135 135 * Array Key Exists and Has Value 136 136 * 137 * @param string $keyThe key to search for in the array.138 * @param array $arrayThe array to search.139 * @param mixed $default_value The default value to return if not found or is empty. Default is an empty string.137 * @param string $key The key to search for in the array. 138 * @param array<string, mixed> $arr The array to search. 139 * @param mixed $default_value The default value to return if not found or is empty. Default is an empty string. 140 140 * 141 * @return mixed |nullThe value of the key found in the array if it exists or the value of `$default_value` if not found or is empty.141 * @return mixed The value of the key found in the array if it exists or the value of `$default_value` if not found or is empty. 142 142 */ 143 143 function get_array_key_value( string $key, array $arr, $default_value = null ) { -
tweakmaster/tags/1.1.1/php/tweaks-standalone/remove-exif.php
r3338568 r3382950 5 5 * @copyright 2025 Nicolas Jonas 6 6 * @license GPL-3.0 7 * Copied from Bob, just Namespaced,and make use of wp_trigger_error7 * Copied from Bob, Namespaced, fixed add_filter instead of add_action and make use of wp_trigger_error 8 8 * 9 9 * @copyright 2024 Bob Matyas … … 28 28 use Exception; 29 29 30 add_ action( 'wp_handle_upload', __NAMESPACE__ . '\remove_exif' );30 add_filter( 'wp_handle_upload', __NAMESPACE__ . '\remove_exif' ); 31 31 /** 32 32 * Handle an image upload by removing EXIF data. 33 33 * 34 * @param array$upload A single array element containing the details of the uploaded file.35 * @return array The processed upload array.34 * @param array<string, mixed> $upload A single array element containing the details of the uploaded file. 35 * @return array<string, mixed> The processed upload array. 36 36 */ 37 37 function remove_exif( array $upload ): array { -
tweakmaster/tags/1.1.1/php/tweaks/admin-bar-greeting.php
r3338568 r3382950 19 19 add_action( 'wp_enqueue_scripts', __NAMESPACE__ . '\enqueue_admin_bar_greeting_module' ); 20 20 add_action( 'admin_enqueue_scripts', __NAMESPACE__ . '\enqueue_admin_bar_greeting_module' ); 21 add_ action( 'wp_script_attributes', __NAMESPACE__ . '\add_greeting_data_attribute' );21 add_filter( 'wp_script_attributes', __NAMESPACE__ . '\add_greeting_data_attribute' ); 22 22 } 23 23 } … … 33 33 } 34 34 35 /** 36 * @param array<string, string> $attributes HTML tag attributes 37 * 38 * @return array<string, string> HTML tag attributes (modified) 39 */ 35 40 function add_greeting_data_attribute( array $attributes ): array { 36 41 -
tweakmaster/tags/1.1.1/php/tweaks/image-quality.php
r3338568 r3382950 11 11 namespace Nextgenthemes\TweakMaster; 12 12 13 add_filter( 'wp_editor_set_quality', __NAMESPACE__ . ' set_image_quality', 10, 2 );13 add_filter( 'wp_editor_set_quality', __NAMESPACE__ . '\set_image_quality', 10, 2 ); 14 14 /** 15 15 * Sets image quality based on MIME type. -
tweakmaster/tags/1.1.1/readme-src.md
r3362812 r3382950 5 5 Tested up to: 6.8 6 6 Requires PHP: 7.4 7 Stable tag: 1.1. 07 Stable tag: 1.1.1 8 8 License: GPLv3 9 9 License URI: https://www.gnu.org/licenses/gpl-3.0.html -
tweakmaster/tags/1.1.1/readme.txt
r3362812 r3382950 5 5 Tested up to: 6.8 6 6 Requires PHP: 7.4 7 Stable tag: 1.1. 07 Stable tag: 1.1.1 8 8 License: GPLv3 9 9 License URI: https://www.gnu.org/licenses/gpl-3.0.html -
tweakmaster/tags/1.1.1/tweakmaster.php
r3362812 r3382950 10 10 * Description: A collection or performance, privacy, security and other tweaks.. Minimalistic lightweight plugin. 11 11 * Plugin URI: https://nextgenthemes.com/plugins/tweakmaster/ 12 * Version: 1.1. 012 * Version: 1.1.1 13 13 * Requires at least: 6.6 14 14 * Author: Nicolas Jonas … … 25 25 } 26 26 27 const VERSION = '1.1. 0';27 const VERSION = '1.1.1'; 28 28 const PLUGIN_FILE = __FILE__; 29 29 const PLUGIN_DIR = __DIR__; -
tweakmaster/tags/1.1.1/vendor/autoload_packages.php
r3362812 r3382950 6 6 */ 7 7 8 namespace Automattic\Jetpack\Autoloader\jp5aa486b2e15e5a77b655cb1dccf2d827\al5_0_1 0;8 namespace Automattic\Jetpack\Autoloader\jp5aa486b2e15e5a77b655cb1dccf2d827\al5_0_11; 9 9 10 10 // phpcs:ignore -
tweakmaster/tags/1.1.1/vendor/automattic/jetpack-autoloader/CHANGELOG.md
r3362812 r3382950 5 5 The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) 6 6 and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). 7 8 ## [5.0.11] - 2025-10-06 9 ### Fixed 10 - Tests: Replace deprecated `RunClassInSeparateProcess` attribute with `RunTestsInSeparateProcesses`. [#45370] 7 11 8 12 ## [5.0.10] - 2025-09-15 … … 439 443 - Add Custom Autoloader 440 444 445 [5.0.11]: https://github.com/Automattic/jetpack-autoloader/compare/v5.0.10...v5.0.11 441 446 [5.0.10]: https://github.com/Automattic/jetpack-autoloader/compare/v5.0.9...v5.0.10 442 447 [5.0.9]: https://github.com/Automattic/jetpack-autoloader/compare/v5.0.8...v5.0.9 -
tweakmaster/tags/1.1.1/vendor/automattic/jetpack-autoloader/src/AutoloadGenerator.php
r3362812 r3382950 22 22 class AutoloadGenerator { 23 23 24 const VERSION = '5.0.1 0';24 const VERSION = '5.0.11'; 25 25 26 26 /** -
tweakmaster/tags/1.1.1/vendor/composer/installed.json
r3362812 r3382950 3 3 { 4 4 "name": "automattic/jetpack-autoloader", 5 "version": "v5.0.1 0",6 "version_normalized": "5.0.1 0.0",5 "version": "v5.0.11", 6 "version_normalized": "5.0.11.0", 7 7 "source": { 8 8 "type": "git", 9 9 "url": "https://github.com/Automattic/jetpack-autoloader.git", 10 "reference": " f7e2142139b925fac0a167ed0cbc71e2592bd9a0"10 "reference": "90bf7b3bc29cb7be74105ac99afab4c21bc47e29" 11 11 }, 12 12 "dist": { 13 13 "type": "zip", 14 "url": "https://api.github.com/repos/Automattic/jetpack-autoloader/zipball/ f7e2142139b925fac0a167ed0cbc71e2592bd9a0",15 "reference": " f7e2142139b925fac0a167ed0cbc71e2592bd9a0",14 "url": "https://api.github.com/repos/Automattic/jetpack-autoloader/zipball/90bf7b3bc29cb7be74105ac99afab4c21bc47e29", 15 "reference": "90bf7b3bc29cb7be74105ac99afab4c21bc47e29", 16 16 "shasum": "" 17 17 }, … … 26 26 "yoast/phpunit-polyfills": "^4.0.0" 27 27 }, 28 "time": "2025- 09-15T14:36:53+00:00",28 "time": "2025-10-06T10:32:52+00:00", 29 29 "type": "composer-plugin", 30 30 "extra": { … … 65 65 ], 66 66 "support": { 67 "source": "https://github.com/Automattic/jetpack-autoloader/tree/v5.0.1 0"67 "source": "https://github.com/Automattic/jetpack-autoloader/tree/v5.0.11" 68 68 }, 69 69 "install-path": "../automattic/jetpack-autoloader" … … 76 76 "type": "git", 77 77 "url": "https://github.com/nextgenthemes/wp-settings.git", 78 "reference": " 4e26cd875e2ba18f6f1bb523ef51d01ec7f7869d"78 "reference": "c899134604cca1d2cbea92ccebc8acdb2eb84429" 79 79 }, 80 80 "dist": { 81 81 "type": "zip", 82 "url": "https://api.github.com/repos/nextgenthemes/wp-settings/zipball/ 4e26cd875e2ba18f6f1bb523ef51d01ec7f7869d",83 "reference": " 4e26cd875e2ba18f6f1bb523ef51d01ec7f7869d",82 "url": "https://api.github.com/repos/nextgenthemes/wp-settings/zipball/c899134604cca1d2cbea92ccebc8acdb2eb84429", 83 "reference": "c899134604cca1d2cbea92ccebc8acdb2eb84429", 84 84 "shasum": "" 85 85 }, … … 87 87 "php": ">=7.4" 88 88 }, 89 "time": "2025- 08-03T12:18:07+00:00",89 "time": "2025-10-21T22:59:15+00:00", 90 90 "default-branch": true, 91 91 "type": "library", -
tweakmaster/tags/1.1.1/vendor/composer/installed.php
r3362812 r3382950 4 4 'pretty_version' => 'dev-master', 5 5 'version' => 'dev-master', 6 'reference' => ' 893995d9c65bfe570c955c1b5c31dd4c153ee16f',6 'reference' => '0a437e33c6baf52e7fe6422de0c8fda7c38b683d', 7 7 'type' => 'wordpress-plugin', 8 8 'install_path' => __DIR__ . '/../../', … … 12 12 'versions' => array( 13 13 'automattic/jetpack-autoloader' => array( 14 'pretty_version' => 'v5.0.1 0',15 'version' => '5.0.1 0.0',16 'reference' => ' f7e2142139b925fac0a167ed0cbc71e2592bd9a0',14 'pretty_version' => 'v5.0.11', 15 'version' => '5.0.11.0', 16 'reference' => '90bf7b3bc29cb7be74105ac99afab4c21bc47e29', 17 17 'type' => 'composer-plugin', 18 18 'install_path' => __DIR__ . '/../automattic/jetpack-autoloader', … … 23 23 'pretty_version' => 'dev-master', 24 24 'version' => 'dev-master', 25 'reference' => ' 893995d9c65bfe570c955c1b5c31dd4c153ee16f',25 'reference' => '0a437e33c6baf52e7fe6422de0c8fda7c38b683d', 26 26 'type' => 'wordpress-plugin', 27 27 'install_path' => __DIR__ . '/../../', … … 32 32 'pretty_version' => 'dev-master', 33 33 'version' => 'dev-master', 34 'reference' => ' 4e26cd875e2ba18f6f1bb523ef51d01ec7f7869d',34 'reference' => 'c899134604cca1d2cbea92ccebc8acdb2eb84429', 35 35 'type' => 'library', 36 36 'install_path' => __DIR__ . '/../nextgenthemes/wp-settings', -
tweakmaster/tags/1.1.1/vendor/composer/jetpack_autoload_classmap.php
r3362812 r3382950 8 8 return array( 9 9 'Autoloader' => array( 10 'version' => '5.0.1 0',10 'version' => '5.0.11', 11 11 'path' => $vendorDir . '/automattic/jetpack-autoloader/src/class-autoloader.php' 12 12 ), 13 13 'Autoloader_Handler' => array( 14 'version' => '5.0.1 0',14 'version' => '5.0.11', 15 15 'path' => $vendorDir . '/automattic/jetpack-autoloader/src/class-autoloader-handler.php' 16 16 ), 17 17 'Autoloader_Locator' => array( 18 'version' => '5.0.1 0',18 'version' => '5.0.11', 19 19 'path' => $vendorDir . '/automattic/jetpack-autoloader/src/class-autoloader-locator.php' 20 20 ), 21 21 'Automattic\\Jetpack\\Autoloader\\AutoloadFileWriter' => array( 22 'version' => '5.0.1 0',22 'version' => '5.0.11', 23 23 'path' => $vendorDir . '/automattic/jetpack-autoloader/src/AutoloadFileWriter.php' 24 24 ), 25 25 'Automattic\\Jetpack\\Autoloader\\AutoloadGenerator' => array( 26 'version' => '5.0.1 0',26 'version' => '5.0.11', 27 27 'path' => $vendorDir . '/automattic/jetpack-autoloader/src/AutoloadGenerator.php' 28 28 ), 29 29 'Automattic\\Jetpack\\Autoloader\\AutoloadProcessor' => array( 30 'version' => '5.0.1 0',30 'version' => '5.0.11', 31 31 'path' => $vendorDir . '/automattic/jetpack-autoloader/src/AutoloadProcessor.php' 32 32 ), 33 33 'Automattic\\Jetpack\\Autoloader\\CustomAutoloaderPlugin' => array( 34 'version' => '5.0.1 0',34 'version' => '5.0.11', 35 35 'path' => $vendorDir . '/automattic/jetpack-autoloader/src/CustomAutoloaderPlugin.php' 36 36 ), 37 37 'Automattic\\Jetpack\\Autoloader\\ManifestGenerator' => array( 38 'version' => '5.0.1 0',38 'version' => '5.0.11', 39 39 'path' => $vendorDir . '/automattic/jetpack-autoloader/src/ManifestGenerator.php' 40 40 ), 41 41 'Container' => array( 42 'version' => '5.0.1 0',42 'version' => '5.0.11', 43 43 'path' => $vendorDir . '/automattic/jetpack-autoloader/src/class-container.php' 44 44 ), 45 45 'Hook_Manager' => array( 46 'version' => '5.0.1 0',46 'version' => '5.0.11', 47 47 'path' => $vendorDir . '/automattic/jetpack-autoloader/src/class-hook-manager.php' 48 48 ), 49 49 'Latest_Autoloader_Guard' => array( 50 'version' => '5.0.1 0',50 'version' => '5.0.11', 51 51 'path' => $vendorDir . '/automattic/jetpack-autoloader/src/class-latest-autoloader-guard.php' 52 52 ), 53 53 'Manifest_Reader' => array( 54 'version' => '5.0.1 0',54 'version' => '5.0.11', 55 55 'path' => $vendorDir . '/automattic/jetpack-autoloader/src/class-manifest-reader.php' 56 56 ), 57 57 'PHP_Autoloader' => array( 58 'version' => '5.0.1 0',58 'version' => '5.0.11', 59 59 'path' => $vendorDir . '/automattic/jetpack-autoloader/src/class-php-autoloader.php' 60 60 ), 61 61 'Path_Processor' => array( 62 'version' => '5.0.1 0',62 'version' => '5.0.11', 63 63 'path' => $vendorDir . '/automattic/jetpack-autoloader/src/class-path-processor.php' 64 64 ), 65 65 'Plugin_Locator' => array( 66 'version' => '5.0.1 0',66 'version' => '5.0.11', 67 67 'path' => $vendorDir . '/automattic/jetpack-autoloader/src/class-plugin-locator.php' 68 68 ), 69 69 'Plugins_Handler' => array( 70 'version' => '5.0.1 0',70 'version' => '5.0.11', 71 71 'path' => $vendorDir . '/automattic/jetpack-autoloader/src/class-plugins-handler.php' 72 72 ), 73 73 'Shutdown_Handler' => array( 74 'version' => '5.0.1 0',74 'version' => '5.0.11', 75 75 'path' => $vendorDir . '/automattic/jetpack-autoloader/src/class-shutdown-handler.php' 76 76 ), 77 77 'Version_Loader' => array( 78 'version' => '5.0.1 0',78 'version' => '5.0.11', 79 79 'path' => $vendorDir . '/automattic/jetpack-autoloader/src/class-version-loader.php' 80 80 ), 81 81 'Version_Selector' => array( 82 'version' => '5.0.1 0',82 'version' => '5.0.11', 83 83 'path' => $vendorDir . '/automattic/jetpack-autoloader/src/class-version-selector.php' 84 84 ), -
tweakmaster/tags/1.1.1/vendor/jetpack-autoloader/class-autoloader-handler.php
r3362812 r3382950 6 6 */ 7 7 8 namespace Automattic\Jetpack\Autoloader\jp5aa486b2e15e5a77b655cb1dccf2d827\al5_0_1 0;8 namespace Automattic\Jetpack\Autoloader\jp5aa486b2e15e5a77b655cb1dccf2d827\al5_0_11; 9 9 10 10 // phpcs:ignore -
tweakmaster/tags/1.1.1/vendor/jetpack-autoloader/class-autoloader-locator.php
r3362812 r3382950 6 6 */ 7 7 8 namespace Automattic\Jetpack\Autoloader\jp5aa486b2e15e5a77b655cb1dccf2d827\al5_0_1 0;8 namespace Automattic\Jetpack\Autoloader\jp5aa486b2e15e5a77b655cb1dccf2d827\al5_0_11; 9 9 10 10 // phpcs:ignore -
tweakmaster/tags/1.1.1/vendor/jetpack-autoloader/class-autoloader.php
r3362812 r3382950 6 6 */ 7 7 8 namespace Automattic\Jetpack\Autoloader\jp5aa486b2e15e5a77b655cb1dccf2d827\al5_0_1 0;8 namespace Automattic\Jetpack\Autoloader\jp5aa486b2e15e5a77b655cb1dccf2d827\al5_0_11; 9 9 10 10 // phpcs:ignore -
tweakmaster/tags/1.1.1/vendor/jetpack-autoloader/class-container.php
r3362812 r3382950 6 6 */ 7 7 8 namespace Automattic\Jetpack\Autoloader\jp5aa486b2e15e5a77b655cb1dccf2d827\al5_0_1 0;8 namespace Automattic\Jetpack\Autoloader\jp5aa486b2e15e5a77b655cb1dccf2d827\al5_0_11; 9 9 10 10 // phpcs:ignore -
tweakmaster/tags/1.1.1/vendor/jetpack-autoloader/class-hook-manager.php
r3362812 r3382950 6 6 */ 7 7 8 namespace Automattic\Jetpack\Autoloader\jp5aa486b2e15e5a77b655cb1dccf2d827\al5_0_1 0;8 namespace Automattic\Jetpack\Autoloader\jp5aa486b2e15e5a77b655cb1dccf2d827\al5_0_11; 9 9 10 10 // phpcs:ignore -
tweakmaster/tags/1.1.1/vendor/jetpack-autoloader/class-latest-autoloader-guard.php
r3362812 r3382950 6 6 */ 7 7 8 namespace Automattic\Jetpack\Autoloader\jp5aa486b2e15e5a77b655cb1dccf2d827\al5_0_1 0;8 namespace Automattic\Jetpack\Autoloader\jp5aa486b2e15e5a77b655cb1dccf2d827\al5_0_11; 9 9 10 10 // phpcs:ignore -
tweakmaster/tags/1.1.1/vendor/jetpack-autoloader/class-manifest-reader.php
r3362812 r3382950 6 6 */ 7 7 8 namespace Automattic\Jetpack\Autoloader\jp5aa486b2e15e5a77b655cb1dccf2d827\al5_0_1 0;8 namespace Automattic\Jetpack\Autoloader\jp5aa486b2e15e5a77b655cb1dccf2d827\al5_0_11; 9 9 10 10 // phpcs:ignore -
tweakmaster/tags/1.1.1/vendor/jetpack-autoloader/class-path-processor.php
r3362812 r3382950 6 6 */ 7 7 8 namespace Automattic\Jetpack\Autoloader\jp5aa486b2e15e5a77b655cb1dccf2d827\al5_0_1 0;8 namespace Automattic\Jetpack\Autoloader\jp5aa486b2e15e5a77b655cb1dccf2d827\al5_0_11; 9 9 10 10 // phpcs:ignore -
tweakmaster/tags/1.1.1/vendor/jetpack-autoloader/class-php-autoloader.php
r3362812 r3382950 6 6 */ 7 7 8 namespace Automattic\Jetpack\Autoloader\jp5aa486b2e15e5a77b655cb1dccf2d827\al5_0_1 0;8 namespace Automattic\Jetpack\Autoloader\jp5aa486b2e15e5a77b655cb1dccf2d827\al5_0_11; 9 9 10 10 // phpcs:ignore -
tweakmaster/tags/1.1.1/vendor/jetpack-autoloader/class-plugin-locator.php
r3362812 r3382950 6 6 */ 7 7 8 namespace Automattic\Jetpack\Autoloader\jp5aa486b2e15e5a77b655cb1dccf2d827\al5_0_1 0;8 namespace Automattic\Jetpack\Autoloader\jp5aa486b2e15e5a77b655cb1dccf2d827\al5_0_11; 9 9 10 10 // phpcs:ignore -
tweakmaster/tags/1.1.1/vendor/jetpack-autoloader/class-plugins-handler.php
r3362812 r3382950 6 6 */ 7 7 8 namespace Automattic\Jetpack\Autoloader\jp5aa486b2e15e5a77b655cb1dccf2d827\al5_0_1 0;8 namespace Automattic\Jetpack\Autoloader\jp5aa486b2e15e5a77b655cb1dccf2d827\al5_0_11; 9 9 10 10 // phpcs:ignore -
tweakmaster/tags/1.1.1/vendor/jetpack-autoloader/class-shutdown-handler.php
r3362812 r3382950 6 6 */ 7 7 8 namespace Automattic\Jetpack\Autoloader\jp5aa486b2e15e5a77b655cb1dccf2d827\al5_0_1 0;8 namespace Automattic\Jetpack\Autoloader\jp5aa486b2e15e5a77b655cb1dccf2d827\al5_0_11; 9 9 10 10 // phpcs:ignore -
tweakmaster/tags/1.1.1/vendor/jetpack-autoloader/class-version-loader.php
r3362812 r3382950 6 6 */ 7 7 8 namespace Automattic\Jetpack\Autoloader\jp5aa486b2e15e5a77b655cb1dccf2d827\al5_0_1 0;8 namespace Automattic\Jetpack\Autoloader\jp5aa486b2e15e5a77b655cb1dccf2d827\al5_0_11; 9 9 10 10 // phpcs:ignore -
tweakmaster/tags/1.1.1/vendor/jetpack-autoloader/class-version-selector.php
r3362812 r3382950 6 6 */ 7 7 8 namespace Automattic\Jetpack\Autoloader\jp5aa486b2e15e5a77b655cb1dccf2d827\al5_0_1 0;8 namespace Automattic\Jetpack\Autoloader\jp5aa486b2e15e5a77b655cb1dccf2d827\al5_0_11; 9 9 10 10 // phpcs:ignore -
tweakmaster/tags/1.1.1/vendor/nextgenthemes/wp-settings/build/settings.asset.php
r3338568 r3382950 1 <?php return array('dependencies' => array('@wordpress/interactivity'), 'version' => ' 53165e7fe2b504514ae7', 'type' => 'module');1 <?php return array('dependencies' => array('@wordpress/interactivity'), 'version' => '0c7f2c162a262e8df404', 'type' => 'module'); -
tweakmaster/tags/1.1.1/vendor/nextgenthemes/wp-settings/build/settings.css
r3338568 r3382950 1 .ngt-width-limiter{margin-left:auto;margin-right:auto;max-width:1100px}.ngt-full-width{margin-left:-10px!important}@media only screen and (min-width:783px){.ngt-full-width{margin-left:-22px!important;margin-right:-20px!important}}.wrap--nextgenthemes{--ngt-settings-bg:oklch(from var(--ngt-wp-body-bg) calc(l + .022) c h)}.wrap--nextgenthemes .nav-tab{cursor:pointer;font-weight:500}.wrap--nextgenthemes .nav-tab-active,.wrap--nextgenthemes .ngt-settings-bg{background-color:var(--ngt-settings-bg);border-bottom-color:var(--ngt-settings-bg)}.wrap--nextgenthemes .ngt-settings-bg{border-bottom:1px solid #c3c4c7;padding:1rem 0 1rem 1rem}.wrap--nextgenthemes a{text-underline-offset:2px}.wrap--nextgenthemes .ngt-label-wrap{display:block}.wrap--nextgenthemes .ngt-label-wrap a{display:none}.wrap--nextgenthemes [hidden]{display:none!important}.ngt-settings-grid{display:grid;grid-template-areas:"content" "sidebar"}@media(min-width:750px){.ngt-settings-grid{grid-template-areas:"content sidebar";grid-template-columns:minmax(300px,1fr) 300px;grid-column-gap:2rem}}@media(min-width:1200px){.ngt-settings-grid{grid-template-columns:minmax(300px,1fr) 420px;grid-column-gap:3rem}}.ngt-settings-grid__content{grid-area:content;-ms-grid-column:1;-ms-grid-row:1;padding-right:5px}.ngt-settings-grid__sidebar{grid-area:sidebar;-ms-grid-column:1;-ms-grid-row:2}@media (min-width:750px){.ngt-settings-grid__content{-ms-grid-column:1;-ms-grid-row:1}.ngt-settings-grid__sidebar{-ms-grid-column:3;-ms-grid-row:1}}.ngt-sidebar-box{background:#fff;border-left:4px solid #46b450;box-shadow:0 1px 1px 0 rgba(0,0,0,.1);margin-bottom:1rem;margin-top:1rem;padding:1rem 1rem .5rem}.ngt-sidebar-box h3:first-child{margin-top:0}.ngt-sidebar-box ul{list-style:square;padding-left:1em}.ngt-sidebar-box li{margin-bottom:.5em;padding-left:0}.ngt-sidebar-box h5{margin-bottom:.5em}@media(min-width:1200px){.ngt-sidebar-box{padding:2rem 3rem 1.5rem}}.ngt-opt{container-type:inline-size}.ngt-opt select{width:130px}.ngt-opt [type=number]{width:6em}.ngt-opt>div{margin-block-end:1em;margin-block-start:1em}input.text-large--ngt-key{font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;width:21em}.ngt-label-wrap{-moz-column-gap:.5em;column-gap:.5em;display:flex;font-weight:600;margin-bottom:.3em}[type=checkbox]+.ngt-label-wrap{display:inline}.ngt-label-wrap a{--blue:oklch(53% .12 247.74deg);--red:oklch(53% .19 21.07deg);-webkit-background-clip:text;background-clip:text;background-image:linear-gradient(90deg,var(--blue) 0,var(--red) 100%);color:transparent;-webkit-text-decoration:underline var(--blue) 1px;text-decoration:underline var(--blue) 1px;text-underline-offset:2px;transition:-webkit-text-decoration .2s ease-in-out;transition:text-decoration .2s ease-in-out;transition:text-decoration .2s ease-in-out,-webkit-text-decoration .2s ease-in-out}.ngt-label-wrap a:focus,.ngt-label-wrap a:hover{-webkit-text-decoration:underline var(--blue) 3px;text-decoration:underline var(--blue) 3px}input[type=checkbox]:has(+.ngt-label-wrap){margin-top:-3px}.ngt-opt--arve-aspect_ratio .large-text,.ngt-opt--arve-lightbox_aspect_ratio .large-text,.ngt-opt--arve-sticky_gap .large-text,.ngt-opt--arve-sticky_max_width .large-text,.ngt-opt--arve-sticky_width .large-text{max-width:6em}1 .ngt-width-limiter{margin-left:auto;margin-right:auto;max-width:1100px}.ngt-full-width{margin-left:-10px!important}@media only screen and (min-width:783px){.ngt-full-width{margin-left:-22px!important;margin-right:-20px!important}}.wrap--nextgenthemes{--ngt-settings-bg:oklch(from var(--ngt-wp-body-bg) calc(l + 0.022) c h)}.wrap--nextgenthemes .nav-tab{cursor:pointer;font-weight:500}.wrap--nextgenthemes .nav-tab-active,.wrap--nextgenthemes .ngt-settings-bg{background-color:var(--ngt-settings-bg);border-bottom-color:var(--ngt-settings-bg)}.wrap--nextgenthemes .ngt-settings-bg{border-bottom:1px solid #c3c4c7;padding:1rem 0 1rem 1rem}.wrap--nextgenthemes a{text-underline-offset:2px}.wrap--nextgenthemes .ngt-label-wrap{display:block}.wrap--nextgenthemes .ngt-label-wrap a{display:none}.wrap--nextgenthemes [hidden]{display:none!important}.ngt-settings-grid{display:grid;grid-template-areas:"content" "sidebar"}@media(min-width:750px){.ngt-settings-grid{grid-template-areas:"content sidebar";grid-template-columns:minmax(300px,1fr) 300px;grid-column-gap:2rem}}@media(min-width:1200px){.ngt-settings-grid{grid-template-columns:minmax(300px,1fr) 420px;grid-column-gap:3rem}}.ngt-settings-grid__content{grid-area:content;-ms-grid-column:1;-ms-grid-row:1;padding-right:5px}.ngt-settings-grid__sidebar{grid-area:sidebar;-ms-grid-column:1;-ms-grid-row:2}@media (min-width:750px){.ngt-settings-grid__content{-ms-grid-column:1;-ms-grid-row:1}.ngt-settings-grid__sidebar{-ms-grid-column:3;-ms-grid-row:1}}.ngt-sidebar-box{background:#fff;border-left:4px solid #46b450;box-shadow:0 1px 1px 0 rgba(0,0,0,.1);margin-bottom:1rem;margin-top:1rem;padding:1rem 1rem .5rem}.ngt-sidebar-box h3:first-child{margin-top:0}.ngt-sidebar-box ul{list-style:square;padding-left:1em}.ngt-sidebar-box li{margin-bottom:.5em;padding-left:0}.ngt-sidebar-box h5{margin-bottom:.5em}@media(min-width:1200px){.ngt-sidebar-box{padding:2rem 3rem 1.5rem}}.ngt-opt{container-type:inline-size}.ngt-opt select{width:130px}.ngt-opt [type=number]{width:6em}.ngt-opt>div{margin-block-end:1em;margin-block-start:1em}input.text-large--ngt-key{font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;width:21em}.ngt-label-wrap{-moz-column-gap:.5em;column-gap:.5em;display:flex;font-weight:600;margin-bottom:.3em}[type=checkbox]+.ngt-label-wrap{display:inline}.ngt-label-wrap a{--blue:oklch(53% .12 247.74deg);--red:oklch(53% .19 21.07deg);-webkit-background-clip:text;background-clip:text;background-image:linear-gradient(90deg,var(--blue) 0,var(--red) 100%);color:transparent;-webkit-text-decoration:underline var(--blue) 1px;text-decoration:underline var(--blue) 1px;text-underline-offset:2px;transition:-webkit-text-decoration .2s ease-in-out;transition:text-decoration .2s ease-in-out;transition:text-decoration .2s ease-in-out,-webkit-text-decoration .2s ease-in-out}.ngt-label-wrap a:focus,.ngt-label-wrap a:hover{-webkit-text-decoration:underline var(--blue) 3px;text-decoration:underline var(--blue) 3px}input[type=checkbox]:has(+.ngt-label-wrap){margin-top:-3px}.ngt-opt--arve-aspect_ratio .large-text,.ngt-opt--arve-lightbox_aspect_ratio .large-text,.ngt-opt--arve-sticky_gap .large-text,.ngt-opt--arve-sticky_max_width .large-text,.ngt-opt--arve-sticky_width .large-text{max-width:6em} -
tweakmaster/tags/1.1.1/vendor/nextgenthemes/wp-settings/includes/WP/Admin/Notices.php
r3338568 r3382950 1 1 <?php 2 3 declare(strict_types = 1);4 5 namespace Nextgenthemes\WP\Admin;6 7 2 /** 8 3 * Dismissible Notices Handler. … … 24 19 * @link https://github.com/julien731/WP-Dismissible-Notices-Handler/blob/develop/handler.php 25 20 * @copyright 2021 Nicolas Jonas, 2018 Julien Liabeuf 26 */ 27 28 if ( 'always' ) { 29 21 **/ 22 23 declare(strict_types = 1); 24 25 namespace Nextgenthemes\WP\Admin; 26 27 if ( ! class_exists( 'Nextgenthemes\WP\Admin\Notices' ) ) { 30 28 final class Notices { 31 29 32 30 /** 33 * @var Notices Holds the unique instance of the handler 34 * @since 1.0 35 */ 36 private static $instance; 31 * @since 1.0 32 */ 33 private static ?Notices $instance = null; 37 34 38 35 /** … … 40 37 * 41 38 * @since 1.0 42 * @var string 43 */ 44 public $version = '1.2.1'; 45 46 /** 47 * Required version of PHP. 48 * 49 * @since 1.0 50 * @var string 51 */ 52 public $php_version_required = '5.5'; 39 */ 40 public string $version = '1.2.2'; 53 41 54 42 /** … … 56 44 * 57 45 * @since 1.0 58 * @var string 59 */ 60 public $wordpress_version_required = '4.7'; 61 62 /** 63 * @var array Holds all our registered notices 64 * @since 1.0 65 */ 66 private $notices; 46 */ 47 public string $wordpress_version_required = '4.7'; 48 49 /** 50 * All registered notices. 51 * 52 * @var array <string, array{ 53 * type: string, 54 * content: string, 55 * screen?: string, 56 * scope: string, 57 * cap?: string, 58 * class?: string 59 * }> 60 */ 61 private array $notices = array(); 67 62 68 63 /** … … 70 65 * 71 66 * @since 1.0 72 * @return objectNotices Unique instance of the handler67 * @return Notices Notices Unique instance of the handler 73 68 */ 74 69 public static function instance(): Notices { 75 70 76 if ( ! isset( self::$instance ) && !( self::$instance instanceof Notices ) ) {71 if ( ! ( self::$instance instanceof Notices ) ) { 77 72 self::$instance = new Notices(); 78 73 self::$instance->init(); … … 102 97 } 103 98 104 // Make sure PHP is compatible105 if ( ! self::$instance->is_php_compatible() ) {106 self::$instance->spit_error(107 sprintf(108 /* translators: %s: required php version */109 esc_html__( 'The library can not be used because your version of PHP is too old. You need version %s at least.', 'advanced-responsive-video-embedder' ),110 self::$instance->php_version_required111 )112 );113 114 return;115 }116 117 99 add_action( 'admin_notices', array( self::$instance, 'display' ) ); 118 100 add_action( 'wp_ajax_dnh_dismiss_notice', array( self::$instance, 'dismiss_notice_ajax' ) ); … … 127 109 128 110 if ( version_compare( get_bloginfo( 'version' ), self::$instance->wordpress_version_required, '<' ) ) { 129 return false;130 }131 132 return true;133 }134 135 /**136 * Check if the version of PHP is compatible with this library137 *138 * @since 1.0139 */140 private function is_php_compatible(): bool {141 142 if ( version_compare( phpversion(), self::$instance->php_version_required, '<' ) ) {143 111 return false; 144 112 } … … 217 185 218 186 /** 219 * Get available notice types220 * 221 * @ since 1.0187 * Retrieve the list of allowed notice types. 188 * 189 * @return string[] 222 190 */ 223 191 public function get_types(): array { … … 239 207 * Get the default arguments for a notice 240 208 * 241 * @since 1.0 209 * @return array <string, array{ 210 * screen: string, 211 * scope: string, 212 * cap: string, 213 * class: string 214 * }> 242 215 */ 243 216 private function default_args(): array { … … 258 231 * @since 1.0 259 232 * 260 * @param string $id Notice ID, used to identify it261 * @param string $type Type of notice to display262 * @param string $content Notice content263 * @param array $args Additional parameters233 * @param string $id Notice ID, used to identify it 234 * @param string $type Type of notice to display 235 * @param string $content Notice content 236 * @param array <string, mixed> $args Additional parameters 264 237 * 265 238 */ … … 322 295 // phpcs:enable 323 296 324 echo wp_kses_post( self::$instance->dismiss_notice( $id ) );297 echo wp_kses_post( (string) self::$instance->dismiss_notice( $id ) ); 325 298 exit; 326 299 } … … 479 452 * This includes notices dismissed globally or per user. 480 453 * 481 * @ since 1.0454 * @return array <string, string> 482 455 */ 483 456 public function dismissed_notices(): array { … … 492 465 * Get user dismissed notices 493 466 * 494 * @ since 1.0467 * @return array <string, string> 495 468 */ 496 469 private function dismissed_user(): array { … … 508 481 * Get globally dismissed notices 509 482 * 510 * @ since 1.0483 * @return array <string, string> 511 484 */ 512 485 private function dismissed_global(): array { … … 536 509 * Get all the registered notices 537 510 * 538 * @since 1.0 539 * @return array|null 540 */ 541 public function get_notices(): ?array { 511 * @return array <string, array{ 512 * type: string, 513 * content: string, 514 * screen?: string, 515 * scope: string, 516 * cap?: string, 517 * class?: string 518 * }> 519 */ 520 public function get_notices(): array { 542 521 return self::$instance->notices; 543 522 } … … 550 529 * @param string $id Notice ID 551 530 * 552 * @return array|false531 * @return false|array <string, string> 553 532 */ 554 533 public function get_notice( string $id ) { … … 563 542 } 564 543 } 565 566 544 } -
tweakmaster/tags/1.1.1/vendor/nextgenthemes/wp-settings/includes/WP/Admin/fn-licensing.php
r3338568 r3382950 6 6 7 7 use Nextgenthemes\WP\Admin\EDD\PluginUpdater; 8 use Nextgenthemes\WP\Admin\EDD\ThemeUpdater;9 8 use function Nextgenthemes\WP\get_products; 10 9 use function Nextgenthemes\WP\str_contains_any; 11 10 use const Nextgenthemes\ARVE\VERSION; 12 11 12 /** @param array <string, int|float|string|bool> $options */ 13 13 function init_edd_updaters( array $options ): void { 14 14 … … 19 19 if ( 'plugin' === $product['type'] && ! empty( $product['file'] ) ) { 20 20 init_plugin_updater( $product, $options ); 21 } elseif ( 'theme' === $product['type'] ) {22 init_theme_updater( $product, $options );23 21 } 24 22 } 25 23 } 26 24 25 /** 26 * @param array <string, int|float|string|bool> $product 27 * @param array <string, int|float|string|bool> $options 28 */ 27 29 function init_plugin_updater( array $product, array $options ): void { 28 30 … … 37 39 'item_id' => $product['id'], 38 40 'author' => $product['author'], 39 )40 );41 }42 43 function init_theme_updater( array $product, array $options ): void {44 45 new ThemeUpdater(46 array(47 'license' => $options[ $product['slug'] ],48 'remote_api_url' => 'https://nextgenthemes.com',49 'version' => $product['version'],50 'item_id' => $product['id'],51 'author' => $product['author'],52 'theme_slug' => $product['slug'],53 'download_id' => $product['download_id'], // Optional, used for generating a license renewal link54 #'renew_url' => $product['renew_link'], // Optional, allows for a custom license renewal link55 ),56 array(57 'theme-license' => __( 'Theme License', 'advanced-responsive-video-embedder' ),58 'enter-key' => __( 'Enter your theme license key.', 'advanced-responsive-video-embedder' ),59 'license-key' => __( 'License Key', 'advanced-responsive-video-embedder' ),60 'license-action' => __( 'License Action', 'advanced-responsive-video-embedder' ),61 'deactivate-license' => __( 'Deactivate License', 'advanced-responsive-video-embedder' ),62 'activate-license' => __( 'Activate License', 'advanced-responsive-video-embedder' ),63 'status-unknown' => __( 'License status is unknown.', 'advanced-responsive-video-embedder' ),64 'renew' => __( 'Renew?', 'advanced-responsive-video-embedder' ),65 'unlimited' => __( 'unlimited', 'advanced-responsive-video-embedder' ),66 'license-key-is-active' => __( 'License key is active.', 'advanced-responsive-video-embedder' ),67 // Translators: Date68 'expires%s' => __( 'Expires %s.', 'advanced-responsive-video-embedder' ),69 'expires-never' => __( 'Lifetime License.', 'advanced-responsive-video-embedder' ),70 // Translators: x of x sites activated71 '%1$s/%2$-sites' => __( 'You have %1$s / %2$s sites activated.', 'advanced-responsive-video-embedder' ),72 // Translators: Date73 'license-key-expired-%s' => __( 'License key expired %s.', 'advanced-responsive-video-embedder' ),74 'license-key-expired' => __( 'License key has expired.', 'advanced-responsive-video-embedder' ),75 'license-keys-do-not-match' => __( 'License keys do not match.', 'advanced-responsive-video-embedder' ),76 'license-is-inactive' => __( 'License is inactive.', 'advanced-responsive-video-embedder' ),77 'license-key-is-disabled' => __( 'License key is disabled.', 'advanced-responsive-video-embedder' ),78 'site-is-inactive' => __( 'Site is inactive.', 'advanced-responsive-video-embedder' ),79 'license-status-unknown' => __( 'License status is unknown.', 'advanced-responsive-video-embedder' ),80 'update-notice' => __( "Updating this theme will lose any customizations you have made. 'Cancel' to stop, 'OK' to update.", 'advanced-responsive-video-embedder' ),81 // phpcs:ignore82 'update-available' => __( '<strong>%1$s %2$s</strong> is available. <a href="%3$s" class="thickbox" title="%4s">Check out what\'s new</a> or <a href="%5$s"%6$s>update now</a>.', 'advanced-responsive-video-embedder' ),83 41 ) 84 42 ); -
tweakmaster/tags/1.1.1/vendor/nextgenthemes/wp-settings/includes/WP/Admin/fn-settings.php
r3338568 r3382950 28 28 * Prints all settings blocks. 29 29 * 30 * param array<string, SettingValidator> $settings The settings data. 31 * @param array<string, array> $tabs The tabs. 32 * @param string $context The context, either 'settings-page' or 'gutenberg_block'. Default 'settings-page'. 30 * @param array{ 31 * string: array{ 32 * title: string, 33 * premium_link?: string, 34 * reset_button?: bool 35 * } 36 * } $tabs 33 37 */ 34 function print_settings_blocks( 35 SettingsData $settings, 36 array $tabs, 37 string $context = 'settings-page' 38 ): void { 38 function print_settings_blocks( SettingsData $settings, array $tabs, string $context = 'settings-page' ): void { 39 39 40 40 $settings = $settings->get_all(); … … 59 59 } 60 60 61 /** 62 * @param array{ 63 * string: array{ 64 * title: string, 65 * premium_link?: string, 66 * reset_button?: bool 67 * } 68 * } $tabs 69 */ 61 70 function option_block( string $key, SettingValidator $setting, array $tabs ): void { 62 71 … … 194 203 } 195 204 205 /** 206 * @param array{ 207 * string: array{ 208 * title: string, 209 * premium_link?: string, 210 * reset_button?: bool 211 * } 212 * } $tabs 213 */ 196 214 function label( string $input_id, SettingValidator $setting, array $tabs ): void { 197 215 -
tweakmaster/tags/1.1.1/vendor/nextgenthemes/wp-settings/includes/WP/SettingValidator.php
r3338568 r3382950 63 63 public ?int $edd_item_id; 64 64 65 /** 66 * @param array <string, mixed> $setting 67 * @param bool $arve Indicates specific actions for ARVE plugin only. 68 */ 65 69 public function __construct( array $setting, bool $arve = false ) { 66 70 … … 164 168 throw new InvalidArgumentException( esc_html( 'Default value must be a string, integer or boolean' ) ); 165 169 } 166 if ( ! isset( $this->type ) ) {170 if ( empty( $this->type ) ) { 167 171 throw new InvalidArgumentException( esc_html( 'type must be set before default' ) ); 168 172 } … … 209 213 } 210 214 215 /** 216 * @return array <string, string|int|bool|null> 217 */ 211 218 public function to_array(): array { 212 219 return get_object_vars( $this ); -
tweakmaster/tags/1.1.1/vendor/nextgenthemes/wp-settings/includes/WP/Settings.php
r3338568 r3382950 60 60 /** 61 61 * Tabs for the Setting Page 62 * 63 * @var array{ 64 * string: array{ 65 * title: string, 66 * premium_link?: string, 67 * reset_button?: bool 68 * } 69 * } 62 70 * 63 71 * Example: … … 78 86 /** 79 87 * Array of current option values. 88 * 89 * @var array <string, int|float|string|bool> 80 90 */ 81 91 private array $options; … … 83 93 /** 84 94 * Array of default option values. 95 * 96 * @var array <string, int|float|string|bool> 85 97 */ 86 98 private array $options_defaults; … … 88 100 /** 89 101 * Array of default option values organized by section. 102 * 103 * @var array <string, array<string, int|float|string|bool>> 90 104 */ 91 105 private array $options_defaults_by_section; … … 93 107 /** 94 108 * Each setting is a SettingValidator object 95 *96 * @var SettingsData <string, SettingValidator>97 109 */ 98 110 private SettingsData $settings; 111 112 /** 113 * @var array <string, string> 114 */ 99 115 private array $defined_keys = array(); 100 116 117 /** 118 * @param array <int|string, mixed> $args 119 */ 101 120 public function __construct( array $args ) { 102 121 … … 128 147 } 129 148 149 /** 150 * @param array <int|string, string> $links 151 * @return array <int|string, string> Modified links 152 */ 130 153 public function add_action_links( array $links ): array { 131 154 … … 155 178 156 179 return array_merge( $extra_links, $links ); 157 }158 159 private function check_option_and_shortcode( array $setting ): void {160 161 if ( 'nextgenthemes_arve' === $this->slugged_namespace162 && ( ! isset( $setting['option'] ) || ! isset( $setting['shortcode'] ) )163 ) {164 wp_trigger_error( __METHOD__, 'option or shortcode must be set in ARVE' );165 }166 180 } 167 181 … … 217 231 } 218 232 233 /** 234 * @return array <string, int|float|string|bool> 235 */ 219 236 public function get_options(): array { 220 237 $options = (array) get_option( $this->slugged_namespace, array() ); … … 224 241 } 225 242 243 /** 244 * @return array <string, int|float|string|bool> 245 */ 226 246 public function get_options_defaults(): array { 227 247 return $this->options_defaults; … … 232 252 } 233 253 254 /** 255 * @param array <string, int|float|string|bool> $options 256 */ 234 257 public function save_options( array $options ): void { 235 258 // remove all items from options that are not also in defaults. -
tweakmaster/tags/1.1.1/vendor/nextgenthemes/wp-settings/includes/WP/SettingsData.php
r3338568 r3382950 7 7 class SettingsData { 8 8 9 /** @var array <string, SettingValidator> $settings */9 /** @var array <string, SettingValidator> $settings */ 10 10 private array $settings = []; 11 11 12 /** @param array <string, array<string, mixed>> $settings */ 12 13 public function __construct( array $settings, bool $arve = false ) { 13 14 foreach ( $settings as $key => $setting ) { -
tweakmaster/tags/1.1.1/vendor/nextgenthemes/wp-settings/includes/WP/fn-asset-helpers.php
r3338568 r3382950 58 58 * 59 59 * @param string $path The path to the file that should be versioned. 60 * @param string $stable_ver The version string to return if debug mode is off.60 * @param string|null $stable_ver The version string to return if debug mode is off. 61 61 * @return string|null The version string, or null if no file at the given path exists. 62 62 */ 63 function ver( string $path, string $stable_ver ): ?string {63 function ver( string $path, ?string $stable_ver ): ?string { 64 64 65 65 $debug = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) || ( defined( 'WP_DEBUG' ) && WP_DEBUG ); -
tweakmaster/tags/1.1.1/vendor/nextgenthemes/wp-settings/includes/WP/fn-license.php
r3338568 r3382950 62 62 63 63 $path_parts = pathinfo( $file ); 64 $path_parts['filename']; 65 66 $product = str_replace( '-', '_', $path_parts['filename'] ); 67 $key_name = strtoupper( $product . '_KEY' ); 68 $key = defined( $key_name ) ? constant( $key_name ) : false; 64 $product = str_replace( '-', '_', $path_parts['filename'] ); 65 $key_name = strtoupper( $product . '_KEY' ); 66 $key = defined( $key_name ) ? constant( $key_name ) : false; 69 67 70 68 if ( $key ) { … … 115 113 } 116 114 115 /** 116 * @param array <string, string> $license_data 117 */ 117 118 function get_api_error_message( array $license_data ): string { 118 119 -
tweakmaster/tags/1.1.1/vendor/nextgenthemes/wp-settings/includes/WP/fn-misc.php
r3338568 r3382950 62 62 * Move certain keys to the start of an associative array. 63 63 * 64 * @param array<string, mixed> $org _arrayThe original array.65 * @param array<string> $keys The keys to move to the start.64 * @param array<string, mixed> $org The original array. 65 * @param array<string> $keys The keys to move to the start. 66 66 * 67 67 * @return array<string, mixed> The modified array. 68 68 */ 69 function move_keys_to_start( array $org_array, array $keys ): array { 70 $new_array = []; 69 function move_keys_to_start( array $org, array $keys ): array { 70 71 $moved = array(); 71 72 72 73 foreach ( $keys as $key ) { 73 if ( array_key_exists( $key, $org _array) ) {74 $ new_array[ $key ] = $org_array[ $key ];75 unset( $org _array[ $key ] );74 if ( array_key_exists( $key, $org ) ) { 75 $moved[ $key ] = $org[ $key ]; 76 unset( $org[ $key ] ); 76 77 } 77 78 } 78 79 79 return $new_array + $org_array; 80 return $moved + $org; 81 } 82 83 /** 84 * Move specified keys to the end of an array 85 * 86 * @param array<string, mixed> $org Array to modify 87 * @param array<int, string> $keys Keys to move to the end 88 * @return array<string, mixed> Modified array with keys moved to end 89 */ 90 function move_keys_to_end( array $org, array $keys ): array { 91 92 $moved = array(); 93 94 foreach ( $keys as $key ) { 95 if ( array_key_exists( $key, $org ) ) { 96 $moved[ $key ] = $org[ $key ]; 97 unset( $org[ $key ] ); 98 } 99 } 100 101 return $org + $moved; 80 102 } 81 103 … … 98 120 * elements from the resulting array. 99 121 * 100 * @param string $strThe input comma-separated string101 * @param string $delimiter The delimiter to use. Space will NOT work!102 * @return array The resulting array122 * @param string $str The input comma-separated string 123 * @param string $delimiter The delimiter to use. Space will NOT work! 124 * @return array<int,string> The resulting array 103 125 */ 104 126 function str_to_array( string $str, string $delimiter = ',' ): array { 105 return array_filter( 106 array_map( 107 'trim', 108 explode( $delimiter, $str ) 109 ), 110 'strlen' 127 128 // Trim spaces from each element 129 $arr = array_map( 'trim', explode( $delimiter, $str ) ); 130 131 // Filter out empty elements 132 $arr = array_filter( 133 $arr, 134 fn ( string $s ): bool => (bool) strlen( $s ) 111 135 ); 136 137 // Remove duplicate elements 138 $arr = array_unique( $arr ); 139 140 return $arr; 112 141 } 113 142 … … 116 145 * with the modified keys and original values. 117 146 * 118 * @param string $callback The callback function to apply to each key.119 * @param array $arr The input array.147 * @param callable(string):string $callback The callback function to apply to each key, must return a string. 148 * @param array<mixed> $arr The input array with any value types. 120 149 * 121 * @return array The resulting array with modified keys. 150 * @return array<mixed> The resulting array with modified keys. 151 * @throws \InvalidArgumentException If the callback is not callable or if the callback returns non-string keys. 122 152 */ 123 function array_map_key( string $callback, array $arr ): array { 124 return array_combine( 125 array_map( $callback, array_keys( $arr ) ), 126 $arr 153 function array_map_key( callable $callback, array $arr ): array { 154 155 $keys = array_keys( $arr ); 156 $new_keys = array_map( 157 function ( $key ) use ( $callback ) { 158 $result = $callback( (string) $key ); 159 if ( ! is_string( $result ) ) { 160 throw new \InvalidArgumentException( 'Callback must return a string, got ' . esc_html( gettype( $result ) ) ); 161 } 162 return $result; 163 }, 164 $keys 127 165 ); 166 167 // Ensure no duplicate keys after mapping 168 if ( count( array_unique( $new_keys ) ) !== count( $new_keys ) ) { 169 throw new \InvalidArgumentException( 'Callback produced duplicate keys, which is not allowed.' ); 170 } 171 172 // array_combine will fail if lengths don't match, but we're safe here 173 return array_combine( $new_keys, array_values( $arr ) ); 128 174 } -
tweakmaster/tags/1.1.1/vendor/nextgenthemes/wp-settings/includes/WP/fn-remote-get.php
r3338568 r3382950 5 5 namespace Nextgenthemes\WP; 6 6 7 use DateTime;8 use Exception;9 use WP_Error;10 11 7 /** 12 8 * Retrieves JSON data from a remote URL. 13 9 * 14 * @return mixed|WP_Error 10 * @param array<string,mixed> $args 11 * 12 * @return mixed|\WP_Error 15 13 */ 16 14 function remote_get_json( string $url, array $args = array(), string $json_name = '' ) { … … 21 19 * Remote get JSON from a URL and cache the response. 22 20 * 23 * @return mixed|WP_Error The decoded JSON response, or the specified JSON value if $json_name is provided. 21 * @param array<string,mixed> $args 22 * 23 * @return mixed|\WP_Error The decoded JSON response, or the specified JSON value if $json_name is provided. 24 24 */ 25 25 function remote_get_json_cached( string $url, array $args = array(), string $json_name = '', int $time = DAY_IN_SECONDS ) { … … 33 33 try { 34 34 $response = json_decode( $response, true, 128, JSON_THROW_ON_ERROR ); 35 } catch ( Exception $exception ) {36 37 return new WP_Error(35 } catch ( \Exception $exception ) { 36 37 return new \WP_Error( 38 38 'json-decode-error', 39 39 sprintf( … … 49 49 if ( $json_name ) { 50 50 if ( empty( $response[ $json_name ] ) ) { 51 return new WP_Error(51 return new \WP_Error( 52 52 'json-value-empty', 53 53 sprintf( … … 74 74 * Retrieves the body content from a remote URL. 75 75 * 76 * @param string $url The URL of the remote resource. 77 * @param array $args Optional. Additional arguments for wp_safe_remote_get. 78 * @return string|WP_Error The response body content from the remote URL, or a WP_Error on failure. 76 * @param string $url The URL of the remote resource. 77 * @param array<string,mixed> $args Optional. Additional arguments for wp_safe_remote_get. 78 * array{ 79 * method?: string, 80 * timeout?: int|float, 81 * redirection?: int, 82 * httpversion?: string, 83 * user-agent?: string, 84 * blocking?: bool, 85 * headers?: array<string,string>, 86 * cookies?: array<string,string>, 87 * body?: string|array, 88 * compress?: bool, 89 * decompress?: bool, 90 * sslverify?: bool, 91 * sslcertificates?: string, 92 * stream?: bool, 93 * filename?: string, 94 * reject_unsafe_urls?: bool 95 * } 96 * @return string|\WP_Error The response body content from the remote URL, or a WP_Error on failure. 79 97 */ 80 98 function remote_get_body( string $url, array $args = array() ) { … … 82 100 $response = wp_safe_remote_get( $url, $args ); 83 101 $response_code = wp_remote_retrieve_response_code( $response ); 84 $body = wp_remote_retrieve_body( $response);102 $body = trim( wp_remote_retrieve_body( $response ) ); 85 103 86 104 if ( is_wp_error( $response ) ) { … … 90 108 if ( 200 !== $response_code ) { 91 109 92 return new WP_Error(110 return new \WP_Error( 93 111 $response_code, 94 112 sprintf( … … 103 121 104 122 if ( '' === $body ) { 105 return new WP_Error(123 return new \WP_Error( 106 124 'empty-body', 107 125 sprintf( … … 118 136 119 137 /** 120 * @return array|WP_Error 138 * @param array<string,mixed> $args 139 * 140 * @return array<string,mixed>|\WP_Error 121 141 */ 122 142 function remote_get_head( string $url, array $args = array() ) { … … 132 152 if ( 200 !== $response_code ) { 133 153 134 return new WP_Error(154 return new \WP_Error( 135 155 $response_code, 136 156 sprintf( … … 150 170 * Retrieves the body content from a remote URL, with caching for improved performance. 151 171 * 152 * @param string $urlThe URL of the remote resource.153 * @param array $args Optional. Additional arguments for wp_safe_remote_get.154 * @param int $time Optional. The duration in seconds to cache the response. Default is DAY_IN_SECONDS. 0 to disable caching.155 * @return mixed| WP_ErrorThe response body content from the remote URL, or a WP_Error on failure.172 * @param string $url The URL of the remote resource. 173 * @param array<string,mixed> $args Optional. Additional arguments for wp_safe_remote_get. 174 * @param int $time Optional. The duration in seconds to cache the response. Default is DAY_IN_SECONDS. 0 to disable caching. 175 * @return mixed|\WP_Error The response body content from the remote URL, or a WP_Error on failure. 156 176 */ 157 177 function remote_get_body_cached( string $url, array $args = array(), int $time = DAY_IN_SECONDS ) { … … 162 182 * Retrieves the body content from a remote URL, with caching for improved performance. 163 183 * 164 * @param string $url The URL of the remote resource.165 * @param array $args Optional. Additional arguments for wp_safe_remote_get.166 * @param int $time Optional. The duration in seconds to cache the response. Default is DAY_IN_SECONDS. 0 to disable caching.167 * @return mixed| WP_ErrorThe response body content from the remote URL, or a WP_Error on failure.184 * @param string $url The URL of the remote resource. 185 * @param array<string,mixed> $args Optional. Additional arguments for wp_safe_remote_get. 186 * @param int $time Optional. The duration in seconds to cache the response. Default is DAY_IN_SECONDS. 0 to disable caching. 187 * @return mixed|\WP_Error The response body content from the remote URL, or a WP_Error on failure. 168 188 */ 169 189 function remote_get_head_cached( string $url, array $args = array(), int $time = DAY_IN_SECONDS ) { … … 176 196 * TODO maybe use json to encode WP_Error to avoid WP using serialize 177 197 * 178 * @param string $urlThe URL of the remote resource.179 * @param array $args Optional. Additional arguments to include in the request.180 * @param int $time Optional. The duration in seconds to cache the response. Default is DAY_IN_SECONDS. 0 to disable caching.181 * @return WP_Error|mixedThe response body content from the remote URL.198 * @param string $url The URL of the remote resource. 199 * @param array<string,mixed> $args Optional. Additional arguments to include in the request. 200 * @param int $time Optional. The duration in seconds to cache the response. Default is DAY_IN_SECONDS. 0 to disable caching. 201 * @return \WP_Error|mixed The response body content from the remote URL. 182 202 */ 183 203 function _remote_get_cached( string $url, array $args, int $time, string $type ) { … … 216 236 array( 'https' ) 217 237 ), 218 current_datetime()->format( DATETIME::ATOM ),238 current_datetime()->format( \DATETIME::ATOM ), 219 239 $time, 220 240 esc_html( $transient_name ) -
tweakmaster/tags/1.1.1/vendor/nextgenthemes/wp-settings/includes/WP/fn-settings.php
r3338568 r3382950 42 42 function nextgenthemes_settings(): SettingsData { 43 43 44 $settings = array(); 44 45 $products = get_products(); 45 46 … … 73 74 } 74 75 76 /** 77 * @return array<string,array<string,string|int|bool>> Product data 78 */ 75 79 function get_products(): array { 76 80 … … 157 161 * 158 162 * @param mixed $value The value to sanitize. 159 * @param WP_REST_Request $request The request object.163 * @param \WP_REST_Request $request The request object. 160 164 * @param string $param The parameter name. 161 165 * @return int The sanitized boolean value. … … 170 174 * 171 175 * @param mixed $value The value to sanitize. 172 * @param WP_REST_Request $request The request object.176 * @param \WP_REST_Request $request The request object. 173 177 * @param string $param The parameter name. 174 178 * @return bool The sanitized boolean value. … … 183 187 * 184 188 * @param mixed $value The value to sanitize. 185 * @param WP_REST_Request $request The request object.189 * @param \WP_REST_Request $request The request object. 186 190 * @param string $param The parameter name. 187 191 * @return string The sanitized boolean value. -
tweakmaster/tags/1.1.1/vendor/nextgenthemes/wp-settings/includes/WP/fn-string.php
r3338568 r3382950 10 10 * Adds, updates or removes attributes to the first HTML tag passed in. 11 11 * 12 * @param string $html The HTML string, e.g. <div>...</div>. 13 * @param array $attr A list of HTML attributes, e.g. class, src, href, etc. 14 * 15 * @return string The updated HTML updated as string. 12 * @param string $html The HTML string, e.g. <div>...</div>. 13 * @param array <string, int|string|bool|null> $attr A list of HTML attributes, e.g. class, src, href, etc. 14 * @return string The updated HTML updated as string. 16 15 */ 17 16 function first_tag_attr( string $html, array $attr ): string { … … 32 31 * Applies attributes to the HTML tag the WP_HTML_Tag_Processor is currently on. 33 32 * 34 * @param WP_HTML_Tag_Processor $p The tag processor. 35 * @param array $attr A list of HTML attributes, e.g. class, src, href, etc. 36 * 37 * @return WP_HTML_Tag_Processor The tag processor. 33 * @param WP_HTML_Tag_Processor $p The tag processor. 34 * @param array <string, string|int|float|bool> $attr A list of HTML attributes, e.g. class, src, href, etc. 35 * @return WP_HTML_Tag_Processor The tag processor. 38 36 */ 39 37 function apply_attr( WP_HTML_Tag_Processor $p, array $attr ): WP_HTML_Tag_Processor { … … 48 46 if ( null === $value ) { 49 47 $value = false; 48 } 49 50 if ( is_float( $value ) ) { 51 $value = (string) $value; 50 52 } 51 53 … … 68 70 * Get the value of a specific attribute from an HTML string. 69 71 * 70 * @param array $query argument for WP_HTML_Tag_Processor::next_tag 71 * @param string $attribute attribute to look for 72 * @param string $html HTML string to parse 73 * @return string|null attribute value or null if not found or empty 72 * @param array{ 73 * tag_name?: string|null, 74 * match_offset?: int|null, 75 * class_name?: string|null, 76 * tag_closers?: 'visit'|'skip'|null 77 * } $query { 78 * Optional. Which tag name to find, having which class, etc. Default is to find any tag. 79 * 80 * @type string|null $tag_name Which tag to find, or null for "any tag." 81 * @type int|null $match_offset Find the Nth tag matching all search criteria. 82 * 1 for "first" tag, 3 for "third," etc. 83 * Defaults to first tag. 84 * @type string|null $class_name Tag must contain this whole class name to match. 85 * @type string|null $tag_closers "visit" or "skip": whether to stop on tag closers, e.g. </div>. 86 * } 87 * @param string $attribute Attribute to look for. 88 * @param string $html HTML string to parse. 89 * @return string|null Attribute value or null if not found or empty. 74 90 */ 75 91 function get_attribute_from_html_tag( array $query, string $attribute, string $html ): ?string { 76 77 92 $wphtml = new WP_HTML_Tag_Processor( $html ); 78 93 79 94 if ( $wphtml->next_tag( $query ) ) { 80 81 95 $attr_value = $wphtml->get_attribute( $attribute ); 82 96 … … 92 106 * Checks if any of the needles are contained within the haystack. 93 107 * 94 * @param string $haystack The string to search in.95 * @param array $needlesAn array of strings to search for.108 * @param string $haystack The string to search in. 109 * @param array <int, string> $needles An array of strings to search for. 96 110 */ 97 111 function str_contains_any( string $haystack, array $needles ): bool { … … 256 270 257 271 /** 258 * Replaces links in the given text with the given replacement, unless the link ends with a period. 272 * Replaces links in the given text with the given replacement. 273 * 274 * Matches URLs with protocols (http://, https://) or domain-like patterns. 275 * Requires at least 2 characters after the final dot to ensure valid TLDs. 259 276 * 260 277 * @see https://regex101.com/r/aElNTt/8 261 278 * 262 * @param string $text The text containing the links to replace.279 * @param string $text The text containing the links to replace. 263 280 * @param string $replacement The string to replace the links with. 264 281 * @return string The modified text with the replaced links. … … 266 283 function replace_links( string $text, string $replacement ): string { 267 284 268 $pattern = '/https?:\/\/[\S]+|[a-z0-9-]+\.[a-z0-9-]+\S*/i'; 269 270 return preg_replace_callback( 271 $pattern, 272 fn ( $matches ) => str_ends_with( $matches[0], '.' ) ? $matches[0] : $replacement, 273 $text 274 ); 275 } 285 $pattern = '/https?:\/\/\S+|[a-z0-9-]+(?:\.[a-z0-9-]+)*\.[a-z]{2,}\S*/i'; 286 287 return preg_replace( $pattern, $replacement, $text ); 288 } -
tweakmaster/tags/1.1.1/vendor/nextgenthemes/wp-settings/src/settings.scss
r3338568 r3382950 20 20 oklch( 21 21 from var(--ngt-wp-body-bg) 22 calc(l + .022)22 calc(l + 0.022) 23 23 c 24 24 h -
tweakmaster/trunk/composer.lock
r3362812 r3382950 10 10 { 11 11 "name": "automattic/jetpack-autoloader", 12 "version": "v5.0.1 0",12 "version": "v5.0.11", 13 13 "source": { 14 14 "type": "git", 15 15 "url": "https://github.com/Automattic/jetpack-autoloader.git", 16 "reference": " f7e2142139b925fac0a167ed0cbc71e2592bd9a0"16 "reference": "90bf7b3bc29cb7be74105ac99afab4c21bc47e29" 17 17 }, 18 18 "dist": { 19 19 "type": "zip", 20 "url": "https://api.github.com/repos/Automattic/jetpack-autoloader/zipball/ f7e2142139b925fac0a167ed0cbc71e2592bd9a0",21 "reference": " f7e2142139b925fac0a167ed0cbc71e2592bd9a0",20 "url": "https://api.github.com/repos/Automattic/jetpack-autoloader/zipball/90bf7b3bc29cb7be74105ac99afab4c21bc47e29", 21 "reference": "90bf7b3bc29cb7be74105ac99afab4c21bc47e29", 22 22 "shasum": "" 23 23 }, … … 69 69 ], 70 70 "support": { 71 "source": "https://github.com/Automattic/jetpack-autoloader/tree/v5.0.1 0"71 "source": "https://github.com/Automattic/jetpack-autoloader/tree/v5.0.11" 72 72 }, 73 "time": "2025- 09-15T14:36:53+00:00"73 "time": "2025-10-06T10:32:52+00:00" 74 74 }, 75 75 { … … 79 79 "type": "git", 80 80 "url": "https://github.com/nextgenthemes/wp-settings.git", 81 "reference": " 4e26cd875e2ba18f6f1bb523ef51d01ec7f7869d"81 "reference": "c899134604cca1d2cbea92ccebc8acdb2eb84429" 82 82 }, 83 83 "dist": { 84 84 "type": "zip", 85 "url": "https://api.github.com/repos/nextgenthemes/wp-settings/zipball/ 4e26cd875e2ba18f6f1bb523ef51d01ec7f7869d",86 "reference": " 4e26cd875e2ba18f6f1bb523ef51d01ec7f7869d",85 "url": "https://api.github.com/repos/nextgenthemes/wp-settings/zipball/c899134604cca1d2cbea92ccebc8acdb2eb84429", 86 "reference": "c899134604cca1d2cbea92ccebc8acdb2eb84429", 87 87 "shasum": "" 88 88 }, … … 109 109 "source": "https://github.com/nextgenthemes/wp-settings/tree/master" 110 110 }, 111 "time": "2025- 08-03T12:18:07+00:00"111 "time": "2025-10-21T22:59:15+00:00" 112 112 } 113 113 ], -
tweakmaster/trunk/php/fn-settings.php
r3362812 r3382950 40 40 } 41 41 42 /** 43 * @return array<string, mixed> 44 */ 42 45 function options(): array { 43 46 return settings_instance()->get_options(); 44 47 } 45 48 49 /** 50 * @return array<string, mixed> 51 */ 46 52 function default_options(): array { 47 53 return settings_instance()->get_options_defaults(); … … 63 69 } 64 70 71 /** 72 * @return array<string, array<string, mixed>> 73 */ 65 74 function general_settings(): array { 66 75 return array( … … 231 240 } 232 241 242 /** 243 * @return array<string, array<string, string|int|bool|float>> 244 */ 233 245 function security_settings(): array { 234 246 … … 274 286 } 275 287 288 /** 289 * @return array<string, array<string, string|int|bool|float>> 290 */ 276 291 function performance_settings(): array { 277 292 return array( … … 300 315 } 301 316 317 /** 318 * @return array<string, array<string, string|int|bool|float>> 319 */ 302 320 function media_settings(): array { 303 321 return array( … … 340 358 } 341 359 360 /** 361 * @return array<string, array<string, string|int|bool|float>> 362 */ 342 363 function privacy_settings(): array { 343 364 … … 378 399 } 379 400 401 /** 402 * @return array<string, array<string, string|int|bool|float>> 403 */ 380 404 function plugins_settings(): array { 381 405 … … 407 431 } 408 432 433 /** 434 * @return array<string, array<string, string|int|bool|float>> 435 */ 409 436 function revision_settings(): array { 410 437 … … 434 461 } 435 462 463 /** 464 * @return array<string, array<string, string|int|bool|float>> 465 */ 436 466 function tools_settings(): array { 437 467 … … 459 489 } 460 490 491 /** 492 * @param array<string> $options_keys 493 */ 461 494 function any_option_is_set( array $options_keys ): bool { 462 495 … … 472 505 /** 473 506 * Get post types which support revisions. 507 * 508 * @return array<string, string> 474 509 */ 475 510 function get_revision_post_types(): array { -
tweakmaster/trunk/php/tweaks-standalone/convert-jpeg-to-avif.php
r3338568 r3382950 22 22 add_filter( 'image_editor_output_format', __NAMESPACE__ . '\convert_jpeg_to_avif' ); 23 23 24 // Output AVIFs for uploaded JPEGs 24 /** 25 * Output AVIFs for uploaded JPEGs 26 * 27 * @param array<string, string> $formats 28 * @return array<string, string> 29 */ 25 30 function convert_jpeg_to_avif( array $formats ): array { 26 31 $formats['image/jpeg'] = 'image/avif'; -
tweakmaster/trunk/php/tweaks-standalone/dequeue-jquery-migrate.php
r3338568 r3382950 20 20 namespace Nextgenthemes\TweakMaster; 21 21 22 use WP_Scripts; 23 24 add_action( 'wp_default_scripts', __NAMESPACE__ . '\dequeue_jquery_migrate', 20 ); 22 add_action( 'wp_enqueue_scripts', __NAMESPACE__ . '\dequeue_jquery_migrate', 15 ); 25 23 /** 26 24 * Dequeue jQuery Migrate from the jQuery script dependencies on the frontend. 27 *28 * @param WP_Scripts $scripts The WP_Scripts object containing registered scripts.29 25 * 30 26 * This function checks if the current request is not for the admin area and if … … 32 28 * the dependencies of the 'jquery' script. 33 29 */ 34 function dequeue_jquery_migrate( WP_Scripts $scripts): void {30 function dequeue_jquery_migrate(): void { 35 31 36 if ( ! is_admin() && ! empty( $scripts->registered['jquery'] ) ) { 32 $scripts = wp_scripts(); 33 34 if ( ! empty( $scripts->registered['jquery'] ) ) { 37 35 $jquery_dependencies = $scripts->registered['jquery']->deps; 38 36 $scripts->registered['jquery']->deps = array_diff( $jquery_dependencies, array( 'jquery-migrate' ) ); -
tweakmaster/trunk/php/tweaks-standalone/disable-comments.php
r3338568 r3382950 25 25 26 26 // Close comments on the front-end 27 add_filter( 'comments_open', '__return_false', 20, 2);28 add_filter( 'pings_open', '__return_false', 20, 2);27 add_filter( 'comments_open', '__return_false', 20, 0 ); 28 add_filter( 'pings_open', '__return_false', 20, 0 ); 29 29 30 30 // Hide existing comments 31 add_filter( 'comments_array', '__return_empty_array', 10, 2);31 add_filter( 'comments_array', '__return_empty_array', 10, 0 ); 32 32 33 33 add_action( 'admin_menu', __NAMESPACE__ . '\remove_comments_page_menu' ); -
tweakmaster/trunk/php/tweaks-standalone/disable-emojis.php
r3338568 r3382950 44 44 * Filter function used to remove the tinymce emoji plugin. 45 45 * 46 * @return array Difference between the two arrays 46 * @param array<string> $plugins Array of plugins 47 * @return array<string> Array of plugins (wpemoji removed) 47 48 */ 48 49 function disable_emojis_tinymce( array $plugins ): array { 49 if ( is_array( $plugins ) ) { 50 return array_diff( $plugins, array( 'wpemoji' ) ); 51 } 52 53 return array(); 50 return array_diff( $plugins, array( 'wpemoji' ) ); 54 51 } 55 52 … … 57 54 * Remove emoji CDN hostname from DNS prefetching hints. 58 55 * 59 * @param array $urls URLs to print for resource hints.60 * @param string $relation_type The relation type the URLs are printed for.61 * @return array Difference between the two arrays.56 * @param array<string> $urls URLs to print for resource hints. 57 * @param string $relation_type The relation type the URLs are printed for. 58 * @return array<string> Difference between the two arrays. 62 59 */ 63 60 function disable_emojis_remove_dns_prefetch( array $urls, string $relation_type ): array { -
tweakmaster/trunk/php/tweaks-standalone/disable-feeds.php
r3338568 r3382950 20 20 namespace Nextgenthemes\TweakMaster; 21 21 22 add_action( 'do_feed_rdf', __NAMESPACE__ . '\kill_feed', 1 ); 23 add_action( 'do_feed_rss', __NAMESPACE__ . '\kill_feed', 1 ); 24 add_action( 'do_feed_rss2', __NAMESPACE__ . '\kill_feed', 1 ); 25 add_action( 'do_feed_atom', __NAMESPACE__ . '\kill_feed', 1 ); 22 add_action( 'do_feed_rdf', __NAMESPACE__ . '\kill_feed', 1 ); // @phpstan-ignore-line 23 add_action( 'do_feed_rss', __NAMESPACE__ . '\kill_feed', 1 ); // @phpstan-ignore-line 24 add_action( 'do_feed_rss2', __NAMESPACE__ . '\kill_feed', 1 ); // @phpstan-ignore-line 25 add_action( 'do_feed_atom', __NAMESPACE__ . '\kill_feed', 1 ); // @phpstan-ignore-line 26 26 27 27 function kill_rss(): void { -
tweakmaster/trunk/php/tweaks-standalone/disable-non-production-emails.php
r3338568 r3382950 23 23 add_filter( 'wp_mail', __NAMESPACE__ . '\disable_non_production_emails', 9999 ); 24 24 25 /** 26 * Disable all emails by filtering wp_mail 27 * 28 * @param array<string, mixed> $args Array of arguments for wp_mail. 29 * @return array<string, mixed> Modified array of arguments. 30 */ 25 31 function disable_non_production_emails( array $args ): array { 26 32 -
tweakmaster/trunk/php/tweaks-standalone/disable-ssl-verify-self.php
r3338568 r3382950 22 22 add_filter( 'http_request_args', __NAMESPACE__ . '\disable_ssl_verify_for_dev', 10, 2 ); 23 23 24 /** 25 * Disable SSL verification for development sites 26 * 27 * @param array<string, mixed> $args Array of arguments for http_request_args. 28 * @param string $url URL to make the request to. 29 * 30 * @return array<string, mixed> Modified array of arguments. 31 */ 24 32 function disable_ssl_verify_for_dev( array $args, string $url ): array { 25 33 -
tweakmaster/trunk/php/tweaks-standalone/disable-success-update-emails.php
r3338568 r3382950 26 26 * @param bool $send Whether to send an email. 27 27 * @param string $type The type of email to send. 28 * @param object $core_update The update offer. 29 * @param array $result The result of the update. 30 * 31 * @return bool Whether to send an email. 28 * @return bool Whether to send an email. 32 29 */ 33 30 function disable_core_auto_update_emails_on_success( bool $send, string $type ): bool { … … 45 42 * Disable auto-update email notifications if all of the updates were successful. 46 43 * 47 * @param bool $enabled Whether to send an email. 48 * @param array $update_results The result of the update. 49 * 50 * @return bool Whether to send an email. 44 * @param bool $enabled Whether to send an email. 45 * @param array<object> $update_results The result of the update. 46 * @return bool Whether to send an email. 51 47 */ 52 48 function disable_auto_update_emails_on_success( bool $enabled, array $update_results ): bool { -
tweakmaster/trunk/php/tweaks-standalone/disable-xmlrpc-allow-jetpack-ips.php
r3338568 r3382950 21 21 22 22 namespace Nextgenthemes\TweakMaster; 23 24 use WP_Error;25 23 26 24 const JETPACK_IPS = array( … … 49 47 function is_ip_in_range( string $ip, string $cidr ): bool { 50 48 list($subnet, $bits) = explode( '/', $cidr ); 49 $bits = (int) $bits; 51 50 $ip = ip2long( $ip ); 52 51 $subnet = ip2long( $subnet ); … … 56 55 } 57 56 58 // Fetch and cache Jetpack IP ranges 57 /** 58 * Fetch and cache Jetpack IP ranges 59 * 60 * @return array<string> Array of IP ranges. 61 */ 59 62 function get_jetpack_ips(): array { 60 63 $transient_key = 'tweakmaster_jetpack_ips'; … … 113 116 * Retrieves the body content from a remote URL. 114 117 * 115 * @param string $urlThe URL of the remote resource.116 * @param array$args Optional. Additional arguments for wp_safe_remote_get.117 * @return string| WP_ErrorThe response body content from the remote URL, or a WP_Error on failure.118 * @param string $url The URL of the remote resource. 119 * @param array<string, mixed> $args Optional. Additional arguments for wp_safe_remote_get. 120 * @return string|\WP_Error The response body content from the remote URL, or a WP_Error on failure. 118 121 */ 119 122 function remote_get_body( string $url, array $args = array() ) { … … 128 131 if ( 200 !== $response_code ) { 129 132 130 return new WP_Error(133 return new \WP_Error( 131 134 $response_code, 132 135 sprintf( … … 142 145 143 146 if ( '' === $response ) { 144 return new WP_Error(147 return new \WP_Error( 145 148 'empty-body', 146 149 sprintf( -
tweakmaster/trunk/php/tweaks-standalone/enable-duplicate-post.php
r3338568 r3382950 28 28 add_filter( 'page_row_actions', __NAMESPACE__ . '\duplicate_post_link', 10, 2 ); 29 29 /** 30 * @param array$actions The actions added as links to the admin.31 * @param WP_Post $postThe post object.32 * 30 * @param array<int|string, string> $actions The actions added as links to the admin. 31 * @param \WP_Post $post The post object. 32 * @return array<int|string, string> The actions added as links to the admin. 33 33 */ 34 34 function duplicate_post_link( array $actions, \WP_Post $post ): array { -
tweakmaster/trunk/php/tweaks-standalone/enable-fonts-to-uploads.php
r3338568 r3382950 25 25 bootstrap(); 26 26 27 28 29 27 30 /** 28 31 * Bootstrap the plugin. … … 37 40 * custom upload directory file handlers. 38 41 */ 39 add_action( 'init', __NAMESPACE__ . '\\cached_wp_get_upload_dir', 20 ); 42 add_action( 'init', __NAMESPACE__ . '\\cached_wp_get_upload_dir_primer', 20 ); 43 } 44 45 /** 46 * Prime the uploads directory cache. Exists to phpstan does not complain about hook function having a return value. 47 * 48 * This runs late on the `init` hook to allow time for plugins to register 49 * custom upload directory file handlers. 50 * 51 */ 52 function cached_wp_get_upload_dir_primer(): void { 53 cached_wp_get_upload_dir(); 40 54 } 41 55 … … 52 66 * @see https://github.com/pantheon-systems/pantheon-mu-plugin/blob/main/inc/fonts.php for inspiration. 53 67 * 54 * @return array Result of wp_get_upload_dir(). 68 * Returns the cached upload directory information. 69 * 70 * This function stores the uploads directory in a static variable to prevent 71 * potential infinite loops that could occur if an extender includes 72 * `add_filter( 'upload_dir', 'wp_get_font_dir' );` in their code base. 73 * 74 * Without a primed cache, `wp_get_upload_dir()` would trigger a call to 75 * `wp_get_font_dir()` which would trigger a call to `wp_get_upload_dir()`. 76 * 77 * @return array<string, string|false> 55 78 */ 56 79 function cached_wp_get_upload_dir(): array { … … 70 93 * sub-directory of the uploads folder. 71 94 * 72 * @param array$font_directory The default in which to store fonts.73 * @return array The modified fonts directory.95 * @param array<string, string|false> $font_directory The default in which to store fonts. 96 * @return array<string, string|false> The modified fonts directory. 74 97 */ 75 98 function filter_default_font_directory( array $font_directory ): array { -
tweakmaster/trunk/php/tweaks-standalone/enable-maintenance-mode.php
r3338568 r3382950 27 27 add_action( 'wp_authenticate_user', __NAMESPACE__ . '\check_user_capability' ); 28 28 29 function check_user_capability( \WP_User $user ): \WP_User{29 function check_user_capability( \WP_User $user ): void { 30 30 31 if ( ! $user || !user_can( $user, CAPABILITY ) ) {31 if ( ! user_can( $user, CAPABILITY ) ) { 32 32 33 33 // Deny the user 34 34 wp_clear_auth_cookie(); 35 wp_set_auth_cookie( '', false );35 wp_set_auth_cookie( $user->ID, false ); 36 36 do_action( 'wp_logout' ); 37 37 wp_safe_redirect( wp_login_url() ); 38 38 exit; 39 39 } 40 41 return $user;42 40 } 43 41 … … 68 66 * This is only shown to users who are not logged in or do not have the CAPABILITY. 69 67 * 70 * @param WP_Admin_Bar $wp_admin_bar The admin bar object.68 * @param \WP_Admin_Bar $wp_admin_bar The admin bar object. 71 69 */ 72 70 function add_maintenance_mode_notice( \WP_Admin_Bar $wp_admin_bar ): void { -
tweakmaster/trunk/php/tweaks-standalone/enable-script-optimizer.php
r3338568 r3382950 135 135 * Array Key Exists and Has Value 136 136 * 137 * @param string $keyThe key to search for in the array.138 * @param array $arrayThe array to search.139 * @param mixed $default_value The default value to return if not found or is empty. Default is an empty string.137 * @param string $key The key to search for in the array. 138 * @param array<string, mixed> $arr The array to search. 139 * @param mixed $default_value The default value to return if not found or is empty. Default is an empty string. 140 140 * 141 * @return mixed |nullThe value of the key found in the array if it exists or the value of `$default_value` if not found or is empty.141 * @return mixed The value of the key found in the array if it exists or the value of `$default_value` if not found or is empty. 142 142 */ 143 143 function get_array_key_value( string $key, array $arr, $default_value = null ) { -
tweakmaster/trunk/php/tweaks-standalone/remove-exif.php
r3338568 r3382950 5 5 * @copyright 2025 Nicolas Jonas 6 6 * @license GPL-3.0 7 * Copied from Bob, just Namespaced,and make use of wp_trigger_error7 * Copied from Bob, Namespaced, fixed add_filter instead of add_action and make use of wp_trigger_error 8 8 * 9 9 * @copyright 2024 Bob Matyas … … 28 28 use Exception; 29 29 30 add_ action( 'wp_handle_upload', __NAMESPACE__ . '\remove_exif' );30 add_filter( 'wp_handle_upload', __NAMESPACE__ . '\remove_exif' ); 31 31 /** 32 32 * Handle an image upload by removing EXIF data. 33 33 * 34 * @param array$upload A single array element containing the details of the uploaded file.35 * @return array The processed upload array.34 * @param array<string, mixed> $upload A single array element containing the details of the uploaded file. 35 * @return array<string, mixed> The processed upload array. 36 36 */ 37 37 function remove_exif( array $upload ): array { -
tweakmaster/trunk/php/tweaks/admin-bar-greeting.php
r3338568 r3382950 19 19 add_action( 'wp_enqueue_scripts', __NAMESPACE__ . '\enqueue_admin_bar_greeting_module' ); 20 20 add_action( 'admin_enqueue_scripts', __NAMESPACE__ . '\enqueue_admin_bar_greeting_module' ); 21 add_ action( 'wp_script_attributes', __NAMESPACE__ . '\add_greeting_data_attribute' );21 add_filter( 'wp_script_attributes', __NAMESPACE__ . '\add_greeting_data_attribute' ); 22 22 } 23 23 } … … 33 33 } 34 34 35 /** 36 * @param array<string, string> $attributes HTML tag attributes 37 * 38 * @return array<string, string> HTML tag attributes (modified) 39 */ 35 40 function add_greeting_data_attribute( array $attributes ): array { 36 41 -
tweakmaster/trunk/php/tweaks/image-quality.php
r3338568 r3382950 11 11 namespace Nextgenthemes\TweakMaster; 12 12 13 add_filter( 'wp_editor_set_quality', __NAMESPACE__ . ' set_image_quality', 10, 2 );13 add_filter( 'wp_editor_set_quality', __NAMESPACE__ . '\set_image_quality', 10, 2 ); 14 14 /** 15 15 * Sets image quality based on MIME type. -
tweakmaster/trunk/readme-src.md
r3362812 r3382950 5 5 Tested up to: 6.8 6 6 Requires PHP: 7.4 7 Stable tag: 1.1. 07 Stable tag: 1.1.1 8 8 License: GPLv3 9 9 License URI: https://www.gnu.org/licenses/gpl-3.0.html -
tweakmaster/trunk/readme.txt
r3362812 r3382950 5 5 Tested up to: 6.8 6 6 Requires PHP: 7.4 7 Stable tag: 1.1. 07 Stable tag: 1.1.1 8 8 License: GPLv3 9 9 License URI: https://www.gnu.org/licenses/gpl-3.0.html -
tweakmaster/trunk/tweakmaster.php
r3362812 r3382950 10 10 * Description: A collection or performance, privacy, security and other tweaks.. Minimalistic lightweight plugin. 11 11 * Plugin URI: https://nextgenthemes.com/plugins/tweakmaster/ 12 * Version: 1.1. 012 * Version: 1.1.1 13 13 * Requires at least: 6.6 14 14 * Author: Nicolas Jonas … … 25 25 } 26 26 27 const VERSION = '1.1. 0';27 const VERSION = '1.1.1'; 28 28 const PLUGIN_FILE = __FILE__; 29 29 const PLUGIN_DIR = __DIR__; -
tweakmaster/trunk/vendor/autoload_packages.php
r3362812 r3382950 6 6 */ 7 7 8 namespace Automattic\Jetpack\Autoloader\jp5aa486b2e15e5a77b655cb1dccf2d827\al5_0_1 0;8 namespace Automattic\Jetpack\Autoloader\jp5aa486b2e15e5a77b655cb1dccf2d827\al5_0_11; 9 9 10 10 // phpcs:ignore -
tweakmaster/trunk/vendor/automattic/jetpack-autoloader/CHANGELOG.md
r3362812 r3382950 5 5 The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) 6 6 and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). 7 8 ## [5.0.11] - 2025-10-06 9 ### Fixed 10 - Tests: Replace deprecated `RunClassInSeparateProcess` attribute with `RunTestsInSeparateProcesses`. [#45370] 7 11 8 12 ## [5.0.10] - 2025-09-15 … … 439 443 - Add Custom Autoloader 440 444 445 [5.0.11]: https://github.com/Automattic/jetpack-autoloader/compare/v5.0.10...v5.0.11 441 446 [5.0.10]: https://github.com/Automattic/jetpack-autoloader/compare/v5.0.9...v5.0.10 442 447 [5.0.9]: https://github.com/Automattic/jetpack-autoloader/compare/v5.0.8...v5.0.9 -
tweakmaster/trunk/vendor/automattic/jetpack-autoloader/src/AutoloadGenerator.php
r3362812 r3382950 22 22 class AutoloadGenerator { 23 23 24 const VERSION = '5.0.1 0';24 const VERSION = '5.0.11'; 25 25 26 26 /** -
tweakmaster/trunk/vendor/composer/installed.json
r3362812 r3382950 3 3 { 4 4 "name": "automattic/jetpack-autoloader", 5 "version": "v5.0.1 0",6 "version_normalized": "5.0.1 0.0",5 "version": "v5.0.11", 6 "version_normalized": "5.0.11.0", 7 7 "source": { 8 8 "type": "git", 9 9 "url": "https://github.com/Automattic/jetpack-autoloader.git", 10 "reference": " f7e2142139b925fac0a167ed0cbc71e2592bd9a0"10 "reference": "90bf7b3bc29cb7be74105ac99afab4c21bc47e29" 11 11 }, 12 12 "dist": { 13 13 "type": "zip", 14 "url": "https://api.github.com/repos/Automattic/jetpack-autoloader/zipball/ f7e2142139b925fac0a167ed0cbc71e2592bd9a0",15 "reference": " f7e2142139b925fac0a167ed0cbc71e2592bd9a0",14 "url": "https://api.github.com/repos/Automattic/jetpack-autoloader/zipball/90bf7b3bc29cb7be74105ac99afab4c21bc47e29", 15 "reference": "90bf7b3bc29cb7be74105ac99afab4c21bc47e29", 16 16 "shasum": "" 17 17 }, … … 26 26 "yoast/phpunit-polyfills": "^4.0.0" 27 27 }, 28 "time": "2025- 09-15T14:36:53+00:00",28 "time": "2025-10-06T10:32:52+00:00", 29 29 "type": "composer-plugin", 30 30 "extra": { … … 65 65 ], 66 66 "support": { 67 "source": "https://github.com/Automattic/jetpack-autoloader/tree/v5.0.1 0"67 "source": "https://github.com/Automattic/jetpack-autoloader/tree/v5.0.11" 68 68 }, 69 69 "install-path": "../automattic/jetpack-autoloader" … … 76 76 "type": "git", 77 77 "url": "https://github.com/nextgenthemes/wp-settings.git", 78 "reference": " 4e26cd875e2ba18f6f1bb523ef51d01ec7f7869d"78 "reference": "c899134604cca1d2cbea92ccebc8acdb2eb84429" 79 79 }, 80 80 "dist": { 81 81 "type": "zip", 82 "url": "https://api.github.com/repos/nextgenthemes/wp-settings/zipball/ 4e26cd875e2ba18f6f1bb523ef51d01ec7f7869d",83 "reference": " 4e26cd875e2ba18f6f1bb523ef51d01ec7f7869d",82 "url": "https://api.github.com/repos/nextgenthemes/wp-settings/zipball/c899134604cca1d2cbea92ccebc8acdb2eb84429", 83 "reference": "c899134604cca1d2cbea92ccebc8acdb2eb84429", 84 84 "shasum": "" 85 85 }, … … 87 87 "php": ">=7.4" 88 88 }, 89 "time": "2025- 08-03T12:18:07+00:00",89 "time": "2025-10-21T22:59:15+00:00", 90 90 "default-branch": true, 91 91 "type": "library", -
tweakmaster/trunk/vendor/composer/installed.php
r3362812 r3382950 4 4 'pretty_version' => 'dev-master', 5 5 'version' => 'dev-master', 6 'reference' => ' 893995d9c65bfe570c955c1b5c31dd4c153ee16f',6 'reference' => '0a437e33c6baf52e7fe6422de0c8fda7c38b683d', 7 7 'type' => 'wordpress-plugin', 8 8 'install_path' => __DIR__ . '/../../', … … 12 12 'versions' => array( 13 13 'automattic/jetpack-autoloader' => array( 14 'pretty_version' => 'v5.0.1 0',15 'version' => '5.0.1 0.0',16 'reference' => ' f7e2142139b925fac0a167ed0cbc71e2592bd9a0',14 'pretty_version' => 'v5.0.11', 15 'version' => '5.0.11.0', 16 'reference' => '90bf7b3bc29cb7be74105ac99afab4c21bc47e29', 17 17 'type' => 'composer-plugin', 18 18 'install_path' => __DIR__ . '/../automattic/jetpack-autoloader', … … 23 23 'pretty_version' => 'dev-master', 24 24 'version' => 'dev-master', 25 'reference' => ' 893995d9c65bfe570c955c1b5c31dd4c153ee16f',25 'reference' => '0a437e33c6baf52e7fe6422de0c8fda7c38b683d', 26 26 'type' => 'wordpress-plugin', 27 27 'install_path' => __DIR__ . '/../../', … … 32 32 'pretty_version' => 'dev-master', 33 33 'version' => 'dev-master', 34 'reference' => ' 4e26cd875e2ba18f6f1bb523ef51d01ec7f7869d',34 'reference' => 'c899134604cca1d2cbea92ccebc8acdb2eb84429', 35 35 'type' => 'library', 36 36 'install_path' => __DIR__ . '/../nextgenthemes/wp-settings', -
tweakmaster/trunk/vendor/composer/jetpack_autoload_classmap.php
r3362812 r3382950 8 8 return array( 9 9 'Autoloader' => array( 10 'version' => '5.0.1 0',10 'version' => '5.0.11', 11 11 'path' => $vendorDir . '/automattic/jetpack-autoloader/src/class-autoloader.php' 12 12 ), 13 13 'Autoloader_Handler' => array( 14 'version' => '5.0.1 0',14 'version' => '5.0.11', 15 15 'path' => $vendorDir . '/automattic/jetpack-autoloader/src/class-autoloader-handler.php' 16 16 ), 17 17 'Autoloader_Locator' => array( 18 'version' => '5.0.1 0',18 'version' => '5.0.11', 19 19 'path' => $vendorDir . '/automattic/jetpack-autoloader/src/class-autoloader-locator.php' 20 20 ), 21 21 'Automattic\\Jetpack\\Autoloader\\AutoloadFileWriter' => array( 22 'version' => '5.0.1 0',22 'version' => '5.0.11', 23 23 'path' => $vendorDir . '/automattic/jetpack-autoloader/src/AutoloadFileWriter.php' 24 24 ), 25 25 'Automattic\\Jetpack\\Autoloader\\AutoloadGenerator' => array( 26 'version' => '5.0.1 0',26 'version' => '5.0.11', 27 27 'path' => $vendorDir . '/automattic/jetpack-autoloader/src/AutoloadGenerator.php' 28 28 ), 29 29 'Automattic\\Jetpack\\Autoloader\\AutoloadProcessor' => array( 30 'version' => '5.0.1 0',30 'version' => '5.0.11', 31 31 'path' => $vendorDir . '/automattic/jetpack-autoloader/src/AutoloadProcessor.php' 32 32 ), 33 33 'Automattic\\Jetpack\\Autoloader\\CustomAutoloaderPlugin' => array( 34 'version' => '5.0.1 0',34 'version' => '5.0.11', 35 35 'path' => $vendorDir . '/automattic/jetpack-autoloader/src/CustomAutoloaderPlugin.php' 36 36 ), 37 37 'Automattic\\Jetpack\\Autoloader\\ManifestGenerator' => array( 38 'version' => '5.0.1 0',38 'version' => '5.0.11', 39 39 'path' => $vendorDir . '/automattic/jetpack-autoloader/src/ManifestGenerator.php' 40 40 ), 41 41 'Container' => array( 42 'version' => '5.0.1 0',42 'version' => '5.0.11', 43 43 'path' => $vendorDir . '/automattic/jetpack-autoloader/src/class-container.php' 44 44 ), 45 45 'Hook_Manager' => array( 46 'version' => '5.0.1 0',46 'version' => '5.0.11', 47 47 'path' => $vendorDir . '/automattic/jetpack-autoloader/src/class-hook-manager.php' 48 48 ), 49 49 'Latest_Autoloader_Guard' => array( 50 'version' => '5.0.1 0',50 'version' => '5.0.11', 51 51 'path' => $vendorDir . '/automattic/jetpack-autoloader/src/class-latest-autoloader-guard.php' 52 52 ), 53 53 'Manifest_Reader' => array( 54 'version' => '5.0.1 0',54 'version' => '5.0.11', 55 55 'path' => $vendorDir . '/automattic/jetpack-autoloader/src/class-manifest-reader.php' 56 56 ), 57 57 'PHP_Autoloader' => array( 58 'version' => '5.0.1 0',58 'version' => '5.0.11', 59 59 'path' => $vendorDir . '/automattic/jetpack-autoloader/src/class-php-autoloader.php' 60 60 ), 61 61 'Path_Processor' => array( 62 'version' => '5.0.1 0',62 'version' => '5.0.11', 63 63 'path' => $vendorDir . '/automattic/jetpack-autoloader/src/class-path-processor.php' 64 64 ), 65 65 'Plugin_Locator' => array( 66 'version' => '5.0.1 0',66 'version' => '5.0.11', 67 67 'path' => $vendorDir . '/automattic/jetpack-autoloader/src/class-plugin-locator.php' 68 68 ), 69 69 'Plugins_Handler' => array( 70 'version' => '5.0.1 0',70 'version' => '5.0.11', 71 71 'path' => $vendorDir . '/automattic/jetpack-autoloader/src/class-plugins-handler.php' 72 72 ), 73 73 'Shutdown_Handler' => array( 74 'version' => '5.0.1 0',74 'version' => '5.0.11', 75 75 'path' => $vendorDir . '/automattic/jetpack-autoloader/src/class-shutdown-handler.php' 76 76 ), 77 77 'Version_Loader' => array( 78 'version' => '5.0.1 0',78 'version' => '5.0.11', 79 79 'path' => $vendorDir . '/automattic/jetpack-autoloader/src/class-version-loader.php' 80 80 ), 81 81 'Version_Selector' => array( 82 'version' => '5.0.1 0',82 'version' => '5.0.11', 83 83 'path' => $vendorDir . '/automattic/jetpack-autoloader/src/class-version-selector.php' 84 84 ), -
tweakmaster/trunk/vendor/jetpack-autoloader/class-autoloader-handler.php
r3362812 r3382950 6 6 */ 7 7 8 namespace Automattic\Jetpack\Autoloader\jp5aa486b2e15e5a77b655cb1dccf2d827\al5_0_1 0;8 namespace Automattic\Jetpack\Autoloader\jp5aa486b2e15e5a77b655cb1dccf2d827\al5_0_11; 9 9 10 10 // phpcs:ignore -
tweakmaster/trunk/vendor/jetpack-autoloader/class-autoloader-locator.php
r3362812 r3382950 6 6 */ 7 7 8 namespace Automattic\Jetpack\Autoloader\jp5aa486b2e15e5a77b655cb1dccf2d827\al5_0_1 0;8 namespace Automattic\Jetpack\Autoloader\jp5aa486b2e15e5a77b655cb1dccf2d827\al5_0_11; 9 9 10 10 // phpcs:ignore -
tweakmaster/trunk/vendor/jetpack-autoloader/class-autoloader.php
r3362812 r3382950 6 6 */ 7 7 8 namespace Automattic\Jetpack\Autoloader\jp5aa486b2e15e5a77b655cb1dccf2d827\al5_0_1 0;8 namespace Automattic\Jetpack\Autoloader\jp5aa486b2e15e5a77b655cb1dccf2d827\al5_0_11; 9 9 10 10 // phpcs:ignore -
tweakmaster/trunk/vendor/jetpack-autoloader/class-container.php
r3362812 r3382950 6 6 */ 7 7 8 namespace Automattic\Jetpack\Autoloader\jp5aa486b2e15e5a77b655cb1dccf2d827\al5_0_1 0;8 namespace Automattic\Jetpack\Autoloader\jp5aa486b2e15e5a77b655cb1dccf2d827\al5_0_11; 9 9 10 10 // phpcs:ignore -
tweakmaster/trunk/vendor/jetpack-autoloader/class-hook-manager.php
r3362812 r3382950 6 6 */ 7 7 8 namespace Automattic\Jetpack\Autoloader\jp5aa486b2e15e5a77b655cb1dccf2d827\al5_0_1 0;8 namespace Automattic\Jetpack\Autoloader\jp5aa486b2e15e5a77b655cb1dccf2d827\al5_0_11; 9 9 10 10 // phpcs:ignore -
tweakmaster/trunk/vendor/jetpack-autoloader/class-latest-autoloader-guard.php
r3362812 r3382950 6 6 */ 7 7 8 namespace Automattic\Jetpack\Autoloader\jp5aa486b2e15e5a77b655cb1dccf2d827\al5_0_1 0;8 namespace Automattic\Jetpack\Autoloader\jp5aa486b2e15e5a77b655cb1dccf2d827\al5_0_11; 9 9 10 10 // phpcs:ignore -
tweakmaster/trunk/vendor/jetpack-autoloader/class-manifest-reader.php
r3362812 r3382950 6 6 */ 7 7 8 namespace Automattic\Jetpack\Autoloader\jp5aa486b2e15e5a77b655cb1dccf2d827\al5_0_1 0;8 namespace Automattic\Jetpack\Autoloader\jp5aa486b2e15e5a77b655cb1dccf2d827\al5_0_11; 9 9 10 10 // phpcs:ignore -
tweakmaster/trunk/vendor/jetpack-autoloader/class-path-processor.php
r3362812 r3382950 6 6 */ 7 7 8 namespace Automattic\Jetpack\Autoloader\jp5aa486b2e15e5a77b655cb1dccf2d827\al5_0_1 0;8 namespace Automattic\Jetpack\Autoloader\jp5aa486b2e15e5a77b655cb1dccf2d827\al5_0_11; 9 9 10 10 // phpcs:ignore -
tweakmaster/trunk/vendor/jetpack-autoloader/class-php-autoloader.php
r3362812 r3382950 6 6 */ 7 7 8 namespace Automattic\Jetpack\Autoloader\jp5aa486b2e15e5a77b655cb1dccf2d827\al5_0_1 0;8 namespace Automattic\Jetpack\Autoloader\jp5aa486b2e15e5a77b655cb1dccf2d827\al5_0_11; 9 9 10 10 // phpcs:ignore -
tweakmaster/trunk/vendor/jetpack-autoloader/class-plugin-locator.php
r3362812 r3382950 6 6 */ 7 7 8 namespace Automattic\Jetpack\Autoloader\jp5aa486b2e15e5a77b655cb1dccf2d827\al5_0_1 0;8 namespace Automattic\Jetpack\Autoloader\jp5aa486b2e15e5a77b655cb1dccf2d827\al5_0_11; 9 9 10 10 // phpcs:ignore -
tweakmaster/trunk/vendor/jetpack-autoloader/class-plugins-handler.php
r3362812 r3382950 6 6 */ 7 7 8 namespace Automattic\Jetpack\Autoloader\jp5aa486b2e15e5a77b655cb1dccf2d827\al5_0_1 0;8 namespace Automattic\Jetpack\Autoloader\jp5aa486b2e15e5a77b655cb1dccf2d827\al5_0_11; 9 9 10 10 // phpcs:ignore -
tweakmaster/trunk/vendor/jetpack-autoloader/class-shutdown-handler.php
r3362812 r3382950 6 6 */ 7 7 8 namespace Automattic\Jetpack\Autoloader\jp5aa486b2e15e5a77b655cb1dccf2d827\al5_0_1 0;8 namespace Automattic\Jetpack\Autoloader\jp5aa486b2e15e5a77b655cb1dccf2d827\al5_0_11; 9 9 10 10 // phpcs:ignore -
tweakmaster/trunk/vendor/jetpack-autoloader/class-version-loader.php
r3362812 r3382950 6 6 */ 7 7 8 namespace Automattic\Jetpack\Autoloader\jp5aa486b2e15e5a77b655cb1dccf2d827\al5_0_1 0;8 namespace Automattic\Jetpack\Autoloader\jp5aa486b2e15e5a77b655cb1dccf2d827\al5_0_11; 9 9 10 10 // phpcs:ignore -
tweakmaster/trunk/vendor/jetpack-autoloader/class-version-selector.php
r3362812 r3382950 6 6 */ 7 7 8 namespace Automattic\Jetpack\Autoloader\jp5aa486b2e15e5a77b655cb1dccf2d827\al5_0_1 0;8 namespace Automattic\Jetpack\Autoloader\jp5aa486b2e15e5a77b655cb1dccf2d827\al5_0_11; 9 9 10 10 // phpcs:ignore -
tweakmaster/trunk/vendor/nextgenthemes/wp-settings/build/settings.asset.php
r3338568 r3382950 1 <?php return array('dependencies' => array('@wordpress/interactivity'), 'version' => ' 53165e7fe2b504514ae7', 'type' => 'module');1 <?php return array('dependencies' => array('@wordpress/interactivity'), 'version' => '0c7f2c162a262e8df404', 'type' => 'module'); -
tweakmaster/trunk/vendor/nextgenthemes/wp-settings/build/settings.css
r3338568 r3382950 1 .ngt-width-limiter{margin-left:auto;margin-right:auto;max-width:1100px}.ngt-full-width{margin-left:-10px!important}@media only screen and (min-width:783px){.ngt-full-width{margin-left:-22px!important;margin-right:-20px!important}}.wrap--nextgenthemes{--ngt-settings-bg:oklch(from var(--ngt-wp-body-bg) calc(l + .022) c h)}.wrap--nextgenthemes .nav-tab{cursor:pointer;font-weight:500}.wrap--nextgenthemes .nav-tab-active,.wrap--nextgenthemes .ngt-settings-bg{background-color:var(--ngt-settings-bg);border-bottom-color:var(--ngt-settings-bg)}.wrap--nextgenthemes .ngt-settings-bg{border-bottom:1px solid #c3c4c7;padding:1rem 0 1rem 1rem}.wrap--nextgenthemes a{text-underline-offset:2px}.wrap--nextgenthemes .ngt-label-wrap{display:block}.wrap--nextgenthemes .ngt-label-wrap a{display:none}.wrap--nextgenthemes [hidden]{display:none!important}.ngt-settings-grid{display:grid;grid-template-areas:"content" "sidebar"}@media(min-width:750px){.ngt-settings-grid{grid-template-areas:"content sidebar";grid-template-columns:minmax(300px,1fr) 300px;grid-column-gap:2rem}}@media(min-width:1200px){.ngt-settings-grid{grid-template-columns:minmax(300px,1fr) 420px;grid-column-gap:3rem}}.ngt-settings-grid__content{grid-area:content;-ms-grid-column:1;-ms-grid-row:1;padding-right:5px}.ngt-settings-grid__sidebar{grid-area:sidebar;-ms-grid-column:1;-ms-grid-row:2}@media (min-width:750px){.ngt-settings-grid__content{-ms-grid-column:1;-ms-grid-row:1}.ngt-settings-grid__sidebar{-ms-grid-column:3;-ms-grid-row:1}}.ngt-sidebar-box{background:#fff;border-left:4px solid #46b450;box-shadow:0 1px 1px 0 rgba(0,0,0,.1);margin-bottom:1rem;margin-top:1rem;padding:1rem 1rem .5rem}.ngt-sidebar-box h3:first-child{margin-top:0}.ngt-sidebar-box ul{list-style:square;padding-left:1em}.ngt-sidebar-box li{margin-bottom:.5em;padding-left:0}.ngt-sidebar-box h5{margin-bottom:.5em}@media(min-width:1200px){.ngt-sidebar-box{padding:2rem 3rem 1.5rem}}.ngt-opt{container-type:inline-size}.ngt-opt select{width:130px}.ngt-opt [type=number]{width:6em}.ngt-opt>div{margin-block-end:1em;margin-block-start:1em}input.text-large--ngt-key{font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;width:21em}.ngt-label-wrap{-moz-column-gap:.5em;column-gap:.5em;display:flex;font-weight:600;margin-bottom:.3em}[type=checkbox]+.ngt-label-wrap{display:inline}.ngt-label-wrap a{--blue:oklch(53% .12 247.74deg);--red:oklch(53% .19 21.07deg);-webkit-background-clip:text;background-clip:text;background-image:linear-gradient(90deg,var(--blue) 0,var(--red) 100%);color:transparent;-webkit-text-decoration:underline var(--blue) 1px;text-decoration:underline var(--blue) 1px;text-underline-offset:2px;transition:-webkit-text-decoration .2s ease-in-out;transition:text-decoration .2s ease-in-out;transition:text-decoration .2s ease-in-out,-webkit-text-decoration .2s ease-in-out}.ngt-label-wrap a:focus,.ngt-label-wrap a:hover{-webkit-text-decoration:underline var(--blue) 3px;text-decoration:underline var(--blue) 3px}input[type=checkbox]:has(+.ngt-label-wrap){margin-top:-3px}.ngt-opt--arve-aspect_ratio .large-text,.ngt-opt--arve-lightbox_aspect_ratio .large-text,.ngt-opt--arve-sticky_gap .large-text,.ngt-opt--arve-sticky_max_width .large-text,.ngt-opt--arve-sticky_width .large-text{max-width:6em}1 .ngt-width-limiter{margin-left:auto;margin-right:auto;max-width:1100px}.ngt-full-width{margin-left:-10px!important}@media only screen and (min-width:783px){.ngt-full-width{margin-left:-22px!important;margin-right:-20px!important}}.wrap--nextgenthemes{--ngt-settings-bg:oklch(from var(--ngt-wp-body-bg) calc(l + 0.022) c h)}.wrap--nextgenthemes .nav-tab{cursor:pointer;font-weight:500}.wrap--nextgenthemes .nav-tab-active,.wrap--nextgenthemes .ngt-settings-bg{background-color:var(--ngt-settings-bg);border-bottom-color:var(--ngt-settings-bg)}.wrap--nextgenthemes .ngt-settings-bg{border-bottom:1px solid #c3c4c7;padding:1rem 0 1rem 1rem}.wrap--nextgenthemes a{text-underline-offset:2px}.wrap--nextgenthemes .ngt-label-wrap{display:block}.wrap--nextgenthemes .ngt-label-wrap a{display:none}.wrap--nextgenthemes [hidden]{display:none!important}.ngt-settings-grid{display:grid;grid-template-areas:"content" "sidebar"}@media(min-width:750px){.ngt-settings-grid{grid-template-areas:"content sidebar";grid-template-columns:minmax(300px,1fr) 300px;grid-column-gap:2rem}}@media(min-width:1200px){.ngt-settings-grid{grid-template-columns:minmax(300px,1fr) 420px;grid-column-gap:3rem}}.ngt-settings-grid__content{grid-area:content;-ms-grid-column:1;-ms-grid-row:1;padding-right:5px}.ngt-settings-grid__sidebar{grid-area:sidebar;-ms-grid-column:1;-ms-grid-row:2}@media (min-width:750px){.ngt-settings-grid__content{-ms-grid-column:1;-ms-grid-row:1}.ngt-settings-grid__sidebar{-ms-grid-column:3;-ms-grid-row:1}}.ngt-sidebar-box{background:#fff;border-left:4px solid #46b450;box-shadow:0 1px 1px 0 rgba(0,0,0,.1);margin-bottom:1rem;margin-top:1rem;padding:1rem 1rem .5rem}.ngt-sidebar-box h3:first-child{margin-top:0}.ngt-sidebar-box ul{list-style:square;padding-left:1em}.ngt-sidebar-box li{margin-bottom:.5em;padding-left:0}.ngt-sidebar-box h5{margin-bottom:.5em}@media(min-width:1200px){.ngt-sidebar-box{padding:2rem 3rem 1.5rem}}.ngt-opt{container-type:inline-size}.ngt-opt select{width:130px}.ngt-opt [type=number]{width:6em}.ngt-opt>div{margin-block-end:1em;margin-block-start:1em}input.text-large--ngt-key{font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;width:21em}.ngt-label-wrap{-moz-column-gap:.5em;column-gap:.5em;display:flex;font-weight:600;margin-bottom:.3em}[type=checkbox]+.ngt-label-wrap{display:inline}.ngt-label-wrap a{--blue:oklch(53% .12 247.74deg);--red:oklch(53% .19 21.07deg);-webkit-background-clip:text;background-clip:text;background-image:linear-gradient(90deg,var(--blue) 0,var(--red) 100%);color:transparent;-webkit-text-decoration:underline var(--blue) 1px;text-decoration:underline var(--blue) 1px;text-underline-offset:2px;transition:-webkit-text-decoration .2s ease-in-out;transition:text-decoration .2s ease-in-out;transition:text-decoration .2s ease-in-out,-webkit-text-decoration .2s ease-in-out}.ngt-label-wrap a:focus,.ngt-label-wrap a:hover{-webkit-text-decoration:underline var(--blue) 3px;text-decoration:underline var(--blue) 3px}input[type=checkbox]:has(+.ngt-label-wrap){margin-top:-3px}.ngt-opt--arve-aspect_ratio .large-text,.ngt-opt--arve-lightbox_aspect_ratio .large-text,.ngt-opt--arve-sticky_gap .large-text,.ngt-opt--arve-sticky_max_width .large-text,.ngt-opt--arve-sticky_width .large-text{max-width:6em} -
tweakmaster/trunk/vendor/nextgenthemes/wp-settings/includes/WP/Admin/Notices.php
r3338568 r3382950 1 1 <?php 2 3 declare(strict_types = 1);4 5 namespace Nextgenthemes\WP\Admin;6 7 2 /** 8 3 * Dismissible Notices Handler. … … 24 19 * @link https://github.com/julien731/WP-Dismissible-Notices-Handler/blob/develop/handler.php 25 20 * @copyright 2021 Nicolas Jonas, 2018 Julien Liabeuf 26 */ 27 28 if ( 'always' ) { 29 21 **/ 22 23 declare(strict_types = 1); 24 25 namespace Nextgenthemes\WP\Admin; 26 27 if ( ! class_exists( 'Nextgenthemes\WP\Admin\Notices' ) ) { 30 28 final class Notices { 31 29 32 30 /** 33 * @var Notices Holds the unique instance of the handler 34 * @since 1.0 35 */ 36 private static $instance; 31 * @since 1.0 32 */ 33 private static ?Notices $instance = null; 37 34 38 35 /** … … 40 37 * 41 38 * @since 1.0 42 * @var string 43 */ 44 public $version = '1.2.1'; 45 46 /** 47 * Required version of PHP. 48 * 49 * @since 1.0 50 * @var string 51 */ 52 public $php_version_required = '5.5'; 39 */ 40 public string $version = '1.2.2'; 53 41 54 42 /** … … 56 44 * 57 45 * @since 1.0 58 * @var string 59 */ 60 public $wordpress_version_required = '4.7'; 61 62 /** 63 * @var array Holds all our registered notices 64 * @since 1.0 65 */ 66 private $notices; 46 */ 47 public string $wordpress_version_required = '4.7'; 48 49 /** 50 * All registered notices. 51 * 52 * @var array <string, array{ 53 * type: string, 54 * content: string, 55 * screen?: string, 56 * scope: string, 57 * cap?: string, 58 * class?: string 59 * }> 60 */ 61 private array $notices = array(); 67 62 68 63 /** … … 70 65 * 71 66 * @since 1.0 72 * @return objectNotices Unique instance of the handler67 * @return Notices Notices Unique instance of the handler 73 68 */ 74 69 public static function instance(): Notices { 75 70 76 if ( ! isset( self::$instance ) && !( self::$instance instanceof Notices ) ) {71 if ( ! ( self::$instance instanceof Notices ) ) { 77 72 self::$instance = new Notices(); 78 73 self::$instance->init(); … … 102 97 } 103 98 104 // Make sure PHP is compatible105 if ( ! self::$instance->is_php_compatible() ) {106 self::$instance->spit_error(107 sprintf(108 /* translators: %s: required php version */109 esc_html__( 'The library can not be used because your version of PHP is too old. You need version %s at least.', 'advanced-responsive-video-embedder' ),110 self::$instance->php_version_required111 )112 );113 114 return;115 }116 117 99 add_action( 'admin_notices', array( self::$instance, 'display' ) ); 118 100 add_action( 'wp_ajax_dnh_dismiss_notice', array( self::$instance, 'dismiss_notice_ajax' ) ); … … 127 109 128 110 if ( version_compare( get_bloginfo( 'version' ), self::$instance->wordpress_version_required, '<' ) ) { 129 return false;130 }131 132 return true;133 }134 135 /**136 * Check if the version of PHP is compatible with this library137 *138 * @since 1.0139 */140 private function is_php_compatible(): bool {141 142 if ( version_compare( phpversion(), self::$instance->php_version_required, '<' ) ) {143 111 return false; 144 112 } … … 217 185 218 186 /** 219 * Get available notice types220 * 221 * @ since 1.0187 * Retrieve the list of allowed notice types. 188 * 189 * @return string[] 222 190 */ 223 191 public function get_types(): array { … … 239 207 * Get the default arguments for a notice 240 208 * 241 * @since 1.0 209 * @return array <string, array{ 210 * screen: string, 211 * scope: string, 212 * cap: string, 213 * class: string 214 * }> 242 215 */ 243 216 private function default_args(): array { … … 258 231 * @since 1.0 259 232 * 260 * @param string $id Notice ID, used to identify it261 * @param string $type Type of notice to display262 * @param string $content Notice content263 * @param array $args Additional parameters233 * @param string $id Notice ID, used to identify it 234 * @param string $type Type of notice to display 235 * @param string $content Notice content 236 * @param array <string, mixed> $args Additional parameters 264 237 * 265 238 */ … … 322 295 // phpcs:enable 323 296 324 echo wp_kses_post( self::$instance->dismiss_notice( $id ) );297 echo wp_kses_post( (string) self::$instance->dismiss_notice( $id ) ); 325 298 exit; 326 299 } … … 479 452 * This includes notices dismissed globally or per user. 480 453 * 481 * @ since 1.0454 * @return array <string, string> 482 455 */ 483 456 public function dismissed_notices(): array { … … 492 465 * Get user dismissed notices 493 466 * 494 * @ since 1.0467 * @return array <string, string> 495 468 */ 496 469 private function dismissed_user(): array { … … 508 481 * Get globally dismissed notices 509 482 * 510 * @ since 1.0483 * @return array <string, string> 511 484 */ 512 485 private function dismissed_global(): array { … … 536 509 * Get all the registered notices 537 510 * 538 * @since 1.0 539 * @return array|null 540 */ 541 public function get_notices(): ?array { 511 * @return array <string, array{ 512 * type: string, 513 * content: string, 514 * screen?: string, 515 * scope: string, 516 * cap?: string, 517 * class?: string 518 * }> 519 */ 520 public function get_notices(): array { 542 521 return self::$instance->notices; 543 522 } … … 550 529 * @param string $id Notice ID 551 530 * 552 * @return array|false531 * @return false|array <string, string> 553 532 */ 554 533 public function get_notice( string $id ) { … … 563 542 } 564 543 } 565 566 544 } -
tweakmaster/trunk/vendor/nextgenthemes/wp-settings/includes/WP/Admin/fn-licensing.php
r3338568 r3382950 6 6 7 7 use Nextgenthemes\WP\Admin\EDD\PluginUpdater; 8 use Nextgenthemes\WP\Admin\EDD\ThemeUpdater;9 8 use function Nextgenthemes\WP\get_products; 10 9 use function Nextgenthemes\WP\str_contains_any; 11 10 use const Nextgenthemes\ARVE\VERSION; 12 11 12 /** @param array <string, int|float|string|bool> $options */ 13 13 function init_edd_updaters( array $options ): void { 14 14 … … 19 19 if ( 'plugin' === $product['type'] && ! empty( $product['file'] ) ) { 20 20 init_plugin_updater( $product, $options ); 21 } elseif ( 'theme' === $product['type'] ) {22 init_theme_updater( $product, $options );23 21 } 24 22 } 25 23 } 26 24 25 /** 26 * @param array <string, int|float|string|bool> $product 27 * @param array <string, int|float|string|bool> $options 28 */ 27 29 function init_plugin_updater( array $product, array $options ): void { 28 30 … … 37 39 'item_id' => $product['id'], 38 40 'author' => $product['author'], 39 )40 );41 }42 43 function init_theme_updater( array $product, array $options ): void {44 45 new ThemeUpdater(46 array(47 'license' => $options[ $product['slug'] ],48 'remote_api_url' => 'https://nextgenthemes.com',49 'version' => $product['version'],50 'item_id' => $product['id'],51 'author' => $product['author'],52 'theme_slug' => $product['slug'],53 'download_id' => $product['download_id'], // Optional, used for generating a license renewal link54 #'renew_url' => $product['renew_link'], // Optional, allows for a custom license renewal link55 ),56 array(57 'theme-license' => __( 'Theme License', 'advanced-responsive-video-embedder' ),58 'enter-key' => __( 'Enter your theme license key.', 'advanced-responsive-video-embedder' ),59 'license-key' => __( 'License Key', 'advanced-responsive-video-embedder' ),60 'license-action' => __( 'License Action', 'advanced-responsive-video-embedder' ),61 'deactivate-license' => __( 'Deactivate License', 'advanced-responsive-video-embedder' ),62 'activate-license' => __( 'Activate License', 'advanced-responsive-video-embedder' ),63 'status-unknown' => __( 'License status is unknown.', 'advanced-responsive-video-embedder' ),64 'renew' => __( 'Renew?', 'advanced-responsive-video-embedder' ),65 'unlimited' => __( 'unlimited', 'advanced-responsive-video-embedder' ),66 'license-key-is-active' => __( 'License key is active.', 'advanced-responsive-video-embedder' ),67 // Translators: Date68 'expires%s' => __( 'Expires %s.', 'advanced-responsive-video-embedder' ),69 'expires-never' => __( 'Lifetime License.', 'advanced-responsive-video-embedder' ),70 // Translators: x of x sites activated71 '%1$s/%2$-sites' => __( 'You have %1$s / %2$s sites activated.', 'advanced-responsive-video-embedder' ),72 // Translators: Date73 'license-key-expired-%s' => __( 'License key expired %s.', 'advanced-responsive-video-embedder' ),74 'license-key-expired' => __( 'License key has expired.', 'advanced-responsive-video-embedder' ),75 'license-keys-do-not-match' => __( 'License keys do not match.', 'advanced-responsive-video-embedder' ),76 'license-is-inactive' => __( 'License is inactive.', 'advanced-responsive-video-embedder' ),77 'license-key-is-disabled' => __( 'License key is disabled.', 'advanced-responsive-video-embedder' ),78 'site-is-inactive' => __( 'Site is inactive.', 'advanced-responsive-video-embedder' ),79 'license-status-unknown' => __( 'License status is unknown.', 'advanced-responsive-video-embedder' ),80 'update-notice' => __( "Updating this theme will lose any customizations you have made. 'Cancel' to stop, 'OK' to update.", 'advanced-responsive-video-embedder' ),81 // phpcs:ignore82 'update-available' => __( '<strong>%1$s %2$s</strong> is available. <a href="%3$s" class="thickbox" title="%4s">Check out what\'s new</a> or <a href="%5$s"%6$s>update now</a>.', 'advanced-responsive-video-embedder' ),83 41 ) 84 42 ); -
tweakmaster/trunk/vendor/nextgenthemes/wp-settings/includes/WP/Admin/fn-settings.php
r3338568 r3382950 28 28 * Prints all settings blocks. 29 29 * 30 * param array<string, SettingValidator> $settings The settings data. 31 * @param array<string, array> $tabs The tabs. 32 * @param string $context The context, either 'settings-page' or 'gutenberg_block'. Default 'settings-page'. 30 * @param array{ 31 * string: array{ 32 * title: string, 33 * premium_link?: string, 34 * reset_button?: bool 35 * } 36 * } $tabs 33 37 */ 34 function print_settings_blocks( 35 SettingsData $settings, 36 array $tabs, 37 string $context = 'settings-page' 38 ): void { 38 function print_settings_blocks( SettingsData $settings, array $tabs, string $context = 'settings-page' ): void { 39 39 40 40 $settings = $settings->get_all(); … … 59 59 } 60 60 61 /** 62 * @param array{ 63 * string: array{ 64 * title: string, 65 * premium_link?: string, 66 * reset_button?: bool 67 * } 68 * } $tabs 69 */ 61 70 function option_block( string $key, SettingValidator $setting, array $tabs ): void { 62 71 … … 194 203 } 195 204 205 /** 206 * @param array{ 207 * string: array{ 208 * title: string, 209 * premium_link?: string, 210 * reset_button?: bool 211 * } 212 * } $tabs 213 */ 196 214 function label( string $input_id, SettingValidator $setting, array $tabs ): void { 197 215 -
tweakmaster/trunk/vendor/nextgenthemes/wp-settings/includes/WP/SettingValidator.php
r3338568 r3382950 63 63 public ?int $edd_item_id; 64 64 65 /** 66 * @param array <string, mixed> $setting 67 * @param bool $arve Indicates specific actions for ARVE plugin only. 68 */ 65 69 public function __construct( array $setting, bool $arve = false ) { 66 70 … … 164 168 throw new InvalidArgumentException( esc_html( 'Default value must be a string, integer or boolean' ) ); 165 169 } 166 if ( ! isset( $this->type ) ) {170 if ( empty( $this->type ) ) { 167 171 throw new InvalidArgumentException( esc_html( 'type must be set before default' ) ); 168 172 } … … 209 213 } 210 214 215 /** 216 * @return array <string, string|int|bool|null> 217 */ 211 218 public function to_array(): array { 212 219 return get_object_vars( $this ); -
tweakmaster/trunk/vendor/nextgenthemes/wp-settings/includes/WP/Settings.php
r3338568 r3382950 60 60 /** 61 61 * Tabs for the Setting Page 62 * 63 * @var array{ 64 * string: array{ 65 * title: string, 66 * premium_link?: string, 67 * reset_button?: bool 68 * } 69 * } 62 70 * 63 71 * Example: … … 78 86 /** 79 87 * Array of current option values. 88 * 89 * @var array <string, int|float|string|bool> 80 90 */ 81 91 private array $options; … … 83 93 /** 84 94 * Array of default option values. 95 * 96 * @var array <string, int|float|string|bool> 85 97 */ 86 98 private array $options_defaults; … … 88 100 /** 89 101 * Array of default option values organized by section. 102 * 103 * @var array <string, array<string, int|float|string|bool>> 90 104 */ 91 105 private array $options_defaults_by_section; … … 93 107 /** 94 108 * Each setting is a SettingValidator object 95 *96 * @var SettingsData <string, SettingValidator>97 109 */ 98 110 private SettingsData $settings; 111 112 /** 113 * @var array <string, string> 114 */ 99 115 private array $defined_keys = array(); 100 116 117 /** 118 * @param array <int|string, mixed> $args 119 */ 101 120 public function __construct( array $args ) { 102 121 … … 128 147 } 129 148 149 /** 150 * @param array <int|string, string> $links 151 * @return array <int|string, string> Modified links 152 */ 130 153 public function add_action_links( array $links ): array { 131 154 … … 155 178 156 179 return array_merge( $extra_links, $links ); 157 }158 159 private function check_option_and_shortcode( array $setting ): void {160 161 if ( 'nextgenthemes_arve' === $this->slugged_namespace162 && ( ! isset( $setting['option'] ) || ! isset( $setting['shortcode'] ) )163 ) {164 wp_trigger_error( __METHOD__, 'option or shortcode must be set in ARVE' );165 }166 180 } 167 181 … … 217 231 } 218 232 233 /** 234 * @return array <string, int|float|string|bool> 235 */ 219 236 public function get_options(): array { 220 237 $options = (array) get_option( $this->slugged_namespace, array() ); … … 224 241 } 225 242 243 /** 244 * @return array <string, int|float|string|bool> 245 */ 226 246 public function get_options_defaults(): array { 227 247 return $this->options_defaults; … … 232 252 } 233 253 254 /** 255 * @param array <string, int|float|string|bool> $options 256 */ 234 257 public function save_options( array $options ): void { 235 258 // remove all items from options that are not also in defaults. -
tweakmaster/trunk/vendor/nextgenthemes/wp-settings/includes/WP/SettingsData.php
r3338568 r3382950 7 7 class SettingsData { 8 8 9 /** @var array <string, SettingValidator> $settings */9 /** @var array <string, SettingValidator> $settings */ 10 10 private array $settings = []; 11 11 12 /** @param array <string, array<string, mixed>> $settings */ 12 13 public function __construct( array $settings, bool $arve = false ) { 13 14 foreach ( $settings as $key => $setting ) { -
tweakmaster/trunk/vendor/nextgenthemes/wp-settings/includes/WP/fn-asset-helpers.php
r3338568 r3382950 58 58 * 59 59 * @param string $path The path to the file that should be versioned. 60 * @param string $stable_ver The version string to return if debug mode is off.60 * @param string|null $stable_ver The version string to return if debug mode is off. 61 61 * @return string|null The version string, or null if no file at the given path exists. 62 62 */ 63 function ver( string $path, string $stable_ver ): ?string {63 function ver( string $path, ?string $stable_ver ): ?string { 64 64 65 65 $debug = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) || ( defined( 'WP_DEBUG' ) && WP_DEBUG ); -
tweakmaster/trunk/vendor/nextgenthemes/wp-settings/includes/WP/fn-license.php
r3338568 r3382950 62 62 63 63 $path_parts = pathinfo( $file ); 64 $path_parts['filename']; 65 66 $product = str_replace( '-', '_', $path_parts['filename'] ); 67 $key_name = strtoupper( $product . '_KEY' ); 68 $key = defined( $key_name ) ? constant( $key_name ) : false; 64 $product = str_replace( '-', '_', $path_parts['filename'] ); 65 $key_name = strtoupper( $product . '_KEY' ); 66 $key = defined( $key_name ) ? constant( $key_name ) : false; 69 67 70 68 if ( $key ) { … … 115 113 } 116 114 115 /** 116 * @param array <string, string> $license_data 117 */ 117 118 function get_api_error_message( array $license_data ): string { 118 119 -
tweakmaster/trunk/vendor/nextgenthemes/wp-settings/includes/WP/fn-misc.php
r3338568 r3382950 62 62 * Move certain keys to the start of an associative array. 63 63 * 64 * @param array<string, mixed> $org _arrayThe original array.65 * @param array<string> $keys The keys to move to the start.64 * @param array<string, mixed> $org The original array. 65 * @param array<string> $keys The keys to move to the start. 66 66 * 67 67 * @return array<string, mixed> The modified array. 68 68 */ 69 function move_keys_to_start( array $org_array, array $keys ): array { 70 $new_array = []; 69 function move_keys_to_start( array $org, array $keys ): array { 70 71 $moved = array(); 71 72 72 73 foreach ( $keys as $key ) { 73 if ( array_key_exists( $key, $org _array) ) {74 $ new_array[ $key ] = $org_array[ $key ];75 unset( $org _array[ $key ] );74 if ( array_key_exists( $key, $org ) ) { 75 $moved[ $key ] = $org[ $key ]; 76 unset( $org[ $key ] ); 76 77 } 77 78 } 78 79 79 return $new_array + $org_array; 80 return $moved + $org; 81 } 82 83 /** 84 * Move specified keys to the end of an array 85 * 86 * @param array<string, mixed> $org Array to modify 87 * @param array<int, string> $keys Keys to move to the end 88 * @return array<string, mixed> Modified array with keys moved to end 89 */ 90 function move_keys_to_end( array $org, array $keys ): array { 91 92 $moved = array(); 93 94 foreach ( $keys as $key ) { 95 if ( array_key_exists( $key, $org ) ) { 96 $moved[ $key ] = $org[ $key ]; 97 unset( $org[ $key ] ); 98 } 99 } 100 101 return $org + $moved; 80 102 } 81 103 … … 98 120 * elements from the resulting array. 99 121 * 100 * @param string $strThe input comma-separated string101 * @param string $delimiter The delimiter to use. Space will NOT work!102 * @return array The resulting array122 * @param string $str The input comma-separated string 123 * @param string $delimiter The delimiter to use. Space will NOT work! 124 * @return array<int,string> The resulting array 103 125 */ 104 126 function str_to_array( string $str, string $delimiter = ',' ): array { 105 return array_filter( 106 array_map( 107 'trim', 108 explode( $delimiter, $str ) 109 ), 110 'strlen' 127 128 // Trim spaces from each element 129 $arr = array_map( 'trim', explode( $delimiter, $str ) ); 130 131 // Filter out empty elements 132 $arr = array_filter( 133 $arr, 134 fn ( string $s ): bool => (bool) strlen( $s ) 111 135 ); 136 137 // Remove duplicate elements 138 $arr = array_unique( $arr ); 139 140 return $arr; 112 141 } 113 142 … … 116 145 * with the modified keys and original values. 117 146 * 118 * @param string $callback The callback function to apply to each key.119 * @param array $arr The input array.147 * @param callable(string):string $callback The callback function to apply to each key, must return a string. 148 * @param array<mixed> $arr The input array with any value types. 120 149 * 121 * @return array The resulting array with modified keys. 150 * @return array<mixed> The resulting array with modified keys. 151 * @throws \InvalidArgumentException If the callback is not callable or if the callback returns non-string keys. 122 152 */ 123 function array_map_key( string $callback, array $arr ): array { 124 return array_combine( 125 array_map( $callback, array_keys( $arr ) ), 126 $arr 153 function array_map_key( callable $callback, array $arr ): array { 154 155 $keys = array_keys( $arr ); 156 $new_keys = array_map( 157 function ( $key ) use ( $callback ) { 158 $result = $callback( (string) $key ); 159 if ( ! is_string( $result ) ) { 160 throw new \InvalidArgumentException( 'Callback must return a string, got ' . esc_html( gettype( $result ) ) ); 161 } 162 return $result; 163 }, 164 $keys 127 165 ); 166 167 // Ensure no duplicate keys after mapping 168 if ( count( array_unique( $new_keys ) ) !== count( $new_keys ) ) { 169 throw new \InvalidArgumentException( 'Callback produced duplicate keys, which is not allowed.' ); 170 } 171 172 // array_combine will fail if lengths don't match, but we're safe here 173 return array_combine( $new_keys, array_values( $arr ) ); 128 174 } -
tweakmaster/trunk/vendor/nextgenthemes/wp-settings/includes/WP/fn-remote-get.php
r3338568 r3382950 5 5 namespace Nextgenthemes\WP; 6 6 7 use DateTime;8 use Exception;9 use WP_Error;10 11 7 /** 12 8 * Retrieves JSON data from a remote URL. 13 9 * 14 * @return mixed|WP_Error 10 * @param array<string,mixed> $args 11 * 12 * @return mixed|\WP_Error 15 13 */ 16 14 function remote_get_json( string $url, array $args = array(), string $json_name = '' ) { … … 21 19 * Remote get JSON from a URL and cache the response. 22 20 * 23 * @return mixed|WP_Error The decoded JSON response, or the specified JSON value if $json_name is provided. 21 * @param array<string,mixed> $args 22 * 23 * @return mixed|\WP_Error The decoded JSON response, or the specified JSON value if $json_name is provided. 24 24 */ 25 25 function remote_get_json_cached( string $url, array $args = array(), string $json_name = '', int $time = DAY_IN_SECONDS ) { … … 33 33 try { 34 34 $response = json_decode( $response, true, 128, JSON_THROW_ON_ERROR ); 35 } catch ( Exception $exception ) {36 37 return new WP_Error(35 } catch ( \Exception $exception ) { 36 37 return new \WP_Error( 38 38 'json-decode-error', 39 39 sprintf( … … 49 49 if ( $json_name ) { 50 50 if ( empty( $response[ $json_name ] ) ) { 51 return new WP_Error(51 return new \WP_Error( 52 52 'json-value-empty', 53 53 sprintf( … … 74 74 * Retrieves the body content from a remote URL. 75 75 * 76 * @param string $url The URL of the remote resource. 77 * @param array $args Optional. Additional arguments for wp_safe_remote_get. 78 * @return string|WP_Error The response body content from the remote URL, or a WP_Error on failure. 76 * @param string $url The URL of the remote resource. 77 * @param array<string,mixed> $args Optional. Additional arguments for wp_safe_remote_get. 78 * array{ 79 * method?: string, 80 * timeout?: int|float, 81 * redirection?: int, 82 * httpversion?: string, 83 * user-agent?: string, 84 * blocking?: bool, 85 * headers?: array<string,string>, 86 * cookies?: array<string,string>, 87 * body?: string|array, 88 * compress?: bool, 89 * decompress?: bool, 90 * sslverify?: bool, 91 * sslcertificates?: string, 92 * stream?: bool, 93 * filename?: string, 94 * reject_unsafe_urls?: bool 95 * } 96 * @return string|\WP_Error The response body content from the remote URL, or a WP_Error on failure. 79 97 */ 80 98 function remote_get_body( string $url, array $args = array() ) { … … 82 100 $response = wp_safe_remote_get( $url, $args ); 83 101 $response_code = wp_remote_retrieve_response_code( $response ); 84 $body = wp_remote_retrieve_body( $response);102 $body = trim( wp_remote_retrieve_body( $response ) ); 85 103 86 104 if ( is_wp_error( $response ) ) { … … 90 108 if ( 200 !== $response_code ) { 91 109 92 return new WP_Error(110 return new \WP_Error( 93 111 $response_code, 94 112 sprintf( … … 103 121 104 122 if ( '' === $body ) { 105 return new WP_Error(123 return new \WP_Error( 106 124 'empty-body', 107 125 sprintf( … … 118 136 119 137 /** 120 * @return array|WP_Error 138 * @param array<string,mixed> $args 139 * 140 * @return array<string,mixed>|\WP_Error 121 141 */ 122 142 function remote_get_head( string $url, array $args = array() ) { … … 132 152 if ( 200 !== $response_code ) { 133 153 134 return new WP_Error(154 return new \WP_Error( 135 155 $response_code, 136 156 sprintf( … … 150 170 * Retrieves the body content from a remote URL, with caching for improved performance. 151 171 * 152 * @param string $urlThe URL of the remote resource.153 * @param array $args Optional. Additional arguments for wp_safe_remote_get.154 * @param int $time Optional. The duration in seconds to cache the response. Default is DAY_IN_SECONDS. 0 to disable caching.155 * @return mixed| WP_ErrorThe response body content from the remote URL, or a WP_Error on failure.172 * @param string $url The URL of the remote resource. 173 * @param array<string,mixed> $args Optional. Additional arguments for wp_safe_remote_get. 174 * @param int $time Optional. The duration in seconds to cache the response. Default is DAY_IN_SECONDS. 0 to disable caching. 175 * @return mixed|\WP_Error The response body content from the remote URL, or a WP_Error on failure. 156 176 */ 157 177 function remote_get_body_cached( string $url, array $args = array(), int $time = DAY_IN_SECONDS ) { … … 162 182 * Retrieves the body content from a remote URL, with caching for improved performance. 163 183 * 164 * @param string $url The URL of the remote resource.165 * @param array $args Optional. Additional arguments for wp_safe_remote_get.166 * @param int $time Optional. The duration in seconds to cache the response. Default is DAY_IN_SECONDS. 0 to disable caching.167 * @return mixed| WP_ErrorThe response body content from the remote URL, or a WP_Error on failure.184 * @param string $url The URL of the remote resource. 185 * @param array<string,mixed> $args Optional. Additional arguments for wp_safe_remote_get. 186 * @param int $time Optional. The duration in seconds to cache the response. Default is DAY_IN_SECONDS. 0 to disable caching. 187 * @return mixed|\WP_Error The response body content from the remote URL, or a WP_Error on failure. 168 188 */ 169 189 function remote_get_head_cached( string $url, array $args = array(), int $time = DAY_IN_SECONDS ) { … … 176 196 * TODO maybe use json to encode WP_Error to avoid WP using serialize 177 197 * 178 * @param string $urlThe URL of the remote resource.179 * @param array $args Optional. Additional arguments to include in the request.180 * @param int $time Optional. The duration in seconds to cache the response. Default is DAY_IN_SECONDS. 0 to disable caching.181 * @return WP_Error|mixedThe response body content from the remote URL.198 * @param string $url The URL of the remote resource. 199 * @param array<string,mixed> $args Optional. Additional arguments to include in the request. 200 * @param int $time Optional. The duration in seconds to cache the response. Default is DAY_IN_SECONDS. 0 to disable caching. 201 * @return \WP_Error|mixed The response body content from the remote URL. 182 202 */ 183 203 function _remote_get_cached( string $url, array $args, int $time, string $type ) { … … 216 236 array( 'https' ) 217 237 ), 218 current_datetime()->format( DATETIME::ATOM ),238 current_datetime()->format( \DATETIME::ATOM ), 219 239 $time, 220 240 esc_html( $transient_name ) -
tweakmaster/trunk/vendor/nextgenthemes/wp-settings/includes/WP/fn-settings.php
r3338568 r3382950 42 42 function nextgenthemes_settings(): SettingsData { 43 43 44 $settings = array(); 44 45 $products = get_products(); 45 46 … … 73 74 } 74 75 76 /** 77 * @return array<string,array<string,string|int|bool>> Product data 78 */ 75 79 function get_products(): array { 76 80 … … 157 161 * 158 162 * @param mixed $value The value to sanitize. 159 * @param WP_REST_Request $request The request object.163 * @param \WP_REST_Request $request The request object. 160 164 * @param string $param The parameter name. 161 165 * @return int The sanitized boolean value. … … 170 174 * 171 175 * @param mixed $value The value to sanitize. 172 * @param WP_REST_Request $request The request object.176 * @param \WP_REST_Request $request The request object. 173 177 * @param string $param The parameter name. 174 178 * @return bool The sanitized boolean value. … … 183 187 * 184 188 * @param mixed $value The value to sanitize. 185 * @param WP_REST_Request $request The request object.189 * @param \WP_REST_Request $request The request object. 186 190 * @param string $param The parameter name. 187 191 * @return string The sanitized boolean value. -
tweakmaster/trunk/vendor/nextgenthemes/wp-settings/includes/WP/fn-string.php
r3338568 r3382950 10 10 * Adds, updates or removes attributes to the first HTML tag passed in. 11 11 * 12 * @param string $html The HTML string, e.g. <div>...</div>. 13 * @param array $attr A list of HTML attributes, e.g. class, src, href, etc. 14 * 15 * @return string The updated HTML updated as string. 12 * @param string $html The HTML string, e.g. <div>...</div>. 13 * @param array <string, int|string|bool|null> $attr A list of HTML attributes, e.g. class, src, href, etc. 14 * @return string The updated HTML updated as string. 16 15 */ 17 16 function first_tag_attr( string $html, array $attr ): string { … … 32 31 * Applies attributes to the HTML tag the WP_HTML_Tag_Processor is currently on. 33 32 * 34 * @param WP_HTML_Tag_Processor $p The tag processor. 35 * @param array $attr A list of HTML attributes, e.g. class, src, href, etc. 36 * 37 * @return WP_HTML_Tag_Processor The tag processor. 33 * @param WP_HTML_Tag_Processor $p The tag processor. 34 * @param array <string, string|int|float|bool> $attr A list of HTML attributes, e.g. class, src, href, etc. 35 * @return WP_HTML_Tag_Processor The tag processor. 38 36 */ 39 37 function apply_attr( WP_HTML_Tag_Processor $p, array $attr ): WP_HTML_Tag_Processor { … … 48 46 if ( null === $value ) { 49 47 $value = false; 48 } 49 50 if ( is_float( $value ) ) { 51 $value = (string) $value; 50 52 } 51 53 … … 68 70 * Get the value of a specific attribute from an HTML string. 69 71 * 70 * @param array $query argument for WP_HTML_Tag_Processor::next_tag 71 * @param string $attribute attribute to look for 72 * @param string $html HTML string to parse 73 * @return string|null attribute value or null if not found or empty 72 * @param array{ 73 * tag_name?: string|null, 74 * match_offset?: int|null, 75 * class_name?: string|null, 76 * tag_closers?: 'visit'|'skip'|null 77 * } $query { 78 * Optional. Which tag name to find, having which class, etc. Default is to find any tag. 79 * 80 * @type string|null $tag_name Which tag to find, or null for "any tag." 81 * @type int|null $match_offset Find the Nth tag matching all search criteria. 82 * 1 for "first" tag, 3 for "third," etc. 83 * Defaults to first tag. 84 * @type string|null $class_name Tag must contain this whole class name to match. 85 * @type string|null $tag_closers "visit" or "skip": whether to stop on tag closers, e.g. </div>. 86 * } 87 * @param string $attribute Attribute to look for. 88 * @param string $html HTML string to parse. 89 * @return string|null Attribute value or null if not found or empty. 74 90 */ 75 91 function get_attribute_from_html_tag( array $query, string $attribute, string $html ): ?string { 76 77 92 $wphtml = new WP_HTML_Tag_Processor( $html ); 78 93 79 94 if ( $wphtml->next_tag( $query ) ) { 80 81 95 $attr_value = $wphtml->get_attribute( $attribute ); 82 96 … … 92 106 * Checks if any of the needles are contained within the haystack. 93 107 * 94 * @param string $haystack The string to search in.95 * @param array $needlesAn array of strings to search for.108 * @param string $haystack The string to search in. 109 * @param array <int, string> $needles An array of strings to search for. 96 110 */ 97 111 function str_contains_any( string $haystack, array $needles ): bool { … … 256 270 257 271 /** 258 * Replaces links in the given text with the given replacement, unless the link ends with a period. 272 * Replaces links in the given text with the given replacement. 273 * 274 * Matches URLs with protocols (http://, https://) or domain-like patterns. 275 * Requires at least 2 characters after the final dot to ensure valid TLDs. 259 276 * 260 277 * @see https://regex101.com/r/aElNTt/8 261 278 * 262 * @param string $text The text containing the links to replace.279 * @param string $text The text containing the links to replace. 263 280 * @param string $replacement The string to replace the links with. 264 281 * @return string The modified text with the replaced links. … … 266 283 function replace_links( string $text, string $replacement ): string { 267 284 268 $pattern = '/https?:\/\/[\S]+|[a-z0-9-]+\.[a-z0-9-]+\S*/i'; 269 270 return preg_replace_callback( 271 $pattern, 272 fn ( $matches ) => str_ends_with( $matches[0], '.' ) ? $matches[0] : $replacement, 273 $text 274 ); 275 } 285 $pattern = '/https?:\/\/\S+|[a-z0-9-]+(?:\.[a-z0-9-]+)*\.[a-z]{2,}\S*/i'; 286 287 return preg_replace( $pattern, $replacement, $text ); 288 } -
tweakmaster/trunk/vendor/nextgenthemes/wp-settings/src/settings.scss
r3338568 r3382950 20 20 oklch( 21 21 from var(--ngt-wp-body-bg) 22 calc(l + .022)22 calc(l + 0.022) 23 23 c 24 24 h
Note: See TracChangeset
for help on using the changeset viewer.