From f981178cac0965d0ca87787db2b50b7300734e27 Mon Sep 17 00:00:00 2001
From: David Mondok <3883758+davidmondok@users.noreply.github.com>
Date: Wed, 15 Apr 2020 12:12:37 +0200
Subject: [PATCH] disable jquery auto updater
---
.idea/.gitignore | 2 +
.idea/composerJson.xml | 10 +
.idea/misc.xml | 6 +
.idea/modules.xml | 8 +
.idea/php.xml | 9 +
.idea/scripts-styles-loader.iml | 13 +
.idea/vcs.xml | 6 +
composer.json | 3 +-
composer.lock | 51 +-
includes/Loader.php | 10 +-
readme.txt | 5 +-
vendor/composer/autoload_files.php | 10 -
vendor/composer/autoload_real.php | 18 -
vendor/composer/autoload_static.php | 4 -
vendor/composer/installed.json | 51 +-
.../plugin-update-checker/.editorconfig | 15 -
.../plugin-update-checker/Puc/v4/Factory.php | 6 -
.../Puc/v4p9/Autoloader.php | 47 -
.../Puc/v4p9/DebugBar/Extension.php | 177 --
.../Puc/v4p9/DebugBar/Panel.php | 165 --
.../Puc/v4p9/DebugBar/PluginExtension.php | 33 -
.../Puc/v4p9/DebugBar/PluginPanel.php | 38 -
.../Puc/v4p9/DebugBar/ThemePanel.php | 21 -
.../Puc/v4p9/Factory.php | 297 ----
.../Puc/v4p9/InstalledPackage.php | 103 --
.../Puc/v4p9/Metadata.php | 132 --
.../Puc/v4p9/OAuthSignature.php | 100 --
.../Puc/v4p9/Plugin/Info.php | 130 --
.../Puc/v4p9/Plugin/Package.php | 184 --
.../Puc/v4p9/Plugin/Ui.php | 277 ---
.../Puc/v4p9/Plugin/Update.php | 110 --
.../Puc/v4p9/Plugin/UpdateChecker.php | 398 -----
.../Puc/v4p9/Scheduler.php | 238 ---
.../Puc/v4p9/StateStore.php | 207 ---
.../Puc/v4p9/Theme/Package.php | 65 -
.../Puc/v4p9/Theme/Update.php | 84 -
.../Puc/v4p9/Theme/UpdateChecker.php | 142 --
.../plugin-update-checker/Puc/v4p9/Update.php | 34 -
.../Puc/v4p9/UpdateChecker.php | 926 ----------
.../Puc/v4p9/UpgraderStatus.php | 199 ---
.../plugin-update-checker/Puc/v4p9/Utils.php | 69 -
.../Puc/v4p9/Vcs/Api.php | 302 ----
.../Puc/v4p9/Vcs/BaseChecker.php | 27 -
.../Puc/v4p9/Vcs/BitBucketApi.php | 265 ---
.../Puc/v4p9/Vcs/GitHubApi.php | 441 -----
.../Puc/v4p9/Vcs/GitLabApi.php | 309 ----
.../Puc/v4p9/Vcs/PluginUpdateChecker.php | 213 ---
.../Puc/v4p9/Vcs/Reference.php | 49 -
.../Puc/v4p9/Vcs/ThemeUpdateChecker.php | 118 --
.../plugin-update-checker/README.md | 299 ----
.../plugin-update-checker/composer.json | 23 -
.../css/puc-debug-bar.css | 70 -
.../examples/plugin.json | 52 -
.../plugin-update-checker/examples/theme.json | 5 -
.../plugin-update-checker/js/debug-bar.js | 52 -
.../languages/plugin-update-checker-ca.mo | Bin 1186 -> 0 bytes
.../languages/plugin-update-checker-ca.po | 48 -
.../languages/plugin-update-checker-cs_CZ.mo | Bin 1077 -> 0 bytes
.../languages/plugin-update-checker-cs_CZ.po | 45 -
.../languages/plugin-update-checker-da_DK.mo | Bin 1010 -> 0 bytes
.../languages/plugin-update-checker-da_DK.po | 42 -
.../languages/plugin-update-checker-de_DE.mo | Bin 980 -> 0 bytes
.../languages/plugin-update-checker-de_DE.po | 38 -
.../languages/plugin-update-checker-es_ES.mo | Bin 1178 -> 0 bytes
.../languages/plugin-update-checker-es_ES.po | 48 -
.../languages/plugin-update-checker-fa_IR.mo | Bin 1128 -> 0 bytes
.../languages/plugin-update-checker-fa_IR.po | 38 -
.../languages/plugin-update-checker-fr_CA.mo | Bin 1208 -> 0 bytes
.../languages/plugin-update-checker-fr_CA.po | 48 -
.../languages/plugin-update-checker-fr_FR.mo | Bin 1066 -> 0 bytes
.../languages/plugin-update-checker-fr_FR.po | 42 -
.../languages/plugin-update-checker-hu_HU.mo | Bin 982 -> 0 bytes
.../languages/plugin-update-checker-hu_HU.po | 41 -
.../languages/plugin-update-checker-it_IT.mo | Bin 989 -> 0 bytes
.../languages/plugin-update-checker-it_IT.po | 38 -
.../languages/plugin-update-checker-ja.mo | Bin 1454 -> 0 bytes
.../languages/plugin-update-checker-ja.po | 57 -
.../languages/plugin-update-checker-nl_BE.mo | Bin 1211 -> 0 bytes
.../languages/plugin-update-checker-nl_BE.po | 48 -
.../languages/plugin-update-checker-nl_NL.mo | Bin 1211 -> 0 bytes
.../languages/plugin-update-checker-nl_NL.po | 48 -
.../languages/plugin-update-checker-pt_BR.mo | Bin 1014 -> 0 bytes
.../languages/plugin-update-checker-pt_BR.po | 48 -
.../languages/plugin-update-checker-sl_SI.mo | Bin 1203 -> 0 bytes
.../languages/plugin-update-checker-sl_SI.po | 48 -
.../languages/plugin-update-checker-sv_SE.mo | Bin 1006 -> 0 bytes
.../languages/plugin-update-checker-sv_SE.po | 42 -
.../languages/plugin-update-checker.pot | 49 -
.../plugin-update-checker/license.txt | 7 -
.../plugin-update-checker/load-v4p9.php | 28 -
.../plugin-update-checker.php | 10 -
.../vendor/Parsedown.php | 9 -
.../vendor/ParsedownLegacy.php | 1535 ----------------
.../vendor/ParsedownModern.php | 1538 -----------------
.../vendor/PucReadmeParser.php | 341 ----
woda-scripts-styles-loader.php | 2 +-
96 files changed, 70 insertions(+), 10796 deletions(-)
create mode 100644 .idea/.gitignore
create mode 100644 .idea/composerJson.xml
create mode 100644 .idea/misc.xml
create mode 100644 .idea/modules.xml
create mode 100644 .idea/php.xml
create mode 100644 .idea/scripts-styles-loader.iml
create mode 100644 .idea/vcs.xml
delete mode 100644 vendor/composer/autoload_files.php
delete mode 100644 vendor/yahnis-elsts/plugin-update-checker/.editorconfig
delete mode 100644 vendor/yahnis-elsts/plugin-update-checker/Puc/v4/Factory.php
delete mode 100644 vendor/yahnis-elsts/plugin-update-checker/Puc/v4p9/Autoloader.php
delete mode 100644 vendor/yahnis-elsts/plugin-update-checker/Puc/v4p9/DebugBar/Extension.php
delete mode 100644 vendor/yahnis-elsts/plugin-update-checker/Puc/v4p9/DebugBar/Panel.php
delete mode 100644 vendor/yahnis-elsts/plugin-update-checker/Puc/v4p9/DebugBar/PluginExtension.php
delete mode 100644 vendor/yahnis-elsts/plugin-update-checker/Puc/v4p9/DebugBar/PluginPanel.php
delete mode 100644 vendor/yahnis-elsts/plugin-update-checker/Puc/v4p9/DebugBar/ThemePanel.php
delete mode 100644 vendor/yahnis-elsts/plugin-update-checker/Puc/v4p9/Factory.php
delete mode 100644 vendor/yahnis-elsts/plugin-update-checker/Puc/v4p9/InstalledPackage.php
delete mode 100644 vendor/yahnis-elsts/plugin-update-checker/Puc/v4p9/Metadata.php
delete mode 100644 vendor/yahnis-elsts/plugin-update-checker/Puc/v4p9/OAuthSignature.php
delete mode 100644 vendor/yahnis-elsts/plugin-update-checker/Puc/v4p9/Plugin/Info.php
delete mode 100644 vendor/yahnis-elsts/plugin-update-checker/Puc/v4p9/Plugin/Package.php
delete mode 100644 vendor/yahnis-elsts/plugin-update-checker/Puc/v4p9/Plugin/Ui.php
delete mode 100644 vendor/yahnis-elsts/plugin-update-checker/Puc/v4p9/Plugin/Update.php
delete mode 100644 vendor/yahnis-elsts/plugin-update-checker/Puc/v4p9/Plugin/UpdateChecker.php
delete mode 100644 vendor/yahnis-elsts/plugin-update-checker/Puc/v4p9/Scheduler.php
delete mode 100644 vendor/yahnis-elsts/plugin-update-checker/Puc/v4p9/StateStore.php
delete mode 100644 vendor/yahnis-elsts/plugin-update-checker/Puc/v4p9/Theme/Package.php
delete mode 100644 vendor/yahnis-elsts/plugin-update-checker/Puc/v4p9/Theme/Update.php
delete mode 100644 vendor/yahnis-elsts/plugin-update-checker/Puc/v4p9/Theme/UpdateChecker.php
delete mode 100644 vendor/yahnis-elsts/plugin-update-checker/Puc/v4p9/Update.php
delete mode 100644 vendor/yahnis-elsts/plugin-update-checker/Puc/v4p9/UpdateChecker.php
delete mode 100644 vendor/yahnis-elsts/plugin-update-checker/Puc/v4p9/UpgraderStatus.php
delete mode 100644 vendor/yahnis-elsts/plugin-update-checker/Puc/v4p9/Utils.php
delete mode 100644 vendor/yahnis-elsts/plugin-update-checker/Puc/v4p9/Vcs/Api.php
delete mode 100644 vendor/yahnis-elsts/plugin-update-checker/Puc/v4p9/Vcs/BaseChecker.php
delete mode 100644 vendor/yahnis-elsts/plugin-update-checker/Puc/v4p9/Vcs/BitBucketApi.php
delete mode 100644 vendor/yahnis-elsts/plugin-update-checker/Puc/v4p9/Vcs/GitHubApi.php
delete mode 100644 vendor/yahnis-elsts/plugin-update-checker/Puc/v4p9/Vcs/GitLabApi.php
delete mode 100644 vendor/yahnis-elsts/plugin-update-checker/Puc/v4p9/Vcs/PluginUpdateChecker.php
delete mode 100644 vendor/yahnis-elsts/plugin-update-checker/Puc/v4p9/Vcs/Reference.php
delete mode 100644 vendor/yahnis-elsts/plugin-update-checker/Puc/v4p9/Vcs/ThemeUpdateChecker.php
delete mode 100644 vendor/yahnis-elsts/plugin-update-checker/README.md
delete mode 100644 vendor/yahnis-elsts/plugin-update-checker/composer.json
delete mode 100644 vendor/yahnis-elsts/plugin-update-checker/css/puc-debug-bar.css
delete mode 100644 vendor/yahnis-elsts/plugin-update-checker/examples/plugin.json
delete mode 100644 vendor/yahnis-elsts/plugin-update-checker/examples/theme.json
delete mode 100644 vendor/yahnis-elsts/plugin-update-checker/js/debug-bar.js
delete mode 100644 vendor/yahnis-elsts/plugin-update-checker/languages/plugin-update-checker-ca.mo
delete mode 100644 vendor/yahnis-elsts/plugin-update-checker/languages/plugin-update-checker-ca.po
delete mode 100644 vendor/yahnis-elsts/plugin-update-checker/languages/plugin-update-checker-cs_CZ.mo
delete mode 100644 vendor/yahnis-elsts/plugin-update-checker/languages/plugin-update-checker-cs_CZ.po
delete mode 100644 vendor/yahnis-elsts/plugin-update-checker/languages/plugin-update-checker-da_DK.mo
delete mode 100644 vendor/yahnis-elsts/plugin-update-checker/languages/plugin-update-checker-da_DK.po
delete mode 100644 vendor/yahnis-elsts/plugin-update-checker/languages/plugin-update-checker-de_DE.mo
delete mode 100644 vendor/yahnis-elsts/plugin-update-checker/languages/plugin-update-checker-de_DE.po
delete mode 100644 vendor/yahnis-elsts/plugin-update-checker/languages/plugin-update-checker-es_ES.mo
delete mode 100644 vendor/yahnis-elsts/plugin-update-checker/languages/plugin-update-checker-es_ES.po
delete mode 100644 vendor/yahnis-elsts/plugin-update-checker/languages/plugin-update-checker-fa_IR.mo
delete mode 100644 vendor/yahnis-elsts/plugin-update-checker/languages/plugin-update-checker-fa_IR.po
delete mode 100644 vendor/yahnis-elsts/plugin-update-checker/languages/plugin-update-checker-fr_CA.mo
delete mode 100644 vendor/yahnis-elsts/plugin-update-checker/languages/plugin-update-checker-fr_CA.po
delete mode 100644 vendor/yahnis-elsts/plugin-update-checker/languages/plugin-update-checker-fr_FR.mo
delete mode 100644 vendor/yahnis-elsts/plugin-update-checker/languages/plugin-update-checker-fr_FR.po
delete mode 100644 vendor/yahnis-elsts/plugin-update-checker/languages/plugin-update-checker-hu_HU.mo
delete mode 100644 vendor/yahnis-elsts/plugin-update-checker/languages/plugin-update-checker-hu_HU.po
delete mode 100644 vendor/yahnis-elsts/plugin-update-checker/languages/plugin-update-checker-it_IT.mo
delete mode 100644 vendor/yahnis-elsts/plugin-update-checker/languages/plugin-update-checker-it_IT.po
delete mode 100644 vendor/yahnis-elsts/plugin-update-checker/languages/plugin-update-checker-ja.mo
delete mode 100644 vendor/yahnis-elsts/plugin-update-checker/languages/plugin-update-checker-ja.po
delete mode 100644 vendor/yahnis-elsts/plugin-update-checker/languages/plugin-update-checker-nl_BE.mo
delete mode 100644 vendor/yahnis-elsts/plugin-update-checker/languages/plugin-update-checker-nl_BE.po
delete mode 100644 vendor/yahnis-elsts/plugin-update-checker/languages/plugin-update-checker-nl_NL.mo
delete mode 100644 vendor/yahnis-elsts/plugin-update-checker/languages/plugin-update-checker-nl_NL.po
delete mode 100644 vendor/yahnis-elsts/plugin-update-checker/languages/plugin-update-checker-pt_BR.mo
delete mode 100644 vendor/yahnis-elsts/plugin-update-checker/languages/plugin-update-checker-pt_BR.po
delete mode 100644 vendor/yahnis-elsts/plugin-update-checker/languages/plugin-update-checker-sl_SI.mo
delete mode 100644 vendor/yahnis-elsts/plugin-update-checker/languages/plugin-update-checker-sl_SI.po
delete mode 100644 vendor/yahnis-elsts/plugin-update-checker/languages/plugin-update-checker-sv_SE.mo
delete mode 100644 vendor/yahnis-elsts/plugin-update-checker/languages/plugin-update-checker-sv_SE.po
delete mode 100644 vendor/yahnis-elsts/plugin-update-checker/languages/plugin-update-checker.pot
delete mode 100644 vendor/yahnis-elsts/plugin-update-checker/license.txt
delete mode 100644 vendor/yahnis-elsts/plugin-update-checker/load-v4p9.php
delete mode 100644 vendor/yahnis-elsts/plugin-update-checker/plugin-update-checker.php
delete mode 100644 vendor/yahnis-elsts/plugin-update-checker/vendor/Parsedown.php
delete mode 100644 vendor/yahnis-elsts/plugin-update-checker/vendor/ParsedownLegacy.php
delete mode 100644 vendor/yahnis-elsts/plugin-update-checker/vendor/ParsedownModern.php
delete mode 100644 vendor/yahnis-elsts/plugin-update-checker/vendor/PucReadmeParser.php
diff --git a/.idea/.gitignore b/.idea/.gitignore
new file mode 100644
index 0000000..e7e9d11
--- /dev/null
+++ b/.idea/.gitignore
@@ -0,0 +1,2 @@
+# Default ignored files
+/workspace.xml
diff --git a/.idea/composerJson.xml b/.idea/composerJson.xml
new file mode 100644
index 0000000..1b07430
--- /dev/null
+++ b/.idea/composerJson.xml
@@ -0,0 +1,10 @@
+
+
', htmlentities(print_r($update, true)), ''; - } else { - echo 'No updates found.'; - } - - $errors = $this->updateChecker->getLastRequestApiErrors(); - if ( !empty($errors) ) { - printf('
The update checker encountered %d API error%s.
', count($errors), (count($errors) > 1) ? 's' : ''); - - foreach (array_values($errors) as $num => $item) { - $wpError = $item['error']; - /** @var WP_Error $wpError */ - printf('%s
%s
%s
)%d %s
'; - foreach (wp_remote_retrieve_headers($item['httpResponse']) as $name => $value) { - printf("%s: %s\n", esc_html($name), esc_html($value)); - } - echo '
%s
' . htmlentities(print_r($value, true)) . ''; - } else if ($value === null) { - $value = '
null
';
- }
- printf('', htmlentities(print_r($info, true)), ''; - } else { - echo 'Failed to retrieve plugin info from the metadata URL.'; - } - exit; - } - } - -endif; diff --git a/vendor/yahnis-elsts/plugin-update-checker/Puc/v4p9/DebugBar/PluginPanel.php b/vendor/yahnis-elsts/plugin-update-checker/Puc/v4p9/DebugBar/PluginPanel.php deleted file mode 100644 index 55aec58..0000000 --- a/vendor/yahnis-elsts/plugin-update-checker/Puc/v4p9/DebugBar/PluginPanel.php +++ /dev/null @@ -1,38 +0,0 @@ -row('Plugin file', htmlentities($this->updateChecker->pluginFile)); - parent::displayConfigHeader(); - } - - protected function getMetadataButton() { - $requestInfoButton = ''; - if ( function_exists('get_submit_button') ) { - $requestInfoButton = get_submit_button( - 'Request Info', - 'secondary', - 'puc-request-info-button', - false, - array('id' => $this->updateChecker->getUniqueName('request-info-button')) - ); - } - return $requestInfoButton; - } - - protected function getUpdateFields() { - return array_merge( - parent::getUpdateFields(), - array('homepage', 'upgrade_notice', 'tested',) - ); - } - } - -endif; diff --git a/vendor/yahnis-elsts/plugin-update-checker/Puc/v4p9/DebugBar/ThemePanel.php b/vendor/yahnis-elsts/plugin-update-checker/Puc/v4p9/DebugBar/ThemePanel.php deleted file mode 100644 index 36d28e5..0000000 --- a/vendor/yahnis-elsts/plugin-update-checker/Puc/v4p9/DebugBar/ThemePanel.php +++ /dev/null @@ -1,21 +0,0 @@ -row('Theme directory', htmlentities($this->updateChecker->directoryName)); - parent::displayConfigHeader(); - } - - protected function getUpdateFields() { - return array_merge(parent::getUpdateFields(), array('details_url')); - } - } - -endif; diff --git a/vendor/yahnis-elsts/plugin-update-checker/Puc/v4p9/Factory.php b/vendor/yahnis-elsts/plugin-update-checker/Puc/v4p9/Factory.php deleted file mode 100644 index de6f7f7..0000000 --- a/vendor/yahnis-elsts/plugin-update-checker/Puc/v4p9/Factory.php +++ /dev/null @@ -1,297 +0,0 @@ - 'Plugin Name'), 'plugin'); - return !empty($headers['Name']); - } - - return false; - } - - /** - * Get the name of the theme's directory from a full path to a file inside that directory. - * E.g. "/abc/public_html/wp-content/themes/foo/whatever.php" => "foo". - * - * Note that subdirectories are currently not supported. For example, - * "/xyz/wp-content/themes/my-theme/includes/whatever.php" => NULL. - * - * @param string $absolutePath Normalized path. - * @return string|null Directory name, or NULL if the path doesn't point to a theme. - */ - protected static function getThemeDirectoryName($absolutePath) { - if ( is_file($absolutePath) ) { - $absolutePath = dirname($absolutePath); - } - - if ( file_exists($absolutePath . '/style.css') ) { - return basename($absolutePath); - } - return null; - } - - /** - * Get the name of the hosting service that the URL points to. - * - * @param string $metadataUrl - * @return string|null - */ - private static function getVcsService($metadataUrl) { - $service = null; - - //Which hosting service does the URL point to? - $host = parse_url($metadataUrl, PHP_URL_HOST); - $path = parse_url($metadataUrl, PHP_URL_PATH); - - //Check if the path looks like "/user-name/repository". - //For GitLab.com it can also be "/user/group1/group2/.../repository". - $repoRegex = '@^/?([^/]+?)/([^/#?&]+?)/?$@'; - if ( $host === 'gitlab.com' ) { - $repoRegex = '@^/?(?:[^/#?&]++/){1,20}(?:[^/#?&]++)/?$@'; - } - if ( preg_match($repoRegex, $path) ) { - $knownServices = array( - 'github.com' => 'GitHub', - 'bitbucket.org' => 'BitBucket', - 'gitlab.com' => 'GitLab', - ); - if ( isset($knownServices[$host]) ) { - $service = $knownServices[$host]; - } - } - - return apply_filters('puc_get_vcs_service', $service, $host, $path, $metadataUrl); - } - - /** - * Get the latest version of the specified class that has the same major version number - * as this factory class. - * - * @param string $class Partial class name. - * @return string|null Full class name. - */ - protected static function getCompatibleClassVersion($class) { - if ( isset(self::$classVersions[$class][self::$latestCompatibleVersion]) ) { - return self::$classVersions[$class][self::$latestCompatibleVersion]; - } - return null; - } - - /** - * Get the specific class name for the latest available version of a class. - * - * @param string $class - * @return null|string - */ - public static function getLatestClassVersion($class) { - if ( !self::$sorted ) { - self::sortVersions(); - } - - if ( isset(self::$classVersions[$class]) ) { - return reset(self::$classVersions[$class]); - } else { - return null; - } - } - - /** - * Sort available class versions in descending order (i.e. newest first). - */ - protected static function sortVersions() { - foreach ( self::$classVersions as $class => $versions ) { - uksort($versions, array(__CLASS__, 'compareVersions')); - self::$classVersions[$class] = $versions; - } - self::$sorted = true; - } - - protected static function compareVersions($a, $b) { - return -version_compare($a, $b); - } - - /** - * Register a version of a class. - * - * @access private This method is only for internal use by the library. - * - * @param string $generalClass Class name without version numbers, e.g. 'PluginUpdateChecker'. - * @param string $versionedClass Actual class name, e.g. 'PluginUpdateChecker_1_2'. - * @param string $version Version number, e.g. '1.2'. - */ - public static function addVersion($generalClass, $versionedClass, $version) { - if ( empty(self::$myMajorVersion) ) { - $nameParts = explode('_', __CLASS__, 3); - self::$myMajorVersion = substr(ltrim($nameParts[1], 'v'), 0, 1); - } - - //Store the greatest version number that matches our major version. - $components = explode('.', $version); - if ( $components[0] === self::$myMajorVersion ) { - - if ( - empty(self::$latestCompatibleVersion) - || version_compare($version, self::$latestCompatibleVersion, '>') - ) { - self::$latestCompatibleVersion = $version; - } - - } - - if ( !isset(self::$classVersions[$generalClass]) ) { - self::$classVersions[$generalClass] = array(); - } - self::$classVersions[$generalClass][$version] = $versionedClass; - self::$sorted = false; - } - } - -endif; \ No newline at end of file diff --git a/vendor/yahnis-elsts/plugin-update-checker/Puc/v4p9/InstalledPackage.php b/vendor/yahnis-elsts/plugin-update-checker/Puc/v4p9/InstalledPackage.php deleted file mode 100644 index 0a2768a..0000000 --- a/vendor/yahnis-elsts/plugin-update-checker/Puc/v4p9/InstalledPackage.php +++ /dev/null @@ -1,103 +0,0 @@ -updateChecker = $updateChecker; - } - - /** - * Get the currently installed version of the plugin or theme. - * - * @return string|null Version number. - */ - abstract public function getInstalledVersion(); - - /** - * Get the full path of the plugin or theme directory (without a trailing slash). - * - * @return string - */ - abstract public function getAbsoluteDirectoryPath(); - - /** - * Check whether a regular file exists in the package's directory. - * - * @param string $relativeFileName File name relative to the package directory. - * @return bool - */ - public function fileExists($relativeFileName) { - return is_file( - $this->getAbsoluteDirectoryPath() - . DIRECTORY_SEPARATOR - . ltrim($relativeFileName, '/\\') - ); - } - - /* ------------------------------------------------------------------- - * File header parsing - * ------------------------------------------------------------------- - */ - - /** - * Parse plugin or theme metadata from the header comment. - * - * This is basically a simplified version of the get_file_data() function from /wp-includes/functions.php. - * It's intended as a utility for subclasses that detect updates by parsing files in a VCS. - * - * @param string|null $content File contents. - * @return string[] - */ - public function getFileHeader($content) { - $content = (string)$content; - - //WordPress only looks at the first 8 KiB of the file, so we do the same. - $content = substr($content, 0, 8192); - //Normalize line endings. - $content = str_replace("\r", "\n", $content); - - $headers = $this->getHeaderNames(); - $results = array(); - foreach ($headers as $field => $name) { - $success = preg_match('/^[ \t\/*#@]*' . preg_quote($name, '/') . ':(.*)$/mi', $content, $matches); - - if ( ($success === 1) && $matches[1] ) { - $value = $matches[1]; - if ( function_exists('_cleanup_header_comment') ) { - $value = _cleanup_header_comment($value); - } - $results[$field] = $value; - } else { - $results[$field] = ''; - } - } - - return $results; - } - - /** - * @return array Format: ['HeaderKey' => 'Header Name'] - */ - abstract protected function getHeaderNames(); - - /** - * Get the value of a specific plugin or theme header. - * - * @param string $headerName - * @return string Either the value of the header, or an empty string if the header doesn't exist. - */ - abstract public function getHeaderValue($headerName); - - } -endif; diff --git a/vendor/yahnis-elsts/plugin-update-checker/Puc/v4p9/Metadata.php b/vendor/yahnis-elsts/plugin-update-checker/Puc/v4p9/Metadata.php deleted file mode 100644 index 93f30bd..0000000 --- a/vendor/yahnis-elsts/plugin-update-checker/Puc/v4p9/Metadata.php +++ /dev/null @@ -1,132 +0,0 @@ -validateMetadata($apiResponse); - if ( is_wp_error($valid) ){ - do_action('puc_api_error', $valid); - trigger_error($valid->get_error_message(), E_USER_NOTICE); - return false; - } - - foreach(get_object_vars($apiResponse) as $key => $value){ - $target->$key = $value; - } - - return true; - } - - /** - * No validation by default! Subclasses should check that the required fields are present. - * - * @param StdClass $apiResponse - * @return bool|WP_Error - */ - protected function validateMetadata(/** @noinspection PhpUnusedParameterInspection */ $apiResponse) { - return true; - } - - /** - * Create a new instance by copying the necessary fields from another object. - * - * @abstract - * @param StdClass|self $object The source object. - * @return self The new copy. - */ - public static function fromObject(/** @noinspection PhpUnusedParameterInspection */ $object) { - throw new LogicException('The ' . __METHOD__ . ' method must be implemented by subclasses'); - } - - /** - * Create an instance of StdClass that can later be converted back to an - * update or info container. Useful for serialization and caching, as it - * avoids the "incomplete object" problem if the cached value is loaded - * before this class. - * - * @return StdClass - */ - public function toStdClass() { - $object = new stdClass(); - $this->copyFields($this, $object); - return $object; - } - - /** - * Transform the metadata into the format used by WordPress core. - * - * @return object - */ - abstract public function toWpFormat(); - - /** - * Copy known fields from one object to another. - * - * @param StdClass|self $from - * @param StdClass|self $to - */ - protected function copyFields($from, $to) { - $fields = $this->getFieldNames(); - - if ( property_exists($from, 'slug') && !empty($from->slug) ) { - //Let plugins add extra fields without having to create subclasses. - $fields = apply_filters($this->getPrefixedFilter('retain_fields') . '-' . $from->slug, $fields); - } - - foreach ($fields as $field) { - if ( property_exists($from, $field) ) { - $to->$field = $from->$field; - } - } - } - - /** - * @return string[] - */ - protected function getFieldNames() { - return array(); - } - - /** - * @param string $tag - * @return string - */ - protected function getPrefixedFilter($tag) { - return 'puc_' . $tag; - } - } - -endif; diff --git a/vendor/yahnis-elsts/plugin-update-checker/Puc/v4p9/OAuthSignature.php b/vendor/yahnis-elsts/plugin-update-checker/Puc/v4p9/OAuthSignature.php deleted file mode 100644 index 4cdbe9f..0000000 --- a/vendor/yahnis-elsts/plugin-update-checker/Puc/v4p9/OAuthSignature.php +++ /dev/null @@ -1,100 +0,0 @@ -consumerKey = $consumerKey; - $this->consumerSecret = $consumerSecret; - } - - /** - * Sign a URL using OAuth 1.0. - * - * @param string $url The URL to be signed. It may contain query parameters. - * @param string $method HTTP method such as "GET", "POST" and so on. - * @return string The signed URL. - */ - public function sign($url, $method = 'GET') { - $parameters = array(); - - //Parse query parameters. - $query = parse_url($url, PHP_URL_QUERY); - if ( !empty($query) ) { - parse_str($query, $parsedParams); - if ( is_array($parameters) ) { - $parameters = $parsedParams; - } - //Remove the query string from the URL. We'll replace it later. - $url = substr($url, 0, strpos($url, '?')); - } - - $parameters = array_merge( - $parameters, - array( - 'oauth_consumer_key' => $this->consumerKey, - 'oauth_nonce' => $this->nonce(), - 'oauth_signature_method' => 'HMAC-SHA1', - 'oauth_timestamp' => time(), - 'oauth_version' => '1.0', - ) - ); - unset($parameters['oauth_signature']); - - //Parameters must be sorted alphabetically before signing. - ksort($parameters); - - //The most complicated part of the request - generating the signature. - //The string to sign contains the HTTP method, the URL path, and all of - //our query parameters. Everything is URL encoded. Then we concatenate - //them with ampersands into a single string to hash. - $encodedVerb = urlencode($method); - $encodedUrl = urlencode($url); - $encodedParams = urlencode(http_build_query($parameters, '', '&')); - - $stringToSign = $encodedVerb . '&' . $encodedUrl . '&' . $encodedParams; - - //Since we only have one OAuth token (the consumer secret) we only have - //to use it as our HMAC key. However, we still have to append an & to it - //as if we were using it with additional tokens. - $secret = urlencode($this->consumerSecret) . '&'; - - //The signature is a hash of the consumer key and the base string. Note - //that we have to get the raw output from hash_hmac and base64 encode - //the binary data result. - $parameters['oauth_signature'] = base64_encode(hash_hmac('sha1', $stringToSign, $secret, true)); - - return ($url . '?' . http_build_query($parameters)); - } - - /** - * Generate a random nonce. - * - * @return string - */ - private function nonce() { - $mt = microtime(); - - $rand = null; - if ( is_callable('random_bytes') ) { - try { - $rand = random_bytes(16); - } catch (Exception $ex) { - //Fall back to mt_rand (below). - } - } - if ( $rand === null ) { - $rand = mt_rand(); - } - - return md5($mt . '_' . $rand); - } - } - -endif; diff --git a/vendor/yahnis-elsts/plugin-update-checker/Puc/v4p9/Plugin/Info.php b/vendor/yahnis-elsts/plugin-update-checker/Puc/v4p9/Plugin/Info.php deleted file mode 100644 index 00695d6..0000000 --- a/vendor/yahnis-elsts/plugin-update-checker/Puc/v4p9/Plugin/Info.php +++ /dev/null @@ -1,130 +0,0 @@ -sections = (array)$instance->sections; - $instance->icons = (array)$instance->icons; - - return $instance; - } - - /** - * Very, very basic validation. - * - * @param StdClass $apiResponse - * @return bool|WP_Error - */ - protected function validateMetadata($apiResponse) { - if ( - !isset($apiResponse->name, $apiResponse->version) - || empty($apiResponse->name) - || empty($apiResponse->version) - ) { - return new WP_Error( - 'puc-invalid-metadata', - "The plugin metadata file does not contain the required 'name' and/or 'version' keys." - ); - } - return true; - } - - - /** - * Transform plugin info into the format used by the native WordPress.org API - * - * @return object - */ - public function toWpFormat(){ - $info = new stdClass; - - //The custom update API is built so that many fields have the same name and format - //as those returned by the native WordPress.org API. These can be assigned directly. - $sameFormat = array( - 'name', 'slug', 'version', 'requires', 'tested', 'rating', 'upgrade_notice', - 'num_ratings', 'downloaded', 'active_installs', 'homepage', 'last_updated', - ); - foreach($sameFormat as $field){ - if ( isset($this->$field) ) { - $info->$field = $this->$field; - } else { - $info->$field = null; - } - } - - //Other fields need to be renamed and/or transformed. - $info->download_link = $this->download_url; - $info->author = $this->getFormattedAuthor(); - $info->sections = array_merge(array('description' => ''), $this->sections); - - if ( !empty($this->banners) ) { - //WP expects an array with two keys: "high" and "low". Both are optional. - //Docs: https://wordpress.org/plugins/about/faq/#banners - $info->banners = is_object($this->banners) ? get_object_vars($this->banners) : $this->banners; - $info->banners = array_intersect_key($info->banners, array('high' => true, 'low' => true)); - } - - return $info; - } - - protected function getFormattedAuthor() { - if ( !empty($this->author_homepage) ){ - /** @noinspection HtmlUnknownTarget */ - return sprintf('%s', $this->author_homepage, $this->author); - } - return $this->author; - } - } - -endif; diff --git a/vendor/yahnis-elsts/plugin-update-checker/Puc/v4p9/Plugin/Package.php b/vendor/yahnis-elsts/plugin-update-checker/Puc/v4p9/Plugin/Package.php deleted file mode 100644 index b92c5f7..0000000 --- a/vendor/yahnis-elsts/plugin-update-checker/Puc/v4p9/Plugin/Package.php +++ /dev/null @@ -1,184 +0,0 @@ -pluginAbsolutePath = $pluginAbsolutePath; - $this->pluginFile = plugin_basename($this->pluginAbsolutePath); - - parent::__construct($updateChecker); - - //Clear the version number cache when something - anything - is upgraded or WP clears the update cache. - add_filter('upgrader_post_install', array($this, 'clearCachedVersion')); - add_action('delete_site_transient_update_plugins', array($this, 'clearCachedVersion')); - } - - public function getInstalledVersion() { - if ( isset($this->cachedInstalledVersion) ) { - return $this->cachedInstalledVersion; - } - - $pluginHeader = $this->getPluginHeader(); - if ( isset($pluginHeader['Version']) ) { - $this->cachedInstalledVersion = $pluginHeader['Version']; - return $pluginHeader['Version']; - } else { - //This can happen if the filename points to something that is not a plugin. - $this->updateChecker->triggerError( - sprintf( - "Can't to read the Version header for '%s'. The filename is incorrect or is not a plugin.", - $this->updateChecker->pluginFile - ), - E_USER_WARNING - ); - return null; - } - } - - /** - * Clear the cached plugin version. This method can be set up as a filter (hook) and will - * return the filter argument unmodified. - * - * @param mixed $filterArgument - * @return mixed - */ - public function clearCachedVersion($filterArgument = null) { - $this->cachedInstalledVersion = null; - return $filterArgument; - } - - public function getAbsoluteDirectoryPath() { - return dirname($this->pluginAbsolutePath); - } - - /** - * Get the value of a specific plugin or theme header. - * - * @param string $headerName - * @param string $defaultValue - * @return string Either the value of the header, or $defaultValue if the header doesn't exist or is empty. - */ - public function getHeaderValue($headerName, $defaultValue = '') { - $headers = $this->getPluginHeader(); - if ( isset($headers[$headerName]) && ($headers[$headerName] !== '') ) { - return $headers[$headerName]; - } - return $defaultValue; - } - - protected function getHeaderNames() { - return array( - 'Name' => 'Plugin Name', - 'PluginURI' => 'Plugin URI', - 'Version' => 'Version', - 'Description' => 'Description', - 'Author' => 'Author', - 'AuthorURI' => 'Author URI', - 'TextDomain' => 'Text Domain', - 'DomainPath' => 'Domain Path', - 'Network' => 'Network', - - //The newest WordPress version that this plugin requires or has been tested with. - //We support several different formats for compatibility with other libraries. - 'Tested WP' => 'Tested WP', - 'Requires WP' => 'Requires WP', - 'Tested up to' => 'Tested up to', - 'Requires at least' => 'Requires at least', - ); - } - - /** - * Get the translated plugin title. - * - * @return string - */ - public function getPluginTitle() { - $title = ''; - $header = $this->getPluginHeader(); - if ( $header && !empty($header['Name']) && isset($header['TextDomain']) ) { - $title = translate($header['Name'], $header['TextDomain']); - } - return $title; - } - - /** - * Get plugin's metadata from its file header. - * - * @return array - */ - public function getPluginHeader() { - if ( !is_file($this->pluginAbsolutePath) ) { - //This can happen if the plugin filename is wrong. - $this->updateChecker->triggerError( - sprintf( - "Can't to read the plugin header for '%s'. The file does not exist.", - $this->updateChecker->pluginFile - ), - E_USER_WARNING - ); - return array(); - } - - if ( !function_exists('get_plugin_data') ) { - /** @noinspection PhpIncludeInspection */ - require_once(ABSPATH . '/wp-admin/includes/plugin.php'); - } - return get_plugin_data($this->pluginAbsolutePath, false, false); - } - - public function removeHooks() { - remove_filter('upgrader_post_install', array($this, 'clearCachedVersion')); - remove_action('delete_site_transient_update_plugins', array($this, 'clearCachedVersion')); - } - - /** - * Check if the plugin file is inside the mu-plugins directory. - * - * @return bool - */ - public function isMuPlugin() { - static $cachedResult = null; - - if ( $cachedResult === null ) { - if ( !defined('WPMU_PLUGIN_DIR') || !is_string(WPMU_PLUGIN_DIR) ) { - $cachedResult = false; - return $cachedResult; - } - - //Convert both paths to the canonical form before comparison. - $muPluginDir = realpath(WPMU_PLUGIN_DIR); - $pluginPath = realpath($this->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); - } - - $cachedResult = (strpos($pluginPath, $muPluginDir) === 0); - } - - return $cachedResult; - } - } - -endif; diff --git a/vendor/yahnis-elsts/plugin-update-checker/Puc/v4p9/Plugin/Ui.php b/vendor/yahnis-elsts/plugin-update-checker/Puc/v4p9/Plugin/Ui.php deleted file mode 100644 index 390bcdf..0000000 --- a/vendor/yahnis-elsts/plugin-update-checker/Puc/v4p9/Plugin/Ui.php +++ /dev/null @@ -1,277 +0,0 @@ -updateChecker = $updateChecker; - $this->manualCheckErrorTransient = $this->updateChecker->getUniqueName('manual_check_errors'); - - add_action('admin_init', array($this, 'onAdminInit')); - } - - public function onAdminInit() { - if ( $this->updateChecker->userCanInstallUpdates() ) { - $this->handleManualCheck(); - - add_filter('plugin_row_meta', array($this, 'addViewDetailsLink'), 10, 3); - add_filter('plugin_row_meta', array($this, 'addCheckForUpdatesLink'), 10, 2); - add_action('all_admin_notices', array($this, 'displayManualCheckResult')); - } - } - - /** - * Add a "View Details" link to the plugin row in the "Plugins" page. By default, - * the new link will appear before the "Visit plugin site" link (if present). - * - * You can change the link text by using the "puc_view_details_link-$slug" filter. - * Returning an empty string from the filter will disable the link. - * - * You can change the position of the link using the - * "puc_view_details_link_position-$slug" filter. - * Returning 'before' or 'after' will place the link immediately before/after - * the "Visit plugin site" link. - * Returning 'append' places the link after any existing links at the time of the hook. - * Returning 'replace' replaces the "Visit plugin site" link. - * Returning anything else disables the link when there is a "Visit plugin site" link. - * - * If there is no "Visit plugin site" link 'append' is always used! - * - * @param array $pluginMeta Array of meta links. - * @param string $pluginFile - * @param array $pluginData Array of plugin header data. - * @return array - */ - public function addViewDetailsLink($pluginMeta, $pluginFile, $pluginData = array()) { - if ( $this->isMyPluginFile($pluginFile) && !isset($pluginData['slug']) ) { - $linkText = apply_filters($this->updateChecker->getUniqueName('view_details_link'), __('View details')); - if ( !empty($linkText) ) { - $viewDetailsLinkPosition = 'append'; - - //Find the "Visit plugin site" link (if present). - $visitPluginSiteLinkIndex = count($pluginMeta) - 1; - if ( $pluginData['PluginURI'] ) { - $escapedPluginUri = esc_url($pluginData['PluginURI']); - foreach ($pluginMeta as $linkIndex => $existingLink) { - if ( strpos($existingLink, $escapedPluginUri) !== false ) { - $visitPluginSiteLinkIndex = $linkIndex; - $viewDetailsLinkPosition = apply_filters( - $this->updateChecker->getUniqueName('view_details_link_position'), - 'before' - ); - break; - } - } - } - - $viewDetailsLink = sprintf('%s', - esc_url(network_admin_url('plugin-install.php?tab=plugin-information&plugin=' . urlencode($this->updateChecker->slug) . - '&TB_iframe=true&width=600&height=550')), - esc_attr(sprintf(__('More information about %s'), $pluginData['Name'])), - esc_attr($pluginData['Name']), - $linkText - ); - switch ($viewDetailsLinkPosition) { - case 'before': - array_splice($pluginMeta, $visitPluginSiteLinkIndex, 0, $viewDetailsLink); - break; - case 'after': - array_splice($pluginMeta, $visitPluginSiteLinkIndex + 1, 0, $viewDetailsLink); - break; - case 'replace': - $pluginMeta[$visitPluginSiteLinkIndex] = $viewDetailsLink; - break; - case 'append': - default: - $pluginMeta[] = $viewDetailsLink; - break; - } - } - } - return $pluginMeta; - } - - /** - * Add a "Check for updates" link to the plugin row in the "Plugins" page. By default, - * the new link will appear after the "Visit plugin site" link if present, otherwise - * after the "View plugin details" link. - * - * You can change the link text by using the "puc_manual_check_link-$slug" filter. - * Returning an empty string from the filter will disable the link. - * - * @param array $pluginMeta Array of meta links. - * @param string $pluginFile - * @return array - */ - public function addCheckForUpdatesLink($pluginMeta, $pluginFile) { - if ( $this->isMyPluginFile($pluginFile) ) { - $linkUrl = wp_nonce_url( - add_query_arg( - array( - 'puc_check_for_updates' => 1, - 'puc_slug' => $this->updateChecker->slug, - ), - self_admin_url('plugins.php') - ), - 'puc_check_for_updates' - ); - - $linkText = apply_filters( - $this->updateChecker->getUniqueName('manual_check_link'), - __('Check for updates', 'plugin-update-checker') - ); - if ( !empty($linkText) ) { - /** @noinspection HtmlUnknownTarget */ - $pluginMeta[] = sprintf('%s', esc_attr($linkUrl), $linkText); - } - } - return $pluginMeta; - } - - protected function isMyPluginFile($pluginFile) { - return ($pluginFile == $this->updateChecker->pluginFile) - || (!empty($this->updateChecker->muPluginFile) && ($pluginFile == $this->updateChecker->muPluginFile)); - } - - /** - * Check for updates when the user clicks the "Check for updates" link. - * - * @see self::addCheckForUpdatesLink() - * - * @return void - */ - public function handleManualCheck() { - $shouldCheck = - isset($_GET['puc_check_for_updates'], $_GET['puc_slug']) - && $_GET['puc_slug'] == $this->updateChecker->slug - && check_admin_referer('puc_check_for_updates'); - - if ( $shouldCheck ) { - $update = $this->updateChecker->checkForUpdates(); - $status = ($update === null) ? 'no_update' : 'update_available'; - - if ( ($update === null) && !empty($this->lastRequestApiErrors) ) { - //Some errors are not critical. For example, if PUC tries to retrieve the readme.txt - //file from GitHub and gets a 404, that's an API error, but it doesn't prevent updates - //from working. Maybe the plugin simply doesn't have a readme. - //Let's only show important errors. - $foundCriticalErrors = false; - $questionableErrorCodes = array( - 'puc-github-http-error', - 'puc-gitlab-http-error', - 'puc-bitbucket-http-error', - ); - - foreach ($this->lastRequestApiErrors as $item) { - $wpError = $item['error']; - /** @var WP_Error $wpError */ - if ( !in_array($wpError->get_error_code(), $questionableErrorCodes) ) { - $foundCriticalErrors = true; - break; - } - } - - if ( $foundCriticalErrors ) { - $status = 'error'; - set_site_transient($this->manualCheckErrorTransient, $this->lastRequestApiErrors, 60); - } - } - - wp_redirect(add_query_arg( - array( - 'puc_update_check_result' => $status, - 'puc_slug' => $this->updateChecker->slug, - ), - self_admin_url('plugins.php') - )); - exit; - } - } - - /** - * Display the results of a manual update check. - * - * @see self::handleManualCheck() - * - * You can change the result message by using the "puc_manual_check_message-$slug" filter. - */ - public function displayManualCheckResult() { - if ( isset($_GET['puc_update_check_result'], $_GET['puc_slug']) && ($_GET['puc_slug'] == $this->updateChecker->slug) ) { - $status = strval($_GET['puc_update_check_result']); - $title = $this->updateChecker->getInstalledPackage()->getPluginTitle(); - $noticeClass = 'updated notice-success'; - $details = ''; - - if ( $status == 'no_update' ) { - $message = sprintf(_x('The %s plugin is up to date.', 'the plugin title', 'plugin-update-checker'), $title); - } else if ( $status == 'update_available' ) { - $message = sprintf(_x('A new version of the %s plugin is available.', 'the plugin title', 'plugin-update-checker'), $title); - } else if ( $status === 'error' ) { - $message = sprintf(_x('Could not determine if updates are available for %s.', 'the plugin title', 'plugin-update-checker'), $title); - $noticeClass = 'error notice-error'; - - $details = $this->formatManualCheckErrors(get_site_transient($this->manualCheckErrorTransient)); - delete_site_transient($this->manualCheckErrorTransient); - } else { - $message = sprintf(__('Unknown update checker status "%s"', 'plugin-update-checker'), htmlentities($status)); - $noticeClass = 'error notice-error'; - } - printf( - '
%s
%s%2$s
%1$s %2$s
This section will be displayed by default when the user clicks 'View version x.y.z details'.
", - "custom_section": "This is a custom section labeled 'Custom Section'." - }, - - "icons" : { - "1x" : "http://w-shadow.com/files/external-update-example/assets/icon-128x128.png", - "2x" : "http://w-shadow.com/files/external-update-example/assets/icon-256x256.png" - }, - - "banners": { - "low": "http://w-shadow.com/files/external-update-example/assets/banner-772x250.png", - "high": "http://w-shadow.com/files/external-update-example/assets/banner-1544x500.png" - }, - - "translations": [ - { - "language": "fr_FR", - "version": "4.0", - "updated": "2016-04-22 23:22:42", - "package": "http://example.com/updates/translations/french-language-pack.zip" - }, - { - "language": "de_DE", - "version": "5.0", - "updated": "2016-04-22 23:22:42", - "package": "http://example.com/updates/translations/german-language-pack.zip" - } - ], - - "rating": 90, - "num_ratings": 123, - - "downloaded": 1234, - "active_installs": 12345 -} \ No newline at end of file diff --git a/vendor/yahnis-elsts/plugin-update-checker/examples/theme.json b/vendor/yahnis-elsts/plugin-update-checker/examples/theme.json deleted file mode 100644 index df6c8c7..0000000 --- a/vendor/yahnis-elsts/plugin-update-checker/examples/theme.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "version": "2.0", - "details_url": "http://example.com/version-2.0-details.html", - "download_url": "http://example.com/example-theme-2.0.zip" -} \ No newline at end of file diff --git a/vendor/yahnis-elsts/plugin-update-checker/js/debug-bar.js b/vendor/yahnis-elsts/plugin-update-checker/js/debug-bar.js deleted file mode 100644 index b8435db..0000000 --- a/vendor/yahnis-elsts/plugin-update-checker/js/debug-bar.js +++ /dev/null @@ -1,52 +0,0 @@ -jQuery(function($) { - - function runAjaxAction(button, action) { - button = $(button); - var panel = button.closest('.puc-debug-bar-panel-v4'); - var responseBox = button.closest('td').find('.puc-ajax-response'); - - responseBox.text('Processing...').show(); - $.post( - ajaxurl, - { - action : action, - uid : panel.data('uid'), - _wpnonce: panel.data('nonce') - }, - function(data) { - responseBox.html(data); - }, - 'html' - ); - } - - $('.puc-debug-bar-panel-v4 input[name="puc-check-now-button"]').click(function() { - runAjaxAction(this, 'puc_v4_debug_check_now'); - return false; - }); - - $('.puc-debug-bar-panel-v4 input[name="puc-request-info-button"]').click(function() { - runAjaxAction(this, 'puc_v4_debug_request_info'); - return false; - }); - - - // Debug Bar uses the panel class name as part of its link and container IDs. This means we can - // end up with multiple identical IDs if more than one plugin uses the update checker library. - // Fix it by replacing the class name with the plugin slug. - var panels = $('#debug-menu-targets').find('.puc-debug-bar-panel-v4'); - panels.each(function() { - var panel = $(this); - var uid = panel.data('uid'); - var target = panel.closest('.debug-menu-target'); - - //Change the panel wrapper ID. - target.attr('id', 'debug-menu-target-puc-' + uid); - - //Change the menu link ID as well and point it at the new target ID. - $('#debug-bar-menu').find('.puc-debug-menu-link-' + uid) - .closest('.debug-menu-link') - .attr('id', 'debug-menu-link-puc-' + uid) - .attr('href', '#' + target.attr('id')); - }); -}); \ No newline at end of file diff --git a/vendor/yahnis-elsts/plugin-update-checker/languages/plugin-update-checker-ca.mo b/vendor/yahnis-elsts/plugin-update-checker/languages/plugin-update-checker-ca.mo deleted file mode 100644 index 59645faba22e5f3b1358ef076a01d5a7fa3aa534..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1186 zcmZ`&%We}f6g5yD3JU~l7MF@jAn=eGUhPB?f>02mg$Po_u5xE?6T{RV*`7X-koW+0 zhy^>uFR+0P5@LzOC$M16M{p*S5}sDhoY=mPbM5P|$7Ws%jDx^&U;rEjo&)uG2OI_7 z0|a~qW`XZO7dWy?Y+5Q5_Zx+>QQSw1WxG&*
zrLezHK%nsfpZ9cg4~#38`f*cCNTU+7K=@3Cu}vkLqX%#+mrMKJtT(ZFrW-cj$W7rV
zv{;=R70#L<*`3?;IGcIb$xR=co*aM{%|dP>3?vVbeK7*2 ')
- {
- $markup = $trimmedMarkup;
- $markup = substr($markup, 3);
-
- $position = strpos($markup, " ')
- {
- $markup = $trimmedMarkup;
- $markup = substr($markup, 3);
-
- $position = strpos($markup, "
\n", $text);
- }
- else
- {
- $text = preg_replace('/(?:[ ][ ]+|[ ]*\\\\)\n/', "
\n", $text);
- $text = str_replace(" \n", "\n", $text);
- }
-
- return $text;
- }
-
- #
- # Handlers
- #
-
- protected function element(array $Element)
- {
- $markup = '<'.$Element['name'];
-
- if (isset($Element['attributes']))
- {
- foreach ($Element['attributes'] as $name => $value)
- {
- if ($value === null)
- {
- continue;
- }
-
- $markup .= ' '.$name.'="'.$value.'"';
- }
- }
-
- if (isset($Element['text']))
- {
- $markup .= '>';
-
- if (isset($Element['handler']))
- {
- $markup .= $this->{$Element['handler']}($Element['text']);
- }
- else
- {
- $markup .= $Element['text'];
- }
-
- $markup .= ''.$Element['name'].'>';
- }
- else
- {
- $markup .= ' />';
- }
-
- return $markup;
- }
-
- protected function elements(array $Elements)
- {
- $markup = '';
-
- foreach ($Elements as $Element)
- {
- $markup .= "\n" . $this->element($Element);
- }
-
- $markup .= "\n";
-
- return $markup;
- }
-
- # ~
-
- protected function li($lines)
- {
- $markup = $this->lines($lines);
-
- $trimmedMarkup = trim($markup);
-
- if ( ! in_array('', $lines) and substr($trimmedMarkup, 0, 3) === '
\n", $text);
- }
- else
- {
- $text = preg_replace('/(?:[ ][ ]+|[ ]*\\\\)\n/', "
\n", $text);
- $text = str_replace(" \n", "\n", $text);
- }
-
- return $text;
- }
-
- #
- # Handlers
- #
-
- protected function element(array $Element)
- {
- $markup = '<'.$Element['name'];
-
- if (isset($Element['attributes']))
- {
- foreach ($Element['attributes'] as $name => $value)
- {
- if ($value === null)
- {
- continue;
- }
-
- $markup .= ' '.$name.'="'.$value.'"';
- }
- }
-
- if (isset($Element['text']))
- {
- $markup .= '>';
-
- if (isset($Element['handler']))
- {
- $markup .= $this->{$Element['handler']}($Element['text']);
- }
- else
- {
- $markup .= $Element['text'];
- }
-
- $markup .= ''.$Element['name'].'>';
- }
- else
- {
- $markup .= ' />';
- }
-
- return $markup;
- }
-
- protected function elements(array $Elements)
- {
- $markup = '';
-
- foreach ($Elements as $Element)
- {
- $markup .= "\n" . $this->element($Element);
- }
-
- $markup .= "\n";
-
- return $markup;
- }
-
- # ~
-
- protected function li($lines)
- {
- $markup = $this->lines($lines);
-
- $trimmedMarkup = trim($markup);
-
- if ( ! in_array('', $lines) and substr($trimmedMarkup, 0, 3) === '$2
', $_sections[$i+1]);
- $content = $this->filter_text( $content, true );
- } else {
- $content = '';
- }
- $sections[str_replace(' ', '_', strtolower($title))] = array('title' => $title, 'content' => $content);
- }
-
-
- // Special sections
- // This is where we nab our special sections, so we can enforce their order and treat them differently, if needed
- // upgrade_notice is not a section, but parse it like it is for now
- $final_sections = array();
- foreach ( array('description', 'installation', 'frequently_asked_questions', 'screenshots', 'changelog', 'change_log', 'upgrade_notice') as $special_section ) {
- if ( isset($sections[$special_section]) ) {
- $final_sections[$special_section] = $sections[$special_section]['content'];
- unset($sections[$special_section]);
- }
- }
- if ( isset($final_sections['change_log']) && empty($final_sections['changelog']) )
- $final_sections['changelog'] = $final_sections['change_log'];
-
-
- $final_screenshots = array();
- if ( isset($final_sections['screenshots']) ) {
- preg_match_all('|(.*?)
#', $final_sections['upgrade_notice'], -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY );
- if ( count($split) >= 2 ) {
- for ( $i = 0; $i < count( $split ); $i += 2 ) {
- $upgrade_notice[$this->sanitize_text( $split[$i] )] = substr( $this->sanitize_text( $split[$i + 1] ), 0, 300 );
- }
- }
- unset( $final_sections['upgrade_notice'] );
- }
-
- // No description?
- // No problem... we'll just fall back to the old style of description
- // We'll even let you use markup this time!
- $excerpt = false;
- if ( !isset($final_sections['description']) ) {
- $final_sections = array_merge(array('description' => $this->filter_text( $_short_description[2], true )), $final_sections);
- $excerpt = true;
- }
-
-
- // dump the non-special sections into $remaining_content
- // their order will be determined by their original order in the readme.txt
- $remaining_content = '';
- foreach ( $sections as $s_name => $s_data ) {
- $remaining_content .= "\n{$s_data['title']}
\n{$s_data['content']}";
- }
- $remaining_content = trim($remaining_content);
-
-
- // All done!
- // $r['tags'] and $r['contributors'] are simple arrays
- // $r['sections'] is an array with named elements
- $r = array(
- 'name' => $name,
- 'tags' => $tags,
- 'requires_at_least' => $requires_at_least,
- 'tested_up_to' => $tested_up_to,
- 'stable_tag' => $stable_tag,
- 'contributors' => $contributors,
- 'donate_link' => $donate_link,
- 'short_description' => $short_description,
- 'screenshots' => $final_screenshots,
- 'is_excerpt' => $excerpt,
- 'is_truncated' => $truncated,
- 'sections' => $final_sections,
- 'remaining_content' => $remaining_content,
- 'upgrade_notice' => $upgrade_notice
- );
-
- return $r;
- }
-
- function chop_string( $string, $chop ) { // chop a "prefix" from a string: Agressive! uses strstr not 0 === strpos
- if ( $_string = strstr($string, $chop) ) {
- $_string = substr($_string, strlen($chop));
- return trim($_string);
- } else {
- return trim($string);
- }
- }
-
- function user_sanitize( $text, $strict = false ) { // whitelisted chars
- if ( function_exists('user_sanitize') ) // bbPress native
- return user_sanitize( $text, $strict );
-
- if ( $strict ) {
- $text = preg_replace('/[^a-z0-9-]/i', '', $text);
- $text = preg_replace('|-+|', '-', $text);
- } else {
- $text = preg_replace('/[^a-z0-9_-]/i', '', $text);
- }
- return $text;
- }
-
- function sanitize_text( $text ) { // not fancy
- $text = strip_tags($text);
- $text = esc_html($text);
- $text = trim($text);
- return $text;
- }
-
- function filter_text( $text, $markdown = false ) { // fancy, Markdown
- $text = trim($text);
-
- $text = call_user_func( array( __CLASS__, 'code_trick' ), $text, $markdown ); // A better parser than Markdown's for: backticks -> CODE
-
- if ( $markdown ) { // Parse markdown.
- if ( !class_exists('Parsedown', false) ) {
- /** @noinspection PhpIncludeInspection */
- require_once(dirname(__FILE__) . '/Parsedown' . (version_compare(PHP_VERSION, '5.3.0', '>=') ? '' : 'Legacy') . '.php');
- }
- $instance = Parsedown::instance();
- $text = $instance->text($text);
- }
-
- $allowed = array(
- 'a' => array(
- 'href' => array(),
- 'title' => array(),
- 'rel' => array()),
- 'blockquote' => array('cite' => array()),
- 'br' => array(),
- 'p' => array(),
- 'code' => array(),
- 'pre' => array(),
- 'em' => array(),
- 'strong' => array(),
- 'ul' => array(),
- 'ol' => array(),
- 'li' => array(),
- 'h3' => array(),
- 'h4' => array()
- );
-
- $text = balanceTags($text);
-
- $text = wp_kses( $text, $allowed );
- $text = trim($text);
- return $text;
- }
-
- function code_trick( $text, $markdown ) { // Don't use bbPress native function - it's incompatible with Markdown
- // If doing markdown, first take any user formatted code blocks and turn them into backticks so that
- // markdown will preserve things like underscores in code blocks
- if ( $markdown )
- $text = preg_replace_callback("!(
|)!s", array( __CLASS__,'decodeit'), $text);
-
- $text = str_replace(array("\r\n", "\r"), "\n", $text);
- if ( !$markdown ) {
- // This gets the "inline" code blocks, but can't be used with Markdown.
- $text = preg_replace_callback("|(`)(.*?)`|", array( __CLASS__, 'encodeit'), $text);
- // This gets the "block level" code blocks and converts them to PRE CODE
- $text = preg_replace_callback("!(^|\n)`(.*?)`!s", array( __CLASS__, 'encodeit'), $text);
- } else {
- // Markdown can do inline code, we convert bbPress style block level code to Markdown style
- $text = preg_replace_callback("!(^|\n)([ \t]*?)`(.*?)`!s", array( __CLASS__, 'indent'), $text);
- }
- return $text;
- }
-
- function indent( $matches ) {
- $text = $matches[3];
- $text = preg_replace('|^|m', $matches[2] . ' ', $text);
- return $matches[1] . $text;
- }
-
- function encodeit( $matches ) {
- if ( function_exists('encodeit') ) // bbPress native
- return encodeit( $matches );
-
- $text = trim($matches[2]);
- $text = htmlspecialchars($text, ENT_QUOTES);
- $text = str_replace(array("\r\n", "\r"), "\n", $text);
- $text = preg_replace("|\n\n\n+|", "\n\n", $text);
- $text = str_replace('<', '<', $text);
- $text = str_replace('>', '>', $text);
- $text = "|
)(.*?)(
$text
";
- if ( "`" != $matches[1] )
- $text = "$text
";
- return $text;
- }
-
- function decodeit( $matches ) {
- if ( function_exists('decodeit') ) // bbPress native
- return decodeit( $matches );
-
- $text = $matches[2];
- $trans_table = array_flip(get_html_translation_table(HTML_ENTITIES));
- $text = strtr($text, $trans_table);
- $text = str_replace('
', '', $text);
- $text = str_replace('&', '&', $text);
- $text = str_replace(''', "'", $text);
- if ( '' == $matches[1] )
- $text = "\n$text\n";
- return "`$text`";
- }
-
-} // end class
-
-endif;
diff --git a/woda-scripts-styles-loader.php b/woda-scripts-styles-loader.php
index df92c04..5e59e92 100644
--- a/woda-scripts-styles-loader.php
+++ b/woda-scripts-styles-loader.php
@@ -3,7 +3,7 @@
* Plugin Name: Woda Scripts Styles Loader
* Plugin URI: https://github.com/wwwoda/woda-scripts-styles-loader
* Description: ...
- * Version: 0.3.1
+ * Version: 0.4.0
* Author: Woda
* Author URI: https://www.woda.at
* License: GNU General Public License v2