xmlrpc_default_posttype_fields filter-hookWP 3.4.0

Filters the default query fields used by the given XML-RPC method.

Usage

add_filter( 'xmlrpc_default_posttype_fields', 'wp_kama_xmlrpc_default_posttype_fields_filter', 10, 2 );

/**
 * Function for `xmlrpc_default_posttype_fields` filter-hook.
 * 
 * @param array  $fields An array of post type query fields for the given method.
 * @param string $method The method name.
 *
 * @return array
 */
function wp_kama_xmlrpc_default_posttype_fields_filter( $fields, $method ){

	// filter...
	return $fields;
}
$fields(array)
An array of post type query fields for the given method.
$method(string)
The method name.

Changelog

Since 3.4.0 Introduced.

Where the hook is called

wp_xmlrpc_server::wp_getPostType()
xmlrpc_default_posttype_fields
wp_xmlrpc_server::wp_getPostTypes()
xmlrpc_default_posttype_fields
wp-includes/class-wp-xmlrpc-server.php 4537
$fields = apply_filters( 'xmlrpc_default_posttype_fields', array( 'labels', 'cap', 'taxonomies' ), 'wp.getPostType' );
wp-includes/class-wp-xmlrpc-server.php 4594
$fields = apply_filters( 'xmlrpc_default_posttype_fields', array( 'labels', 'cap', 'taxonomies' ), 'wp.getPostTypes' );

Where the hook is used in WordPress

Usage not found.