mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +00:00
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. git-svn-id: https://develop.svn.wordpress.org/trunk@54329 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -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.' ),
|
||||
|
||||
@@ -36,11 +36,11 @@ class Tests_User_WpRegisterPersistedPreferencesMeta extends WP_UnitTestCase {
|
||||
'sanitize_callback' => null,
|
||||
'auth_callback' => '__return_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.' ),
|
||||
|
||||
Reference in New Issue
Block a user