xmlrpc_prepare_taxonomy

Filters XML-RPC-prepared data for the given taxonomy.

Description

apply_filters( 'xmlrpc_prepare_taxonomy', (WP_Taxonomy) $taxonomy, (WP_Taxonomy) $taxonomy, (array) $fields ); 

Parameters (3)

0. $taxonomy (array)
An array of taxonomy data.
1. $taxonomy (WP_Taxonomy)
Taxonomy object.
2. $fields (array)
The subset of taxonomy fields to return.

Usage

To run the hook, copy the example below.
  1. $taxonomy = apply_filters( 'xmlrpc_prepare_taxonomy', $taxonomy, $taxonomy, $fields ); 
  2.  
  3. if ( !empty( $taxonomy ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the xmlrpc_prepare_taxonomy callback 
  2. function filter_xmlrpc_prepare_taxonomy( $taxonomy, $taxonomy, $fields ) { 
  3. // make filter magic happen here... 
  4. return $taxonomy
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'xmlrpc_prepare_taxonomy', 'filter_xmlrpc_prepare_taxonomy', 10, 3 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'xmlrpc_prepare_taxonomy', 'filter_xmlrpc_prepare_taxonomy', 10, 3 ); 

Defined (1)

The filter is defined in the following location(s).

/wp-includes/class-wp-xmlrpc-server.php  
  1. return apply_filters( 'xmlrpc_prepare_taxonomy', $_taxonomy, $taxonomy, $fields );