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
2239           } else {
2240                /**
2241                 * Filter the taxonomy query fields used by the given XML-RPC method.
2242                 *
2243                 * @since 3.4.0
2244                 *
2245                 * @param array  $fields An array of taxonomy fields to retrieve.
2246                 * @param string $method The method name.
2247                 */
2248                $fields = apply_filters( 'xmlrpc_default_taxonomy_fields', array( 'labels', 'cap', 'object_type' ), 'wp.getTaxonomy' );
2249           }
2250
2251           if ( ! $user = $this->login( $username, $password ) )
2252                return $this->error;
2253
2254           /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
2255           do_action( 'xmlrpc_call', 'wp.getTaxonomy' );
2256
2257           if ( ! taxonomy_exists( $taxonomy ) )
 
Line Code
2292
2293           $username = $args[1];
2294           $password = $args[2];
2295           $filter   = isset( $args[3] ) ? $args[3] : array( 'public' => true );
2296
2297           if ( isset( $args[4] ) ) {
2298                $fields = $args[4];
2299           } else {
2300                /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
2301                $fields = apply_filters( 'xmlrpc_default_taxonomy_fields', array( 'labels', 'cap', 'object_type' ), 'wp.getTaxonomies' );
2302           }
2303
2304           if ( ! $user = $this->login( $username, $password ) )
2305                return $this->error;
2306
2307           /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
2308           do_action( 'xmlrpc_call', 'wp.getTaxonomies' );
2309
2310           $taxonomies = get_taxonomies( $filter, 'objects' );