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
1907
1908           $blog_id        = (int) $args[0];
1909           $username       = $args[1];
1910           $password       = $args[2];
1911           $taxonomy       = $args[3];
1912
1913           if ( isset( $args[4] ) )
1914                $fields = $args[4];
1915           else
1916                $fields = apply_filters( 'xmlrpc_default_taxonomy_fields', array( 'labels', 'cap', 'object_type' ), 'wp.getTaxonomy' );
1917
1918           if ( ! $user = $this->login( $username, $password ) )
1919                return $this->error;
1920
1921           do_action( 'xmlrpc_call', 'wp.getTaxonomy' );
1922
1923           if ( ! taxonomy_exists( $taxonomy ) )
1924                return new IXR_Error( 403, __( 'Invalid taxonomy' ) );
1925
 
Line Code
1951
1952           $blog_id            = (int) $args[0];
1953           $username           = $args[1];
1954           $password           = $args[2];
1955           $filter             = isset( $args[3] ) ? $args[3] : array( 'public' => true );
1956
1957           if ( isset( $args[4] ) )
1958                $fields = $args[4];
1959           else
1960                $fields = apply_filters( 'xmlrpc_default_taxonomy_fields', array( 'labels', 'cap', 'object_type' ), 'wp.getTaxonomies' );
1961
1962           if ( ! $user = $this->login( $username, $password ) )
1963                return $this->error;
1964
1965           do_action( 'xmlrpc_call', 'wp.getTaxonomies' );
1966
1967           $taxonomies = get_taxonomies( $filter, 'objects' );
1968
1969           // holds all the taxonomy data