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