WP_REST_Posts_Controller::handle_terms( int $post_id, WP_REST_Request $request )
Updates the post’s terms from a REST request.
Parameters
- $post_id
-
(Required) The post ID to update the terms form.
- $request
-
(Required) The request object with post and terms data.
Return
(null|WP_Error) WP_Error on an error assigning any of the terms, otherwise null.
Source
File: wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php
Changelog
Version | Description |
---|---|
4.7.0 | Introduced. |