mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-22 17:18:32 +01:00
Avoid inadvertent stomping of the original $args
parameter passed to plugins_api_result
and themes_api_result
filters in plugins_api()
and themes_api()
, respectively.
Fixes a regression introduced in [25956]. props Corphi, obenland. fixes #29079. Built from https://develop.svn.wordpress.org/trunk@31363 git-svn-id: http://core.svn.wordpress.org/trunk@31344 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
c8892dfaa2
commit
1e0905793c
@ -70,18 +70,18 @@ function plugins_api($action, $args = null) {
|
||||
if ( $ssl = wp_http_supports( array( 'ssl' ) ) )
|
||||
$url = set_url_scheme( $url, 'https' );
|
||||
|
||||
$args = array(
|
||||
$http_args = array(
|
||||
'timeout' => 15,
|
||||
'body' => array(
|
||||
'action' => $action,
|
||||
'request' => serialize( $args )
|
||||
)
|
||||
);
|
||||
$request = wp_remote_post( $url, $args );
|
||||
$request = wp_remote_post( $url, $http_args );
|
||||
|
||||
if ( $ssl && is_wp_error( $request ) ) {
|
||||
trigger_error( __( 'An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration. If you continue to have problems, please try the <a href="https://wordpress.org/support/">support forums</a>.' ) . ' ' . __( '(WordPress could not establish a secure connection to WordPress.org. Please contact your server administrator.)' ), headers_sent() || WP_DEBUG ? E_USER_WARNING : E_USER_NOTICE );
|
||||
$request = wp_remote_post( $http_url, $args );
|
||||
$request = wp_remote_post( $http_url, $http_args );
|
||||
}
|
||||
|
||||
if ( is_wp_error($request) ) {
|
||||
|
@ -359,19 +359,19 @@ function themes_api( $action, $args = null ) {
|
||||
if ( $ssl = wp_http_supports( array( 'ssl' ) ) )
|
||||
$url = set_url_scheme( $url, 'https' );
|
||||
|
||||
$args = array(
|
||||
$http_args = array(
|
||||
'body' => array(
|
||||
'action' => $action,
|
||||
'request' => serialize( $args )
|
||||
)
|
||||
);
|
||||
$request = wp_remote_post( $url, $args );
|
||||
$request = wp_remote_post( $url, $http_args );
|
||||
|
||||
if ( $ssl && is_wp_error( $request ) ) {
|
||||
if ( ! defined( 'DOING_AJAX' ) || ! DOING_AJAX ) {
|
||||
trigger_error( __( 'An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration. If you continue to have problems, please try the <a href="https://wordpress.org/support/">support forums</a>.' ) . ' ' . __( '(WordPress could not establish a secure connection to WordPress.org. Please contact your server administrator.)' ), headers_sent() || WP_DEBUG ? E_USER_WARNING : E_USER_NOTICE );
|
||||
}
|
||||
$request = wp_remote_post( $http_url, $args );
|
||||
$request = wp_remote_post( $http_url, $http_args );
|
||||
}
|
||||
|
||||
if ( is_wp_error($request) ) {
|
||||
|
@ -4,7 +4,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.2-alpha-31362';
|
||||
$wp_version = '4.2-alpha-31363';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user