WordPress.org

Make WordPress Core


Ignore:
Timestamp:
01/30/2018 02:43:55 PM (3 years ago)
Author:
SergeyBiryukov
Message:

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

Props dlh, westonruter.
See #42433, #39896.
Merges [42615] to the 4.9 branch.
Fixes #42450.

Location:
branches/4.9
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.9

  • branches/4.9/tests/phpunit/tests/customize/manager.php

    r41839 r42620  
    499499            wp_list_pluck( $wp_customize->changeset_data(), 'value' )
    500500        );
     501
     502        // If there is no user, don't fetch the most recent autosave. See #42450.
     503        wp_set_current_user( 0 );
     504        $wp_customize = new WP_Customize_Manager(
     505            array(
     506                'changeset_uuid' => $uuid,
     507                'autosaved'      => true,
     508            )
     509        );
     510        $this->assertEquals( $data, $wp_customize->changeset_data() );
    501511    }
    502512
Note: See TracChangeset for help on using the changeset viewer.