xmlrpc_prepare_post_type хук-фильтр . WP 3.4.0
Filters XML-RPC-prepared date for the given post type.
Использование
add_filter( 'xmlrpc_prepare_post_type', 'filter_function_name_927', 10, 2 ); function filter_function_name_927( $_post_type, $post_type ){ // filter... return $_post_type; }
- $_post_type(массив)
- An array of post type data.
- $post_type(WP_Post_Type)
- Post type object.
Список изменений
С версии 3.4.0 | Введена. |
С версии 4.6.0 | Converted the $post_type parameter to accept a WP_Post_Type object. |
Где вызывается хук
xmlrpc_prepare_post_type
wp-includes/class-wp-xmlrpc-server.php 1003
return apply_filters( 'xmlrpc_prepare_post_type', $_post_type, $post_type );