Make WordPress Core


Ignore:
Timestamp:
08/31/2016 05:48:49 AM (8 years ago)
Author:
wonderboymusic
Message:

General: use get_bloginfo( 'version' ) instead of global $wp_version in several locations - excluding those locations which reload version.php mid-flight.

See #37699.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-xmlrpc-server.php

    r38275 r38459  
    414414     *
    415415     * @since 2.6.0
    416      *
    417      * @global string $wp_version
    418416     */
    419417    public function initialise_blog_option_info() {
    420         global $wp_version;
    421 
    422418        $this->blog_options = array(
    423419            // Read only options
     
    430426                'desc'          => __( 'Software Version' ),
    431427                'readonly'      => true,
    432                 'value'         => $wp_version
     428                'value'         => get_bloginfo( 'version' )
    433429            ),
    434430            'blog_url'          => array(
     
    61876183     * @since 1.5.0
    61886184     *
    6189      * @global string $wp_version
    6190      *
    61916185     * @param array  $args {
    61926186     *     Method arguments. Note: arguments must be ordered as documented.
     
    61986192     */
    61996193    public function pingback_ping( $args ) {
    6200         global $wp_version;
    6201 
    62026194        /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
    62036195        do_action( 'xmlrpc_call', 'pingback.ping' );
     
    62866278
    62876279        /** 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' ) );
    62896281
    62906282        // Let's check the remote site
Note: See TracChangeset for help on using the changeset viewer.