Ticket #54905: 54905.diff
File 54905.diff, 3.4 KB (added by , 3 years ago) |
---|
-
src/wp-includes/class-wp-customize-nav-menus.php
519 519 'movedDown' => __( 'Menu item moved down' ), 520 520 'movedLeft' => __( 'Menu item moved out of submenu' ), 521 521 'movedRight' => __( 'Menu item is now a sub-item' ), 522 /* 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 ) ),524 522 /* translators: %s: Title of an invalid menu item. */ 525 523 'invalidTitleTpl' => __( '%s (Invalid)' ), 526 524 /* translators: %s: Title of a menu item in draft status. */ … … 543 541 ), 544 542 'locationSlugMappedToName' => get_registered_nav_menus(), 545 543 ); 544 $nav_menus = $this->manager->get_panel( 'nav_menus' ); 545 if ( $nav_menus ) { 546 /* translators: ▸ is the unicode right-pointing triangle. %s: Section title in the Customizer. */ 547 $settings['l10n']['customizingMenus'] = sprintf( __( 'Customizing ▸ %s' ), esc_html( $nav_menus->title ) ); 548 } 546 549 547 550 $data = sprintf( 'var _wpCustomizeNavMenusSettings = %s;', wp_json_encode( $settings ) ); 548 551 wp_scripts()->add_data( 'customize-nav-menus', 'data', $data ); … … 1146 1149 <span class="screen-reader-text"><?php _e( 'Back' ); ?></span> 1147 1150 </button> 1148 1151 <h3> 1149 <span class="customize-action"> 1150 <?php 1151 /* 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 ) ); 1152 <?php 1153 $nav_menus = $this->manager->get_panel( 'nav_menus' ); 1154 if ( $nav_menus ) : 1153 1155 ?> 1154 </span> 1156 <span class="customize-action"> 1157 <?php 1158 /* translators: ▸ is the unicode right-pointing triangle. %s: Section title in the Customizer. */ 1159 printf( __( 'Customizing ▸ %s' ), esc_html( $nav_menus->title ) ); 1160 ?> 1161 </span> 1162 <?php endif; ?> 1155 1163 <?php _e( 'Add Menu Items' ); ?> 1156 1164 </h3> 1157 1165 </div> -
src/wp-includes/class-wp-customize-widgets.php
893 893 <span class="screen-reader-text"><?php _e( 'Back' ); ?></span> 894 894 </button> 895 895 <h3> 896 <span class="customize-action">897 896 <?php 898 /* 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 ) ); 900 ?> 901 </span> 897 $widgets = $this->manager->get_panel( 'widgets' ); 898 if ( $widgets ) : 899 ?> 900 <span class="customize-action"> 901 <?php 902 /* translators: ▸ is the unicode right-pointing triangle. %s: Section title in the Customizer. */ 903 printf( __( 'Customizing ▸ %s' ), esc_html( $widgets->title ) ); 904 ?> 905 </span> 906 <?php endif; ?> 902 907 <?php _e( 'Add a Widget' ); ?> 903 908 </h3> 904 909 </div>