From c5b8f83628052dcbf25e3ccccb70fe07971320e6 Mon Sep 17 00:00:00 2001 From: Mike Hemberger Date: Fri, 21 Aug 2020 12:09:06 -0400 Subject: [PATCH] update updater and vbump 1.11.6 --- CHANGES.md | 4 + composer.lock | 12 +- mai-theme-engine.php | 4 +- vendor/composer/autoload_files.php | 2 +- vendor/composer/autoload_static.php | 2 +- vendor/composer/installed.json | 14 +- .../plugin-update-checker/.gitignore | 40 +++++ .../plugin-update-checker/Puc/v4/Factory.php | 2 +- .../Puc/{v4p9 => v4p10}/Autoloader.php | 22 ++- .../{v4p9 => v4p10}/DebugBar/Extension.php | 25 ++- .../Puc/{v4p9 => v4p10}/DebugBar/Panel.php | 6 +- .../DebugBar/PluginExtension.php | 8 +- .../{v4p9 => v4p10}/DebugBar/PluginPanel.php | 6 +- .../{v4p9 => v4p10}/DebugBar/ThemePanel.php | 6 +- .../Puc/{v4p9 => v4p10}/Factory.php | 69 ++++++++- .../Puc/{v4p9 => v4p10}/InstalledPackage.php | 6 +- .../Puc/{v4p9 => v4p10}/Metadata.php | 4 +- .../Puc/{v4p9 => v4p10}/OAuthSignature.php | 4 +- .../Puc/{v4p9 => v4p10}/Plugin/Info.php | 6 +- .../Puc/{v4p9 => v4p10}/Plugin/Package.php | 10 +- .../Puc/{v4p9 => v4p10}/Plugin/Ui.php | 6 +- .../Puc/{v4p9 => v4p10}/Plugin/Update.php | 20 +-- .../{v4p9 => v4p10}/Plugin/UpdateChecker.php | 50 +++--- .../Puc/{v4p9 => v4p10}/Scheduler.php | 44 +++++- .../Puc/{v4p9 => v4p10}/StateStore.php | 18 +-- .../Puc/{v4p9 => v4p10}/Theme/Package.php | 4 +- .../Puc/{v4p9 => v4p10}/Theme/Update.php | 8 +- .../{v4p9 => v4p10}/Theme/UpdateChecker.php | 30 ++-- .../Puc/{v4p9 => v4p10}/Update.php | 4 +- .../Puc/{v4p9 => v4p10}/UpdateChecker.php | 142 +++++++++++++----- .../Puc/{v4p9 => v4p10}/UpgraderStatus.php | 4 +- .../Puc/{v4p9 => v4p10}/Utils.php | 4 +- .../Puc/{v4p9 => v4p10}/Vcs/Api.php | 14 +- .../Puc/{v4p9 => v4p10}/Vcs/BaseChecker.php | 6 +- .../Puc/{v4p9 => v4p10}/Vcs/BitBucketApi.php | 24 +-- .../Puc/{v4p9 => v4p10}/Vcs/GitHubApi.php | 18 +-- .../Puc/{v4p9 => v4p10}/Vcs/GitLabApi.php | 16 +- .../Vcs/PluginUpdateChecker.php | 21 ++- .../Puc/{v4p9 => v4p10}/Vcs/Reference.php | 4 +- .../Vcs/ThemeUpdateChecker.php | 18 +-- .../plugin-update-checker/README.md | 10 +- .../plugin-update-checker/composer.json | 2 +- .../languages/plugin-update-checker-es_AR.mo | Bin 0 -> 1140 bytes .../languages/plugin-update-checker-es_AR.po | 48 ++++++ .../languages/plugin-update-checker-es_CL.mo | Bin 0 -> 1140 bytes .../languages/plugin-update-checker-es_CL.po | 48 ++++++ .../languages/plugin-update-checker-es_CO.mo | Bin 0 -> 1140 bytes .../languages/plugin-update-checker-es_CO.po | 48 ++++++ .../languages/plugin-update-checker-es_CR.mo | Bin 0 -> 1140 bytes .../languages/plugin-update-checker-es_CR.po | 48 ++++++ .../languages/plugin-update-checker-es_DO.mo | Bin 0 -> 1140 bytes .../languages/plugin-update-checker-es_DO.po | 48 ++++++ .../languages/plugin-update-checker-es_ES.mo | Bin 1178 -> 1140 bytes .../languages/plugin-update-checker-es_ES.po | 8 +- .../languages/plugin-update-checker-es_GT.mo | Bin 0 -> 1140 bytes .../languages/plugin-update-checker-es_GT.po | 48 ++++++ .../languages/plugin-update-checker-es_HN.mo | Bin 0 -> 1140 bytes .../languages/plugin-update-checker-es_HN.po | 48 ++++++ .../languages/plugin-update-checker-es_MX.mo | Bin 0 -> 1140 bytes .../languages/plugin-update-checker-es_MX.po | 48 ++++++ .../languages/plugin-update-checker-es_PE.mo | Bin 0 -> 1140 bytes .../languages/plugin-update-checker-es_PE.po | 48 ++++++ .../languages/plugin-update-checker-es_PR.mo | Bin 0 -> 1140 bytes .../languages/plugin-update-checker-es_PR.po | 48 ++++++ .../languages/plugin-update-checker-es_UY.mo | Bin 0 -> 1140 bytes .../languages/plugin-update-checker-es_UY.po | 48 ++++++ .../languages/plugin-update-checker-es_VE.mo | Bin 0 -> 1140 bytes .../languages/plugin-update-checker-es_VE.po | 48 ++++++ .../languages/plugin-update-checker-zh_CN.mo | Bin 0 -> 1060 bytes .../languages/plugin-update-checker-zh_CN.po | 48 ++++++ .../languages/plugin-update-checker.pot | 16 +- .../plugin-update-checker/load-v4p10.php | 28 ++++ .../plugin-update-checker/load-v4p9.php | 28 ---- .../plugin-update-checker.php | 4 +- .../vendor/PucReadmeParser.php | 7 + 75 files changed, 1163 insertions(+), 271 deletions(-) create mode 100644 vendor/yahnis-elsts/plugin-update-checker/.gitignore rename vendor/yahnis-elsts/plugin-update-checker/Puc/{v4p9 => v4p10}/Autoloader.php (66%) rename vendor/yahnis-elsts/plugin-update-checker/Puc/{v4p9 => v4p10}/DebugBar/Extension.php (86%) rename vendor/yahnis-elsts/plugin-update-checker/Puc/{v4p9 => v4p10}/DebugBar/Panel.php (96%) rename vendor/yahnis-elsts/plugin-update-checker/Puc/{v4p9 => v4p10}/DebugBar/PluginExtension.php (72%) rename vendor/yahnis-elsts/plugin-update-checker/Puc/{v4p9 => v4p10}/DebugBar/PluginPanel.php (80%) rename vendor/yahnis-elsts/plugin-update-checker/Puc/{v4p9 => v4p10}/DebugBar/ThemePanel.php (66%) rename vendor/yahnis-elsts/plugin-update-checker/Puc/{v4p9 => v4p10}/Factory.php (81%) rename vendor/yahnis-elsts/plugin-update-checker/Puc/{v4p9 => v4p10}/InstalledPackage.php (95%) rename vendor/yahnis-elsts/plugin-update-checker/Puc/{v4p9 => v4p10}/Metadata.php (97%) rename vendor/yahnis-elsts/plugin-update-checker/Puc/{v4p9 => v4p10}/OAuthSignature.php (96%) rename vendor/yahnis-elsts/plugin-update-checker/Puc/{v4p9 => v4p10}/Plugin/Info.php (95%) rename vendor/yahnis-elsts/plugin-update-checker/Puc/{v4p9 => v4p10}/Plugin/Package.php (94%) rename vendor/yahnis-elsts/plugin-update-checker/Puc/{v4p9 => v4p10}/Plugin/Ui.php (98%) rename vendor/yahnis-elsts/plugin-update-checker/Puc/{v4p9 => v4p10}/Plugin/Update.php (81%) rename vendor/yahnis-elsts/plugin-update-checker/Puc/{v4p9 => v4p10}/Plugin/UpdateChecker.php (89%) rename vendor/yahnis-elsts/plugin-update-checker/Puc/{v4p9 => v4p10}/Scheduler.php (84%) rename vendor/yahnis-elsts/plugin-update-checker/Puc/{v4p9 => v4p10}/StateStore.php (89%) rename vendor/yahnis-elsts/plugin-update-checker/Puc/{v4p9 => v4p10}/Theme/Package.php (92%) rename vendor/yahnis-elsts/plugin-update-checker/Puc/{v4p9 => v4p10}/Theme/Update.php (89%) rename vendor/yahnis-elsts/plugin-update-checker/Puc/{v4p9 => v4p10}/Theme/UpdateChecker.php (81%) rename vendor/yahnis-elsts/plugin-update-checker/Puc/{v4p9 => v4p10}/Update.php (84%) rename vendor/yahnis-elsts/plugin-update-checker/Puc/{v4p9 => v4p10}/UpdateChecker.php (87%) rename vendor/yahnis-elsts/plugin-update-checker/Puc/{v4p9 => v4p10}/UpgraderStatus.php (98%) rename vendor/yahnis-elsts/plugin-update-checker/Puc/{v4p9 => v4p10}/Utils.php (96%) rename vendor/yahnis-elsts/plugin-update-checker/Puc/{v4p9 => v4p10}/Vcs/Api.php (96%) rename vendor/yahnis-elsts/plugin-update-checker/Puc/{v4p9 => v4p10}/Vcs/BaseChecker.php (75%) rename vendor/yahnis-elsts/plugin-update-checker/Puc/{v4p9 => v4p10}/Vcs/BitBucketApi.php (91%) rename vendor/yahnis-elsts/plugin-update-checker/Puc/{v4p9 => v4p10}/Vcs/GitHubApi.php (96%) rename vendor/yahnis-elsts/plugin-update-checker/Puc/{v4p9 => v4p10}/Vcs/GitLabApi.php (95%) rename vendor/yahnis-elsts/plugin-update-checker/Puc/{v4p9 => v4p10}/Vcs/PluginUpdateChecker.php (91%) rename vendor/yahnis-elsts/plugin-update-checker/Puc/{v4p9 => v4p10}/Vcs/Reference.php (91%) rename vendor/yahnis-elsts/plugin-update-checker/Puc/{v4p9 => v4p10}/Vcs/ThemeUpdateChecker.php (85%) create mode 100644 vendor/yahnis-elsts/plugin-update-checker/languages/plugin-update-checker-es_AR.mo create mode 100644 vendor/yahnis-elsts/plugin-update-checker/languages/plugin-update-checker-es_AR.po create mode 100644 vendor/yahnis-elsts/plugin-update-checker/languages/plugin-update-checker-es_CL.mo create mode 100644 vendor/yahnis-elsts/plugin-update-checker/languages/plugin-update-checker-es_CL.po create mode 100644 vendor/yahnis-elsts/plugin-update-checker/languages/plugin-update-checker-es_CO.mo create mode 100644 vendor/yahnis-elsts/plugin-update-checker/languages/plugin-update-checker-es_CO.po create mode 100644 vendor/yahnis-elsts/plugin-update-checker/languages/plugin-update-checker-es_CR.mo create mode 100644 vendor/yahnis-elsts/plugin-update-checker/languages/plugin-update-checker-es_CR.po create mode 100644 vendor/yahnis-elsts/plugin-update-checker/languages/plugin-update-checker-es_DO.mo create mode 100644 vendor/yahnis-elsts/plugin-update-checker/languages/plugin-update-checker-es_DO.po create mode 100644 vendor/yahnis-elsts/plugin-update-checker/languages/plugin-update-checker-es_GT.mo create mode 100644 vendor/yahnis-elsts/plugin-update-checker/languages/plugin-update-checker-es_GT.po create mode 100644 vendor/yahnis-elsts/plugin-update-checker/languages/plugin-update-checker-es_HN.mo create mode 100644 vendor/yahnis-elsts/plugin-update-checker/languages/plugin-update-checker-es_HN.po create mode 100644 vendor/yahnis-elsts/plugin-update-checker/languages/plugin-update-checker-es_MX.mo create mode 100644 vendor/yahnis-elsts/plugin-update-checker/languages/plugin-update-checker-es_MX.po create mode 100644 vendor/yahnis-elsts/plugin-update-checker/languages/plugin-update-checker-es_PE.mo create mode 100644 vendor/yahnis-elsts/plugin-update-checker/languages/plugin-update-checker-es_PE.po create mode 100644 vendor/yahnis-elsts/plugin-update-checker/languages/plugin-update-checker-es_PR.mo create mode 100644 vendor/yahnis-elsts/plugin-update-checker/languages/plugin-update-checker-es_PR.po create mode 100644 vendor/yahnis-elsts/plugin-update-checker/languages/plugin-update-checker-es_UY.mo create mode 100644 vendor/yahnis-elsts/plugin-update-checker/languages/plugin-update-checker-es_UY.po create mode 100644 vendor/yahnis-elsts/plugin-update-checker/languages/plugin-update-checker-es_VE.mo create mode 100644 vendor/yahnis-elsts/plugin-update-checker/languages/plugin-update-checker-es_VE.po create mode 100644 vendor/yahnis-elsts/plugin-update-checker/languages/plugin-update-checker-zh_CN.mo create mode 100644 vendor/yahnis-elsts/plugin-update-checker/languages/plugin-update-checker-zh_CN.po create mode 100644 vendor/yahnis-elsts/plugin-update-checker/load-v4p10.php delete mode 100644 vendor/yahnis-elsts/plugin-update-checker/load-v4p9.php diff --git a/CHANGES.md b/CHANGES.md index 72e799f..a2ec754 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,9 @@ # Changelog +## 1.11.6 (8/21/20) +* Fixed: Compatibility with WP 5.5, deprecated `wp_make_content_images_responsive()` in favor of `wp_filter_content_tags()` when available. +* Changed: Update updater. + ## 1.11.5 (2/12/20) * Fixed: Gallery alignment again again. diff --git a/composer.lock b/composer.lock index 21584ed..d44bf9a 100644 --- a/composer.lock +++ b/composer.lock @@ -61,16 +61,16 @@ }, { "name": "yahnis-elsts/plugin-update-checker", - "version": "v4.9", + "version": "v4.10", "source": { "type": "git", "url": "https://github.com/YahnisElsts/plugin-update-checker.git", - "reference": "28f29c940cc22754aff85a99645e3c0a51c097e8" + "reference": "0edd15f67822464af8a23285ce367b30d515a855" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/YahnisElsts/plugin-update-checker/zipball/28f29c940cc22754aff85a99645e3c0a51c097e8", - "reference": "28f29c940cc22754aff85a99645e3c0a51c097e8", + "url": "https://api.github.com/repos/YahnisElsts/plugin-update-checker/zipball/0edd15f67822464af8a23285ce367b30d515a855", + "reference": "0edd15f67822464af8a23285ce367b30d515a855", "shasum": "" }, "require": { @@ -80,7 +80,7 @@ "type": "library", "autoload": { "files": [ - "load-v4p9.php" + "load-v4p10.php" ] }, "notification-url": "https://packagist.org/downloads/", @@ -103,7 +103,7 @@ "theme updates", "wordpress" ], - "time": "2020-02-07T11:07:19+00:00" + "time": "2020-08-21T11:36:45+00:00" } ], "packages-dev": [], diff --git a/mai-theme-engine.php b/mai-theme-engine.php index 3570568..9671673 100644 --- a/mai-theme-engine.php +++ b/mai-theme-engine.php @@ -5,7 +5,7 @@ * Plugin URI: https://maitheme.com/ * Description: The Mai Theme Engine plugin * - * Version: 1.11.5 + * Version: 1.11.6 * * GitHub URI: maithemewp/mai-theme-engine * @@ -89,7 +89,7 @@ public function __wakeup() { private function setup_constants() { // Plugin version. - define( 'MAI_THEME_ENGINE_VERSION', '1.11.5' ); + define( 'MAI_THEME_ENGINE_VERSION', '1.11.6' ); // DB version. define( 'MAI_THEME_ENGINE_DB_VERSION', '1600' ); diff --git a/vendor/composer/autoload_files.php b/vendor/composer/autoload_files.php index 3a5cb36..ec55229 100644 --- a/vendor/composer/autoload_files.php +++ b/vendor/composer/autoload_files.php @@ -6,6 +6,6 @@ $baseDir = dirname($vendorDir); return array( - '241d2b5b9c1e680c0770b006b0271156' => $vendorDir . '/yahnis-elsts/plugin-update-checker/load-v4p9.php', + '689b08b7620712b04324ecd7ed167c6b' => $vendorDir . '/yahnis-elsts/plugin-update-checker/load-v4p10.php', 'eb0e248b25b656ba76af120dff1e9323' => $vendorDir . '/cmb2/cmb2/init.php', ); diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php index 7197ab0..99acdb3 100644 --- a/vendor/composer/autoload_static.php +++ b/vendor/composer/autoload_static.php @@ -7,7 +7,7 @@ class ComposerStaticInit29cbfa4c66a87652b0a20a26f9238cc1 { public static $files = array ( - '241d2b5b9c1e680c0770b006b0271156' => __DIR__ . '/..' . '/yahnis-elsts/plugin-update-checker/load-v4p9.php', + '689b08b7620712b04324ecd7ed167c6b' => __DIR__ . '/..' . '/yahnis-elsts/plugin-update-checker/load-v4p10.php', 'eb0e248b25b656ba76af120dff1e9323' => __DIR__ . '/..' . '/cmb2/cmb2/init.php', ); diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index 34a8f18..7fb4c7f 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -56,29 +56,29 @@ }, { "name": "yahnis-elsts/plugin-update-checker", - "version": "v4.9", - "version_normalized": "4.9.0.0", + "version": "v4.10", + "version_normalized": "4.10.0.0", "source": { "type": "git", "url": "https://github.com/YahnisElsts/plugin-update-checker.git", - "reference": "28f29c940cc22754aff85a99645e3c0a51c097e8" + "reference": "0edd15f67822464af8a23285ce367b30d515a855" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/YahnisElsts/plugin-update-checker/zipball/28f29c940cc22754aff85a99645e3c0a51c097e8", - "reference": "28f29c940cc22754aff85a99645e3c0a51c097e8", + "url": "https://api.github.com/repos/YahnisElsts/plugin-update-checker/zipball/0edd15f67822464af8a23285ce367b30d515a855", + "reference": "0edd15f67822464af8a23285ce367b30d515a855", "shasum": "" }, "require": { "ext-json": "*", "php": ">=5.2.0" }, - "time": "2020-02-07T11:07:19+00:00", + "time": "2020-08-21T11:36:45+00:00", "type": "library", "installation-source": "dist", "autoload": { "files": [ - "load-v4p9.php" + "load-v4p10.php" ] }, "notification-url": "https://packagist.org/downloads/", diff --git a/vendor/yahnis-elsts/plugin-update-checker/.gitignore b/vendor/yahnis-elsts/plugin-update-checker/.gitignore new file mode 100644 index 0000000..7126070 --- /dev/null +++ b/vendor/yahnis-elsts/plugin-update-checker/.gitignore @@ -0,0 +1,40 @@ +# Created by .ignore support plugin (hsz.mobi) +### JetBrains template +# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider +# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 + +# The entire IDEA/PhpStorm directory +.idea/ + +# CMake +cmake-build-*/ + +# Mongo Explorer plugin +.idea/**/mongoSettings.xml + +# File-based project format +*.iws + +# IntelliJ +out/ + +# mpeltonen/sbt-idea plugin +.idea_modules/ + +# JIRA plugin +atlassian-ide-plugin.xml + +# Cursive Clojure plugin +.idea/replstate.xml + +# Crashlytics plugin (for Android Studio and IntelliJ) +com_crashlytics_export_strings.xml +crashlytics.properties +crashlytics-build.properties +fabric.properties + +# Editor-based Rest Client +.idea/httpRequests + +# Android studio 3.1+ serialized cache file +.idea/caches/build_file_checksums.ser diff --git a/vendor/yahnis-elsts/plugin-update-checker/Puc/v4/Factory.php b/vendor/yahnis-elsts/plugin-update-checker/Puc/v4/Factory.php index 3723e00..32673c9 100644 --- a/vendor/yahnis-elsts/plugin-update-checker/Puc/v4/Factory.php +++ b/vendor/yahnis-elsts/plugin-update-checker/Puc/v4/Factory.php @@ -1,6 +1,6 @@ prefix = $nameParts[0] . '_' . $nameParts[1] . '_'; - $this->libraryDir = realpath($this->rootDir . '../..') . '/'; + $this->libraryDir = $this->rootDir . '../..'; + if ( !self::isPhar() ) { + $this->libraryDir = realpath($this->libraryDir); + } + $this->libraryDir = $this->libraryDir . '/'; + $this->staticMap = array( 'PucReadmeParser' => 'vendor/PucReadmeParser.php', 'Parsedown' => 'vendor/Parsedown.php', @@ -24,6 +29,17 @@ public function __construct() { spl_autoload_register(array($this, 'autoload')); } + /** + * Determine if this file is running as part of a Phar archive. + * + * @return bool + */ + private static function isPhar() { + //Check if the current file path starts with "phar://". + static $pharProtocol = 'phar://'; + return (substr(__FILE__, 0, strlen($pharProtocol)) === $pharProtocol); + } + public function autoload($className) { if ( isset($this->staticMap[$className]) && file_exists($this->libraryDir . $this->staticMap[$className]) ) { /** @noinspection PhpIncludeInspection */ diff --git a/vendor/yahnis-elsts/plugin-update-checker/Puc/v4p9/DebugBar/Extension.php b/vendor/yahnis-elsts/plugin-update-checker/Puc/v4p10/DebugBar/Extension.php similarity index 86% rename from vendor/yahnis-elsts/plugin-update-checker/Puc/v4p9/DebugBar/Extension.php rename to vendor/yahnis-elsts/plugin-update-checker/Puc/v4p10/DebugBar/Extension.php index 9401789..deba8c2 100644 --- a/vendor/yahnis-elsts/plugin-update-checker/Puc/v4p9/DebugBar/Extension.php +++ b/vendor/yahnis-elsts/plugin-update-checker/Puc/v4p10/DebugBar/Extension.php @@ -1,12 +1,12 @@ updateChecker = $updateChecker; @@ -142,6 +142,15 @@ protected function preAjaxRequest() { @ini_set('display_errors', 'On'); } + /** + * Remove hooks that were added by this extension. + */ + public function removeHooks() { + remove_filter('debug_bar_panels', array($this, 'addDebugBarPanel')); + remove_action('debug_bar_enqueue_scripts', array($this, 'enqueuePanelDependencies')); + remove_action('wp_ajax_puc_v4_debug_check_now', array($this, 'ajaxCheckNow')); + } + /** * @param string $filePath * @return string @@ -150,11 +159,11 @@ private function getLibraryUrl($filePath) { $absolutePath = realpath(dirname(__FILE__) . '/../../../' . ltrim($filePath, '/')); //Where is the library located inside the WordPress directory structure? - $absolutePath = Puc_v4p9_Factory::normalizePath($absolutePath); + $absolutePath = Puc_v4p10_Factory::normalizePath($absolutePath); - $pluginDir = Puc_v4p9_Factory::normalizePath(WP_PLUGIN_DIR); - $muPluginDir = Puc_v4p9_Factory::normalizePath(WPMU_PLUGIN_DIR); - $themeDir = Puc_v4p9_Factory::normalizePath(get_theme_root()); + $pluginDir = Puc_v4p10_Factory::normalizePath(WP_PLUGIN_DIR); + $muPluginDir = Puc_v4p10_Factory::normalizePath(WPMU_PLUGIN_DIR); + $themeDir = Puc_v4p10_Factory::normalizePath(get_theme_root()); if ( (strpos($absolutePath, $pluginDir) === 0) || (strpos($absolutePath, $muPluginDir) === 0) ) { //It's part of a plugin. diff --git a/vendor/yahnis-elsts/plugin-update-checker/Puc/v4p9/DebugBar/Panel.php b/vendor/yahnis-elsts/plugin-update-checker/Puc/v4p10/DebugBar/Panel.php similarity index 96% rename from vendor/yahnis-elsts/plugin-update-checker/Puc/v4p9/DebugBar/Panel.php rename to vendor/yahnis-elsts/plugin-update-checker/Puc/v4p10/DebugBar/Panel.php index dd0e259..ecd0641 100644 --- a/vendor/yahnis-elsts/plugin-update-checker/Puc/v4p9/DebugBar/Panel.php +++ b/vendor/yahnis-elsts/plugin-update-checker/Puc/v4p10/DebugBar/Panel.php @@ -1,9 +1,9 @@ '; diff --git a/vendor/yahnis-elsts/plugin-update-checker/Puc/v4p9/DebugBar/PluginExtension.php b/vendor/yahnis-elsts/plugin-update-checker/Puc/v4p10/DebugBar/PluginExtension.php similarity index 72% rename from vendor/yahnis-elsts/plugin-update-checker/Puc/v4p9/DebugBar/PluginExtension.php rename to vendor/yahnis-elsts/plugin-update-checker/Puc/v4p10/DebugBar/PluginExtension.php index ca3de42..863ed73 100644 --- a/vendor/yahnis-elsts/plugin-update-checker/Puc/v4p9/DebugBar/PluginExtension.php +++ b/vendor/yahnis-elsts/plugin-update-checker/Puc/v4p10/DebugBar/PluginExtension.php @@ -1,12 +1,12 @@ '', + 'slug' => '', + 'checkPeriod' => 12, + 'optionName' => '', + 'muPluginFile' => '', + ); + $args = array_merge($defaults, array_intersect_key($args, $defaults)); + extract($args, EXTR_SKIP); + + //Check for the service URI + if ( empty($metadataUrl) ) { + $metadataUrl = self::getServiceURI($fullPath); + } + + /** @noinspection PhpUndefinedVariableInspection These variables are created by extract(), above. */ + return self::buildUpdateChecker($metadataUrl, $fullPath, $slug, $checkPeriod, $optionName, $muPluginFile); + } + /** * Create a new instance of the update checker. * * This method automatically detects if you're using it for a plugin or a theme and chooses * the appropriate implementation for your update source (JSON file, GitHub, BitBucket, etc). * - * @see Puc_v4p9_UpdateChecker::__construct + * @see Puc_v4p10_UpdateChecker::__construct * * @param string $metadataUrl The URL of the metadata file, a GitHub repository, or another supported update source. * @param string $fullPath Full path to the main plugin file or to the theme directory. @@ -32,7 +62,7 @@ class Puc_v4p9_Factory { * @param int $checkPeriod How often to check for updates (in hours). * @param string $optionName Where to store book-keeping info about update checks. * @param string $muPluginFile The plugin filename relative to the mu-plugins directory. - * @return Puc_v4p9_Plugin_UpdateChecker|Puc_v4p9_Theme_UpdateChecker|Puc_v4p9_Vcs_BaseChecker + * @return Puc_v4p10_Plugin_UpdateChecker|Puc_v4p10_Theme_UpdateChecker|Puc_v4p10_Vcs_BaseChecker */ public static function buildUpdateChecker($metadataUrl, $fullPath, $slug = '', $checkPeriod = 12, $optionName = '', $muPluginFile = '') { $fullPath = self::normalizePath($fullPath); @@ -178,6 +208,35 @@ protected static function getThemeDirectoryName($absolutePath) { return null; } + /** + * Get the service URI from the file header. + * + * @param string $fullPath + * @return string + */ + private static function getServiceURI($fullPath) { + //Look for the URI + if ( is_readable($fullPath) ) { + $seek = array( + 'github' => 'GitHub URI', + 'gitlab' => 'GitLab URI', + 'bucket' => 'BitBucket URI', + ); + $seek = apply_filters('puc_get_source_uri', $seek); + $data = get_file_data($fullPath, $seek); + foreach ($data as $key => $uri) { + if ( $uri ) { + return $uri; + } + } + } + + //URI was not found so throw an error. + throw new RuntimeException( + sprintf('Unable to locate URI in header of "%s"', htmlentities($fullPath)) + ); + } + /** * Get the name of the hosting service that the URL points to. * @@ -294,4 +353,4 @@ public static function addVersion($generalClass, $versionedClass, $version) { } } -endif; \ No newline at end of file +endif; diff --git a/vendor/yahnis-elsts/plugin-update-checker/Puc/v4p9/InstalledPackage.php b/vendor/yahnis-elsts/plugin-update-checker/Puc/v4p10/InstalledPackage.php similarity index 95% rename from vendor/yahnis-elsts/plugin-update-checker/Puc/v4p9/InstalledPackage.php rename to vendor/yahnis-elsts/plugin-update-checker/Puc/v4p10/InstalledPackage.php index 0a2768a..9080c5a 100644 --- a/vendor/yahnis-elsts/plugin-update-checker/Puc/v4p9/InstalledPackage.php +++ b/vendor/yahnis-elsts/plugin-update-checker/Puc/v4p10/InstalledPackage.php @@ -1,5 +1,5 @@ $field) ) { diff --git a/vendor/yahnis-elsts/plugin-update-checker/Puc/v4p9/Plugin/Package.php b/vendor/yahnis-elsts/plugin-update-checker/Puc/v4p10/Plugin/Package.php similarity index 94% rename from vendor/yahnis-elsts/plugin-update-checker/Puc/v4p9/Plugin/Package.php rename to vendor/yahnis-elsts/plugin-update-checker/Puc/v4p10/Plugin/Package.php index b92c5f7..debb5eb 100644 --- a/vendor/yahnis-elsts/plugin-update-checker/Puc/v4p9/Plugin/Package.php +++ b/vendor/yahnis-elsts/plugin-update-checker/Puc/v4p10/Plugin/Package.php @@ -1,9 +1,9 @@ pluginAbsolutePath); //If realpath() fails, just normalize the syntax instead. if (($muPluginDir === false) || ($pluginPath === false)) { - $muPluginDir = Puc_v4p9_Factory::normalizePath(WPMU_PLUGIN_DIR); - $pluginPath = Puc_v4p9_Factory::normalizePath($this->pluginAbsolutePath); + $muPluginDir = Puc_v4p10_Factory::normalizePath(WPMU_PLUGIN_DIR); + $pluginPath = Puc_v4p10_Factory::normalizePath($this->pluginAbsolutePath); } $cachedResult = (strpos($pluginPath, $muPluginDir) === 0); diff --git a/vendor/yahnis-elsts/plugin-update-checker/Puc/v4p9/Plugin/Ui.php b/vendor/yahnis-elsts/plugin-update-checker/Puc/v4p10/Plugin/Ui.php similarity index 98% rename from vendor/yahnis-elsts/plugin-update-checker/Puc/v4p9/Plugin/Ui.php rename to vendor/yahnis-elsts/plugin-update-checker/Puc/v4p10/Plugin/Ui.php index 390bcdf..1ff18d6 100644 --- a/vendor/yahnis-elsts/plugin-update-checker/Puc/v4p9/Plugin/Ui.php +++ b/vendor/yahnis-elsts/plugin-update-checker/Puc/v4p10/Plugin/Ui.php @@ -1,14 +1,14 @@ updateChecker = $updateChecker; diff --git a/vendor/yahnis-elsts/plugin-update-checker/Puc/v4p9/Plugin/Update.php b/vendor/yahnis-elsts/plugin-update-checker/Puc/v4p10/Plugin/Update.php similarity index 81% rename from vendor/yahnis-elsts/plugin-update-checker/Puc/v4p9/Plugin/Update.php rename to vendor/yahnis-elsts/plugin-update-checker/Puc/v4p10/Plugin/Update.php index 4345617..89293c5 100644 --- a/vendor/yahnis-elsts/plugin-update-checker/Puc/v4p9/Plugin/Update.php +++ b/vendor/yahnis-elsts/plugin-update-checker/Puc/v4p10/Plugin/Update.php @@ -1,5 +1,5 @@ id = $this->id; $update->url = $this->homepage; $update->tested = $this->tested; + $update->requires_php = $this->requires_php; $update->plugin = $this->filename; if ( !empty($this->upgrade_notice) ) { diff --git a/vendor/yahnis-elsts/plugin-update-checker/Puc/v4p9/Plugin/UpdateChecker.php b/vendor/yahnis-elsts/plugin-update-checker/Puc/v4p10/Plugin/UpdateChecker.php similarity index 89% rename from vendor/yahnis-elsts/plugin-update-checker/Puc/v4p9/Plugin/UpdateChecker.php rename to vendor/yahnis-elsts/plugin-update-checker/Puc/v4p10/Plugin/UpdateChecker.php index e99af5e..c45f109 100644 --- a/vendor/yahnis-elsts/plugin-update-checker/Puc/v4p9/Plugin/UpdateChecker.php +++ b/vendor/yahnis-elsts/plugin-update-checker/Puc/v4p10/Plugin/UpdateChecker.php @@ -1,5 +1,5 @@ pluginFile, array($this, 'removeHooks')); - $this->extraUi = new Puc_v4p9_Plugin_Ui($this); + $this->extraUi = new Puc_v4p10_Plugin_Ui($this); } /** * Create an instance of the scheduler. * * @param int $checkPeriod - * @return Puc_v4p9_Scheduler + * @return Puc_v4p10_Scheduler */ protected function createScheduler($checkPeriod) { - $scheduler = new Puc_v4p9_Scheduler($this, $checkPeriod, array('load-plugins.php')); + $scheduler = new Puc_v4p10_Scheduler($this, $checkPeriod, array('load-plugins.php')); register_deactivation_hook($this->pluginFile, array($scheduler, 'removeUpdaterCron')); return $scheduler; } @@ -124,13 +124,13 @@ public function removeHooks() { * @uses wp_remote_get() * * @param array $queryArgs Additional query arguments to append to the request. Optional. - * @return Puc_v4p9_Plugin_Info + * @return Puc_v4p10_Plugin_Info */ public function requestInfo($queryArgs = array()) { - list($pluginInfo, $result) = $this->requestMetadata('Puc_v4p9_Plugin_Info', 'request_info', $queryArgs); + list($pluginInfo, $result) = $this->requestMetadata('Puc_v4p10_Plugin_Info', 'request_info', $queryArgs); if ( $pluginInfo !== null ) { - /** @var Puc_v4p9_Plugin_Info $pluginInfo */ + /** @var Puc_v4p10_Plugin_Info $pluginInfo */ $pluginInfo->filename = $this->pluginFile; $pluginInfo->slug = $this->slug; } @@ -144,7 +144,7 @@ public function requestInfo($queryArgs = array()) { * * @uses PluginUpdateChecker::requestInfo() * - * @return Puc_v4p9_Update|null An instance of Plugin_Update, or NULL when no updates are available. + * @return Puc_v4p10_Update|null An instance of Plugin_Update, or NULL when no updates are available. */ public function requestUpdate() { //For the sake of simplicity, this function just calls requestInfo() @@ -153,7 +153,7 @@ public function requestUpdate() { if ( $pluginInfo === null ){ return null; } - $update = Puc_v4p9_Plugin_Update::fromPluginInfo($pluginInfo); + $update = Puc_v4p10_Plugin_Update::fromPluginInfo($pluginInfo); $update = $this->filterUpdateResult($update); @@ -235,6 +235,22 @@ protected function getUpdateListKey() { return $this->pluginFile; } + protected function getNoUpdateItemFields() { + return array_merge( + parent::getNoUpdateItemFields(), + array( + 'id' => $this->pluginFile, + 'slug' => $this->slug, + 'plugin' => $this->pluginFile, + 'icons' => array(), + 'banners' => array(), + 'banners_rtl' => array(), + 'tested' => '', + 'compatibility' => new stdClass(), + ) + ); + } + /** * Alias for isBeingUpgraded(). * @@ -265,12 +281,12 @@ public function isBeingUpgraded($upgrader = null) { * Uses cached update data. To retrieve update information straight from * the metadata URL, call requestUpdate() instead. * - * @return Puc_v4p9_Plugin_Update|null + * @return Puc_v4p10_Plugin_Update|null */ public function getUpdate() { $update = parent::getUpdate(); if ( isset($update) ) { - /** @var Puc_v4p9_Plugin_Update $update */ + /** @var Puc_v4p10_Plugin_Update $update */ $update->filename = $this->pluginFile; } return $update; @@ -375,20 +391,20 @@ public function addResultFilter($callback) { } protected function createDebugBarExtension() { - return new Puc_v4p9_DebugBar_PluginExtension($this); + return new Puc_v4p10_DebugBar_PluginExtension($this); } /** * Create a package instance that represents this plugin or theme. * - * @return Puc_v4p9_InstalledPackage + * @return Puc_v4p10_InstalledPackage */ protected function createInstalledPackage() { - return new Puc_v4p9_Plugin_Package($this->pluginAbsolutePath, $this); + return new Puc_v4p10_Plugin_Package($this->pluginAbsolutePath, $this); } /** - * @return Puc_v4p9_Plugin_Package + * @return Puc_v4p10_Plugin_Package */ public function getInstalledPackage() { return $this->package; diff --git a/vendor/yahnis-elsts/plugin-update-checker/Puc/v4p9/Scheduler.php b/vendor/yahnis-elsts/plugin-update-checker/Puc/v4p10/Scheduler.php similarity index 84% rename from vendor/yahnis-elsts/plugin-update-checker/Puc/v4p9/Scheduler.php rename to vendor/yahnis-elsts/plugin-update-checker/Puc/v4p10/Scheduler.php index ce81463..3e9857b 100644 --- a/vendor/yahnis-elsts/plugin-update-checker/Puc/v4p9/Scheduler.php +++ b/vendor/yahnis-elsts/plugin-update-checker/Puc/v4p10/Scheduler.php @@ -1,11 +1,11 @@ removeHooks(); + $this->updateChecker->removeHooks(); + return; + } //Sanity check and limitation to relevant types. if ( @@ -106,7 +116,7 @@ public function upgraderProcessComplete( //Filter out notifications of upgrades that should have no bearing upon whether or not our //current info is up-to-date. - if ( is_a($this->updateChecker, 'Puc_v4p9_Theme_UpdateChecker') ) { + if ( is_a($this->updateChecker, 'Puc_v4p10_Theme_UpdateChecker') ) { if ( 'theme' !== $upgradeInfo['type'] || !isset($upgradeInfo['themes']) ) { return; } @@ -120,7 +130,7 @@ public function upgraderProcessComplete( } } - if ( is_a($this->updateChecker, 'Puc_v4p9_Plugin_UpdateChecker') ) { + if ( is_a($this->updateChecker, 'Puc_v4p10_Plugin_UpdateChecker') ) { if ( 'plugin' !== $upgradeInfo['type'] || !isset($upgradeInfo['plugins']) ) { return; } @@ -136,7 +146,7 @@ public function upgraderProcessComplete( $this->maybeCheckForUpdates(); } - + /** * Check for updates if the configured check interval has already elapsed. * Will use a shorter check interval on certain admin pages like "Dashboard -> Updates" or when doing cron. @@ -233,6 +243,24 @@ public function removeUpdaterCron() { public function getCronHookName() { return $this->cronHook; } + + /** + * Remove most hooks added by the scheduler. + */ + public function removeHooks() { + remove_filter('cron_schedules', array($this, '_addCustomSchedule')); + remove_action('admin_init', array($this, 'maybeCheckForUpdates')); + remove_action('load-update-core.php', array($this, 'maybeCheckForUpdates')); + + if ( $this->cronHook !== null ) { + remove_action($this->cronHook, array($this, 'maybeCheckForUpdates')); + } + if ( !empty($this->hourlyCheckHooks) ) { + foreach ($this->hourlyCheckHooks as $hook) { + remove_action($hook, array($this, 'maybeCheckForUpdates')); + } + } + } } endif; diff --git a/vendor/yahnis-elsts/plugin-update-checker/Puc/v4p9/StateStore.php b/vendor/yahnis-elsts/plugin-update-checker/Puc/v4p10/StateStore.php similarity index 89% rename from vendor/yahnis-elsts/plugin-update-checker/Puc/v4p9/StateStore.php rename to vendor/yahnis-elsts/plugin-update-checker/Puc/v4p10/StateStore.php index ff14063..903fee1 100644 --- a/vendor/yahnis-elsts/plugin-update-checker/Puc/v4p9/StateStore.php +++ b/vendor/yahnis-elsts/plugin-update-checker/Puc/v4p10/StateStore.php @@ -1,8 +1,8 @@ lazyLoad(); @@ -73,10 +73,10 @@ public function getUpdate() { } /** - * @param Puc_v4p9_Update|null $update + * @param Puc_v4p10_Update|null $update * @return $this */ - public function setUpdate(Puc_v4p9_Update $update = null) { + public function setUpdate(Puc_v4p10_Update $update = null) { $this->lazyLoad(); $this->update = $update; return $this; @@ -138,7 +138,7 @@ public function save() { $updateClass = get_class($this->update); $state->updateClass = $updateClass; $prefix = $this->getLibPrefix(); - if ( Puc_v4p9_Utils::startsWith($updateClass, $prefix) ) { + if ( Puc_v4p10_Utils::startsWith($updateClass, $prefix) ) { $state->updateBaseClass = substr($updateClass, strlen($prefix)); } } @@ -169,8 +169,8 @@ protected function load() { return; } - $this->lastCheck = intval(Puc_v4p9_Utils::get($state, 'lastCheck', 0)); - $this->checkedVersion = Puc_v4p9_Utils::get($state, 'checkedVersion', ''); + $this->lastCheck = intval(Puc_v4p10_Utils::get($state, 'lastCheck', 0)); + $this->checkedVersion = Puc_v4p10_Utils::get($state, 'checkedVersion', ''); $this->update = null; if ( isset($state->update) ) { diff --git a/vendor/yahnis-elsts/plugin-update-checker/Puc/v4p9/Theme/Package.php b/vendor/yahnis-elsts/plugin-update-checker/Puc/v4p10/Theme/Package.php similarity index 92% rename from vendor/yahnis-elsts/plugin-update-checker/Puc/v4p9/Theme/Package.php rename to vendor/yahnis-elsts/plugin-update-checker/Puc/v4p10/Theme/Package.php index 4766c5c..5d9243b 100644 --- a/vendor/yahnis-elsts/plugin-update-checker/Puc/v4p9/Theme/Package.php +++ b/vendor/yahnis-elsts/plugin-update-checker/Puc/v4p10/Theme/Package.php @@ -1,7 +1,7 @@ requestMetadata('Puc_v4p9_Theme_Update', 'request_update'); + list($themeUpdate, $result) = $this->requestMetadata('Puc_v4p10_Theme_Update', 'request_update'); if ( $themeUpdate !== null ) { - /** @var Puc_v4p9_Theme_Update $themeUpdate */ + /** @var Puc_v4p10_Theme_Update $themeUpdate */ $themeUpdate->slug = $this->slug; } @@ -53,6 +53,16 @@ public function requestUpdate() { return $themeUpdate; } + protected function getNoUpdateItemFields() { + return array_merge( + parent::getNoUpdateItemFields(), + array( + 'theme' => $this->directoryName, + 'requires' => '', + ) + ); + } + public function userCanInstallUpdates() { return current_user_can('update_themes'); } @@ -61,10 +71,10 @@ public function userCanInstallUpdates() { * Create an instance of the scheduler. * * @param int $checkPeriod - * @return Puc_v4p9_Scheduler + * @return Puc_v4p10_Scheduler */ protected function createScheduler($checkPeriod) { - return new Puc_v4p9_Scheduler($this, $checkPeriod, array('load-themes.php')); + return new Puc_v4p10_Scheduler($this, $checkPeriod, array('load-themes.php')); } /** @@ -78,7 +88,7 @@ public function isBeingUpgraded($upgrader = null) { } protected function createDebugBarExtension() { - return new Puc_v4p9_DebugBar_Extension($this, 'Puc_v4p9_DebugBar_ThemePanel'); + return new Puc_v4p10_DebugBar_Extension($this, 'Puc_v4p10_DebugBar_ThemePanel'); } /** @@ -132,10 +142,10 @@ public function addResultFilter($callback) { /** * Create a package instance that represents this plugin or theme. * - * @return Puc_v4p9_InstalledPackage + * @return Puc_v4p10_InstalledPackage */ protected function createInstalledPackage() { - return new Puc_v4p9_Theme_Package($this->stylesheet, $this); + return new Puc_v4p10_Theme_Package($this->stylesheet, $this); } } diff --git a/vendor/yahnis-elsts/plugin-update-checker/Puc/v4p9/Update.php b/vendor/yahnis-elsts/plugin-update-checker/Puc/v4p10/Update.php similarity index 84% rename from vendor/yahnis-elsts/plugin-update-checker/Puc/v4p9/Update.php rename to vendor/yahnis-elsts/plugin-update-checker/Puc/v4p10/Update.php index 3db3d60..b36b18b 100644 --- a/vendor/yahnis-elsts/plugin-update-checker/Puc/v4p9/Update.php +++ b/vendor/yahnis-elsts/plugin-update-checker/Puc/v4p10/Update.php @@ -1,5 +1,5 @@ debugMode = (bool)(constant('WP_DEBUG')); $this->metadataUrl = $metadataUrl; @@ -79,8 +89,8 @@ public function __construct($metadataUrl, $directoryName, $slug = null, $checkPe $this->package = $this->createInstalledPackage(); $this->scheduler = $this->createScheduler($checkPeriod); - $this->upgraderStatus = new Puc_v4p9_UpgraderStatus(); - $this->updateState = new Puc_v4p9_StateStore($this->optionName); + $this->upgraderStatus = new Puc_v4p10_UpgraderStatus(); + $this->updateState = new Puc_v4p10_StateStore($this->optionName); if ( did_action('init') ) { $this->loadTextDomain(); @@ -146,7 +156,7 @@ protected function installHooks() { /** * Remove hooks that were added by this update checker instance. */ - protected function removeHooks() { + public function removeHooks() { remove_filter('site_transient_' . $this->updateTransient, array($this,'injectUpdate')); remove_filter('site_transient_' . $this->updateTransient, array($this, 'injectTranslationUpdates')); remove_action( @@ -159,6 +169,14 @@ protected function removeHooks() { remove_action('plugins_loaded', array($this, 'maybeInitDebugBar')); remove_action('init', array($this, 'loadTextDomain')); + + if ( $this->scheduler ) { + $this->scheduler->removeHooks(); + } + + if ( $this->debugBarExtension ) { + $this->debugBarExtension->removeHooks(); + } } /** @@ -187,12 +205,11 @@ abstract public function userCanInstallUpdates(); * @return bool */ public function allowMetadataHost($allow, $host) { - static $metadataHost = 0; //Using 0 instead of NULL because parse_url can return NULL. - if ( $metadataHost === 0 ) { - $metadataHost = parse_url($this->metadataUrl, PHP_URL_HOST); + if ( $this->cachedMetadataHost === 0 ) { + $this->cachedMetadataHost = parse_url($this->metadataUrl, PHP_URL_HOST); } - if ( is_string($metadataHost) && (strtolower($host) === strtolower($metadataHost)) ) { + if ( is_string($this->cachedMetadataHost) && (strtolower($host) === strtolower($this->cachedMetadataHost)) ) { return true; } return $allow; @@ -201,12 +218,12 @@ public function allowMetadataHost($allow, $host) { /** * Create a package instance that represents this plugin or theme. * - * @return Puc_v4p9_InstalledPackage + * @return Puc_v4p10_InstalledPackage */ abstract protected function createInstalledPackage(); /** - * @return Puc_v4p9_InstalledPackage + * @return Puc_v4p10_InstalledPackage */ public function getInstalledPackage() { return $this->package; @@ -219,14 +236,14 @@ public function getInstalledPackage() { * and substitute their own scheduler. * * @param int $checkPeriod - * @return Puc_v4p9_Scheduler + * @return Puc_v4p10_Scheduler */ abstract protected function createScheduler($checkPeriod); /** * Check for updates. The results are stored in the DB option specified in $optionName. * - * @return Puc_v4p9_Update|null + * @return Puc_v4p10_Update|null */ public function checkForUpdates() { $installedVersion = $this->getInstalledVersion(); @@ -260,7 +277,7 @@ public function checkForUpdates() { /** * Load the update checker state from the DB. * - * @return Puc_v4p9_StateStore + * @return Puc_v4p10_StateStore */ public function getUpdateState() { return $this->updateState->lazyLoad(); @@ -285,7 +302,7 @@ public function resetUpdateState() { * Uses cached update data. To retrieve update information straight from * the metadata URL, call requestUpdate() instead. * - * @return Puc_v4p9_Update|null + * @return Puc_v4p10_Update|null */ public function getUpdate() { $update = $this->updateState->getUpdate(); @@ -306,16 +323,16 @@ public function getUpdate() { * * Subclasses should run the update through filterUpdateResult before returning it. * - * @return Puc_v4p9_Update An instance of Update, or NULL when no updates are available. + * @return Puc_v4p10_Update An instance of Update, or NULL when no updates are available. */ abstract public function requestUpdate(); /** * Filter the result of a requestUpdate() call. * - * @param Puc_v4p9_Update|null $update + * @param Puc_v4p10_Update|null $update * @param array|WP_Error|null $httpResult The value returned by wp_remote_get(), if any. - * @return Puc_v4p9_Update + * @return Puc_v4p10_Update */ protected function filterUpdateResult($update, $httpResult = null) { //Let plugins/themes modify the update. @@ -338,9 +355,9 @@ protected function filterUpdateResult($update, $httpResult = null) { * "Compatibility: Unknown". * The function mimics how wordpress.org API crafts the "tested" field out of "Tested up to". * - * @param Puc_v4p9_Metadata|null $update + * @param Puc_v4p10_Metadata|null $update */ - protected function fixSupportedWordpressVersion(Puc_v4p9_Metadata $update = null) { + protected function fixSupportedWordpressVersion(Puc_v4p10_Metadata $update = null) { if ( !isset($update->tested) || !preg_match('/^\d++\.\d++$/', $update->tested) ) { return; } @@ -349,26 +366,39 @@ protected function fixSupportedWordpressVersion(Puc_v4p9_Metadata $update = null $wpVersion = $GLOBALS['wp_version']; - if ( function_exists('get_preferred_from_update_core') ) { - $coreUpdate = get_preferred_from_update_core(); - if ( isset($coreUpdate->current) && version_compare($coreUpdate->current, $wpVersion, '>') ) { - $actualWpVersions[] = $coreUpdate->current; + if ( function_exists('get_core_updates') ) { + $coreUpdates = get_core_updates(); + if ( is_array($coreUpdates) ) { + foreach ($coreUpdates as $coreUpdate) { + if ( isset($coreUpdate->current) ) { + $actualWpVersions[] = $coreUpdate->current; + } + } } } $actualWpVersions[] = $wpVersion; - $actualWpPatchNumber = "999"; + $actualWpPatchNumber = null; foreach ($actualWpVersions as $version) { - if ( preg_match('/^(?P\d++\.\d++)\.(?P\d++)/', $version, $versionParts) ) { + if ( preg_match('/^(?P\d++\.\d++)(?:\.(?P\d++))?/', $version, $versionParts) ) { if ( $versionParts['majorMinor'] === $update->tested ) { - $actualWpPatchNumber = $versionParts['patch']; - break; + $patch = isset($versionParts['patch']) ? intval($versionParts['patch']) : 0; + if ( $actualWpPatchNumber === null ) { + $actualWpPatchNumber = $patch; + } else { + $actualWpPatchNumber = max($actualWpPatchNumber, $patch); + } } } } + if ( $actualWpPatchNumber === null ) { + $actualWpPatchNumber = 999; + } - $update->tested .= '.' . $actualWpPatchNumber; + if ( $actualWpPatchNumber > 0 ) { + $update->tested .= '.' . $actualWpPatchNumber; + } } /** @@ -503,6 +533,10 @@ public function injectUpdate($updates) { } else { //Clean up any stale update info. $updates = $this->removeUpdateFromList($updates); + //Add a placeholder item to the "no_update" list to enable auto-update support. + //If we don't do this, the option to enable automatic updates will only show up + //when an update is available. + $updates = $this->addNoUpdateItem($updates); } return $updates; @@ -534,6 +568,40 @@ protected function removeUpdateFromList($updates) { return $updates; } + /** + * See this post for more information: + * @link https://make.wordpress.org/core/2020/07/30/recommended-usage-of-the-updates-api-to-support-the-auto-updates-ui-for-plugins-and-themes-in-wordpress-5-5/ + * + * @param stdClass|null $updates + * @return stdClass + */ + protected function addNoUpdateItem($updates) { + if ( !is_object($updates) ) { + $updates = new stdClass(); + $updates->response = array(); + $updates->no_update = array(); + } else if ( !isset($updates->no_update) ) { + $updates->no_update = array(); + } + + $updates->no_update[$this->getUpdateListKey()] = (object) $this->getNoUpdateItemFields(); + + return $updates; + } + + /** + * Subclasses should override this method to add fields that are specific to plugins or themes. + * @return array + */ + protected function getNoUpdateItemFields() { + return array( + 'new_version' => $this->getInstalledVersion(), + 'url' => '', + 'package' => '', + 'requires_php' => '', + ); + } + /** * Get the key that will be used when adding updates to the update list that's maintained * by the WordPress core. The list is always an associative array, but the key is different @@ -570,7 +638,7 @@ protected function shouldShowUpdates() { * @param string $metaClass Parse the JSON as an instance of this class. It must have a static fromJson method. * @param string $filterRoot * @param array $queryArgs Additional query arguments. - * @return array [Puc_v4p9_Metadata|null, array|WP_Error] A metadata instance and the value returned by wp_remote_get(). + * @return array [Puc_v4p10_Metadata|null, array|WP_Error] A metadata instance and the value returned by wp_remote_get(). */ protected function requestMetadata($metaClass, $filterRoot, $queryArgs = array()) { //Query args to append to the URL. Plugins can add their own by using a filter callback (see addQueryArgFilter()). @@ -904,18 +972,18 @@ protected function isBadDirectoryStructure($remoteSource) { */ public function maybeInitDebugBar() { if ( class_exists('Debug_Bar', false) && file_exists(dirname(__FILE__) . '/DebugBar') ) { - $this->createDebugBarExtension(); + $this->debugBarExtension = $this->createDebugBarExtension(); } } protected function createDebugBarExtension() { - return new Puc_v4p9_DebugBar_Extension($this); + return new Puc_v4p10_DebugBar_Extension($this); } /** * Display additional configuration details in the Debug Bar panel. * - * @param Puc_v4p9_DebugBar_Panel $panel + * @param Puc_v4p10_DebugBar_Panel $panel */ public function onDisplayConfiguration($panel) { //Do nothing. Subclasses can use this to add additional info to the panel. diff --git a/vendor/yahnis-elsts/plugin-update-checker/Puc/v4p9/UpgraderStatus.php b/vendor/yahnis-elsts/plugin-update-checker/Puc/v4p10/UpgraderStatus.php similarity index 98% rename from vendor/yahnis-elsts/plugin-update-checker/Puc/v4p9/UpgraderStatus.php rename to vendor/yahnis-elsts/plugin-update-checker/Puc/v4p10/UpgraderStatus.php index 2918fa1..2c2a625 100644 --- a/vendor/yahnis-elsts/plugin-update-checker/Puc/v4p9/UpgraderStatus.php +++ b/vendor/yahnis-elsts/plugin-update-checker/Puc/v4p10/UpgraderStatus.php @@ -1,5 +1,5 @@ $branch->name, 'updated' => $branch->target->date, 'downloadUrl' => $this->getDownloadUrl($branch->name), @@ -70,7 +70,7 @@ public function getBranch($branchName) { * Get a specific tag. * * @param string $tagName - * @return Puc_v4p9_Vcs_Reference|null + * @return Puc_v4p10_Vcs_Reference|null */ public function getTag($tagName) { $tag = $this->api('/refs/tags/' . $tagName); @@ -78,7 +78,7 @@ public function getTag($tagName) { return null; } - return new Puc_v4p9_Vcs_Reference(array( + return new Puc_v4p10_Vcs_Reference(array( 'name' => $tag->name, 'version' => ltrim($tag->name, 'v'), 'updated' => $tag->target->date, @@ -89,7 +89,7 @@ public function getTag($tagName) { /** * Get the tag that looks like the highest version number. * - * @return Puc_v4p9_Vcs_Reference|null + * @return Puc_v4p10_Vcs_Reference|null */ public function getLatestTag() { $tags = $this->api('/refs/tags?sort=-target.date'); @@ -103,7 +103,7 @@ public function getLatestTag() { //Return the first result. if ( !empty($versionTags) ) { $tag = $versionTags[0]; - return new Puc_v4p9_Vcs_Reference(array( + return new Puc_v4p10_Vcs_Reference(array( 'name' => $tag->name, 'version' => ltrim($tag->name, 'v'), 'updated' => $tag->target->date, @@ -117,7 +117,7 @@ public function getLatestTag() { * Get the tag/ref specified by the "Stable tag" header in the readme.txt of a given branch. * * @param string $branch - * @return null|Puc_v4p9_Vcs_Reference + * @return null|Puc_v4p10_Vcs_Reference */ protected function getStableTag($branch) { $remoteReadme = $this->getRemoteReadme($branch); @@ -187,7 +187,7 @@ public function getLatestCommitTime($ref) { */ public function api($url, $version = '2.0') { $url = ltrim($url, '/'); - $isSrcResource = Puc_v4p9_Utils::startsWith($url, 'src/'); + $isSrcResource = Puc_v4p10_Utils::startsWith($url, 'src/'); $url = implode('/', array( 'https://api.bitbucket.org', @@ -242,7 +242,7 @@ public function setAuthentication($credentials) { parent::setAuthentication($credentials); if ( !empty($credentials) && !empty($credentials['consumer_key']) ) { - $this->oauth = new Puc_v4p9_OAuthSignature( + $this->oauth = new Puc_v4p10_OAuthSignature( $credentials['consumer_key'], $credentials['consumer_secret'] ); diff --git a/vendor/yahnis-elsts/plugin-update-checker/Puc/v4p9/Vcs/GitHubApi.php b/vendor/yahnis-elsts/plugin-update-checker/Puc/v4p10/Vcs/GitHubApi.php similarity index 96% rename from vendor/yahnis-elsts/plugin-update-checker/Puc/v4p9/Vcs/GitHubApi.php rename to vendor/yahnis-elsts/plugin-update-checker/Puc/v4p10/Vcs/GitHubApi.php index 0187a66..ada0d13 100644 --- a/vendor/yahnis-elsts/plugin-update-checker/Puc/v4p9/Vcs/GitHubApi.php +++ b/vendor/yahnis-elsts/plugin-update-checker/Puc/v4p10/Vcs/GitHubApi.php @@ -1,8 +1,8 @@ api('/repos/:user/:repo/releases/latest'); @@ -65,7 +65,7 @@ public function getLatestRelease() { return null; } - $reference = new Puc_v4p9_Vcs_Reference(array( + $reference = new Puc_v4p10_Vcs_Reference(array( 'name' => $release->tag_name, 'version' => ltrim($release->tag_name, 'v'), //Remove the "v" prefix from "v1.2.3". 'downloadUrl' => $release->zipball_url, @@ -109,7 +109,7 @@ public function getLatestRelease() { /** * Get the tag that looks like the highest version number. * - * @return Puc_v4p9_Vcs_Reference|null + * @return Puc_v4p10_Vcs_Reference|null */ public function getLatestTag() { $tags = $this->api('/repos/:user/:repo/tags'); @@ -124,7 +124,7 @@ public function getLatestTag() { } $tag = $versionTags[0]; - return new Puc_v4p9_Vcs_Reference(array( + return new Puc_v4p10_Vcs_Reference(array( 'name' => $tag->name, 'version' => ltrim($tag->name, 'v'), 'downloadUrl' => $tag->zipball_url, @@ -136,7 +136,7 @@ public function getLatestTag() { * Get a branch by name. * * @param string $branchName - * @return null|Puc_v4p9_Vcs_Reference + * @return null|Puc_v4p10_Vcs_Reference */ public function getBranch($branchName) { $branch = $this->api('/repos/:user/:repo/branches/' . $branchName); @@ -144,7 +144,7 @@ public function getBranch($branchName) { return null; } - $reference = new Puc_v4p9_Vcs_Reference(array( + $reference = new Puc_v4p10_Vcs_Reference(array( 'name' => $branch->name, 'downloadUrl' => $this->buildArchiveDownloadUrl($branch->name), 'apiResponse' => $branch, @@ -314,7 +314,7 @@ public function setAuthentication($credentials) { * Figure out which reference (i.e tag or branch) contains the latest version. * * @param string $configBranch Start looking in this branch. - * @return null|Puc_v4p9_Vcs_Reference + * @return null|Puc_v4p10_Vcs_Reference */ public function chooseReference($configBranch) { $updateSource = null; diff --git a/vendor/yahnis-elsts/plugin-update-checker/Puc/v4p9/Vcs/GitLabApi.php b/vendor/yahnis-elsts/plugin-update-checker/Puc/v4p10/Vcs/GitLabApi.php similarity index 95% rename from vendor/yahnis-elsts/plugin-update-checker/Puc/v4p9/Vcs/GitLabApi.php rename to vendor/yahnis-elsts/plugin-update-checker/Puc/v4p10/Vcs/GitLabApi.php index 30bbd13..a1a313c 100644 --- a/vendor/yahnis-elsts/plugin-update-checker/Puc/v4p9/Vcs/GitLabApi.php +++ b/vendor/yahnis-elsts/plugin-update-checker/Puc/v4p10/Vcs/GitLabApi.php @@ -1,8 +1,8 @@ getLatestTag(); @@ -100,7 +100,7 @@ public function getLatestRelease() { /** * Get the tag that looks like the highest version number. * - * @return Puc_v4p9_Vcs_Reference|null + * @return Puc_v4p10_Vcs_Reference|null */ public function getLatestTag() { $tags = $this->api('/:id/repository/tags'); @@ -114,7 +114,7 @@ public function getLatestTag() { } $tag = $versionTags[0]; - return new Puc_v4p9_Vcs_Reference(array( + return new Puc_v4p10_Vcs_Reference(array( 'name' => $tag->name, 'version' => ltrim($tag->name, 'v'), 'downloadUrl' => $this->buildArchiveDownloadUrl($tag->name), @@ -126,7 +126,7 @@ public function getLatestTag() { * Get a branch by name. * * @param string $branchName - * @return null|Puc_v4p9_Vcs_Reference + * @return null|Puc_v4p10_Vcs_Reference */ public function getBranch($branchName) { $branch = $this->api('/:id/repository/branches/' . $branchName); @@ -134,7 +134,7 @@ public function getBranch($branchName) { return null; } - $reference = new Puc_v4p9_Vcs_Reference(array( + $reference = new Puc_v4p10_Vcs_Reference(array( 'name' => $branch->name, 'downloadUrl' => $this->buildArchiveDownloadUrl($branch->name), 'apiResponse' => $branch, @@ -283,7 +283,7 @@ public function getTag($tagName) { * Figure out which reference (i.e tag or branch) contains the latest version. * * @param string $configBranch Start looking in this branch. - * @return null|Puc_v4p9_Vcs_Reference + * @return null|Puc_v4p10_Vcs_Reference */ public function chooseReference($configBranch) { $updateSource = null; diff --git a/vendor/yahnis-elsts/plugin-update-checker/Puc/v4p9/Vcs/PluginUpdateChecker.php b/vendor/yahnis-elsts/plugin-update-checker/Puc/v4p10/Vcs/PluginUpdateChecker.php similarity index 91% rename from vendor/yahnis-elsts/plugin-update-checker/Puc/v4p9/Vcs/PluginUpdateChecker.php rename to vendor/yahnis-elsts/plugin-update-checker/Puc/v4p10/Vcs/PluginUpdateChecker.php index fab268f..aba4b32 100644 --- a/vendor/yahnis-elsts/plugin-update-checker/Puc/v4p9/Vcs/PluginUpdateChecker.php +++ b/vendor/yahnis-elsts/plugin-update-checker/Puc/v4p10/Vcs/PluginUpdateChecker.php @@ -1,21 +1,21 @@ api; $api->setLocalDirectory($this->package->getAbsoluteDirectoryPath()); - $info = new Puc_v4p9_Plugin_Info(); + $info = new Puc_v4p10_Plugin_Info(); $info->filename = $this->pluginFile; $info->slug = $this->slug; @@ -124,7 +124,7 @@ protected function readmeTxtExistsLocally() { * Copy plugin metadata from a file header to a Plugin Info object. * * @param array $fileHeader - * @param Puc_v4p9_Plugin_Info $pluginInfo + * @param Puc_v4p10_Plugin_Info $pluginInfo */ protected function setInfoFromHeader($fileHeader, $pluginInfo) { $headerToPropertyMap = array( @@ -139,6 +139,8 @@ protected function setInfoFromHeader($fileHeader, $pluginInfo) { 'Tested WP' => 'tested', 'Requires at least' => 'requires', 'Tested up to' => 'tested', + + 'Requires PHP' => 'requires_php', ); foreach ($headerToPropertyMap as $headerName => $property) { if ( isset($fileHeader[$headerName]) && !empty($fileHeader[$headerName]) ) { @@ -155,7 +157,7 @@ protected function setInfoFromHeader($fileHeader, $pluginInfo) { * Copy plugin metadata from the remote readme.txt file. * * @param string $ref GitHub tag or branch where to look for the readme. - * @param Puc_v4p9_Plugin_Info $pluginInfo + * @param Puc_v4p10_Plugin_Info $pluginInfo */ protected function setInfoFromRemoteReadme($ref, $pluginInfo) { $readme = $this->api->getRemoteReadme($ref); @@ -172,6 +174,9 @@ protected function setInfoFromRemoteReadme($ref, $pluginInfo) { if ( !empty($readme['requires_at_least']) ) { $pluginInfo->requires = $readme['requires_at_least']; } + if ( !empty($readme['requires_php']) ) { + $pluginInfo->requires_php = $readme['requires_php']; + } if ( isset($readme['upgrade_notice'], $readme['upgrade_notice'][$pluginInfo->version]) ) { $pluginInfo->upgrade_notice = $readme['upgrade_notice'][$pluginInfo->version]; diff --git a/vendor/yahnis-elsts/plugin-update-checker/Puc/v4p9/Vcs/Reference.php b/vendor/yahnis-elsts/plugin-update-checker/Puc/v4p10/Vcs/Reference.php similarity index 91% rename from vendor/yahnis-elsts/plugin-update-checker/Puc/v4p9/Vcs/Reference.php rename to vendor/yahnis-elsts/plugin-update-checker/Puc/v4p10/Vcs/Reference.php index b9b30c1..85250cd 100644 --- a/vendor/yahnis-elsts/plugin-update-checker/Puc/v4p9/Vcs/Reference.php +++ b/vendor/yahnis-elsts/plugin-update-checker/Puc/v4p10/Vcs/Reference.php @@ -1,5 +1,5 @@ api; $api->setLocalDirectory($this->package->getAbsoluteDirectoryPath()); - $update = new Puc_v4p9_Theme_Update(); + $update = new Puc_v4p10_Theme_Update(); $update->slug = $this->slug; //Figure out which reference (tag or branch) we'll use to get the latest version of the theme. @@ -60,13 +60,13 @@ public function requestUpdate() { //Get headers from the main stylesheet in this branch/tag. Its "Version" header and other metadata //are what the WordPress install will actually see after upgrading, so they take precedence over releases/tags. $remoteHeader = $this->package->getFileHeader($api->getRemoteFile('style.css', $ref)); - $update->version = Puc_v4p9_Utils::findNotEmpty(array( + $update->version = Puc_v4p10_Utils::findNotEmpty(array( $remoteHeader['Version'], - Puc_v4p9_Utils::get($updateSource, 'version'), + Puc_v4p10_Utils::get($updateSource, 'version'), )); //The details URL defaults to the Theme URI header or the repository URL. - $update->details_url = Puc_v4p9_Utils::findNotEmpty(array( + $update->details_url = Puc_v4p10_Utils::findNotEmpty(array( $remoteHeader['ThemeURI'], $this->package->getHeaderValue('ThemeURI'), $this->metadataUrl, diff --git a/vendor/yahnis-elsts/plugin-update-checker/README.md b/vendor/yahnis-elsts/plugin-update-checker/README.md index d2f8280..ddb9fb5 100644 --- a/vendor/yahnis-elsts/plugin-update-checker/README.md +++ b/vendor/yahnis-elsts/plugin-update-checker/README.md @@ -28,6 +28,8 @@ From the users' perspective, it works just like with plugins and themes hosted o Getting Started --------------- +*Note:* In each of the below examples, part of the instructions are to create an instance of the update checker class. It's recommended to do this either during the `plugins_loaded` action or outside of any hooks. If you do it only during an `admin_*` action, then updates will not be visible to a wide variety of WordPress maanagement tools; they will only be visible to logged-in users on dashboard pages. + ### Self-hosted Plugins and Themes 1. Download [the latest release](https://github.com/YahnisElsts/plugin-update-checker/releases/latest) and copy the `plugin-update-checker` directory to your plugin or theme. @@ -244,8 +246,8 @@ BitBucket doesn't have an equivalent to GitHub's releases, so the process is sli Alternatively, if you're using a self-hosted GitLab instance, initialize the update checker like this: ```php - $myUpdateChecker = new Puc_v4p9_Vcs_PluginUpdateChecker( - new Puc_v4p9_Vcs_GitLabApi('https://myserver.com/user-name/repo-name/'), + $myUpdateChecker = new Puc_v4p10_Vcs_PluginUpdateChecker( + new Puc_v4p10_Vcs_GitLabApi('https://myserver.com/user-name/repo-name/'), __FILE__, 'unique-plugin-or-theme-slug' ); @@ -253,8 +255,8 @@ BitBucket doesn't have an equivalent to GitHub's releases, so the process is sli ``` If you're using a self-hosted GitLab instance and [subgroups or nested groups](https://docs.gitlab.com/ce/user/group/subgroups/index.html), you have to tell the update checker which parts of the URL are subgroups: ```php - $myUpdateChecker = new Puc_v4p9_Vcs_PluginUpdateChecker( - new Puc_v4p9_Vcs_GitLabApi('https://myserver.com/group-name/subgroup-level1/subgroup-level2/subgroup-level3/repo-name/', null, 'subgroup-level1/subgroup-level2/subgroup-level3'), + $myUpdateChecker = new Puc_v4p10_Vcs_PluginUpdateChecker( + new Puc_v4p10_Vcs_GitLabApi('https://myserver.com/group-name/subgroup-level1/subgroup-level2/subgroup-level3/repo-name/', null, 'subgroup-level1/subgroup-level2/subgroup-level3'), __FILE__, 'unique-plugin-or-theme-slug' ); diff --git a/vendor/yahnis-elsts/plugin-update-checker/composer.json b/vendor/yahnis-elsts/plugin-update-checker/composer.json index 4379eeb..db487f3 100644 --- a/vendor/yahnis-elsts/plugin-update-checker/composer.json +++ b/vendor/yahnis-elsts/plugin-update-checker/composer.json @@ -18,6 +18,6 @@ "ext-json": "*" }, "autoload": { - "files": ["load-v4p9.php"] + "files": ["load-v4p10.php"] } } diff --git a/vendor/yahnis-elsts/plugin-update-checker/languages/plugin-update-checker-es_AR.mo b/vendor/yahnis-elsts/plugin-update-checker/languages/plugin-update-checker-es_AR.mo new file mode 100644 index 0000000000000000000000000000000000000000..85afecd344184a07c3ff0117b87066af6850078c GIT binary patch literal 1140 zcmZ`&O>Yx15H(Oh3I{~bNDP%KQ3)?e3R1OE4ke_hqJ@a2sJF=7ohGImJF>lL%WvR@ z;Ep(Q1ys0DpicaPyK7ZSW>og5QBZ06zf2e&>o1OW-4L1N;eG2mc1Ig6HRixC8Ej;WAm5 z@x*6=BXMR7dj`aHQ;2Q_N=3Pl&Zj9bO-F1v?pUJ87R}|%=Sr*mCn>|#*x@I z`^FxasRL{ffgSmvLhfl{(JzQFU>aq4UmFTKWIVS@h7V}W&TDJP?onZ}=ueH1Z6?75 z@0QK86nX-s9M}!Dfxx{}#iXG3%zaYJqK__WKwOn%Py;7OqI>` z&GvchT2!sHtO;y_>>iB}CGcT*Fv^rRjiT?)b7*dN*W}8%om0l|v6F3+*i@T-Oe?!O zRCeT3HtbZeE~bv_PzGjOdeJ)8FV03Rw1?`T6Q>cc2{A%G!4`dsU+ko({EIQ{$pC7+sScm$Z;R} z9eyZNqK3QLdP=n)S)(Uo+s1&V#n+6IY19;B59^tjCtnOsd}57FG^~$5FZ$!}72lxoiWYRWOg{3oR?75F~?_B?$o%tZJZUT3KE^rHY2NdfYa0mDf z5bz6_1O5U{;Pw?E+Taba1iuG=1bza9{q{8>7Qjc~2KY0$4*mmP0ng3|aSz-D!)3g# z;)%}!N8S2|NW8AoEv z>=}DtCJwMc1a{7<-l&J4Fv9_j(zvU@Z_l)#7K(I`{eG>X1E&!M^1U6sq{c1{_;%TBgUVpDDUF)i=t zP}!Ex*sxQ(_-UOutnL`j2USVaLb0A;*2> zcle=9i5l)`>nYWKWQ`t=Z5soc7GE<;CQ(z2J*=l2lxoiWYRWOg{3oR?75F~?_B?$o%tZJZUT3KE^rHY2NdfYa0mDf z5bz6_1O5U{;Pw?E+Taba1iuG=1bza9{q{8>7Qjc~2KY0$4*mmP0ng3|aSz-D!)3g# z;)%}!N8S2|NW8AoEv z>=}DtCJwMc1a{7<-l&J4Fv9_j(zvU@Z_l)#7K(I`{eG>X1E&!M^1U6sq{c1{_;%TBgUVpDDUF)i=t zP}!Ex*sxQ(_-UOutnL`j2USVaLb0A;*2> zcle=9i5l)`>nYWKWQ`t=Z5soc7GE<;CQ(z2J*=l2lxoiWYRWOg{3oR?75F~?_B?$o%tZJZUT3KE^rHY2NdfYa0mDf z5bz6_1O5U{;Pw?E+Taba1iuG=1bza9{q{8>7Qjc~2KY0$4*mmP0ng3|aSz-D!)3g# z;)%}!N8S2|NW8AoEv z>=}DtCJwMc1a{7<-l&J4Fv9_j(zvU@Z_l)#7K(I`{eG>X1E&!M^1U6sq{c1{_;%TBgUVpDDUF)i=t zP}!Ex*sxQ(_-UOutnL`j2USVaLb0A;*2> zcle=9i5l)`>nYWKWQ`t=Z5soc7GE<;CQ(z2J*=l2lxoiWYRWOg{3oR?75F~?_B?$o%tZJZUT3KE^rHY2NdfYa0mDf z5bz6_1O5U{;Pw?E+Taba1iuG=1bza9{q{8>7Qjc~2KY0$4*mmP0ng3|aSz-D!)3g# z;)%}!N8S2|NW8AoEv z>=}DtCJwMc1a{7<-l&J4Fv9_j(zvU@Z_l)#7K(I`{eG>X1E&!M^1U6sq{c1{_;%TBgUVpDDUF)i=t zP}!Ex*sxQ(_-UOutnL`j2USVaLb0A;*2> zcle=9i5l)`>nYWKWQ`t=Z5soc7GE<;CQ(z2J*=ll2j`NBLgD?T?1oXBSQs46Dw0QT?3QJmQ2l)_c6U?D$Sd` TiaCt!&}!Ak%@w#xs`#Dwt0at*(Zcu7jW-*F7 pOI-s?T_aNkLklZIbD+A(0!+=5Co;XC+{_%xqNG}^H2EI$Gyq9kB^Uqz diff --git a/vendor/yahnis-elsts/plugin-update-checker/languages/plugin-update-checker-es_ES.po b/vendor/yahnis-elsts/plugin-update-checker/languages/plugin-update-checker-es_ES.po index 0aea312..c404f91 100644 --- a/vendor/yahnis-elsts/plugin-update-checker/languages/plugin-update-checker-es_ES.po +++ b/vendor/yahnis-elsts/plugin-update-checker/languages/plugin-update-checker-es_ES.po @@ -2,12 +2,12 @@ msgid "" msgstr "" "Project-Id-Version: plugin-update-checker\n" "POT-Creation-Date: 2017-11-24 17:02+0200\n" -"PO-Revision-Date: 2019-09-25 18:17+0200\n" +"PO-Revision-Date: 2020-03-21 14:56-0400\n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 2.2.3\n" +"X-Generator: Poedit 2.3\n" "X-Poedit-Basepath: ..\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" "X-Poedit-SourceCharset: UTF-8\n" @@ -41,8 +41,8 @@ msgstr "No se pudo determinar si hay actualizaciones disponibles para %s." #: Puc/v4p3/Plugin/UpdateChecker.php:558 #, php-format msgid "Unknown update checker status \"%s\"" -msgstr "Estado del comprobador de actualización desconocido \"%s\"" +msgstr "Estado del comprobador de actualización desconocido «%s»" #: Puc/v4p3/Vcs/PluginUpdateChecker.php:95 msgid "There is no changelog available." -msgstr "No hay registro de cambios disponible." +msgstr "No hay un registro de cambios disponible." diff --git a/vendor/yahnis-elsts/plugin-update-checker/languages/plugin-update-checker-es_GT.mo b/vendor/yahnis-elsts/plugin-update-checker/languages/plugin-update-checker-es_GT.mo new file mode 100644 index 0000000000000000000000000000000000000000..de9c75268fa512015414f8f8314fae704bbe40ea GIT binary patch literal 1140 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 S^L4*gMRCpPJAUm|Fy=2vaBdI) literal 0 HcmV?d00001 diff --git a/vendor/yahnis-elsts/plugin-update-checker/languages/plugin-update-checker-zh_CN.po b/vendor/yahnis-elsts/plugin-update-checker/languages/plugin-update-checker-zh_CN.po new file mode 100644 index 0000000..005b4d0 --- /dev/null +++ b/vendor/yahnis-elsts/plugin-update-checker/languages/plugin-update-checker-zh_CN.po @@ -0,0 +1,48 @@ +msgid "" +msgstr "" +"Project-Id-Version: plugin-update-checker\n" +"POT-Creation-Date: 2017-11-24 17:02+0200\n" +"PO-Revision-Date: 2020-08-04 08:10+0800\n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 2.4\n" +"X-Poedit-Basepath: ..\n" +"Plural-Forms: nplurals=1; plural=0;\n" +"X-Poedit-SourceCharset: UTF-8\n" +"X-Poedit-KeywordsList: __;_e;_x:1,2c;_x\n" +"Last-Translator: Seaton Jiang \n" +"Language: zh_CN\n" +"X-Poedit-SearchPath-0: .\n" + +#: Puc/v4p3/Plugin/UpdateChecker.php:395 +msgid "Check for updates" +msgstr "检查更新" + +#: Puc/v4p3/Plugin/UpdateChecker.php:548 +#, php-format +msgctxt "the plugin title" +msgid "The %s plugin is up to date." +msgstr "%s 目前是最新版本。" + +#: Puc/v4p3/Plugin/UpdateChecker.php:550 +#, php-format +msgctxt "the plugin title" +msgid "A new version of the %s plugin is available." +msgstr "%s 当前有可用的更新。" + +#: Puc/v4p3/Plugin/UpdateChecker.php:552 +#, php-format +msgctxt "the plugin title" +msgid "Could not determine if updates are available for %s." +msgstr "%s 无法确定是否有可用的更新。" + +#: Puc/v4p3/Plugin/UpdateChecker.php:558 +#, php-format +msgid "Unknown update checker status \"%s\"" +msgstr "未知的更新检查状态:%s" + +#: Puc/v4p3/Vcs/PluginUpdateChecker.php:95 +msgid "There is no changelog available." +msgstr "没有可用的更新日志。" diff --git a/vendor/yahnis-elsts/plugin-update-checker/languages/plugin-update-checker.pot b/vendor/yahnis-elsts/plugin-update-checker/languages/plugin-update-checker.pot index 67f4f00..29d1f40 100644 --- a/vendor/yahnis-elsts/plugin-update-checker/languages/plugin-update-checker.pot +++ b/vendor/yahnis-elsts/plugin-update-checker/languages/plugin-update-checker.pot @@ -2,7 +2,7 @@ msgid "" msgstr "" "Project-Id-Version: plugin-update-checker\n" -"POT-Creation-Date: 2017-11-24 17:02+0200\n" +"POT-Creation-Date: 2020-08-08 14:36+0300\n" "PO-Revision-Date: 2016-01-10 20:59+0100\n" "Last-Translator: Tamás András Horváth \n" "Language-Team: \n" @@ -10,40 +10,40 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 2.0.4\n" +"X-Generator: Poedit 2.4\n" "X-Poedit-Basepath: ..\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" "X-Poedit-SourceCharset: UTF-8\n" "X-Poedit-KeywordsList: __;_e;_x:1,2c;_x\n" "X-Poedit-SearchPath-0: .\n" -#: Puc/v4p3/Plugin/UpdateChecker.php:395 +#: Puc/v4p10/Plugin/Ui.php:128 msgid "Check for updates" msgstr "" -#: Puc/v4p3/Plugin/UpdateChecker.php:548 +#: Puc/v4p10/Plugin/Ui.php:213 #, php-format msgctxt "the plugin title" msgid "The %s plugin is up to date." msgstr "" -#: Puc/v4p3/Plugin/UpdateChecker.php:550 +#: Puc/v4p10/Plugin/Ui.php:215 #, php-format msgctxt "the plugin title" msgid "A new version of the %s plugin is available." msgstr "" -#: Puc/v4p3/Plugin/UpdateChecker.php:552 +#: Puc/v4p10/Plugin/Ui.php:217 #, php-format msgctxt "the plugin title" msgid "Could not determine if updates are available for %s." msgstr "" -#: Puc/v4p3/Plugin/UpdateChecker.php:558 +#: Puc/v4p10/Plugin/Ui.php:223 #, php-format msgid "Unknown update checker status \"%s\"" msgstr "" -#: Puc/v4p3/Vcs/PluginUpdateChecker.php:95 +#: Puc/v4p10/Vcs/PluginUpdateChecker.php:98 msgid "There is no changelog available." msgstr "" diff --git a/vendor/yahnis-elsts/plugin-update-checker/load-v4p10.php b/vendor/yahnis-elsts/plugin-update-checker/load-v4p10.php new file mode 100644 index 0000000..5531938 --- /dev/null +++ b/vendor/yahnis-elsts/plugin-update-checker/load-v4p10.php @@ -0,0 +1,28 @@ + 'Puc_v4p10_Plugin_UpdateChecker', + 'Theme_UpdateChecker' => 'Puc_v4p10_Theme_UpdateChecker', + + 'Vcs_PluginUpdateChecker' => 'Puc_v4p10_Vcs_PluginUpdateChecker', + 'Vcs_ThemeUpdateChecker' => 'Puc_v4p10_Vcs_ThemeUpdateChecker', + + 'GitHubApi' => 'Puc_v4p10_Vcs_GitHubApi', + 'BitBucketApi' => 'Puc_v4p10_Vcs_BitBucketApi', + 'GitLabApi' => 'Puc_v4p10_Vcs_GitLabApi', + ) + as $pucGeneralClass => $pucVersionedClass +) { + Puc_v4_Factory::addVersion($pucGeneralClass, $pucVersionedClass, '4.10'); + //Also add it to the minor-version factory in case the major-version factory + //was already defined by another, older version of the update checker. + Puc_v4p10_Factory::addVersion($pucGeneralClass, $pucVersionedClass, '4.10'); +} + diff --git a/vendor/yahnis-elsts/plugin-update-checker/load-v4p9.php b/vendor/yahnis-elsts/plugin-update-checker/load-v4p9.php deleted file mode 100644 index f5634b5..0000000 --- a/vendor/yahnis-elsts/plugin-update-checker/load-v4p9.php +++ /dev/null @@ -1,28 +0,0 @@ - 'Puc_v4p9_Plugin_UpdateChecker', - 'Theme_UpdateChecker' => 'Puc_v4p9_Theme_UpdateChecker', - - 'Vcs_PluginUpdateChecker' => 'Puc_v4p9_Vcs_PluginUpdateChecker', - 'Vcs_ThemeUpdateChecker' => 'Puc_v4p9_Vcs_ThemeUpdateChecker', - - 'GitHubApi' => 'Puc_v4p9_Vcs_GitHubApi', - 'BitBucketApi' => 'Puc_v4p9_Vcs_BitBucketApi', - 'GitLabApi' => 'Puc_v4p9_Vcs_GitLabApi', - ) - as $pucGeneralClass => $pucVersionedClass -) { - Puc_v4_Factory::addVersion($pucGeneralClass, $pucVersionedClass, '4.9'); - //Also add it to the minor-version factory in case the major-version factory - //was already defined by another, older version of the update checker. - Puc_v4p9_Factory::addVersion($pucGeneralClass, $pucVersionedClass, '4.9'); -} - diff --git a/vendor/yahnis-elsts/plugin-update-checker/plugin-update-checker.php b/vendor/yahnis-elsts/plugin-update-checker/plugin-update-checker.php index 2abd4ec..5a03ddb 100644 --- a/vendor/yahnis-elsts/plugin-update-checker/plugin-update-checker.php +++ b/vendor/yahnis-elsts/plugin-update-checker/plugin-update-checker.php @@ -1,10 +1,10 @@ sanitize_text( $_requires_php[1] ); + } else { + $requires_php = null; + } // Stable tag: 10.4-ride-the-fire-eagle-danger-day if ( preg_match('|Stable tag:(.*)|i', $file_contents, $_stable_tag) ) @@ -196,6 +202,7 @@ function parse_readme_contents( $file_contents ) { 'tags' => $tags, 'requires_at_least' => $requires_at_least, 'tested_up_to' => $tested_up_to, + 'requires_php' => $requires_php, 'stable_tag' => $stable_tag, 'contributors' => $contributors, 'donate_link' => $donate_link,