WPDev.one
Core Class

WP_REST_Terms_Controller

class WP_REST_Terms_Controller // Constructor: function Object() { [native code] }

Core class used to managed terms associated with a taxonomy via the REST API.

Methods 20 methods

Method / Return Description
__construct()
void

Constructor.

Parameters: $taxonomy: mixed
register_routes()
void

Registers the routes for terms.

check_read_terms_permission_for_post()
bool

Checks if the terms for a post can be read.

Parameters: $post: mixed, $request: mixed
get_items_permissions_check()
(bool

Checks if a request has access to read terms in the specified taxonomy.

Parameters: $request: mixed
get_items()
(WP_REST_Response

Retrieves terms associated with a taxonomy.

Parameters: $request: mixed
get_term()
(WP_Term

Get the term, if the ID is valid.

Parameters: $id: mixed
get_item_permissions_check()
(true

Checks if a request has access to read or edit the specified term.

Parameters: $request: mixed
get_item()
(WP_REST_Response

Gets a single term from a taxonomy.

Parameters: $request: mixed
create_item_permissions_check()
(bool

Checks if a request has access to create a term.

Parameters: $request: mixed
create_item()
(WP_REST_Response

Creates a single term in a taxonomy.

Parameters: $request: mixed
update_item_permissions_check()
(true

Checks if a request has access to update the specified term.

Parameters: $request: mixed
update_item()
(WP_REST_Response

Updates a single term from a taxonomy.

Parameters: $request: mixed
delete_item_permissions_check()
(true

Checks if a request has access to delete the specified term.

Parameters: $request: mixed
delete_item()
(WP_REST_Response

Deletes a single term from a taxonomy.

Parameters: $request: mixed
prepare_item_for_database()
object

Prepares a single term for create or update.

Parameters: $request: mixed
prepare_item_for_response()
WP_REST_Response

Prepares a single term output for response.

Parameters: $item: mixed, $request: mixed
prepare_links()
array

Prepares links for the request.

Parameters: $term: mixed
get_item_schema()
array

Retrieves the term's schema, conforming to JSON Schema.

get_collection_params()
array

Retrieves the query params for collections.

check_is_taxonomy_allowed()
bool

Checks that the taxonomy is valid.

Parameters: $taxonomy: mixed

Properties

Property / Type Description
$taxonomy
mixed
public
No description available.
$meta
mixed
public
No description available.
$sort_column
mixed
public
No description available.
$total_terms
mixed
public
No description available.
$allow_batch
mixed
public
No description available.

Class Information

Since Version
4.7.0
Source File
wp-includes/rest-api/endpoints/class-wp-rest-terms-controller.php
Advertisement