Filter hook 'xmlrpc_default_user_fields'

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

View Source

xmlrpc_default_user_fields

Filter Hook
Description
Retrieves information about the requesting user. }

Hook Information

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

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_user_fields
add_filter('xmlrpc_default_user_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:2853 - How this hook is used in WordPress core
<?php
2848  
2849  		if ( isset( $args[3] ) ) {
2850  			$fields = $args[3];
2851  		} else {
2852  			/** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
2853  			$fields = apply_filters( 'xmlrpc_default_user_fields', array( 'all' ), 'wp.getProfile' );
2854  		}
2855  
2856  		$user = $this->login( $username, $password );
2857  		if ( ! $user ) {
2858  			return $this->error;

PHP Documentation

<?php
/**
	 * Retrieves information about the requesting user.
	 *
	 * @uses get_userdata()
	 *
	 * @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. Fields to return.
	 * }
	 * @return array|IXR_Error (@see wp_getUser)
	 */
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.