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
2532           } else {
2533                /**
2534                 * Filters the taxonomy query fields used by the given XML-RPC method.
2535                 *
2536                 * @since 3.4.0
2537                 *
2538                 * @param array  $fields An array of taxonomy fields to retrieve.
2539                 * @param string $method The method name.
2540                 */
2541                $fields = apply_filters( 'xmlrpc_default_taxonomy_fields', array( 'labels', 'cap', 'object_type' ), 'wp.getTaxonomy' );
2542           }
2543
2544           $user = $this->login( $username, $password );
2545           if ( ! $user ) {
2546                return $this->error;
2547           }
2548
2549           /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
2550           do_action( 'xmlrpc_call', 'wp.getTaxonomy', $args, $this );
 
Line Code
2590
2591           $username = $args[1];
2592           $password = $args[2];
2593           $filter   = isset( $args[3] ) ? $args[3] : array( 'public' => true );
2594
2595           if ( isset( $args[4] ) ) {
2596                $fields = $args[4];
2597           } else {
2598                /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
2599                $fields = apply_filters( 'xmlrpc_default_taxonomy_fields', array( 'labels', 'cap', 'object_type' ), 'wp.getTaxonomies' );
2600           }
2601
2602           $user = $this->login( $username, $password );
2603           if ( ! $user ) {
2604                return $this->error;
2605           }
2606
2607           /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
2608           do_action( 'xmlrpc_call', 'wp.getTaxonomies', $args, $this );