XML-RPC: In wp.editPost, Remove all terms in a taxonomy when an empty array is explicitly passed.

props jstraitiff, maxcutler.
fixes #26686.


git-svn-id: https://develop.svn.wordpress.org/trunk@27554 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin
2014-03-15 05:08:40 +00:00
parent 890b809bb9
commit f4cc32fac9
2 changed files with 28 additions and 0 deletions

View File

@@ -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 );