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
4402           } else {
4403                /**
4404                 * Filters the default query fields used by the given XML-RPC method.
4405                 *
4406                 * @since 3.4.0
4407                 *
4408                 * @param array  $fields An array of post type query fields for the given method.
4409                 * @param string $method The method name.
4410                 */
4411                $fields = apply_filters( 'xmlrpc_default_posttype_fields', array( 'labels', 'cap', 'taxonomies' ), 'wp.getPostType' );
4412           }
4413
4414           if ( ! $user = $this->login( $username, $password ) ) {
4415                return $this->error;
4416           }
4417
4418           /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
4419           do_action( 'xmlrpc_call', 'wp.getPostType' );
4420
 
Line Code
4458
4459           $username = $args[1];
4460           $password = $args[2];
4461           $filter   = isset( $args[3] ) ? $args[3] : array( 'public' => true );
4462
4463           if ( isset( $args[4] ) ) {
4464                $fields = $args[4];
4465           } else {
4466                /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
4467                $fields = apply_filters( 'xmlrpc_default_posttype_fields', array( 'labels', 'cap', 'taxonomies' ), 'wp.getPostTypes' );
4468           }
4469
4470           if ( ! $user = $this->login( $username, $password ) ) {
4471                return $this->error;
4472           }
4473
4474           /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
4475           do_action( 'xmlrpc_call', 'wp.getPostTypes' );
4476