From be08bbbabdbcbf5ad36148bbc9e39e5757430bb3 Mon Sep 17 00:00:00 2001 From: Lai Power Date: Mon, 24 Aug 2020 15:44:58 +0000 Subject: [PATCH] updated plugin `Menu Icons` version 0.12.5 --- wp-content/plugins/menu-icons/CHANGELOG.md | 3 + .../plugins/menu-icons/includes/picker.php | 4 + wp-content/plugins/menu-icons/menu-icons.php | 4 +- wp-content/plugins/menu-icons/readme.md | 4 + wp-content/plugins/menu-icons/readme.txt | 4 + .../plugins/menu-icons/vendor/autoload.php | 2 +- .../codeinwp/themeisle-sdk/CHANGELOG.md | 4 + .../vendor/codeinwp/themeisle-sdk/load.php | 2 +- .../codeinwp/themeisle-sdk/src/Loader.php | 1 - .../themeisle-sdk/src/Modules/Endpoint.php | 358 ------------------ .../vendor/composer/autoload_real.php | 10 +- .../menu-icons/vendor/composer/installed.json | 12 +- 12 files changed, 34 insertions(+), 374 deletions(-) delete mode 100644 wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Modules/Endpoint.php diff --git a/wp-content/plugins/menu-icons/CHANGELOG.md b/wp-content/plugins/menu-icons/CHANGELOG.md index 86d65e2..f249106 100644 --- a/wp-content/plugins/menu-icons/CHANGELOG.md +++ b/wp-content/plugins/menu-icons/CHANGELOG.md @@ -1,4 +1,7 @@ + ### v0.12.5 - 2020-08-18 + **Changes:** + ### v0.12.4 - 2020-07-13 **Changes:** * Fix Font Awesome not loading diff --git a/wp-content/plugins/menu-icons/includes/picker.php b/wp-content/plugins/menu-icons/includes/picker.php index 8d1d38f..a995c1e 100644 --- a/wp-content/plugins/menu-icons/includes/picker.php +++ b/wp-content/plugins/menu-icons/includes/picker.php @@ -186,6 +186,10 @@ final class Menu_Icons_Picker { return; } + if( ! function_exists( 'get_current_screen' ) ) { + return; + } + $screen = get_current_screen(); if ( ! $screen instanceof WP_Screen || 'nav-menus' !== $screen->id ) { return; diff --git a/wp-content/plugins/menu-icons/menu-icons.php b/wp-content/plugins/menu-icons/menu-icons.php index b352c04..2a4fed7 100644 --- a/wp-content/plugins/menu-icons/menu-icons.php +++ b/wp-content/plugins/menu-icons/menu-icons.php @@ -11,7 +11,7 @@ * Plugin name: Menu Icons * Plugin URI: https://github.com/Codeinwp/wp-menu-icons * Description: Spice up your navigation menus with pretty icons, easily. - * Version: 0.12.4 + * Version: 0.12.5 * Author: ThemeIsle * Author URI: https://themeisle.com * License: GPLv2 @@ -27,7 +27,7 @@ */ final class Menu_Icons { - const VERSION = '0.12.4'; + const VERSION = '0.12.5'; /** * Holds plugin data diff --git a/wp-content/plugins/menu-icons/readme.md b/wp-content/plugins/menu-icons/readme.md index 5195398..022a073 100644 --- a/wp-content/plugins/menu-icons/readme.md +++ b/wp-content/plugins/menu-icons/readme.md @@ -224,6 +224,10 @@ Add this block of code to your [mu-plugin file](http://codex.wordpress.org/Must_ Read [this blog post](http://kucrut.org/add-custom-image-sizes-right-way/). ## Changelog ## +### 0.12.5 - 2020-08-18 ### + + + ### 0.12.4 - 2020-07-13 ### * Fix Font Awesome not loading diff --git a/wp-content/plugins/menu-icons/readme.txt b/wp-content/plugins/menu-icons/readme.txt index 8dd0972..1195458 100644 --- a/wp-content/plugins/menu-icons/readme.txt +++ b/wp-content/plugins/menu-icons/readme.txt @@ -224,6 +224,10 @@ add_filter( 'menu_icons_menu_settings', 'my_menu_icons_menu_settings', 10, 2 ); Read [this blog post](http://kucrut.org/add-custom-image-sizes-right-way/). == Changelog == += 0.12.5 - 2020-08-18 = + + + = 0.12.4 - 2020-07-13 = * Fix Font Awesome not loading diff --git a/wp-content/plugins/menu-icons/vendor/autoload.php b/wp-content/plugins/menu-icons/vendor/autoload.php index 44da764..5607b84 100644 --- a/wp-content/plugins/menu-icons/vendor/autoload.php +++ b/wp-content/plugins/menu-icons/vendor/autoload.php @@ -4,4 +4,4 @@ require_once __DIR__ . '/composer' . '/autoload_real.php'; -return ComposerAutoloaderInit71c9918e9dc7700df7d673a6b588baa1::getLoader(); +return ComposerAutoloaderInitabef56b0da707c7e3eaebd0d256cca29::getLoader(); diff --git a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/CHANGELOG.md b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/CHANGELOG.md index 0d9e8d1..4d67451 100644 --- a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/CHANGELOG.md +++ b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/CHANGELOG.md @@ -1,3 +1,7 @@ +##### [Version 3.2.15](https://github.com/Codeinwp/themeisle-sdk/compare/v3.2.14...v3.2.15) (2020-07-23) + +* remove no redundant module + ##### [Version 3.2.14](https://github.com/Codeinwp/themeisle-sdk/compare/v3.2.13...v3.2.14) (2020-06-10) > Things are getting better every day. 🚀 diff --git a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/load.php b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/load.php index ed6e429..218a28f 100644 --- a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/load.php +++ b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/load.php @@ -14,7 +14,7 @@ if ( ! defined( 'ABSPATH' ) ) { return; } // Current SDK version and path. -$themeisle_sdk_version = '3.2.14'; +$themeisle_sdk_version = '3.2.15'; $themeisle_sdk_path = dirname( __FILE__ ); global $themeisle_sdk_max_version; diff --git a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Loader.php b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Loader.php index d77478c..5d1df16 100644 --- a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Loader.php +++ b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Loader.php @@ -50,7 +50,6 @@ final class Loader { 'rollback', 'uninstall_feedback', 'licenser', - 'endpoint', 'logger', 'translate', 'review', diff --git a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Modules/Endpoint.php b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Modules/Endpoint.php deleted file mode 100644 index 6b5db06..0000000 --- a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Modules/Endpoint.php +++ /dev/null @@ -1,358 +0,0 @@ -.*)/' : '' ), - array( - 'methods' => 'GET', - 'callback' => array( $this, 'checksum' ), - ) - ); - } - - /** - * The checksum endpoint. - * - * @param \WP_REST_Request $data the request. - * - * @return \WP_REST_Response Response or the error - */ - function checksum( \WP_REST_Request $data ) { - $products = Loader::get_products(); - if ( self::PRODUCT_SPECIFIC ) { - $params = $this->validate_params( $data, array( 'slug' ) ); - foreach ( $products as $product ) { - if ( $params['slug'] === $product->get_slug() ) { - $products = array( $product ); - break; - } - } - } - $response = array(); - $custom_css = $this->has_custom_css(); - if ( is_bool( $custom_css ) ) { - $response['custom_css'] = $custom_css; - } - - $response['child_theme'] = $this->get_theme_properties(); - - foreach ( $products as $product ) { - $files = array(); - switch ( $product->get_type() ) { - case 'plugin': - $files = array(); - break; - case 'theme': - $files = array( 'style.css', 'functions.php' ); - break; - } - - $error = ''; - - // if any element in the $files array contains a '/', this would imply recursion is required. - $diff = $this->generate_diff( - $product, - $files, - array_reduce( - $files, - array( - $this, - 'is_recursion_required', - ), - false - ) - ); - if ( is_wp_error( $diff ) ) { - /** - * Error returner by the diff checker method. - * - * @var \WP_Error $diff Error returned. - */ - $error = $diff->get_error_message(); - $diff = array(); - } - - $response['products'][] = array( - 'slug' => $product->get_slug(), - 'version' => $product->get_version(), - 'diffs' => $diff, - 'error' => $error, - ); - } - - return new \WP_REST_Response( array( 'checksum' => $response ) ); - } - - /** - * Validates the parameters to the API - * - * @param \WP_REST_Request $data the request. - * @param array $params the parameters to validate. - * - * @return array of parameter name=>value - */ - private function validate_params( \WP_REST_Request $data, $params ) { - $collect = array(); - foreach ( $params as $param ) { - $value = sanitize_text_field( $data[ $param ] ); - if ( empty( $value ) ) { - return rest_ensure_response( - new \WP_Error( - 'themeisle_' . $param . '_invalid', - sprintf( 'Invalid %', $param ), - array( - 'status' => 403, - ) - ) - ); - } else { - $collect[ $param ] = $value; - } - } - - return $collect; - } - - /** - * Check if custom css has been added to the theme. - * - * @return bool Whether custom css has been added to the theme. - */ - private function has_custom_css() { - $query = new \WP_Query( - array( - 'post_type' => 'custom_css', - 'post_status' => 'publish', - 'numberposts' => 1, - 'update_post_meta_cache' => false, - 'update_post_term_cache' => false, - ) - ); - - if ( $query->have_posts() ) { - $query->the_post(); - $content = get_the_content(); - - // if the content contains a colon, a CSS rule has been added. - return strpos( $content, ':' ) === false ? false : true; - } - - return false; - } - - /** - * Get the current theme properties. - * - * @return mixed Properties of the current theme. - */ - function get_theme_properties() { - if ( ! is_child_theme() ) { - return false; - } - - $properties = array(); - $theme = wp_get_theme(); - // @codingStandardsIgnoreStart - $properties['name'] = $theme->Name; - // @codingStandardsIgnoreEnd - - // get the files in the child theme. - require_once( ABSPATH . 'wp-admin/includes/file.php' ); - WP_Filesystem(); - global $wp_filesystem; - $path = str_replace( ABSPATH, $wp_filesystem->abspath(), get_stylesheet_directory() ); - $list = $wp_filesystem->dirlist( $path, false, false ); - if ( $list ) { - $list = array_keys( self::flatten_dirlist( $list ) ); - $properties['files'] = $list; - } - - return $properties; - } - - /** - * Flatten the results of WP_Filesystem::dirlist() for iterating over. - * - * @access private - * - * @param array $nested_files Array of files as returned by WP_Filesystem::dirlist(). - * @param string $path Relative path to prepend to child nodes. Optional. - * - * @return array $files A flattened array of the $nested_files specified. - */ - private static function flatten_dirlist( $nested_files, $path = '' ) { - $files = array(); - foreach ( $nested_files as $name => $details ) { - $files[ $path . $name ] = $details; - // Append children recursively. - if ( ! empty( $details['files'] ) ) { - $children = self::flatten_dirlist( $details['files'], $path . $name . '/' ); - // Merge keeping possible numeric keys, which array_merge() will reindex from 0..n. - $files = $files + $children; - } - } - - return $files; - } - - /** - * Generate the diff of the files. - * - * @param Product $product Themeisle Product. - * @param array $files Array of files. - * @param bool $recurse Whether to recurse or not. - * - * @return mixed Diff data. - */ - private function generate_diff( $product, $files, $recurse = false ) { - require_once( ABSPATH . 'wp-admin/includes/file.php' ); - WP_Filesystem(); - global $wp_filesystem; - - $diff = array(); - $path = str_replace( ABSPATH, $wp_filesystem->abspath(), plugin_dir_path( $product->get_basefile() ) ); - $list = $wp_filesystem->dirlist( $path, false, $recurse ); - // nothing found. - if ( ! $list ) { - return $diff; - } - $list = array_keys( self::flatten_dirlist( $list ) ); - - // now let's get the valid files that actually exist. - if ( empty( $files ) ) { - $files = $list; - } else { - $files = array_intersect( $files, $list ); - } - - // fetch the calculated hashes. - if ( ! $wp_filesystem->is_readable( $path . '/' . self::HASH_FILE ) ) { - return new \WP_Error( 'themeisle_sdk_hash_not_found', sprintf( '%s not found', self::HASH_FILE ) ); - } - - $hashes = json_decode( $wp_filesystem->get_contents( $path . '/' . self::HASH_FILE ), true ); - ksort( $hashes ); - - $diff = array(); - foreach ( $files as $file ) { - // file does not exist in the hashes. - if ( ! array_key_exists( $file, $hashes ) ) { - continue; - } - $new = md5( $wp_filesystem->get_contents( $path . $file ) ); - $old = $hashes[ $file ]; - - // same hash, bail. - if ( $new === $old ) { - continue; - } - $diff[] = $file; - } - - return $diff; - } - - /** - * Check if recursion needs to be enabled on the WP_Filesystem by reducing the array of files to a boolean. - * - * @param string $carry Value of the previous iteration. - * @param string $item Value of the current iteration. - * - * @return bool Whether to recurse or not. - */ - function is_recursion_required( $carry, $item ) { - if ( ! $carry ) { - return ( strpos( $item, '/' ) !== false ); - } - - return $carry; - } - - /** - * Load module for this product. - * - * @param Product $product Product to check. - * - * @return bool Should we load this? - */ - public function can_load( $product ) { - return true; - } - - /** - * Load module logic. - * - * @param Product $product Product to load. - */ - public function load( $product ) { - $this->setup_endpoints(); - - return $this; - } - - /** - * Setup endpoints. - */ - private function setup_endpoints() { - global $wp_version; - if ( version_compare( $wp_version, '4.4', '<' ) ) { - // no REST support. - return; - } - - $this->setup_rest(); - } - - /** - * Setup REST endpoints. - */ - private function setup_rest() { - add_action( 'rest_api_init', array( $this, 'rest_register' ) ); - } -} diff --git a/wp-content/plugins/menu-icons/vendor/composer/autoload_real.php b/wp-content/plugins/menu-icons/vendor/composer/autoload_real.php index 6a5aaf1..97f375c 100644 --- a/wp-content/plugins/menu-icons/vendor/composer/autoload_real.php +++ b/wp-content/plugins/menu-icons/vendor/composer/autoload_real.php @@ -2,7 +2,7 @@ // autoload_real.php @generated by Composer -class ComposerAutoloaderInit71c9918e9dc7700df7d673a6b588baa1 +class ComposerAutoloaderInitabef56b0da707c7e3eaebd0d256cca29 { private static $loader; @@ -19,9 +19,9 @@ class ComposerAutoloaderInit71c9918e9dc7700df7d673a6b588baa1 return self::$loader; } - spl_autoload_register(array('ComposerAutoloaderInit71c9918e9dc7700df7d673a6b588baa1', 'loadClassLoader'), true, true); + spl_autoload_register(array('ComposerAutoloaderInitabef56b0da707c7e3eaebd0d256cca29', 'loadClassLoader'), true, true); self::$loader = $loader = new \Composer\Autoload\ClassLoader(); - spl_autoload_unregister(array('ComposerAutoloaderInit71c9918e9dc7700df7d673a6b588baa1', 'loadClassLoader')); + spl_autoload_unregister(array('ComposerAutoloaderInitabef56b0da707c7e3eaebd0d256cca29', 'loadClassLoader')); $map = require __DIR__ . '/autoload_namespaces.php'; foreach ($map as $namespace => $path) { @@ -42,14 +42,14 @@ class ComposerAutoloaderInit71c9918e9dc7700df7d673a6b588baa1 $includeFiles = require __DIR__ . '/autoload_files.php'; foreach ($includeFiles as $fileIdentifier => $file) { - composerRequire71c9918e9dc7700df7d673a6b588baa1($fileIdentifier, $file); + composerRequireabef56b0da707c7e3eaebd0d256cca29($fileIdentifier, $file); } return $loader; } } -function composerRequire71c9918e9dc7700df7d673a6b588baa1($fileIdentifier, $file) +function composerRequireabef56b0da707c7e3eaebd0d256cca29($fileIdentifier, $file) { if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { require $file; diff --git a/wp-content/plugins/menu-icons/vendor/composer/installed.json b/wp-content/plugins/menu-icons/vendor/composer/installed.json index e8a8fad..723591b 100644 --- a/wp-content/plugins/menu-icons/vendor/composer/installed.json +++ b/wp-content/plugins/menu-icons/vendor/composer/installed.json @@ -79,17 +79,17 @@ }, { "name": "codeinwp/themeisle-sdk", - "version": "3.2.14", - "version_normalized": "3.2.14.0", + "version": "3.2.15", + "version_normalized": "3.2.15.0", "source": { "type": "git", "url": "https://github.com/Codeinwp/themeisle-sdk.git", - "reference": "992f5e8347836e325ffc50760da1d550b79831c4" + "reference": "95b7447a5f4faba410c281c4bf278fbd740fed71" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Codeinwp/themeisle-sdk/zipball/992f5e8347836e325ffc50760da1d550b79831c4", - "reference": "992f5e8347836e325ffc50760da1d550b79831c4", + "url": "https://api.github.com/repos/Codeinwp/themeisle-sdk/zipball/95b7447a5f4faba410c281c4bf278fbd740fed71", + "reference": "95b7447a5f4faba410c281c4bf278fbd740fed71", "shasum": "" }, "require-dev": { @@ -97,7 +97,7 @@ "squizlabs/php_codesniffer": "^3.1", "wp-coding-standards/wpcs": "^1.0.0" }, - "time": "2020-06-10 16:25:09", + "time": "2020-07-23 15:02:10", "type": "library", "installation-source": "dist", "notification-url": "https://packagist.org/downloads/",