WordPress.org

Make WordPress Core


Ignore:
Timestamp:
01/30/2018 12:20:37 AM (3 years ago)
Author:
westonruter
Message:

Customize: Ensure customize_autosaved requests only use revision of logged-in user.

Props dlh, westonruter.
See #42433, #39896.
Fixes #42450.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/customize/manager.php

    r42343 r42615  
    525525            wp_list_pluck( $wp_customize->changeset_data(), 'value' )
    526526        );
     527
     528        // If there is no user, don't fetch the most recent autosave. See #42450.
     529        wp_set_current_user( 0 );
     530        $wp_customize = new WP_Customize_Manager(
     531            array(
     532                'changeset_uuid' => $uuid,
     533                'autosaved'      => true,
     534            )
     535        );
     536        $this->assertEquals( $data, $wp_customize->changeset_data() );
    527537    }
    528538
Note: See TracChangeset for help on using the changeset viewer.