WordPress at a glance
function is not described

wp_xmlrpc_server::wp_getTaxonomy() public WP 3.4.0

Retrieve a taxonomy.

{} It's a method of the class: wp_xmlrpc_server{}

Return

Array/IXR_Error. An array of taxonomy data on success, IXR_Error instance otherwise.

Usage

$wp_xmlrpc_server = new wp_xmlrpc_server();
$wp_xmlrpc_server->wp_getTaxonomy( $args );
$args(array) (required)

Method arguments. Note: arguments must be ordered as documented.

  • blog_id(int)
    Blog ID (unused).

  • username(string)
    Username.

  • password(string)
    Password.

  • taxnomy(string)
    Taxonomy name.

  • fields(array)
    Optional. Array of taxonomy fields to limit to in the return. Accepts 'labels', 'cap', 'menu', and 'object_type'.
    Default: empty array

Notes

  • See: get_taxonomy()

Changelog

Since 3.4.0 Introduced.

Code of wp_xmlrpc_server::wp_getTaxonomy() WP 5.5.3

<?php
public function wp_getTaxonomy( $args ) {
	if ( ! $this->minimum_args( $args, 4 ) ) {
		return $this->error;
	}

	$this->escape( $args );

	$username = $args[1];
	$password = $args[2];
	$taxonomy = $args[3];

	if ( isset( $args[4] ) ) {
		$fields = $args[4];
	} else {
		/**
		 * Filters the taxonomy query fields used by the given XML-RPC method.
		 *
		 * @since 3.4.0
		 *
		 * @param array  $fields An array of taxonomy fields to retrieve.
		 * @param string $method The method name.
		 */
		$fields = apply_filters( 'xmlrpc_default_taxonomy_fields', array( 'labels', 'cap', 'object_type' ), 'wp.getTaxonomy' );
	}

	$user = $this->login( $username, $password );
	if ( ! $user ) {
		return $this->error;
	}

	/** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
	do_action( 'xmlrpc_call', 'wp.getTaxonomy' );

	if ( ! taxonomy_exists( $taxonomy ) ) {
		return new IXR_Error( 403, __( 'Invalid taxonomy.' ) );
	}

	$taxonomy = get_taxonomy( $taxonomy );

	if ( ! current_user_can( $taxonomy->cap->assign_terms ) ) {
		return new IXR_Error( 401, __( 'Sorry, you are not allowed to assign terms in this taxonomy.' ) );
	}

	return $this->_prepare_taxonomy( $taxonomy, $fields );
}