xmlrpc_default_taxonomy_fields
Filter HookDescription
Retrieves all taxonomies. } by `$fields`, or an IXR_Error instance on failure.Hook Information
File Location |
wp-includes/class-wp-xmlrpc-server.php
View on GitHub
|
Hook Type | Filter |
Line Number | 2624 |
Hook Parameters
Type | Name | Description |
---|---|---|
array
|
$args
|
{ Method arguments. Note: arguments must be ordered as documented. |
Usage Examples
Basic Usage
<?php
// Hook into xmlrpc_default_taxonomy_fields
add_filter('xmlrpc_default_taxonomy_fields', 'my_custom_filter', 10, 1);
function my_custom_filter($args) {
// Your custom filtering logic here
return $args;
}
Source Code Context
wp-includes/class-wp-xmlrpc-server.php:2624
- How this hook is used in WordPress core
<?php
2619
2620 if ( isset( $args[4] ) ) {
2621 $fields = $args[4];
2622 } else {
2623 /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
2624 $fields = apply_filters( 'xmlrpc_default_taxonomy_fields', array( 'labels', 'cap', 'object_type' ), 'wp.getTaxonomies' );
2625 }
2626
2627 $user = $this->login( $username, $password );
2628 if ( ! $user ) {
2629 return $this->error;
PHP Documentation
<?php
/**
* Retrieves all taxonomies.
*
* @since 3.4.0
*
* @see get_taxonomies()
*
* @param array $args {
* Method arguments. Note: arguments must be ordered as documented.
*
* @type int $0 Blog ID (unused).
* @type string $1 Username.
* @type string $2 Password.
* @type array $3 Optional. An array of arguments for retrieving taxonomies.
* @type array $4 Optional. The subset of taxonomy fields to return.
* }
* @return array|IXR_Error An associative array of taxonomy data with returned fields determined
* by `$fields`, or an IXR_Error instance on failure.
*/
Quick Info
- Hook Type: Filter
- Parameters: 1
- File: wp-includes/class-wp-xmlrpc-server.php
Related Hooks
Related hooks will be displayed here in future updates.