_prepare_taxonomy example

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 );
    }

    /** * Retrieves all taxonomies. * * @since 3.4.0 * * @see get_taxonomies() * * @param array $args { * Method arguments. Note: arguments must be ordered as documented. * * @type int $0 Blog ID (unused). * @type string $1 Username. * @type string $2 Password. * @type array $3 Optional. An array of arguments for retrieving taxonomies. * @type array $4 Optional. The subset of taxonomy fields to return. * } * @return array|IXR_Error An associative array of taxonomy data with returned fields determined * by `$fields`, or an IXR_Error instance on failure. */
Home | Imprint | This part of the site doesn't use cookies.