Make WordPress Core


Ignore:
Timestamp:
11/09/2016 07:02:53 AM (9 years ago)
Author:
westonruter
Message:

Customize: Store modifying user ID with setting change written into changeset and restore current user when setting is being saved.

Restoring the current user context when saving a setting ensures filters apply as expected, such as Kses. When a user is not associated with a given setting change, continue to override capability to be exist when saving. Skip overwriting setting values in a changeset that have not changed, facilitating concurrent editing and amending a changeset by a user with fewer privileges.

See #30937.
Fixes #38705.

File:
1 edited

Legend:

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

    r39180 r39181  
    25652565    if ( empty( $wp_customize ) ) {
    25662566        require_once ABSPATH . WPINC . '/class-wp-customize-manager.php';
    2567         $wp_customize = new WP_Customize_Manager( $changeset_post->post_name );
     2567        $wp_customize = new WP_Customize_Manager( array( 'changeset_uuid' => $changeset_post->post_name ) );
    25682568    }
    25692569
Note: See TracChangeset for help on using the changeset viewer.