Kill all notices in XML-RPC found when running the test suite with WP_DEBUG. see [UT706], [UT707]. see #20566.
git-svn-id: https://develop.svn.wordpress.org/trunk@20671 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
8868595fd4
commit
9761a56833
@ -524,7 +524,7 @@ class wp_xmlrpc_server extends IXR_Server {
|
|||||||
'hierarchical' => (bool) $taxonomy->hierarchical,
|
'hierarchical' => (bool) $taxonomy->hierarchical,
|
||||||
'public' => (bool) $taxonomy->public,
|
'public' => (bool) $taxonomy->public,
|
||||||
'show_ui' => (bool) $taxonomy->show_ui,
|
'show_ui' => (bool) $taxonomy->show_ui,
|
||||||
'_builtin' => (bool) $taxnomy->_builtin,
|
'_builtin' => (bool) $taxonomy->_builtin,
|
||||||
);
|
);
|
||||||
|
|
||||||
if ( in_array( 'labels', $fields ) )
|
if ( in_array( 'labels', $fields ) )
|
||||||
@ -534,7 +534,7 @@ class wp_xmlrpc_server extends IXR_Server {
|
|||||||
$_taxonomy['cap'] = (array) $taxonomy->cap;
|
$_taxonomy['cap'] = (array) $taxonomy->cap;
|
||||||
|
|
||||||
if ( in_array( 'object_types', $fields ) )
|
if ( in_array( 'object_types', $fields ) )
|
||||||
$_taxonomy['taxonomies'] = array_unique( (array) $taxonomy->object_type );
|
$_taxonomy['object_type'] = array_unique( (array) $taxonomy->object_type );
|
||||||
|
|
||||||
return apply_filters( 'xmlrpc_prepare_taxonomy', $_taxonomy, $taxonomy, $fields );
|
return apply_filters( 'xmlrpc_prepare_taxonomy', $_taxonomy, $taxonomy, $fields );
|
||||||
}
|
}
|
||||||
@ -902,7 +902,7 @@ class wp_xmlrpc_server extends IXR_Server {
|
|||||||
|
|
||||||
if ( $post_data['post_type'] == 'post' ) {
|
if ( $post_data['post_type'] == 'post' ) {
|
||||||
// Private and password-protected posts cannot be stickied.
|
// Private and password-protected posts cannot be stickied.
|
||||||
if ( $post_data['status'] == 'private' || ! empty( $post_data['post_password'] ) ) {
|
if ( $post_data['post_status'] == 'private' || ! empty( $post_data['post_password'] ) ) {
|
||||||
// Error if the client tried to stick the post, otherwise, silently unstick.
|
// Error if the client tried to stick the post, otherwise, silently unstick.
|
||||||
if ( ! empty( $post_data['sticky'] ) )
|
if ( ! empty( $post_data['sticky'] ) )
|
||||||
return new IXR_Error( 401, __( 'Sorry, you cannot stick a private post.' ) );
|
return new IXR_Error( 401, __( 'Sorry, you cannot stick a private post.' ) );
|
||||||
@ -3947,11 +3947,11 @@ class wp_xmlrpc_server extends IXR_Server {
|
|||||||
|
|
||||||
$this->escape($args);
|
$this->escape($args);
|
||||||
|
|
||||||
$post_ID = (int) $args[0];
|
$post_ID = (int) $args[0];
|
||||||
$username = $args[1];
|
$username = $args[1];
|
||||||
$password = $args[2];
|
$password = $args[2];
|
||||||
$content_struct = $args[3];
|
$content_struct = $args[3];
|
||||||
$publish = $args[4];
|
$publish = isset( $args[4] ) ? $args[4] : 0;
|
||||||
|
|
||||||
if ( ! $user = $this->login($username, $password) )
|
if ( ! $user = $this->login($username, $password) )
|
||||||
return $this->error;
|
return $this->error;
|
||||||
@ -4105,8 +4105,7 @@ class wp_xmlrpc_server extends IXR_Server {
|
|||||||
if ( isset( $content_struct['mt_excerpt'] ) )
|
if ( isset( $content_struct['mt_excerpt'] ) )
|
||||||
$post_excerpt = $content_struct['mt_excerpt'];
|
$post_excerpt = $content_struct['mt_excerpt'];
|
||||||
|
|
||||||
if ( isset( $content_struct['mt_text_more'] ) )
|
$post_more = isset( $content_struct['mt_text_more'] ) ? $content_struct['mt_text_more'] : null;
|
||||||
$post_more = $content_struct['mt_text_more'];
|
|
||||||
|
|
||||||
$post_status = $publish ? 'publish' : 'draft';
|
$post_status = $publish ? 'publish' : 'draft';
|
||||||
if ( isset( $content_struct["{$post_type}_status"] ) ) {
|
if ( isset( $content_struct["{$post_type}_status"] ) ) {
|
||||||
|
Loading…
Reference in New Issue
Block a user