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
2264           } else {
2265                /**
2266                 * Filters the taxonomy query fields used by the given XML-RPC method.
2267                 *
2268                 * @since 3.4.0
2269                 *
2270                 * @param array  $fields An array of taxonomy fields to retrieve.
2271                 * @param string $method The method name.
2272                 */
2273                $fields = apply_filters( 'xmlrpc_default_taxonomy_fields', array( 'labels', 'cap', 'object_type' ), 'wp.getTaxonomy' );
2274           }
2275
2276           if ( ! $user = $this->login( $username, $password ) )
2277                return $this->error;
2278
2279           /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
2280           do_action( 'xmlrpc_call', 'wp.getTaxonomy' );
2281
2282           if ( ! taxonomy_exists( $taxonomy ) )
 
Line Code
2317
2318           $username = $args[1];
2319           $password = $args[2];
2320           $filter   = isset( $args[3] ) ? $args[3] : array( 'public' => true );
2321
2322           if ( isset( $args[4] ) ) {
2323                $fields = $args[4];
2324           } else {
2325                /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
2326                $fields = apply_filters( 'xmlrpc_default_taxonomy_fields', array( 'labels', 'cap', 'object_type' ), 'wp.getTaxonomies' );
2327           }
2328
2329           if ( ! $user = $this->login( $username, $password ) )
2330                return $this->error;
2331
2332           /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
2333           do_action( 'xmlrpc_call', 'wp.getTaxonomies' );
2334
2335           $taxonomies = get_taxonomies( $filter, 'objects' );