WP_REST_Posts_Controller::handle_terms

SummerySummery

Updates the post’s terms from a REST request.

Syntax

WP_REST_Posts_Controller::handle_terms( int $post_id, WP_REST_Request $request )

ParametersParameters

$post_id

(int) (Required) The post ID to update the terms form.

$request

(WP_REST_Request) (Required) The request object with post and terms data.

ReturnReturn

(null|WP_Error) WP_Error on an error assigning any of the terms, otherwise null.

SourceSource

File: wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php


			

ChangelogChangelog

Changelog
Version Description
4.7.0 Introduced.
Scroll to Top