xmlrpc_default_revision_fields
Filters the default revision query fields used by the given XML-RPC method.
Usage
add_filter( 'xmlrpc_default_revision_fields', 'wp_kama_xmlrpc_default_revision_fields_filter', 10, 2 ); /** * Function for `xmlrpc_default_revision_fields` filter-hook. * * @param array $field An array of revision fields to retrieve. By default, contains 'post_date' and 'post_date_gmt'. * @param string $method The method name. * * @return array */ function wp_kama_xmlrpc_default_revision_fields_filter( $field, $method ){ // filter... return $field; }
- $field(array)
- An array of revision fields to retrieve. By default, contains 'post_date' and 'post_date_gmt'.
- $method(string)
- The method name.
Changelog
Since 3.5.0 | Introduced. |
Where the hook is called
xmlrpc_default_revision_fields
wp-includes/class-wp-xmlrpc-server.php 4692
$fields = apply_filters( 'xmlrpc_default_revision_fields', array( 'post_date', 'post_date_gmt' ), 'wp.getRevisions' );