xmlrpc_default_posttype_fields
Filter HookDescription
Retrieves post types. }Hook Information
| File Location | 
                                wp-includes/class-wp-xmlrpc-server.php
                                
                                    View on GitHub
                                
                             | 
                        
| Hook Type | Filter | 
| Line Number | 4633 | 
                        
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_posttype_fields
add_filter('xmlrpc_default_posttype_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:4633
                        - How this hook is used in WordPress core
                    
                    <?php
4628  
4629  		if ( isset( $args[4] ) ) {
4630  			$fields = $args[4];
4631  		} else {
4632  			/** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
4633  			$fields = apply_filters( 'xmlrpc_default_posttype_fields', array( 'labels', 'cap', 'taxonomies' ), 'wp.getPostTypes' );
4634  		}
4635  
4636  		$user = $this->login( $username, $password );
4637  		if ( ! $user ) {
4638  			return $this->error;
                    PHP Documentation
<?php
/**
	 * Retrieves post types.
	 *
	 * @since 3.4.0
	 *
	 * @see get_post_types()
	 *
	 * @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. Query arguments.
	 *     @type array  $4 Optional. Fields to fetch.
	 * }
	 * @return array|IXR_Error
	 */
                
            
                        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.