Created
July 26, 2013 18:01
-
-
Save WerdsWords/6090892 to your computer and use it in GitHub Desktop.
#21: xmlrpc_default_taxonomy_fields
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Only retrieve cap and object_type in taxonomy XML-RPC getters | |
* | |
* @see wp.getTaxonomy(), wp.getTaxonomies() | |
* | |
* @param array $fields An array of taxonomy fields. | |
* @param string $method The XML-RPC method name. | |
* | |
* @return array The filtered array of fields. | |
*/ | |
function wpdocs_fewer_xmlrpc_tax_fields( $fields, $method ) { | |
return array( 'cap', 'object_type' ); | |
} | |
add_filter( 'xmlrpc_default_taxonomy_fields', 'wpdocs_fewer_xmlrpc_tax_fields', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment