[wp-trac] [WordPress Trac] #25457: Add a filter to the Close link in wp-admin/customize.php

WordPress Trac noreply at wordpress.org
Sat Oct 5 19:46:07 UTC 2013


#25457: Add a filter to the Close link in wp-admin/customize.php
-----------------------------+------------------------------
 Reporter:  birgire          |       Owner:
     Type:  enhancement      |      Status:  new
 Priority:  normal           |   Milestone:  Awaiting Review
Component:  Appearance       |     Version:  3.6.1
 Severity:  normal           |  Resolution:
 Keywords:  has-patch close  |
-----------------------------+------------------------------

Comment (by birgire):

 I agree, the user experince should be consistent and predictable.

 Few things that come to mind,  like these two different approaches:

 **a)** I wonder if it would make sense to replace {{{customize.php}}} with
 {{{customize.php?url=#current_page_url#}}}
 in the admin-menu. **Example:** if we are on the admin page
 {{{widgets.php}}} then the admin menu link for ''Customize'' will be
 {{{customize.php?url=widgets.php}}}.

 **b)** Perhaps we can use {{{wp_get_referer()}}}, so instead of

  {{{$return ? $return : admin_url( 'themes.php' )}}}

 in {{{wp-admin/customize.php}}}, we could try:

 {{{$return ? $return : $close_url }}}

 or if we want it to be filterable:

 {{{$return ? $return : apply_filters( 'wp_customize_close_url', $close_url
 ) }}}

 where:

 {{{$close_url = ( wp_get_referer() ) ? wp_get_referer() : admin_url(
 'themes.php' )}}}

--
Ticket URL: <http://core.trac.wordpress.org/ticket/25457#comment:7>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list