mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 20:30:23 +00:00
Coding Standards: Explicitly declare the $wp_version global used in some core files.
Props jaydeep-rami, sabernhardt. Fixes #44932. git-svn-id: https://develop.svn.wordpress.org/trunk@48971 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -406,13 +406,14 @@ class Plugin_Upgrader extends WP_Upgrader {
|
||||
* @since 3.3.0
|
||||
*
|
||||
* @global WP_Filesystem_Base $wp_filesystem WordPress filesystem subclass.
|
||||
* @global string $wp_version The WordPress version string.
|
||||
*
|
||||
* @param string $source The path to the downloaded package source.
|
||||
* @return string|WP_Error The source as passed, or a WP_Error object
|
||||
* if no plugins were found.
|
||||
*/
|
||||
public function check_package( $source ) {
|
||||
global $wp_filesystem;
|
||||
global $wp_filesystem, $wp_version;
|
||||
|
||||
$this->new_plugin_data = array();
|
||||
|
||||
@@ -459,7 +460,7 @@ class Plugin_Upgrader extends WP_Upgrader {
|
||||
$error = sprintf(
|
||||
/* translators: 1: Current WordPress version, 2: Version required by the uploaded plugin. */
|
||||
__( 'Your WordPress version is %1$s, however the uploaded plugin requires %2$s.' ),
|
||||
$GLOBALS['wp_version'],
|
||||
$wp_version,
|
||||
$requires_wp
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user