[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

/wp-includes/rest-api/endpoints/ -> class-wp-rest-terms-controller.php (summary)

REST API: WP_REST_Terms_Controller class

File Size: 1154 lines (32 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

WP_REST_Terms_Controller:: (19 methods):
  __construct()
  register_routes()
  get_items_permissions_check()
  get_items()
  get_term()
  get_item_permissions_check()
  get_item()
  create_item_permissions_check()
  create_item()
  update_item_permissions_check()
  update_item()
  delete_item_permissions_check()
  delete_item()
  prepare_item_for_database()
  prepare_item_for_response()
  prepare_links()
  get_item_schema()
  get_collection_params()
  check_is_taxonomy_allowed()


Class: WP_REST_Terms_Controller  - X-Ref

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

__construct( $taxonomy )   X-Ref
Constructor.

since: 4.7.0
param: string $taxonomy Taxonomy key.

register_routes()   X-Ref
Registers the routes for terms.

since: 4.7.0

get_items_permissions_check( $request )   X-Ref
Checks if a request has access to read terms in the specified taxonomy.

return: true|WP_Error True if the request has read access, otherwise false or WP_Error object.
since: 4.7.0
param: WP_REST_Request $request Full details about the request.

get_items( $request )   X-Ref
Retrieves terms associated with a taxonomy.

return: WP_REST_Response|WP_Error Response object on success, or WP_Error object on failure.
since: 4.7.0
param: WP_REST_Request $request Full details about the request.

get_term( $id )   X-Ref
Get the term, if the ID is valid.

return: WP_Term|WP_Error Term object if ID is valid, WP_Error otherwise.
since: 4.7.2
param: int $id Supplied ID.

get_item_permissions_check( $request )   X-Ref
Checks if a request has access to read or edit the specified term.

return: true|WP_Error True if the request has read access for the item, otherwise false or WP_Error object.
since: 4.7.0
param: WP_REST_Request $request Full details about the request.

get_item( $request )   X-Ref
Gets a single term from a taxonomy.

return: WP_REST_Response|WP_Error Response object on success, or WP_Error object on failure.
since: 4.7.0
param: WP_REST_Request $request Full details about the request.

create_item_permissions_check( $request )   X-Ref
Checks if a request has access to create a term.

return: true|WP_Error True if the request has access to create items, false or WP_Error object otherwise.
since: 4.7.0
param: WP_REST_Request $request Full details about the request.

create_item( $request )   X-Ref
Creates a single term in a taxonomy.

return: WP_REST_Response|WP_Error Response object on success, or WP_Error object on failure.
since: 4.7.0
param: WP_REST_Request $request Full details about the request.

update_item_permissions_check( $request )   X-Ref
Checks if a request has access to update the specified term.

return: true|WP_Error True if the request has access to update the item, false or WP_Error object otherwise.
since: 4.7.0
param: WP_REST_Request $request Full details about the request.

update_item( $request )   X-Ref
Updates a single term from a taxonomy.

return: WP_REST_Response|WP_Error Response object on success, or WP_Error object on failure.
since: 4.7.0
param: WP_REST_Request $request Full details about the request.

delete_item_permissions_check( $request )   X-Ref
Checks if a request has access to delete the specified term.

return: true|WP_Error True if the request has access to delete the item, otherwise false or WP_Error object.
since: 4.7.0
param: WP_REST_Request $request Full details about the request.

delete_item( $request )   X-Ref
Deletes a single term from a taxonomy.

return: WP_REST_Response|WP_Error Response object on success, or WP_Error object on failure.
since: 4.7.0
param: WP_REST_Request $request Full details about the request.

prepare_item_for_database( $request )   X-Ref
Prepares a single term for create or update.

return: object Term object.
since: 4.7.0
param: WP_REST_Request $request Request object.

prepare_item_for_response( $item, $request )   X-Ref
Prepares a single term output for response.

return: WP_REST_Response Response object.
since: 4.7.0
param: WP_Term         $item    Term object.
param: WP_REST_Request $request Request object.

prepare_links( $term )   X-Ref
Prepares links for the request.

return: array Links for the given term.
since: 4.7.0
param: WP_Term $term Term object.

get_item_schema()   X-Ref
Retrieves the term's schema, conforming to JSON Schema.

return: array Item schema data.
since: 4.7.0

get_collection_params()   X-Ref
Retrieves the query params for collections.

return: array Collection parameters.
since: 4.7.0

check_is_taxonomy_allowed( $taxonomy )   X-Ref
Checks that the taxonomy is valid.

return: bool Whether the taxonomy is allowed for REST management.
since: 4.7.0
param: string $taxonomy Taxonomy to check.



Generated: Wed Apr 24 01:00:03 2024 Cross-referenced by PHPXref 0.7.1