@@ 433-439 (lines=7) @@ | ||
430 | add_submenu_page( $themes_slug, esc_attr__( 'Background', 'jetpack' ), __( 'Background', 'jetpack' ), 'customize', esc_url( $customize_background_url ), null, 20 ); |
|
431 | } |
|
432 | ||
433 | if ( current_theme_supports( 'widgets' ) ) { |
|
434 | remove_submenu_page( 'themes.php', 'widgets.php' ); |
|
435 | remove_submenu_page( 'themes.php', 'gutenberg-widgets' ); |
|
436 | ||
437 | $customize_widgets_url = $wp_admin_customize ? 'widgets.php' : add_query_arg( array( 'autofocus' => array( 'panel' => 'widgets' ) ), $customize_slug ); |
|
438 | add_submenu_page( $themes_slug, esc_attr__( 'Widgets', 'jetpack' ), __( 'Widgets', 'jetpack' ), 'customize', esc_url( $customize_widgets_url ), null, 20 ); |
|
439 | } |
|
440 | ||
441 | if ( current_theme_supports( 'menus' ) || current_theme_supports( 'widgets' ) ) { |
|
442 | remove_submenu_page( 'themes.php', 'nav-menus.php' ); |
|
@@ 441-446 (lines=6) @@ | ||
438 | add_submenu_page( $themes_slug, esc_attr__( 'Widgets', 'jetpack' ), __( 'Widgets', 'jetpack' ), 'customize', esc_url( $customize_widgets_url ), null, 20 ); |
|
439 | } |
|
440 | ||
441 | if ( current_theme_supports( 'menus' ) || current_theme_supports( 'widgets' ) ) { |
|
442 | remove_submenu_page( 'themes.php', 'nav-menus.php' ); |
|
443 | ||
444 | $customize_menus_url = $wp_admin_customize ? 'nav-menus.php' : add_query_arg( array( 'autofocus' => array( 'panel' => 'nav_menus' ) ), $customize_slug ); |
|
445 | add_submenu_page( $themes_slug, esc_attr__( 'Menus', 'jetpack' ), __( 'Menus', 'jetpack' ), 'customize', esc_url( $customize_menus_url ), null, 20 ); |
|
446 | } |
|
447 | ||
448 | // Register menu for the Custom CSS Jetpack module, but don't add it as a menu item. |
|
449 | $GLOBALS['_registered_pages']['admin_page_editcss'] = true; // phpcs:ignore |