Customizer: Use deep-links for Backgrounds, Headers, and Widgets.

Replace links in admin menu and toolbar to Custom Background/Header screen with deep-links to the Customizer section.
On the Widgets screen display a link to the Customizer widgets panel.

props topher1kenobe, rzen, celloexpressions, westonruter
fixes #25569, #25571, #28032.

git-svn-id: https://develop.svn.wordpress.org/trunk@30459 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dominik Schilling (ocean90)
2014-11-20 15:28:55 +00:00
parent 05facab3d6
commit df884cb92e
6 changed files with 106 additions and 8 deletions

View File

@@ -152,11 +152,23 @@ $menu[60] = array( __('Appearance'), $appearance_cap, 'themes.php', '', 'menu-to
$customize_url = add_query_arg( 'return', urlencode( wp_unslash( $_SERVER['REQUEST_URI'] ) ), 'customize.php' );
$submenu['themes.php'][6] = array( __( 'Customize' ), 'customize', $customize_url, '', 'hide-if-no-customize' );
unset( $customize_url );
if ( current_theme_supports( 'menus' ) || current_theme_supports( 'widgets' ) ) {
$submenu['themes.php'][10] = array(__( 'Menus' ), 'edit_theme_options', 'nav-menus.php');
}
if ( current_theme_supports( 'custom-header' ) && current_user_can( 'customize') ) {
$customize_header_url = add_query_arg( 'autofocus[control]', 'header_image', $customize_url );
$submenu['themes.php'][15] = array( __( 'Header' ), $appearance_cap, $customize_header_url, '', 'hide-if-no-customize' );
}
if ( current_theme_supports( 'custom-background' ) && current_user_can( 'customize') ) {
$customize_background_url = add_query_arg( 'autofocus[control]', 'background_image', $customize_url );
$submenu['themes.php'][20] = array( __( 'Background' ), $appearance_cap, $customize_background_url, '', 'hide-if-no-customize' );
}
unset( $customize_url );
unset( $appearance_cap );
// Add 'Editor' to the bottom of the Appearance menu.