Coding Standards: Explicitly declare the $wp_version global used in some core files.

Props jaydeep-rami, sabernhardt.
Fixes #44932.
Built from https://develop.svn.wordpress.org/trunk@48971


git-svn-id: http://core.svn.wordpress.org/trunk@48733 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov
2020-09-12 00:12:08 +00:00
parent f29d62012d
commit 282c813259
4 changed files with 10 additions and 8 deletions

View File

@@ -519,12 +519,13 @@ class Theme_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 full path to the package source.
* @return string|WP_Error The source or a WP_Error.
*/
public function check_package( $source ) {
global $wp_filesystem;
global $wp_filesystem, $wp_version;
$this->new_theme_data = array();
@@ -606,7 +607,7 @@ class Theme_Upgrader extends WP_Upgrader {
$error = sprintf(
/* translators: 1: Current WordPress version, 2: Version required by the uploaded theme. */
__( 'Your WordPress version is %1$s, however the uploaded theme requires %2$s.' ),
$GLOBALS['wp_version'],
$wp_version,
$requires_wp
);