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/comment.php

    r38411 r38459  
    23632363 * @since 0.71
    23642364 *
    2365  * @global string $wp_version
    2366  *
    23672365 * @param string $content Post content to check for links.
    23682366 * @param int $post_ID Post ID.
    23692367 */
    23702368function pingback($content, $post_ID) {
    2371     global $wp_version;
    2372 
    23732369    // original code by Mort (http://mort.mine.nu:8080)
    23742370    $post_links = array();
     
    24362432             * @param string $pagelinkedfrom      URL of page linked from.
    24372433             */
    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 );
    24392435            // when set to true, this outputs debug messages by itself
    24402436            $client->debug = false;
     
    25052501 * @since 1.2.0
    25062502 *
    2507  * @global string $wp_version
    2508  *
    25092503 * @param string $server Host of blog to connect to.
    25102504 * @param string $path Path to send the ping.
    25112505 */
    25122506function weblog_ping($server = '', $path = '') {
    2513     global $wp_version;
    2514 
    25152507    // using a timeout of 3 seconds should be enough to cover slow servers
    25162508    $client = new WP_HTTP_IXR_Client($server, ((!strlen(trim($path)) || ('/' == $path)) ? false : $path));
    25172509    $client->timeout = 3;
    2518     $client->useragent .= ' -- WordPress/'.$wp_version;
     2510    $client->useragent .= ' -- WordPress/' . get_bloginfo( 'version' );
    25192511
    25202512    // when set to true, this outputs debug messages by itself
Note: See TracChangeset for help on using the changeset viewer.