Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: xmlrpc_default_taxonomy_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
2096           } else {
2097                /**
2098                 * Filter the taxonomy query fields used by the given XML-RPC method.
2099                 *
2100                 * @since 3.4.0
2101                 *
2102                 * @param array  $fields An array of taxonomy fields to retrieve.
2103                 * @param string $method The method name.
2104                 */
2105                $fields = apply_filters( 'xmlrpc_default_taxonomy_fields', array( 'labels', 'cap', 'object_type' ), 'wp.getTaxonomy' );
2106           }
2107
2108           if ( ! $user = $this->login( $username, $password ) )
2109                return $this->error;
2110
2111           /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
2112           do_action( 'xmlrpc_call', 'wp.getTaxonomy' );
2113
2114           if ( ! taxonomy_exists( $taxonomy ) )
 
Line Code
2143           $blog_id            = (int) $args[0];
2144           $username           = $args[1];
2145           $password           = $args[2];
2146           $filter             = isset( $args[3] ) ? $args[3] : array( 'public' => true );
2147
2148           if ( isset( $args[4] ) ) {
2149                $fields = $args[4];
2150           } else {
2151                /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
2152                $fields = apply_filters( 'xmlrpc_default_taxonomy_fields', array( 'labels', 'cap', 'object_type' ), 'wp.getTaxonomies' );
2153           }
2154
2155           if ( ! $user = $this->login( $username, $password ) )
2156                return $this->error;
2157
2158           /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
2159           do_action( 'xmlrpc_call', 'wp.getTaxonomies' );
2160
2161           $taxonomies = get_taxonomies( $filter, 'objects' );