PHP 클래스 WP_REST_Terms_Controller, wordpress

상속: extends WP_REST_Controller
파일 보기 프로젝트 열기: johnpbloch/wordpress 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$meta WP_REST_Term_Meta_Fields Instance of a term meta fields object.
$sort_column string Column to have the terms be sorted by.
$taxonomy string Taxonomy key.
$total_terms integer Number of terms that were found.

공개 메소드들

메소드 설명
__construct ( string $taxonomy ) Constructor.
create_item ( WP_REST_Request $request ) : WP_REST_Response | WP_Error Creates a single term in a taxonomy.
create_item_permissions_check ( WP_REST_Request $request ) : boolean | WP_Error Checks if a request has access to create a term.
delete_item ( WP_REST_Request $request ) : WP_REST_Response | WP_Error Deletes a single term from a taxonomy.
delete_item_permissions_check ( WP_REST_Request $request ) : boolean | WP_Error Checks if a request has access to delete the specified term.
get_collection_params ( ) : array Retrieves the query params for collections.
get_item ( WP_REST_Request $request ) : WP_REST_Response | WP_Error Gets a single term from a taxonomy.
get_item_permissions_check ( WP_REST_Request $request ) : boolean | WP_Error Checks if a request has access to read the specified term.
get_item_schema ( ) : array Retrieves the term's schema, conforming to JSON Schema.
get_items ( WP_REST_Request $request ) : WP_REST_Response | WP_Error Retrieves terms associated with a taxonomy.
get_items_permissions_check ( WP_REST_Request $request ) : boolean | WP_Error Checks if a request has access to read terms in the specified taxonomy.
prepare_item_for_database ( WP_REST_Request $request ) : object Prepares a single term for create or update.
prepare_item_for_response ( obj $item, WP_REST_Request $request ) : WP_REST_Response Prepares a single term output for response.
register_routes ( ) Registers the routes for the objects of the controller.
update_item ( WP_REST_Request $request ) : WP_REST_Response | WP_Error Updates a single term from a taxonomy.
update_item_permissions_check ( WP_REST_Request $request ) : boolean | WP_Error Checks if a request has access to update the specified term.

보호된 메소드들

메소드 설명
check_is_taxonomy_allowed ( string $taxonomy ) : boolean Checks that the taxonomy is valid.
prepare_links ( object $term ) : array Prepares links for the request.

메소드 상세

__construct() 공개 메소드

Constructor.
부터: 4.7.0
public __construct ( string $taxonomy )
$taxonomy string Taxonomy key.

check_is_taxonomy_allowed() 보호된 메소드

Checks that the taxonomy is valid.
부터: 4.7.0
protected check_is_taxonomy_allowed ( string $taxonomy ) : boolean
$taxonomy string Taxonomy to check.
리턴 boolean Whether the taxonomy is allowed for REST management.

create_item() 공개 메소드

Creates a single term in a taxonomy.
부터: 4.7.0
public create_item ( WP_REST_Request $request ) : WP_REST_Response | WP_Error
$request WP_REST_Request Full details about the request.
리턴 WP_REST_Response | WP_Error Response object on success, or WP_Error object on failure.

create_item_permissions_check() 공개 메소드

Checks if a request has access to create a term.
부터: 4.7.0
public create_item_permissions_check ( WP_REST_Request $request ) : boolean | WP_Error
$request WP_REST_Request Full details about the request.
리턴 boolean | WP_Error True if the request has access to create items, false or WP_Error object otherwise.

delete_item() 공개 메소드

Deletes a single term from a taxonomy.
부터: 4.7.0
public delete_item ( WP_REST_Request $request ) : WP_REST_Response | WP_Error
$request WP_REST_Request Full details about the request.
리턴 WP_REST_Response | WP_Error Response object on success, or WP_Error object on failure.

delete_item_permissions_check() 공개 메소드

