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
2290           } else {
2291                /**
2292                 * Filters the taxonomy query fields used by the given XML-RPC method.
2293                 *
2294                 * @since 3.4.0
2295                 *
2296                 * @param array  $fields An array of taxonomy fields to retrieve.
2297                 * @param string $method The method name.
2298                 */
2299                $fields = apply_filters( 'xmlrpc_default_taxonomy_fields', array( 'labels', 'cap', 'object_type' ), 'wp.getTaxonomy' );
2300           }
2301
2302           if ( ! $user = $this->login( $username, $password ) )
2303                return $this->error;
2304
2305           /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
2306           do_action( 'xmlrpc_call', 'wp.getTaxonomy' );
2307
2308           if ( ! taxonomy_exists( $taxonomy ) )
 
Line Code
2343
2344           $username = $args[1];
2345           $password = $args[2];
2346           $filter   = isset( $args[3] ) ? $args[3] : array( 'public' => true );
2347
2348           if ( isset( $args[4] ) ) {
2349                $fields = $args[4];
2350           } else {
2351                /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
2352                $fields = apply_filters( 'xmlrpc_default_taxonomy_fields', array( 'labels', 'cap', 'object_type' ), 'wp.getTaxonomies' );
2353           }
2354
2355           if ( ! $user = $this->login( $username, $password ) )
2356                return $this->error;
2357
2358           /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
2359           do_action( 'xmlrpc_call', 'wp.getTaxonomies' );
2360
2361           $taxonomies = get_taxonomies( $filter, 'objects' );