mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-22 17:18:32 +01:00
XML-RPC: In wp.editPost, Remove all terms in a taxonomy when an empty array is explicitly passed.
props jstraitiff, maxcutler. fixes #26686. Built from https://develop.svn.wordpress.org/trunk@27554 git-svn-id: http://core.svn.wordpress.org/trunk@27397 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
a9e69869c9
commit
5d77f8a18a
@ -1131,6 +1131,7 @@ class wp_xmlrpc_server extends IXR_Server {
|
||||
return new IXR_Error( 401, __( 'Sorry, you are not allowed to assign a term to one of the given taxonomies.' ) );
|
||||
|
||||
$term_ids = $post_data['terms'][$taxonomy];
|
||||
$terms[ $taxonomy ] = array();
|
||||
foreach ( $term_ids as $term_id ) {
|
||||
$term = get_term_by( 'id', $term_id, $taxonomy );
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user