WordPress.org

Make WordPress Core


Ignore:
Timestamp:
06/08/2012 06:45:12 PM (10 years ago)
Author:
ryan
Message:

Customizer: Redirect back to referrer. If referrer is a front end page, load that page in the customizer preview. Props nacin, koopersmith. fixes #20877

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/admin-bar.php

    r20934 r21028  
    577577        return;
    578578
     579    $current_url = ( is_ssl() ? 'https://' : 'http://' ) . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
    579580    $wp_admin_bar->add_menu( array(
    580581        'parent' => 'appearance',
    581582        'id'     => 'customize',
    582583        'title'  => __('Customize'),
    583         'href'   => wp_customize_url(),
     584        'href'   => add_query_arg( 'url', urlencode( $current_url ), wp_customize_url() ),
    584585        'meta'   => array(
    585586            'class' => 'hide-if-no-customize',
Note: See TracChangeset for help on using the changeset viewer.