xmlrpc_prepare_post_type
Filters XML-RPC-prepared date for the given post type.
Usage
add_filter( 'xmlrpc_prepare_post_type', 'wp_kama_xmlrpc_prepare_post_type_filter', 10, 2 ); /** * Function for `xmlrpc_prepare_post_type` filter-hook. * * @param array $_post_type An array of post type data. * @param WP_Post_Type $post_type Post type object. * * @return array */ function wp_kama_xmlrpc_prepare_post_type_filter( $_post_type, $post_type ){ // filter... return $_post_type; }
- $_post_type(array)
- An array of post type data.
- $post_type(WP_Post_Type)
- Post type object.
Changelog
Since 3.4.0 | Introduced. |
Since 4.6.0 | Converted the $post_type parameter to accept a WP_Post_Type object. |
Where the hook is called
xmlrpc_prepare_post_type
wp-includes/class-wp-xmlrpc-server.php 1049
return apply_filters( 'xmlrpc_prepare_post_type', $_post_type, $post_type );