Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: xmlrpc_default_posttype_fields

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

This hook occurs 2 times in this file.

Line Code
4463           } else {
4464                /**
4465                 * Filters the default query fields used by the given XML-RPC method.
4466                 *
4467                 * @since 3.4.0
4468                 *
4469                 * @param array  $fields An array of post type query fields for the given method.
4470                 * @param string $method The method name.
4471                 */
4472                $fields = apply_filters( 'xmlrpc_default_posttype_fields', array( 'labels', 'cap', 'taxonomies' ), 'wp.getPostType' );
4473           }
4474
4475           $user = $this->login( $username, $password );
4476           if ( ! $user ) {
4477                return $this->error;
4478           }
4479
4480           /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
4481           do_action( 'xmlrpc_call', 'wp.getPostType' );
 
Line Code
4520
4521           $username = $args[1];
4522           $password = $args[2];
4523           $filter   = isset( $args[3] ) ? $args[3] : array( 'public' => true );
4524
4525           if ( isset( $args[4] ) ) {
4526                $fields = $args[4];
4527           } else {
4528                /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
4529                $fields = apply_filters( 'xmlrpc_default_posttype_fields', array( 'labels', 'cap', 'taxonomies' ), 'wp.getPostTypes' );
4530           }
4531
4532           $user = $this->login( $username, $password );
4533           if ( ! $user ) {
4534                return $this->error;
4535           }
4536
4537           /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
4538           do_action( 'xmlrpc_call', 'wp.getPostTypes' );