REST API: Return term resources in "edit" context after PUT or POST request.

Props westonruter, dlh.
Fixes #41411.


Built from https://develop.svn.wordpress.org/trunk@46098


git-svn-id: http://core.svn.wordpress.org/trunk@45910 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
K. Adam White 2019-09-12 21:29:57 +00:00
parent b987372d75
commit 742ab2d68b
2 changed files with 3 additions and 3 deletions

View File

@ -468,7 +468,7 @@ class WP_REST_Terms_Controller extends WP_REST_Controller {
return $fields_update;
}
$request->set_param( 'context', 'view' );
$request->set_param( 'context', 'edit' );
/**
* Fires after a single term is completely created or updated via the REST API.
@ -570,7 +570,7 @@ class WP_REST_Terms_Controller extends WP_REST_Controller {
return $fields_update;
}
$request->set_param( 'context', 'view' );
$request->set_param( 'context', 'edit' );
/** This action is documented in wp-includes/rest-api/endpoints/class-wp-rest-terms-controller.php */
do_action( "rest_after_insert_{$this->taxonomy}", $term, $request, false );

View File

@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.3-alpha-46097';
$wp_version = '5.3-alpha-46098';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.