Make WordPress Core


Ignore:
Timestamp:
09/27/2022 03:21:48 PM (2 years ago)
Author:
SergeyBiryukov
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/user.php

    r54262 r54329  
    49914991            'single'       => true,
    49924992            'show_in_rest' => array(
    4993                 'name'    => 'persisted_preferences',
    4994                 'type'    => 'object',
    4995                 'context' => array( 'edit' ),
    4996                 'schema'  => array(
     4993                'name'   => 'persisted_preferences',
     4994                'type'   => 'object',
     4995                'schema' => array(
    49974996                    'type'                 => 'object',
     4997                    'context'              => array( 'edit' ),
    49984998                    'properties'           => array(
    49994999                        '_modified' => array(
Note: See TracChangeset for help on using the changeset viewer.