mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-12 04:40:26 +00:00
General: use get_bloginfo( 'version' ) instead of global $wp_version in several locations - excluding those locations which reload version.php mid-flight.
See #37699. git-svn-id: https://develop.svn.wordpress.org/trunk@38459 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user