REST API: Support assigning terms when creating attachments.

Props mukesh27, Dharm1025, Ankit K Gupta, swissspidy, dharm1025, tanjimtc71, timothyblynjacobs, spacedmonkey.
Fixes #57897.
Built from https://develop.svn.wordpress.org/trunk@57380


git-svn-id: http://core.svn.wordpress.org/trunk@56886 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Pascal Birchler 2024-01-30 08:39:16 +00:00
parent f0bfb0e9be
commit ce230b8742
2 changed files with 7 additions and 1 deletions

View File

@ -186,6 +186,12 @@ class WP_REST_Attachments_Controller extends WP_REST_Posts_Controller {
return $fields_update;
}
$terms_update = $this->handle_terms( $attachment_id, $request );
if ( is_wp_error( $terms_update ) ) {
return $terms_update;
}
$request->set_param( 'context', 'edit' );
/**

View File

@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.5-alpha-57379';
$wp_version = '6.5-alpha-57380';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.