diff --git a/wp-admin/about.php b/wp-admin/about.php index 51d6a8d440..5bf7139ca3 100644 --- a/wp-admin/about.php +++ b/wp-admin/about.php @@ -42,7 +42,7 @@ if ( 'en' !== $locale ) { $title = __( 'About' ); -list( $display_version ) = explode( '-', $wp_version ); +list( $display_version ) = explode( '-', get_bloginfo( 'version' ) ); include( ABSPATH . 'wp-admin/admin-header.php' ); ?> diff --git a/wp-admin/admin-header.php b/wp-admin/admin-header.php index 350222c69e..9ec3999ac8 100644 --- a/wp-admin/admin-header.php +++ b/wp-admin/admin-header.php @@ -18,12 +18,11 @@ if ( ! defined( 'WP_ADMIN' ) ) * @global WP_Screen $current_screen * @global WP_Locale $wp_locale * @global string $pagenow - * @global string $wp_version * @global string $update_title * @global int $total_update_count * @global string $parent_file */ -global $title, $hook_suffix, $current_screen, $wp_locale, $pagenow, $wp_version, +global $title, $hook_suffix, $current_screen, $wp_locale, $pagenow, $update_title, $total_update_count, $parent_file; // Catch plugins that include admin-header.php before admin.php completes. @@ -154,8 +153,8 @@ if ( $current_screen->post_type ) if ( $current_screen->taxonomy ) $admin_body_class .= ' taxonomy-' . $current_screen->taxonomy; -$admin_body_class .= ' branch-' . str_replace( array( '.', ',' ), '-', floatval( $wp_version ) ); -$admin_body_class .= ' version-' . str_replace( '.', '-', preg_replace( '/^([.0-9]+).*/', '$1', $wp_version ) ); +$admin_body_class .= ' branch-' . str_replace( array( '.', ',' ), '-', floatval( get_bloginfo( 'version' ) ) ); +$admin_body_class .= ' version-' . str_replace( '.', '-', preg_replace( '/^([.0-9]+).*/', '$1', get_bloginfo( 'version' ) ) ); $admin_body_class .= ' admin-color-' . sanitize_html_class( get_user_option( 'admin_color' ), 'fresh' ); $admin_body_class .= ' locale-' . sanitize_html_class( strtolower( str_replace( '_', '-', get_locale() ) ) ); diff --git a/wp-admin/credits.php b/wp-admin/credits.php index 3f5afc9ee7..6c2ff78015 100644 --- a/wp-admin/credits.php +++ b/wp-admin/credits.php @@ -12,7 +12,7 @@ require_once( dirname( __FILE__ ) . '/includes/credits.php' ); $title = __( 'Credits' ); -list( $display_version ) = explode( '-', $wp_version ); +list( $display_version ) = explode( '-', get_bloginfo( 'version' ) ); include( ABSPATH . 'wp-admin/admin-header.php' ); ?> diff --git a/wp-admin/freedoms.php b/wp-admin/freedoms.php index 811777b07b..f8aa8b4941 100644 --- a/wp-admin/freedoms.php +++ b/wp-admin/freedoms.php @@ -11,7 +11,7 @@ require_once( dirname( __FILE__ ) . '/admin.php' ); $title = __( 'Freedoms' ); -list( $display_version ) = explode( '-', $wp_version ); +list( $display_version ) = explode( '-', get_bloginfo( 'version' ) ); include( ABSPATH . 'wp-admin/admin-header.php' ); ?> diff --git a/wp-admin/includes/class-wp-automatic-updater.php b/wp-admin/includes/class-wp-automatic-updater.php index 102c38e1d7..ea2d70c5ce 100644 --- a/wp-admin/includes/class-wp-automatic-updater.php +++ b/wp-admin/includes/class-wp-automatic-updater.php @@ -371,13 +371,8 @@ class WP_Automatic_Updater { * * @since 3.7.0 * @access public - * - * @global wpdb $wpdb - * @global string $wp_version */ public function run() { - global $wpdb, $wp_version; - if ( $this->is_disabled() ) return; @@ -457,7 +452,7 @@ class WP_Automatic_Updater { // Send debugging email to all development installs. if ( ! empty( $this->update_results ) ) { - $development_version = false !== strpos( $wp_version, '-' ); + $development_version = false !== strpos( get_bloginfo( 'version' ), '-' ); /** * Filters whether to send a debugging email for each automatic background update. @@ -494,12 +489,10 @@ class WP_Automatic_Updater { * @since Unknown * @access protected * - * @global string $wp_version - * * @param object $update_result The result of the core update. Includes the update offer and result. */ protected function after_core_update( $update_result ) { - global $wp_version; + $wp_version = get_bloginfo( 'version' ); $core_update = $update_result->item; $result = $update_result->result; @@ -584,8 +577,6 @@ class WP_Automatic_Updater { * @since 3.7.0 * @access protected * - * @global string $wp_version - * * @param string $type The type of email to send. Can be one of 'success', 'fail', 'manual', 'critical'. * @param object $core_update The update offer that was attempted. * @param mixed $result Optional. The result for the core update. Can be WP_Error. @@ -722,7 +713,7 @@ class WP_Automatic_Updater { if ( 'critical' == $type && is_wp_error( $result ) ) { $body .= "\n***\n\n"; - $body .= sprintf( __( 'Your site was running version %s.' ), $GLOBALS['wp_version'] ); + $body .= sprintf( __( 'Your site was running version %s.' ), get_bloginfo( 'version' ) ); $body .= ' ' . __( 'We have some data that describes the error your site encountered.' ); $body .= ' ' . __( 'Your hosting company, support forum volunteers, or a friendly developer may be able to use this information to help you:' ); diff --git a/wp-admin/includes/class-wp-plugin-install-list-table.php b/wp-admin/includes/class-wp-plugin-install-list-table.php index 2b69ad6b8a..73df40f8f1 100644 --- a/wp-admin/includes/class-wp-plugin-install-list-table.php +++ b/wp-admin/includes/class-wp-plugin-install-list-table.php @@ -69,7 +69,6 @@ class WP_Plugin_Install_List_Table extends WP_List_Table { * @global int $paged * @global string $type * @global string $term - * @global string $wp_version */ public function prepare_items() { include( ABSPATH . 'wp-admin/includes/plugin-install.php' ); @@ -88,7 +87,7 @@ class WP_Plugin_Install_List_Table extends WP_List_Table { if ( 'search' === $tab ) { $tabs['search'] = __( 'Search Results' ); } - if ( $tab === 'beta' || false !== strpos( $GLOBALS['wp_version'], '-' ) ) { + if ( $tab === 'beta' || false !== strpos( get_bloginfo( 'version' ), '-' ) ) { $tabs['beta'] = _x( 'Beta Testing', 'Plugin Installer' ); } $tabs['featured'] = _x( 'Featured', 'Plugin Installer' ); @@ -391,9 +390,6 @@ class WP_Plugin_Install_List_Table extends WP_List_Table { } } - /** - * @global string $wp_version - */ public function display_rows() { $plugins_allowedtags = array( 'a' => array( 'href' => array(),'title' => array(), 'target' => array() ), @@ -574,9 +570,11 @@ class WP_Plugin_Install_List_Table extends WP_List_Table {
' ) ) { + $wp_version = get_bloginfo( 'version' ); + + if ( ! empty( $plugin['tested'] ) && version_compare( substr( $wp_version, 0, strlen( $plugin['tested'] ) ), $plugin['tested'], '>' ) ) { echo '' . __( 'Untested with your version of WordPress' ) . ''; - } elseif ( ! empty( $plugin['requires'] ) && version_compare( substr( $GLOBALS['wp_version'], 0, strlen( $plugin['requires'] ) ), $plugin['requires'], '<' ) ) { + } elseif ( ! empty( $plugin['requires'] ) && version_compare( substr( $wp_version, 0, strlen( $plugin['requires'] ) ), $plugin['requires'], '<' ) ) { echo '' . __( 'Incompatible with your version of WordPress' ) . ''; } else { echo '' . __( 'Compatible with your version of WordPress' ) . ''; diff --git a/wp-admin/includes/class-wp-press-this.php b/wp-admin/includes/class-wp-press-this.php index 9b3c1fa599..bc6f7f90ff 100644 --- a/wp-admin/includes/class-wp-press-this.php +++ b/wp-admin/includes/class-wp-press-this.php @@ -267,8 +267,6 @@ class WP_Press_This { * @return string Source's HTML sanitized markup */ public function fetch_source_html( $url ) { - global $wp_version; - if ( empty( $url ) ) { return new WP_Error( 'invalid-url', __( 'A valid URL was not provided.' ) ); } @@ -276,7 +274,7 @@ class WP_Press_This { $remote_url = wp_safe_remote_get( $url, array( 'timeout' => 30, // Use an explicit user-agent for Press This - 'user-agent' => 'Press This (WordPress/' . $wp_version . '); ' . get_bloginfo( 'url' ) + 'user-agent' => 'Press This (WordPress/' . get_bloginfo( 'version' ) . '); ' . get_bloginfo( 'url' ) ) ); if ( is_wp_error( $remote_url ) ) { @@ -1189,11 +1187,12 @@ class WP_Press_This { * @access public * * @global WP_Locale $wp_locale - * @global string $wp_version * @global bool $is_IE */ public function html() { - global $wp_locale, $wp_version; + global $wp_locale; + + $wp_version = get_bloginfo( 'version' ); // Get data, new (POST) and old (GET). $data = $this->merge_or_fetch_data(); diff --git a/wp-admin/includes/credits.php b/wp-admin/includes/credits.php index 80f1269ec2..6634724c84 100644 --- a/wp-admin/includes/credits.php +++ b/wp-admin/includes/credits.php @@ -10,14 +10,12 @@ /** * Retrieve the contributor credits. * - * @global string $wp_version The current WordPress version. - * * @since 3.2.0 * * @return array|false A list of all of the contributors, or false on error. */ function wp_credits() { - global $wp_version; + $wp_version = get_bloginfo( 'version' ); $locale = get_locale(); $results = get_site_transient( 'wordpress_credits_' . $locale ); @@ -26,7 +24,7 @@ function wp_credits() { || false !== strpos( $wp_version, '-' ) || ( isset( $results['data']['version'] ) && strpos( $wp_version, $results['data']['version'] ) !== 0 ) ) { - $response = wp_remote_get( "http://api.wordpress.org/core/credits/1.1/?version=$wp_version&locale=$locale" ); + $response = wp_remote_get( "http://api.wordpress.org/core/credits/1.1/?version={$wp_version}&locale={$locale}" ); if ( is_wp_error( $response ) || 200 != wp_remote_retrieve_response_code( $response ) ) return false; diff --git a/wp-admin/includes/dashboard.php b/wp-admin/includes/dashboard.php index 50074ef7e8..f3d2f797e4 100644 --- a/wp-admin/includes/dashboard.php +++ b/wp-admin/includes/dashboard.php @@ -1393,8 +1393,6 @@ function dashboard_browser_nag_class( $classes ) { * * @since 3.2.0 * - * @global string $wp_version - * * @return array|bool False on failure, array of browser data on success. */ function wp_check_browser_version() { @@ -1404,11 +1402,9 @@ function wp_check_browser_version() { $key = md5( $_SERVER['HTTP_USER_AGENT'] ); if ( false === ($response = get_site_transient('browser_' . $key) ) ) { - global $wp_version; - $options = array( 'body' => array( 'useragent' => $_SERVER['HTTP_USER_AGENT'] ), - 'user-agent' => 'WordPress/' . $wp_version . '; ' . home_url() + 'user-agent' => 'WordPress/' . get_bloginfo( 'version' ) . '; ' . home_url() ); $response = wp_remote_post( 'http://api.wordpress.org/core/browse-happy/1.1/', $options ); diff --git a/wp-admin/includes/plugin-install.php b/wp-admin/includes/plugin-install.php index 7c5df8447f..a33797e540 100644 --- a/wp-admin/includes/plugin-install.php +++ b/wp-admin/includes/plugin-install.php @@ -423,7 +423,6 @@ function install_plugin_install_status($api, $loop = false) { * @since 2.7.0 * * @global string $tab - * @global string $wp_version */ function install_plugin_information() { global $tab; @@ -630,9 +629,11 @@ function install_plugin_information() {
tested ) && version_compare( substr( $GLOBALS['wp_version'], 0, strlen( $api->tested ) ), $api->tested, '>' ) ) { + $wp_version = get_bloginfo( 'version' ); + + if ( ! empty( $api->tested ) && version_compare( substr( $wp_version, 0, strlen( $api->tested ) ), $api->tested, '>' ) ) { echo '

' . __( 'Warning: This plugin has not been tested with your current version of WordPress.' ) . '

'; - } elseif ( ! empty( $api->requires ) && version_compare( substr( $GLOBALS['wp_version'], 0, strlen( $api->requires ) ), $api->requires, '<' ) ) { + } elseif ( ! empty( $api->requires ) && version_compare( substr( $wp_version, 0, strlen( $api->requires ) ), $api->requires, '<' ) ) { echo '

' . __( 'Warning: This plugin has not been marked as compatible with your version of WordPress.' ) . '

'; } diff --git a/wp-admin/plugin-editor.php b/wp-admin/plugin-editor.php index 754c4265b2..9919005416 100644 --- a/wp-admin/plugin-editor.php +++ b/wp-admin/plugin-editor.php @@ -260,7 +260,7 @@ foreach ( $plugin_files as $plugin_file ) :
-
+
diff --git a/wp-admin/theme-editor.php b/wp-admin/theme-editor.php index d6c492fc0f..0b100cf881 100644 --- a/wp-admin/theme-editor.php +++ b/wp-admin/theme-editor.php @@ -263,7 +263,7 @@ else : ?>
- +
diff --git a/wp-admin/update-core.php b/wp-admin/update-core.php index c83fddd5bc..aec07adc81 100644 --- a/wp-admin/update-core.php +++ b/wp-admin/update-core.php @@ -26,16 +26,17 @@ if ( ! current_user_can( 'update_core' ) && ! current_user_can( 'update_themes' * * @global string $wp_local_package * @global wpdb $wpdb - * @global string $wp_version * * @staticvar bool $first_pass * * @param object $update */ function list_core_update( $update ) { - global $wp_local_package, $wpdb, $wp_version; + global $wp_local_package, $wpdb; static $first_pass = true; + $wp_version = get_bloginfo( 'version' ); + if ( 'en_US' == $update->locale && 'en_US' == get_locale() ) $version_string = $update->current; // If the only available update is a partial builds, it doesn't need a language-specific version string. @@ -149,13 +150,13 @@ function dismissed_updates() { * * @since 2.7.0 * - * @global string $wp_version * @global string $required_php_version * @global string $required_mysql_version */ function core_upgrade_preamble() { - global $wp_version, $required_php_version, $required_mysql_version; + global $required_php_version, $required_mysql_version; + $wp_version = get_bloginfo( 'version' ); $updates = get_core_updates(); if ( !isset($updates[0]->response) || 'latest' == $updates[0]->response ) { @@ -211,14 +212,9 @@ function core_upgrade_preamble() { dismissed_updates(); } -/** - * - * @global string $wp_version - */ function list_plugin_updates() { - global $wp_version; - - $cur_wp_version = preg_replace('/-.*$/', '', $wp_version); + $wp_version = get_bloginfo( 'version' ); + $cur_wp_version = preg_replace( '/-.*$/', '', $wp_version ); require_once(ABSPATH . 'wp-admin/includes/plugin-install.php'); $plugins = get_plugin_updates(); diff --git a/wp-includes/class-http.php b/wp-includes/class-http.php index c7a09cfc40..4872a1978a 100644 --- a/wp-includes/class-http.php +++ b/wp-includes/class-http.php @@ -101,8 +101,6 @@ class WP_Http { * @access public * @since 2.7.0 * - * @global string $wp_version - * * @param string $url The request URL. * @param string|array $args { * Optional. Array or string of HTTP request arguments. @@ -116,7 +114,7 @@ class WP_Http { * @type string $httpversion Version of the HTTP protocol to use. Accepts '1.0' and '1.1'. * Default '1.0'. * @type string $user-agent User-agent value sent. - * Default WordPress/' . $wp_version . '; ' . get_bloginfo( 'url' ). + * Default WordPress/' . get_bloginfo( 'version' ) . '; ' . get_bloginfo( 'url' ). * @type bool $reject_unsafe_urls Whether to pass URLs through wp_http_validate_url(). * Default false. * @type bool $blocking Whether the calling code requires the result of the request. @@ -148,8 +146,6 @@ class WP_Http { * A WP_Error instance upon error. */ public function request( $url, $args = array() ) { - global $wp_version; - $defaults = array( 'method' => 'GET', /** @@ -185,7 +181,7 @@ class WP_Http { * * @param string $user_agent WordPress user agent string. */ - 'user-agent' => apply_filters( 'http_headers_useragent', 'WordPress/' . $wp_version . '; ' . get_bloginfo( 'url' ) ), + 'user-agent' => apply_filters( 'http_headers_useragent', 'WordPress/' . get_bloginfo( 'version' ) . '; ' . get_bloginfo( 'url' ) ), /** * Filters whether to pass URLs through wp_http_validate_url() in an HTTP request. * diff --git a/wp-includes/class-wp-editor.php b/wp-includes/class-wp-editor.php index f7137f83ed..6e6feccbc7 100644 --- a/wp-includes/class-wp-editor.php +++ b/wp-includes/class-wp-editor.php @@ -296,14 +296,13 @@ final class _WP_Editors { /** * @static * - * @global string $wp_version * @global string $tinymce_version * * @param string $editor_id * @param array $set */ public static function editor_settings($editor_id, $set) { - global $wp_version, $tinymce_version; + global $tinymce_version; if ( empty(self::$first_init) ) { if ( is_admin() ) { @@ -559,7 +558,7 @@ final class _WP_Editors { } $suffix = SCRIPT_DEBUG ? '' : '.min'; - $version = 'ver=' . $wp_version; + $version = 'ver=' . get_bloginfo( 'version' ); $dashicons = includes_url( "css/dashicons$suffix.css?$version" ); // WordPress default stylesheet and dashicons @@ -1131,13 +1130,12 @@ final class _WP_Editors { /** * * @static - * @global string $wp_version * @global string $tinymce_version * @global bool $concatenate_scripts * @global bool $compress_scripts */ public static function editor_js() { - global $wp_version, $tinymce_version, $concatenate_scripts, $compress_scripts; + global $tinymce_version, $concatenate_scripts, $compress_scripts; /** * Filters "tiny_mce_version" is deprecated @@ -1215,7 +1213,7 @@ final class _WP_Editors { $baseurl = self::$baseurl; // Load tinymce.js when running from /src, else load wp-tinymce.js.gz (production) or tinymce.min.js (SCRIPT_DEBUG) - $mce_suffix = false !== strpos( $wp_version, '-src' ) ? '' : '.min'; + $mce_suffix = false !== strpos( get_bloginfo( 'version' ), '-src' ) ? '' : '.min'; if ( $tmce_on ) { if ( $compressed ) { diff --git a/wp-includes/class-wp-locale.php b/wp-includes/class-wp-locale.php index a8a00f4409..2cc6afaa00 100644 --- a/wp-includes/class-wp-locale.php +++ b/wp-includes/class-wp-locale.php @@ -125,7 +125,6 @@ class WP_Locale { * @access private * * @global string $text_direction - * @global string $wp_version */ public function init() { // The Weekdays @@ -231,7 +230,7 @@ class WP_Locale { elseif ( 'rtl' == _x( 'ltr', 'text direction' ) ) $this->text_direction = 'rtl'; - if ( 'rtl' === $this->text_direction && strpos( $GLOBALS['wp_version'], '-src' ) ) { + if ( 'rtl' === $this->text_direction && strpos( get_bloginfo( 'version' ), '-src' ) ) { $this->text_direction = 'ltr'; add_action( 'all_admin_notices', array( $this, 'rtl_src_admin_notice' ) ); } diff --git a/wp-includes/class-wp-xmlrpc-server.php b/wp-includes/class-wp-xmlrpc-server.php index c8e8f9610a..e338c84948 100644 --- a/wp-includes/class-wp-xmlrpc-server.php +++ b/wp-includes/class-wp-xmlrpc-server.php @@ -413,12 +413,8 @@ class wp_xmlrpc_server extends IXR_Server { * Passes property through {@see 'xmlrpc_blog_options'} filter. * * @since 2.6.0 - * - * @global string $wp_version */ public function initialise_blog_option_info() { - global $wp_version; - $this->blog_options = array( // Read only options 'software_name' => array( @@ -429,7 +425,7 @@ class wp_xmlrpc_server extends IXR_Server { 'software_version' => array( 'desc' => __( 'Software Version' ), 'readonly' => true, - 'value' => $wp_version + 'value' => get_bloginfo( 'version' ) ), 'blog_url' => array( 'desc' => __( 'WordPress Address (URL)' ), @@ -6186,8 +6182,6 @@ class wp_xmlrpc_server extends IXR_Server { * * @since 1.5.0 * - * @global string $wp_version - * * @param array $args { * Method arguments. Note: arguments must be ordered as documented. * @@ -6197,8 +6191,6 @@ class wp_xmlrpc_server extends IXR_Server { * @return string|IXR_Error */ public function pingback_ping( $args ) { - global $wp_version; - /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ do_action( 'xmlrpc_call', 'pingback.ping' ); @@ -6285,7 +6277,7 @@ class wp_xmlrpc_server extends IXR_Server { $remote_ip = preg_replace( '/[^0-9a-fA-F:., ]/', '', $_SERVER['REMOTE_ADDR'] ); /** This filter is documented in wp-includes/class-http.php */ - $user_agent = apply_filters( 'http_headers_useragent', 'WordPress/' . $wp_version . '; ' . get_bloginfo( 'url' ) ); + $user_agent = apply_filters( 'http_headers_useragent', 'WordPress/' . get_bloginfo( 'version' ) . '; ' . get_bloginfo( 'url' ) ); // Let's check the remote site $http_api_args = array( diff --git a/wp-includes/comment.php b/wp-includes/comment.php index 421bdbcd28..f88eb52825 100644 --- a/wp-includes/comment.php +++ b/wp-includes/comment.php @@ -2362,14 +2362,10 @@ function generic_ping( $post_id = 0 ) { * * @since 0.71 * - * @global string $wp_version - * * @param string $content Post content to check for links. * @param int $post_ID Post ID. */ function pingback($content, $post_ID) { - global $wp_version; - // original code by Mort (http://mort.mine.nu:8080) $post_links = array(); @@ -2435,7 +2431,7 @@ function pingback($content, $post_ID) { * @param string $pagelinkedto URL of page linked to. * @param string $pagelinkedfrom URL of page linked from. */ - $client->useragent = apply_filters( 'pingback_useragent', $client->useragent . ' -- WordPress/' . $wp_version, $client->useragent, $pingback_server_url, $pagelinkedto, $pagelinkedfrom ); + $client->useragent = apply_filters( 'pingback_useragent', $client->useragent . ' -- WordPress/' . get_bloginfo( 'version' ), $client->useragent, $pingback_server_url, $pagelinkedto, $pagelinkedfrom ); // when set to true, this outputs debug messages by itself $client->debug = false; @@ -2504,18 +2500,14 @@ function trackback($trackback_url, $title, $excerpt, $ID) { * * @since 1.2.0 * - * @global string $wp_version - * * @param string $server Host of blog to connect to. * @param string $path Path to send the ping. */ function weblog_ping($server = '', $path = '') { - global $wp_version; - // using a timeout of 3 seconds should be enough to cover slow servers $client = new WP_HTTP_IXR_Client($server, ((!strlen(trim($path)) || ('/' == $path)) ? false : $path)); $client->timeout = 3; - $client->useragent .= ' -- WordPress/'.$wp_version; + $client->useragent .= ' -- WordPress/' . get_bloginfo( 'version' ); // when set to true, this outputs debug messages by itself $client->debug = false; diff --git a/wp-includes/formatting.php b/wp-includes/formatting.php index 0e6e6850f3..a29e317b09 100644 --- a/wp-includes/formatting.php +++ b/wp-includes/formatting.php @@ -4927,12 +4927,8 @@ function print_emoji_detection_script() { * @ignore * @since 4.6.0 * @access private - * - * @global string $wp_version WordPress version string. */ function _print_emoji_detection_script() { - global $wp_version; - $settings = array( /** * Filters the URL where emoji png images are hosted. @@ -4971,7 +4967,7 @@ function _print_emoji_detection_script() { 'svgExt' => apply_filters( 'emoji_svg_ext', '.svg' ), ); - $version = 'ver=' . $wp_version; + $version = 'ver=' . get_bloginfo( 'version' ); if ( SCRIPT_DEBUG ) { $settings['source'] = array( diff --git a/wp-includes/general-template.php b/wp-includes/general-template.php index 2161efac97..7a056412d5 100644 --- a/wp-includes/general-template.php +++ b/wp-includes/general-template.php @@ -3344,8 +3344,6 @@ function wp_admin_css_color( $key, $name, $url, $colors = array(), $icons = arra * Registers the default Admin color schemes * * @since 3.0.0 - * - * @global string $wp_version */ function register_admin_color_schemes() { $suffix = is_rtl() ? '-rtl' : ''; @@ -3358,8 +3356,9 @@ function register_admin_color_schemes() { ); // Other color schemes are not available when running out of src - if ( false !== strpos( $GLOBALS['wp_version'], '-src' ) ) + if ( false !== strpos( get_bloginfo( 'version' ), '-src' ) ) { return; + } wp_admin_css_color( 'light', _x( 'Light', 'admin color scheme' ), admin_url( "css/colors/light/colors$suffix.css" ), diff --git a/wp-includes/link-template.php b/wp-includes/link-template.php index 77fbd7b469..4d2a757d26 100644 --- a/wp-includes/link-template.php +++ b/wp-includes/link-template.php @@ -2897,17 +2897,13 @@ function the_comments_pagination( $args = array() ) { * * @since 2.6.0 * - * @global bool $is_IE Whether the browser matches an Internet Explorer user agent. - * @global string $wp_version WP version. - * - * @global bool $is_IE - * @global string $wp_version + * @global bool $is_IE Whether the browser matches an Internet Explorer user agent. * @global WP_Press_This $wp_press_this * * @return string The Press This bookmarklet link URL. */ function get_shortcut_link() { - global $is_IE, $wp_version; + global $is_IE; $GLOBALS['wp_press_this'] = new WP_Press_This(); $bookmarklet_version = $GLOBALS['wp_press_this']->version; diff --git a/wp-includes/media.php b/wp-includes/media.php index fc5508de48..3a5685c475 100644 --- a/wp-includes/media.php +++ b/wp-includes/media.php @@ -3810,12 +3810,10 @@ function attachment_url_to_postid( $url ) { * * @since 4.0.0 * - * @global string $wp_version - * * @return array The relevant CSS file URLs. */ function wpview_media_sandbox_styles() { - $version = 'ver=' . $GLOBALS['wp_version']; + $version = 'ver=' . get_bloginfo( 'version' ); $mediaelement = includes_url( "js/mediaelement/mediaelementplayer.min.css?$version" ); $wpmediaelement = includes_url( "js/mediaelement/wp-mediaelement.css?$version" ); diff --git a/wp-includes/version.php b/wp-includes/version.php index f3e136a6e3..7df4087794 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.7-alpha-38458'; +$wp_version = '4.7-alpha-38459'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.