Checks if a request has access to delete the specified term.
부터: 4.7.0
public delete_item_permissions_check ( WP_REST_Request $request ) : boolean | WP_Error
$request WP_REST_Request Full details about the request.
리턴 boolean | WP_Error True if the request has access to delete the item, otherwise false or WP_Error object.

get_collection_params() 공개 메소드

Retrieves the query params for collections.
부터: 4.7.0
public get_collection_params ( ) : array
리턴 array Collection parameters.

get_item() 공개 메소드

Gets a single term from a taxonomy.
부터: 4.7.0
public get_item ( WP_REST_Request $request ) : WP_REST_Response | WP_Error
$request WP_REST_Request Full details about the request.
리턴 WP_REST_Response | WP_Error Response object on success, or WP_Error object on failure.

get_item_permissions_check() 공개 메소드

Checks if a request has access to read the specified term.
부터: 4.7.0
public get_item_permissions_check ( WP_REST_Request $request ) : boolean | WP_Error
$request WP_REST_Request Full details about the request.
리턴 boolean | WP_Error True if the request has read access for the item, otherwise false or WP_Error object.

get_item_schema() 공개 메소드

Retrieves the term's schema, conforming to JSON Schema.
부터: 4.7.0
public get_item_schema ( ) : array
리턴 array Item schema data.

get_items() 공개 메소드

Retrieves terms associated with a taxonomy.
부터: 4.7.0
public get_items ( WP_REST_Request $request ) : WP_REST_Response | WP_Error
$request WP_REST_Request Full details about the request.
리턴 WP_REST_Response | WP_Error Response object on success, or WP_Error object on failure.

get_items_permissions_check() 공개 메소드

Checks if a request has access to read terms in the specified taxonomy.
부터: 4.7.0
public get_items_permissions_check ( WP_REST_Request $request ) : boolean | WP_Error
$request WP_REST_Request Full details about the request.
리턴 boolean | WP_Error True if the request has read access, otherwise false or WP_Error object.

prepare_item_for_database() 공개 메소드

Prepares a single term for create or update.
부터: 4.7.0
public prepare_item_for_database ( WP_REST_Request $request ) : object
$request WP_REST_Request Request object.
리턴 object $prepared_term Term object.

prepare_item_for_response() 공개 메소드

Prepares a single term output for response.
부터: 4.7.0
public prepare_item_for_response ( obj $item, WP_REST_Request $request ) : WP_REST_Response
$item obj Term object.
$request WP_REST_Request Request object.
리턴 WP_REST_Response $response Response object.

register_routes() 공개 메소드

Registers the routes for the objects of the controller.
또한 보기: register_rest_route()
부터: 4.7.0
public register_routes ( )

update_item() 공개 메소드

Updates a single term from a taxonomy.
부터: 4.7.0
public update_item ( WP_REST_Request $request ) : WP_REST_Response | WP_Error
$request WP_REST_Request Full details about the request.
리턴 WP_REST_Response | WP_Error Response object on success, or WP_Error object on failure.

update_item_permissions_check() 공개 메소드

Checks if a request has access to update the specified term.
부터: 4.7.0
public update_item_permissions_check ( WP_REST_Request $request ) : boolean | WP_Error
$request WP_REST_Request Full details about the request.
리턴 boolean | WP_Error True if the request has access to update the item, false or WP_Error object otherwise.

프로퍼티 상세

$meta 보호되어 있는 프로퍼티

Instance of a term meta fields object.
부터: 4.7.0
protected WP_REST_Term_Meta_Fields $meta
리턴 WP_REST_Term_Meta_Fields

$sort_column 보호되어 있는 프로퍼티

Column to have the terms be sorted by.
부터: 4.7.0
protected string $sort_column
리턴 string

$taxonomy 보호되어 있는 프로퍼티

Taxonomy key.
부터: 4.7.0
protected string $taxonomy
리턴 string

$total_terms 보호되어 있는 프로퍼티

Number of terms that were found.
부터: 4.7.0
protected int $total_terms
리턴 integer