-
Notifications
You must be signed in to change notification settings - Fork 156
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #937 from 10up/feature/update-plugin-updater
Update `yahnis-elsts/plugin-update-checker` from 4.9 to 4.13 # Conflicts: # composer.json # composer.lock
- Loading branch information
1 parent
e0f5410
commit 7e6d0a5
Showing
81 changed files
with
1,669 additions
and
378 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<?php | ||
if ( !class_exists('Puc_v4_Factory', false) ): | ||
|
||
class Puc_v4_Factory extends Puc_v4p9_Factory { } | ||
class Puc_v4_Factory extends Puc_v4p13_Factory { } | ||
|
||
endif; |
70 changes: 70 additions & 0 deletions
70
vendor/yahnis-elsts/plugin-update-checker/Puc/v4p13/Autoloader.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
<?php | ||
|
||
if ( !class_exists('Puc_v4p13_Autoloader', false) ): | ||
|
||
class Puc_v4p13_Autoloader { | ||
private $prefix = ''; | ||
private $rootDir = ''; | ||
private $libraryDir = ''; | ||
|
||
private $staticMap; | ||
|
||
public function __construct() { | ||
$this->rootDir = dirname(__FILE__) . '/'; | ||
|
||
if ( version_compare(PHP_VERSION, '5.3', '>=') && __NAMESPACE__ ) { | ||
$namespaceWithSlash = __NAMESPACE__ . '\\'; | ||
} else { | ||
$namespaceWithSlash = ''; | ||
} | ||
|
||
$nameParts = explode('_', substr(__CLASS__, strlen($namespaceWithSlash)), 3); | ||
$this->prefix = $namespaceWithSlash . $nameParts[0] . '_' . $nameParts[1] . '_'; | ||
|
||
$this->libraryDir = $this->rootDir . '../..'; | ||
if ( !self::isPhar() ) { | ||
$this->libraryDir = realpath($this->libraryDir); | ||
} | ||
$this->libraryDir = $this->libraryDir . '/'; | ||
|
||
$this->staticMap = array( | ||
$namespaceWithSlash . 'PucReadmeParser' => 'vendor/PucReadmeParser.php', | ||
$namespaceWithSlash . 'Parsedown' => 'vendor/Parsedown.php', | ||
$namespaceWithSlash . 'Puc_v4_Factory' => 'Puc/v4/Factory.php', | ||
); | ||
|
||
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 */ | ||
include ($this->libraryDir . $this->staticMap[$className]); | ||
return; | ||
} | ||
|
||
if (strpos($className, $this->prefix) === 0) { | ||
$path = substr($className, strlen($this->prefix)); | ||
$path = str_replace('_', '/', $path); | ||
$path = $this->rootDir . $path . '.php'; | ||
|
||
if (file_exists($path)) { | ||
/** @noinspection PhpIncludeInspection */ | ||
include $path; | ||
} | ||
} | ||
} | ||
} | ||
|
||
endif; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
...pdate-checker/Puc/v4p9/DebugBar/Panel.php → ...date-checker/Puc/v4p13/DebugBar/Panel.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 4 additions & 4 deletions
8
...ker/Puc/v4p9/DebugBar/PluginExtension.php → ...er/Puc/v4p13/DebugBar/PluginExtension.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
...checker/Puc/v4p9/DebugBar/PluginPanel.php → ...hecker/Puc/v4p13/DebugBar/PluginPanel.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
...-checker/Puc/v4p9/DebugBar/ThemePanel.php → ...checker/Puc/v4p13/DebugBar/ThemePanel.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.