WordPress at a glance
function is not described

WP_REST_Terms_Controller::check_is_taxonomy_allowed() protected WP 4.7.0

Checks that the taxonomy is valid.

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

No Hooks.

Return

true/false. Whether the taxonomy is allowed for REST management.

Usage

// protected - for code of main (parent) or child class
$result = $this->check_is_taxonomy_allowed( $taxonomy );
$taxonomy(string) (required)
Taxonomy to check.

Changelog

Since 4.7.0 Introduced.

Code of WP_REST_Terms_Controller::check_is_taxonomy_allowed() WP 5.5.2

<?php
protected function check_is_taxonomy_allowed( $taxonomy ) {
	$taxonomy_obj = get_taxonomy( $taxonomy );
	if ( $taxonomy_obj && ! empty( $taxonomy_obj->show_in_rest ) ) {
		return true;
	}
	return false;
}