General: use `get_bloginfo( 'version' )` instead of `global $wp_version` in several locations - excluding those locations which reload `version.php` mid-flight.
See #37699. Built from https://develop.svn.wordpress.org/trunk@38459 git-svn-id: http://core.svn.wordpress.org/trunk@38400 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
cabb4a03c8
commit
9383bf8f74
|
@ -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' );
|
||||
?>
|
||||
|
|
|
@ -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() ) ) );
|
||||
|
||||
|
|
|
@ -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' );
|
||||
?>
|
||||
|
|
|
@ -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' );
|
||||
?>
|
||||
|
|
|
@ -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:' );
|
||||
|
||||
|
|
|
@ -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 {
|
|||
</div>
|
||||
<div class="column-compatibility">
|
||||
<?php
|
||||
if ( ! empty( $plugin['tested'] ) && version_compare( substr( $GLOBALS['wp_version'], 0, strlen( $plugin['tested'] ) ), $plugin['tested'], '>' ) ) {
|
||||
$wp_version = get_bloginfo( 'version' );
|
||||
|
||||
if ( ! empty( $plugin['tested'] ) && version_compare( substr( $wp_version, 0, strlen( $plugin['tested'] ) ), $plugin['tested'], '>' ) ) {
|
||||
echo '<span class="compatibility-untested">' . __( 'Untested with your version of WordPress' ) . '</span>';
|
||||
} 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 '<span class="compatibility-incompatible">' . __( '<strong>Incompatible</strong> with your version of WordPress' ) . '</span>';
|
||||
} else {
|
||||
echo '<span class="compatibility-compatible">' . __( '<strong>Compatible</strong> with your version of WordPress' ) . '</span>';
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 );
|
||||
|
|
|
@ -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() {
|
|||
</div>
|
||||
<div id="section-holder" class="wrap">
|
||||
<?php
|
||||
if ( ! empty( $api->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 '<div class="notice notice-warning notice-alt"><p>' . __( '<strong>Warning:</strong> This plugin has <strong>not been tested</strong> with your current version of WordPress.' ) . '</p></div>';
|
||||
} 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 '<div class="notice notice-warning notice-alt"><p>' . __( '<strong>Warning:</strong> This plugin has <strong>not been marked as compatible</strong> with your version of WordPress.' ) . '</p></div>';
|
||||
}
|
||||
|
||||
|
|
|
@ -260,7 +260,7 @@ foreach ( $plugin_files as $plugin_file ) :
|
|||
<input type="hidden" name="scrollto" id="scrollto" value="<?php echo $scrollto; ?>" />
|
||||
</div>
|
||||
<?php if ( !empty( $docs_select ) ) : ?>
|
||||
<div id="documentation" class="hide-if-no-js"><label for="docs-list"><?php _e('Documentation:') ?></label> <?php echo $docs_select ?> <input type="button" class="button" value="<?php esc_attr_e( 'Look Up' ) ?> " onclick="if ( '' != jQuery('#docs-list').val() ) { window.open( 'https://api.wordpress.org/core/handbook/1.0/?function=' + escape( jQuery( '#docs-list' ).val() ) + '&locale=<?php echo urlencode( get_locale() ) ?>&version=<?php echo urlencode( $wp_version ) ?>&redirect=true'); }" /></div>
|
||||
<div id="documentation" class="hide-if-no-js"><label for="docs-list"><?php _e('Documentation:') ?></label> <?php echo $docs_select ?> <input type="button" class="button" value="<?php esc_attr_e( 'Look Up' ) ?> " onclick="if ( '' != jQuery('#docs-list').val() ) { window.open( 'https://api.wordpress.org/core/handbook/1.0/?function=' + escape( jQuery( '#docs-list' ).val() ) + '&locale=<?php echo urlencode( get_locale() ) ?>&version=<?php echo urlencode( get_bloginfo( 'version' ) ) ?>&redirect=true'); }" /></div>
|
||||
<?php endif; ?>
|
||||
<?php if ( is_writeable($real_file) ) : ?>
|
||||
<?php if ( in_array( $file, (array) get_option( 'active_plugins', array() ) ) ) { ?>
|
||||
|
|
|
@ -263,7 +263,7 @@ else : ?>
|
|||
<div id="documentation" class="hide-if-no-js">
|
||||
<label for="docs-list"><?php _e('Documentation:') ?></label>
|
||||
<?php echo $docs_select; ?>
|
||||
<input type="button" class="button" value="<?php esc_attr_e( 'Look Up' ); ?>" onclick="if ( '' != jQuery('#docs-list').val() ) { window.open( 'https://api.wordpress.org/core/handbook/1.0/?function=' + escape( jQuery( '#docs-list' ).val() ) + '&locale=<?php echo urlencode( get_locale() ) ?>&version=<?php echo urlencode( $wp_version ) ?>&redirect=true'); }" />
|
||||
<input type="button" class="button" value="<?php esc_attr_e( 'Look Up' ); ?>" onclick="if ( '' != jQuery('#docs-list').val() ) { window.open( 'https://api.wordpress.org/core/handbook/1.0/?function=' + escape( jQuery( '#docs-list' ).val() ) + '&locale=<?php echo urlencode( get_locale() ) ?>&version=<?php echo urlencode( get_bloginfo( 'version' ) ) ?>&redirect=true'); }" />
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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.
|
||||
*
|
||||
|
|
|
@ -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 ) {
|
||||
|
|
|
@ -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' ) );
|
||||
}
|
||||
|
|
|
@ -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(
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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(
|
||||
|
|
|
@ -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" ),
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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" );
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue