[wp-trac] [WordPress Trac] #46686: Customize Close Button Not Updating URL

WordPress Trac noreply at wordpress.org
Wed Nov 20 16:04:01 UTC 2019


#46686: Customize Close Button Not Updating URL
--------------------------+-----------------------------
 Reporter:  JarretC       |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Future Release
Component:  Customize     |     Version:
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |     Focuses:
--------------------------+-----------------------------

Comment (by SergeyBiryukov):

 Looking at [attachment:"46686.diff"], we cannot just remove
 `$wp_customize->get_return_url()` there, as the Close button would then
 always lead to the Themes screen instead of the previous page.

 Seems like some logic should be added to
 `WP_Customize_Manager::get_return_url()` to check if the return link still
 exists, by checking the `$_registered_pages` global, something similar to
 `user_can_access_admin_page()`.

 A unit test would also be great,
 `Tests_WP_Customize_Manager::test_return_url()` could be used as an
 example.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/46686#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list