Fix copy-paste issues in XML-RPC's _prepare_taxonomy(). see #20566.
git-svn-id: https://develop.svn.wordpress.org/trunk@20670 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
9426067fbc
commit
8868595fd4
|
@ -519,7 +519,7 @@ class wp_xmlrpc_server extends IXR_Server {
|
||||||
*/
|
*/
|
||||||
protected function _prepare_taxonomy( $taxonomy, $fields ) {
|
protected function _prepare_taxonomy( $taxonomy, $fields ) {
|
||||||
$_taxonomy = array(
|
$_taxonomy = array(
|
||||||
'name' => $taxonmy->name,
|
'name' => $taxonomy->name,
|
||||||
'label' => $taxonomy->label,
|
'label' => $taxonomy->label,
|
||||||
'hierarchical' => (bool) $taxonomy->hierarchical,
|
'hierarchical' => (bool) $taxonomy->hierarchical,
|
||||||
'public' => (bool) $taxonomy->public,
|
'public' => (bool) $taxonomy->public,
|
||||||
|
@ -531,7 +531,7 @@ class wp_xmlrpc_server extends IXR_Server {
|
||||||
$_taxonomy['labels'] = (array) $taxonomy->labels;
|
$_taxonomy['labels'] = (array) $taxonomy->labels;
|
||||||
|
|
||||||
if ( in_array( 'capabilities', $fields ) )
|
if ( in_array( 'capabilities', $fields ) )
|
||||||
$_taxonomy['cap'] = (array) $post_type->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['taxonomies'] = array_unique( (array) $taxonomy->object_type );
|
||||||
|
|
Loading…
Reference in New Issue