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
2485           } else {
2486                /**
2487                 * Filters the taxonomy query fields used by the given XML-RPC method.
2488                 *
2489                 * @since 3.4.0
2490                 *
2491                 * @param array  $fields An array of taxonomy fields to retrieve.
2492                 * @param string $method The method name.
2493                 */
2494                $fields = apply_filters( 'xmlrpc_default_taxonomy_fields', array( 'labels', 'cap', 'object_type' ), 'wp.getTaxonomy' );
2495           }
2496
2497           $user = $this->login( $username, $password );
2498           if ( ! $user ) {
2499                return $this->error;
2500           }
2501
2502           /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
2503           do_action( 'xmlrpc_call', 'wp.getTaxonomy' );
 
Line Code
2543
2544           $username = $args[1];
2545           $password = $args[2];
2546           $filter   = isset( $args[3] ) ? $args[3] : array( 'public' => true );
2547
2548           if ( isset( $args[4] ) ) {
2549                $fields = $args[4];
2550           } else {
2551                /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
2552                $fields = apply_filters( 'xmlrpc_default_taxonomy_fields', array( 'labels', 'cap', 'object_type' ), 'wp.getTaxonomies' );
2553           }
2554
2555           $user = $this->login( $username, $password );
2556           if ( ! $user ) {
2557                return $this->error;
2558           }
2559
2560           /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
2561           do_action( 'xmlrpc_call', 'wp.getTaxonomies' );