Make WordPress Core


Ignore:
Timestamp:
01/11/2016 06:50:30 PM (9 years ago)
Author:
westonruter
Message:

Customizer: Prevent erroneously directing user to login screen when closing.

Fixes issue where user gets stuck at login screen after trying to close the app if previously they had to first login to access the Customizer. Prevents WP_Customize_Manager::get_return_url() from using wp-login.php as a referer.

Props chandrapatel.
See #32637.
Fixes #35355.

File:
1 edited

Legend:

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

    r35810 r36261  
    321321
    322322        $_SERVER['HTTP_REFERER'] = wp_slash( admin_url( 'customize.php' ) );
     323        $this->assertEquals( $preview_url, $this->manager->get_return_url() );
     324
     325        // See #35355.
     326        $_SERVER['HTTP_REFERER'] = wp_slash( admin_url( 'wp-login.php' ) );
    323327        $this->assertEquals( $preview_url, $this->manager->get_return_url() );
    324328
Note: See TracChangeset for help on using the changeset viewer.