diff --git a/src/wp-includes/class-wp-customize-nav-menus.php b/src/wp-includes/class-wp-customize-nav-menus.php
index ae0925fe02..6b4b0cb2d9 100644
a
|
b
|
final class WP_Customize_Nav_Menus { |
495 | 495 | /* translators: %s: Number of menu locations. */ |
496 | 496 | $locations_description = sprintf( _n( 'Your theme can display menus in %s location.', 'Your theme can display menus in %s locations.', $num_locations ), number_format_i18n( $num_locations ) ); |
497 | 497 | } |
| 498 | $panel = $this->manager->get_panel( 'menus' ); |
| 499 | $section_title = ( null !== $panel ) ? $panel->title : __( 'Menus'); |
498 | 500 | |
499 | 501 | // Pass data to JS. |
500 | 502 | $settings = array( |
… |
… |
final class WP_Customize_Nav_Menus { |
520 | 522 | 'movedLeft' => __( 'Menu item moved out of submenu' ), |
521 | 523 | 'movedRight' => __( 'Menu item is now a sub-item' ), |
522 | 524 | /* translators: ▸ is the unicode right-pointing triangle. %s: Section title in the Customizer. */ |
523 | | 'customizingMenus' => sprintf( __( 'Customizing ▸ %s' ), esc_html( $this->manager->get_panel( 'nav_menus' )->title ) ), |
| 525 | 'customizingMenus' => sprintf( __( 'Customizing ▸ %s' ), esc_html( $section_title ) ), |
524 | 526 | /* translators: %s: Title of an invalid menu item. */ |
525 | 527 | 'invalidTitleTpl' => __( '%s (Invalid)' ), |
526 | 528 | /* translators: %s: Title of a menu item in draft status. */ |
… |
… |
final class WP_Customize_Nav_Menus { |
1148 | 1150 | <h3> |
1149 | 1151 | <span class="customize-action"> |
1150 | 1152 | <?php |
| 1153 | $panel = $this->manager->get_panel( 'menus' ); |
| 1154 | $section_title = ( null !== $panel ) ? $panel->title : __( 'Menus'); |
1151 | 1155 | /* translators: ▸ is the unicode right-pointing triangle. %s: Section title in the Customizer. */ |
1152 | | printf( __( 'Customizing ▸ %s' ), esc_html( $this->manager->get_panel( 'nav_menus' )->title ) ); |
| 1156 | printf( __( 'Customizing ▸ %s' ), esc_html( $section_title ) ); |
1153 | 1157 | ?> |
1154 | 1158 | </span> |
1155 | 1159 | <?php _e( 'Add Menu Items' ); ?> |
diff --git a/src/wp-includes/class-wp-customize-widgets.php b/src/wp-includes/class-wp-customize-widgets.php
index 9b4a0fa1c5..825c2fc923 100644
a
|
b
|
final class WP_Customize_Widgets { |
895 | 895 | <h3> |
896 | 896 | <span class="customize-action"> |
897 | 897 | <?php |
| 898 | $panel = $this->manager->get_panel( 'widgets' ); |
| 899 | $section_title = ( null !== $panel ) ? $panel->title : __( 'Widgets' ); |
898 | 900 | /* translators: ▸ is the unicode right-pointing triangle. %s: Section title in the Customizer. */ |
899 | | printf( __( 'Customizing ▸ %s' ), esc_html( $this->manager->get_panel( 'widgets' )->title ) ); |
| 901 | printf( __( 'Customizing ▸ %s' ), esc_html( $section_title ) ); |
900 | 902 | ?> |
901 | 903 | </span> |
902 | 904 | <?php _e( 'Add a Widget' ); ?> |