mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-02 00:00:15 +00:00
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. git-svn-id: https://develop.svn.wordpress.org/trunk@36261 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -322,6 +322,10 @@ class Tests_WP_Customize_Manager extends WP_UnitTestCase {
|
||||
$_SERVER['HTTP_REFERER'] = wp_slash( admin_url( 'customize.php' ) );
|
||||
$this->assertEquals( $preview_url, $this->manager->get_return_url() );
|
||||
|
||||
// See #35355.
|
||||
$_SERVER['HTTP_REFERER'] = wp_slash( admin_url( 'wp-login.php' ) );
|
||||
$this->assertEquals( $preview_url, $this->manager->get_return_url() );
|
||||
|
||||
$url = home_url( '/referred/' );
|
||||
$_SERVER['HTTP_REFERER'] = wp_slash( $url );
|
||||
$this->assertEquals( $url, $this->manager->get_return_url() );
|
||||
|
||||
Reference in New Issue
Block a user