Customizer: Redirect back to referrer. If referrer is a front end page, load that page in the customizer preview. Props nacin, koopersmith. fixes #20877
git-svn-id: http://core.svn.wordpress.org/trunk@21028 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -576,11 +576,12 @@ function wp_admin_bar_appearance_menu( $wp_admin_bar ) {
|
||||
if ( ! current_user_can( 'edit_theme_options' ) )
|
||||
return;
|
||||
|
||||
$current_url = ( is_ssl() ? 'https://' : 'http://' ) . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
|
||||
$wp_admin_bar->add_menu( array(
|
||||
'parent' => 'appearance',
|
||||
'id' => 'customize',
|
||||
'title' => __('Customize'),
|
||||
'href' => wp_customize_url(),
|
||||
'href' => add_query_arg( 'url', urlencode( $current_url ), wp_customize_url() ),
|
||||
'meta' => array(
|
||||
'class' => 'hide-if-no-customize',
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user