mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 01:27:36 +01:00
XML-RPC: Fix bracing of conditionals around doc blocks.
props redsweater, DrewAPicture. fixes #27506. Built from https://develop.svn.wordpress.org/trunk@28065 git-svn-id: http://core.svn.wordpress.org/trunk@27897 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
8ccb425f95
commit
58ca03f8ea
@ -180,28 +180,14 @@ class wp_xmlrpc_server extends IXR_Server {
|
|||||||
* @return mixed WP_User object if authentication passed, false otherwise
|
* @return mixed WP_User object if authentication passed, false otherwise
|
||||||
*/
|
*/
|
||||||
function login( $username, $password ) {
|
function login( $username, $password ) {
|
||||||
// Respect any old filters against get_option() for 'enable_xmlrpc'.
|
/*
|
||||||
|
* Respect old get_option() filters left for back-compat when the 'enable_xmlrpc'
|
||||||
/**
|
* option was deprecated in 3.5.0. Use the 'xmlrpc_enabled' hook instead.
|
||||||
* Filter whether XML-RPC is enabled.
|
|
||||||
*
|
|
||||||
* @since 3.5.0
|
|
||||||
* @deprecated 3.5.0 Use 'xmlrpc_enabled' instead.
|
|
||||||
*
|
|
||||||
* @param bool $enable Whether to enable XML-RPC. Default false.
|
|
||||||
*/
|
*/
|
||||||
$enabled = apply_filters( 'pre_option_enable_xmlrpc', false );
|
$enabled = apply_filters( 'pre_option_enable_xmlrpc', false );
|
||||||
if ( false === $enabled )
|
if ( false === $enabled ) {
|
||||||
|
|
||||||
/**
|
|
||||||
* Filter whether XML-RPC is enabled.
|
|
||||||
*
|
|
||||||
* @since 3.5.0
|
|
||||||
* @deprecated 3.5.0 Use 'xmlrpc_enabled' instead.
|
|
||||||
*
|
|
||||||
* @param bool $enable Whether to enable XML-RPC. Default true.
|
|
||||||
*/
|
|
||||||
$enabled = apply_filters( 'option_enable_xmlrpc', true );
|
$enabled = apply_filters( 'option_enable_xmlrpc', true );
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Filter whether XML-RPC is enabled.
|
* Filter whether XML-RPC is enabled.
|
||||||
@ -1533,10 +1519,9 @@ class wp_xmlrpc_server extends IXR_Server {
|
|||||||
$password = $args[2];
|
$password = $args[2];
|
||||||
$post_id = (int) $args[3];
|
$post_id = (int) $args[3];
|
||||||
|
|
||||||
if ( isset( $args[4] ) )
|
if ( isset( $args[4] ) ) {
|
||||||
$fields = $args[4];
|
$fields = $args[4];
|
||||||
else
|
} else {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Filter the list of post query fields used by the given XML-RPC method.
|
* Filter the list of post query fields used by the given XML-RPC method.
|
||||||
*
|
*
|
||||||
@ -1546,6 +1531,7 @@ class wp_xmlrpc_server extends IXR_Server {
|
|||||||
* @param string $method Method name.
|
* @param string $method Method name.
|
||||||
*/
|
*/
|
||||||
$fields = apply_filters( 'xmlrpc_default_post_fields', array( 'post', 'terms', 'custom_fields' ), 'wp.getPost' );
|
$fields = apply_filters( 'xmlrpc_default_post_fields', array( 'post', 'terms', 'custom_fields' ), 'wp.getPost' );
|
||||||
|
}
|
||||||
|
|
||||||
if ( ! $user = $this->login( $username, $password ) )
|
if ( ! $user = $this->login( $username, $password ) )
|
||||||
return $this->error;
|
return $this->error;
|
||||||
|
Loading…
Reference in New Issue
Block a user