xmlrpc_prepare_post

Filters XML-RPC-prepared date for the given post.

Description

apply_filters( 'xmlrpc_prepare_post', (array) $post, (array) $post, (array) $fields ); 

Parameters (3)

0. $post (array)
An array of modified post data.
1. $post (array)
An array of post data.
2. $fields (array)
An array of post fields.

Usage

To run the hook, copy the example below.
  1. $post = apply_filters( 'xmlrpc_prepare_post', $post, $post, $fields ); 
  2.  
  3. if ( !empty( $post ) ) { 
  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_post callback 
  2. function filter_xmlrpc_prepare_post( $post, $post, $fields ) { 
  3. // make filter magic happen here... 
  4. return $post
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'xmlrpc_prepare_post', 'filter_xmlrpc_prepare_post', 10, 3 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'xmlrpc_prepare_post', 'filter_xmlrpc_prepare_post', 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_post', $_post, $post, $fields );