Tribe__Events__REST__V1__Endpoints__Term_Single_Base::update( WP_REST_Request $request )
Handles UPDATE requests on the endpoint.
Contents
Parameters
- $request
-
(WP_REST_Request) (Required)
Return
(WP_Error|WP_REST_Response) An array containing the data of the updated post on success or a WP_Error instance on failure.
Source
File: src/Tribe/REST/V1/Endpoints/Term_Single_Base.php
public function update( WP_REST_Request $request ) {
$term_response = $this->terms_controller->update_item( $request );
if ( is_wp_error( $term_response ) ) {
return $term_response;
}
$data = $this->repository->prepare_term_data( $term_response->get_data(), $this->get_taxonomy(), $this->get_term_namespace() );
$term_response->set_data( $data );
return $term_response;
}
Changelog
| Version | Description |
|---|---|
| 4.6 | Introduced. |