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

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

View File

@ -16,7 +16,7 @@
*
* @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.