Ticket #37699: 37699-version.3.diff
File 37699-version.3.diff, 10.9 KB (added by , 8 years ago) |
---|
-
src/wp-includes/class-http.php
101 101 * @access public 102 102 * @since 2.7.0 103 103 * 104 * @global string $wp_version105 *106 104 * @param string $url The request URL. 107 105 * @param string|array $args { 108 106 * Optional. Array or string of HTTP request arguments. … … 116 114 * @type string $httpversion Version of the HTTP protocol to use. Accepts '1.0' and '1.1'. 117 115 * Default '1.0'. 118 116 * @type string $user-agent User-agent value sent. 119 * Default WordPress/' . $wp_version. '; ' . get_bloginfo( 'url' ).117 * Default WordPress/' . get_bloginfo( 'version' ) . '; ' . get_bloginfo( 'url' ). 120 118 * @type bool $reject_unsafe_urls Whether to pass URLs through wp_http_validate_url(). 121 119 * Default false. 122 120 * @type bool $blocking Whether the calling code requires the result of the request. … … 148 146 * A WP_Error instance upon error. 149 147 */ 150 148 public function request( $url, $args = array() ) { 151 global $wp_version;152 153 149 $defaults = array( 154 150 'method' => 'GET', 155 151 /** … … 185 181 * 186 182 * @param string $user_agent WordPress user agent string. 187 183 */ 188 'user-agent' => apply_filters( 'http_headers_useragent', 'WordPress/' . $wp_version. '; ' . get_bloginfo( 'url' ) ),184 'user-agent' => apply_filters( 'http_headers_useragent', 'WordPress/' . get_bloginfo( 'version' ) . '; ' . get_bloginfo( 'url' ) ), 189 185 /** 190 186 * Filters whether to pass URLs through wp_http_validate_url() in an HTTP request. 191 187 * -
src/wp-includes/class-wp-editor.php
296 296 /** 297 297 * @static 298 298 * 299 * @global string $wp_version300 299 * @global string $tinymce_version 301 300 * 302 301 * @param string $editor_id … … 303 302 * @param array $set 304 303 */ 305 304 public static function editor_settings($editor_id, $set) { 306 global $ wp_version, $tinymce_version;305 global $tinymce_version; 307 306 308 307 if ( empty(self::$first_init) ) { 309 308 if ( is_admin() ) { … … 559 558 } 560 559 561 560 $suffix = SCRIPT_DEBUG ? '' : '.min'; 562 $version = 'ver=' . $wp_version;561 $version = 'ver=' . get_bloginfo( 'version' ); 563 562 $dashicons = includes_url( "css/dashicons$suffix.css?$version" ); 564 563 565 564 // WordPress default stylesheet and dashicons … … 1131 1130 /** 1132 1131 * 1133 1132 * @static 1134 * @global string $wp_version1135 1133 * @global string $tinymce_version 1136 1134 * @global bool $concatenate_scripts 1137 1135 * @global bool $compress_scripts 1138 1136 */ 1139 1137 public static function editor_js() { 1140 global $ wp_version, $tinymce_version, $concatenate_scripts, $compress_scripts;1138 global $tinymce_version, $concatenate_scripts, $compress_scripts; 1141 1139 1142 1140 /** 1143 1141 * Filters "tiny_mce_version" is deprecated … … 1215 1213 1216 1214 $baseurl = self::$baseurl; 1217 1215 // Load tinymce.js when running from /src, else load wp-tinymce.js.gz (production) or tinymce.min.js (SCRIPT_DEBUG) 1218 $mce_suffix = false !== strpos( $wp_version, '-src' ) ? '' : '.min';1216 $mce_suffix = false !== strpos( get_bloginfo( 'version' ), '-src' ) ? '' : '.min'; 1219 1217 1220 1218 if ( $tmce_on ) { 1221 1219 if ( $compressed ) { -
src/wp-includes/class-wp-locale.php
125 125 * @access private 126 126 * 127 127 * @global string $text_direction 128 * @global string $wp_version129 128 */ 130 129 public function init() { 131 130 // The Weekdays … … 231 230 elseif ( 'rtl' == _x( 'ltr', 'text direction' ) ) 232 231 $this->text_direction = 'rtl'; 233 232 234 if ( 'rtl' === $this->text_direction && strpos( $GLOBALS['wp_version'], '-src' ) ) {233 if ( 'rtl' === $this->text_direction && strpos( get_bloginfo( 'version' ), '-src' ) ) { 235 234 $this->text_direction = 'ltr'; 236 235 add_action( 'all_admin_notices', array( $this, 'rtl_src_admin_notice' ) ); 237 236 } -
src/wp-includes/class-wp-xmlrpc-server.php
413 413 * Passes property through {@see 'xmlrpc_blog_options'} filter. 414 414 * 415 415 * @since 2.6.0 416 *417 * @global string $wp_version418 416 */ 419 417 public function initialise_blog_option_info() { 420 global $wp_version;421 422 418 $this->blog_options = array( 423 419 // Read only options 424 420 'software_name' => array( … … 429 425 'software_version' => array( 430 426 'desc' => __( 'Software Version' ), 431 427 'readonly' => true, 432 'value' => $wp_version428 'value' => get_bloginfo( 'version' ) 433 429 ), 434 430 'blog_url' => array( 435 431 'desc' => __( 'WordPress Address (URL)' ), … … 6186 6182 * 6187 6183 * @since 1.5.0 6188 6184 * 6189 * @global string $wp_version6190 *6191 6185 * @param array $args { 6192 6186 * Method arguments. Note: arguments must be ordered as documented. 6193 6187 * … … 6197 6191 * @return string|IXR_Error 6198 6192 */ 6199 6193 public function pingback_ping( $args ) { 6200 global $wp_version;6201 6202 6194 /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */ 6203 6195 do_action( 'xmlrpc_call', 'pingback.ping' ); 6204 6196 … … 6285 6277 $remote_ip = preg_replace( '/[^0-9a-fA-F:., ]/', '', $_SERVER['REMOTE_ADDR'] ); 6286 6278 6287 6279 /** This filter is documented in wp-includes/class-http.php */ 6288 $user_agent = apply_filters( 'http_headers_useragent', 'WordPress/' . $wp_version. '; ' . get_bloginfo( 'url' ) );6280 $user_agent = apply_filters( 'http_headers_useragent', 'WordPress/' . get_bloginfo( 'version' ) . '; ' . get_bloginfo( 'url' ) ); 6289 6281 6290 6282 // Let's check the remote site 6291 6283 $http_api_args = array( -
src/wp-includes/comment.php
2362 2362 * 2363 2363 * @since 0.71 2364 2364 * 2365 * @global string $wp_version2366 *2367 2365 * @param string $content Post content to check for links. 2368 2366 * @param int $post_ID Post ID. 2369 2367 */ 2370 2368 function pingback($content, $post_ID) { 2371 global $wp_version;2372 2373 2369 // original code by Mort (http://mort.mine.nu:8080) 2374 2370 $post_links = array(); 2375 2371 … … 2435 2431 * @param string $pagelinkedto URL of page linked to. 2436 2432 * @param string $pagelinkedfrom URL of page linked from. 2437 2433 */ 2438 $client->useragent = apply_filters( 'pingback_useragent', $client->useragent . ' -- WordPress/' . $wp_version, $client->useragent, $pingback_server_url, $pagelinkedto, $pagelinkedfrom );2434 $client->useragent = apply_filters( 'pingback_useragent', $client->useragent . ' -- WordPress/' . get_bloginfo( 'version' ), $client->useragent, $pingback_server_url, $pagelinkedto, $pagelinkedfrom ); 2439 2435 // when set to true, this outputs debug messages by itself 2440 2436 $client->debug = false; 2441 2437 … … 2504 2500 * 2505 2501 * @since 1.2.0 2506 2502 * 2507 * @global string $wp_version2508 *2509 2503 * @param string $server Host of blog to connect to. 2510 2504 * @param string $path Path to send the ping. 2511 2505 */ 2512 2506 function weblog_ping($server = '', $path = '') { 2513 global $wp_version;2514 2515 2507 // using a timeout of 3 seconds should be enough to cover slow servers 2516 2508 $client = new WP_HTTP_IXR_Client($server, ((!strlen(trim($path)) || ('/' == $path)) ? false : $path)); 2517 2509 $client->timeout = 3; 2518 $client->useragent .= ' -- WordPress/' .$wp_version;2510 $client->useragent .= ' -- WordPress/' . get_bloginfo( 'version' ); 2519 2511 2520 2512 // when set to true, this outputs debug messages by itself 2521 2513 $client->debug = false; -
src/wp-includes/formatting.php
4927 4927 * @ignore 4928 4928 * @since 4.6.0 4929 4929 * @access private 4930 *4931 * @global string $wp_version WordPress version string.4932 4930 */ 4933 4931 function _print_emoji_detection_script() { 4934 global $wp_version;4935 4936 4932 $settings = array( 4937 4933 /** 4938 4934 * Filters the URL where emoji png images are hosted. … … 4971 4967 'svgExt' => apply_filters( 'emoji_svg_ext', '.svg' ), 4972 4968 ); 4973 4969 4974 $version = 'ver=' . $wp_version;4970 $version = 'ver=' . get_bloginfo( 'version' ); 4975 4971 4976 4972 if ( SCRIPT_DEBUG ) { 4977 4973 $settings['source'] = array( -
src/wp-includes/general-template.php
3344 3344 * Registers the default Admin color schemes 3345 3345 * 3346 3346 * @since 3.0.0 3347 *3348 * @global string $wp_version3349 3347 */ 3350 3348 function register_admin_color_schemes() { 3351 3349 $suffix = is_rtl() ? '-rtl' : ''; … … 3358 3356 ); 3359 3357 3360 3358 // Other color schemes are not available when running out of src 3361 if ( false !== strpos( $GLOBALS['wp_version'], '-src' ) )3359 if ( false !== strpos( get_bloginfo( 'version' ), '-src' ) ) { 3362 3360 return; 3361 } 3363 3362 3364 3363 wp_admin_css_color( 'light', _x( 'Light', 'admin color scheme' ), 3365 3364 admin_url( "css/colors/light/colors$suffix.css" ), -
src/wp-includes/link-template.php
2897 2897 * 2898 2898 * @since 2.6.0 2899 2899 * 2900 * @global bool $is_IE Whether the browser matches an Internet Explorer user agent. 2901 * @global string $wp_version WP version. 2902 * 2903 * @global bool $is_IE 2904 * @global string $wp_version 2900 * @global bool $is_IE Whether the browser matches an Internet Explorer user agent. 2905 2901 * @global WP_Press_This $wp_press_this 2906 2902 * 2907 2903 * @return string The Press This bookmarklet link URL. 2908 2904 */ 2909 2905 function get_shortcut_link() { 2910 global $is_IE , $wp_version;2906 global $is_IE; 2911 2907 2912 2908 $GLOBALS['wp_press_this'] = new WP_Press_This(); 2913 2909 $bookmarklet_version = $GLOBALS['wp_press_this']->version; -
src/wp-includes/media.php
3810 3810 * 3811 3811 * @since 4.0.0 3812 3812 * 3813 * @global string $wp_version3814 *3815 3813 * @return array The relevant CSS file URLs. 3816 3814 */ 3817 3815 function wpview_media_sandbox_styles() { 3818 $version = 'ver=' . $GLOBALS['wp_version'];3816 $version = 'ver=' . get_bloginfo( 'version' ); 3819 3817 $mediaelement = includes_url( "js/mediaelement/mediaelementplayer.min.css?$version" ); 3820 3818 $wpmediaelement = includes_url( "js/mediaelement/wp-mediaelement.css?$version" ); 3821 3819