mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-22 00:01:27 +01:00
REST API: Pass correct ID to meta->update_value
to permit setting term meta during term creation.
Props joehoyle. Fixes #44834. Built from https://develop.svn.wordpress.org/trunk@43636 git-svn-id: http://core.svn.wordpress.org/trunk@43465 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
a7bb083120
commit
42b578ad94
@ -454,7 +454,7 @@ class WP_REST_Terms_Controller extends WP_REST_Controller {
|
||||
|
||||
$schema = $this->get_item_schema();
|
||||
if ( ! empty( $schema['properties']['meta'] ) && isset( $request['meta'] ) ) {
|
||||
$meta_update = $this->meta->update_value( $request['meta'], (int) $request['id'] );
|
||||
$meta_update = $this->meta->update_value( $request['meta'], $term->term_id );
|
||||
|
||||
if ( is_wp_error( $meta_update ) ) {
|
||||
return $meta_update;
|
||||
|
@ -4,7 +4,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '5.0-alpha-43635';
|
||||
$wp_version = '5.0-alpha-43636';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user