Filter hook 'xmlrpc_default_revision_fields'

in WP Core File wp-includes/class-wp-xmlrpc-server.php at line 4704

View Source

xmlrpc_default_revision_fields

Filter Hook
Description
Filters the default revision query fields used by the given XML-RPC method.

Hook Information

File Location wp-includes/class-wp-xmlrpc-server.php View on GitHub
Hook Type Filter
Line Number 4704

Hook Parameters

Type Name Description
array $field An array of revision fields to retrieve. By default, contains 'post_date' and 'post_date_gmt'.
string $method The method name.

Usage Examples

Basic Usage
<?php
// Hook into xmlrpc_default_revision_fields
add_filter('xmlrpc_default_revision_fields', 'my_custom_filter', 10, 2);

function my_custom_filter($field, $method) {
    // Your custom filtering logic here
    return $field;
}

Source Code Context

wp-includes/class-wp-xmlrpc-server.php:4704 - How this hook is used in WordPress core
<?php
4699  			 *
4700  			 * @param array  $field  An array of revision fields to retrieve. By default,
4701  			 *                       contains 'post_date' and 'post_date_gmt'.
4702  			 * @param string $method The method name.
4703  			 */
4704  			$fields = apply_filters( 'xmlrpc_default_revision_fields', array( 'post_date', 'post_date_gmt' ), 'wp.getRevisions' );
4705  		}
4706  
4707  		$user = $this->login( $username, $password );
4708  		if ( ! $user ) {
4709  			return $this->error;

PHP Documentation

<?php
/**
			 * Filters the default revision query fields used by the given XML-RPC method.
			 *
			 * @since 3.5.0
			 *
			 * @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.
			 */
Quick Info
  • Hook Type: Filter
  • Parameters: 2
  • File: wp-includes/class-wp-xmlrpc-server.php
Related Hooks

Related hooks will be displayed here in future updates.