diff --git a/src/wp-includes/user.php b/src/wp-includes/user.php index 0368e21753..499fd9c83a 100644 --- a/src/wp-includes/user.php +++ b/src/wp-includes/user.php @@ -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.' ), diff --git a/tests/phpunit/tests/user/wpRegisterPersistedPreferencesMeta.php b/tests/phpunit/tests/user/wpRegisterPersistedPreferencesMeta.php index 5c136070d5..c3c4bd7a09 100644 --- a/tests/phpunit/tests/user/wpRegisterPersistedPreferencesMeta.php +++ b/tests/phpunit/tests/user/wpRegisterPersistedPreferencesMeta.php @@ -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.' ),