Users: Correctly pass the `context` property for persisted preferences.

The user meta `context` property in `wp_register_persisted_preferences_meta()` was incorrectly configured. It should be part of the `schema` array, not the `show_in_rest` array.

Follow-up to [54182].

Props talldanwp, dd32.
Fixes #56665. See #56467.
Built from https://develop.svn.wordpress.org/trunk@54329


git-svn-id: http://core.svn.wordpress.org/trunk@53888 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2022-09-27 15:23:10 +00:00
parent 3ed1ed5c13
commit abf66fa018
2 changed files with 5 additions and 5 deletions

View File

@ -4992,9 +4992,9 @@ function wp_register_persisted_preferences_meta() {
'show_in_rest' => array( 'show_in_rest' => array(
'name' => 'persisted_preferences', 'name' => 'persisted_preferences',
'type' => 'object', 'type' => 'object',
'context' => array( 'edit' ),
'schema' => array( 'schema' => array(
'type' => 'object', 'type' => 'object',
'context' => array( 'edit' ),
'properties' => array( 'properties' => array(
'_modified' => array( '_modified' => array(
'description' => __( 'The date and time the preferences were updated.' ), 'description' => __( 'The date and time the preferences were updated.' ),

View File

@ -16,7 +16,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '6.1-beta1-54328'; $wp_version = '6.1-beta1-54329';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.