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