Customizer: Use deep-link for Widgets in toolbar on front-end.
props caseypatrickdriscoll. fixes #30971. Built from https://develop.svn.wordpress.org/trunk@31176 git-svn-id: http://core.svn.wordpress.org/trunk@31157 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
b2b4233b7b
commit
c3c35cf645
|
@ -678,8 +678,29 @@ function wp_admin_bar_appearance_menu( $wp_admin_bar ) {
|
|||
add_action( 'wp_before_admin_bar_render', 'wp_customize_support_script' );
|
||||
}
|
||||
|
||||
if ( current_theme_supports( 'widgets' ) )
|
||||
$wp_admin_bar->add_menu( array( 'parent' => 'appearance', 'id' => 'widgets', 'title' => __('Widgets'), 'href' => admin_url('widgets.php') ) );
|
||||
if ( current_theme_supports( 'widgets' ) ) {
|
||||
$wp_admin_bar->add_menu( array(
|
||||
'parent' => 'appearance',
|
||||
'id' => 'widgets',
|
||||
'title' => __( 'Widgets' ),
|
||||
'href' => admin_url( 'widgets.php' ),
|
||||
'meta' => array(
|
||||
'class' => 'hide-if-customize',
|
||||
),
|
||||
) );
|
||||
|
||||
if ( current_user_can( 'customize' ) ) {
|
||||
$wp_admin_bar->add_menu( array(
|
||||
'parent' => 'appearance',
|
||||
'id' => 'customize-widgets',
|
||||
'title' => __( 'Widgets' ),
|
||||
'href' => add_query_arg( urlencode( 'autofocus[panel]' ), 'widgets', $customize_url ), // urlencode() needed due to #16859
|
||||
'meta' => array(
|
||||
'class' => 'hide-if-no-customize',
|
||||
),
|
||||
) );
|
||||
}
|
||||
}
|
||||
|
||||
if ( current_theme_supports( 'menus' ) || current_theme_supports( 'widgets' ) )
|
||||
$wp_admin_bar->add_menu( array( 'parent' => 'appearance', 'id' => 'menus', 'title' => __('Menus'), 'href' => admin_url('nav-menus.php') ) );
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.2-alpha-31175';
|
||||
$wp_version = '4.2-alpha-31176';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue