Changeset 23727 for trunk/wp-admin/nav-menus.php
- Timestamp:
- 03/16/2013 04:47:19 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/nav-menus.php
r23707 r23727 354 354 $page_count = wp_count_posts( 'page' ); 355 355 $one_theme_location_no_menus = ( 1 == count( get_registered_nav_menus() ) && ! $add_new_screen && empty( $nav_menus ) && ! empty( $page_count->publish ) ) ? true : false; 356 357 $l10n = array( 358 "oneThemeLocationNoMenus" => ( $one_theme_location_no_menus ) ? 'true' : 'false', 359 "move" => __( 'Move' ), 360 "menuFocus" => __( 'Menu item %d of %d' ), 361 "subMenuFocus" => __( 'Sub item number %d under' ), 362 "under" => __( 'Under' ), 363 "outFrom" => __( 'Out from under' ) 364 ); 365 wp_localize_script( 'nav-menu', 'menus', $l10n ); 356 366 357 367 // Redirect to add screen if there are no menus and this users has either zero, or more than 1 theme locations … … 544 554 <div id="post-body-content"> 545 555 <?php if ( ! $add_new_screen ) : ?> 556 <h3><?php _e( 'Menu Structure' ); ?></h3> 546 557 <?php $starter_copy = ( $one_theme_location_no_menus ) ? __( 'Edit your default menu by adding or removing items. Drag each item into the order you prefer. Click Create Menu to save your changes.' ) : __( 'Drag each item into the order you prefer. Click an item to reveal additional configuration options.' ); ?> 547 558 <div class="drag-instructions post-body-plain" <?php if ( isset( $menu_items ) && 0 == count( $menu_items ) ) { ?>style="display: none;"<?php } ?>> … … 560 571 <?php endif; ?> 561 572 <div class="menu-settings" <?php if ( $one_theme_location_no_menus ) { ?>style="display: none;"<?php } ?>> 573 <h3><?php _e( 'Menu Settings' ); ?></h3> 562 574 <?php 563 575 if ( ! isset( $auto_add ) ) { … … 613 625 </div><!-- /#nav-menus-frame --> 614 626 </div><!-- /.wrap--> 615 <script type="text/javascript">var oneThemeLocationNoMenus = <?php if ( $one_theme_location_no_menus ) echo 'true'; else echo 'false'; ?>;</script>616 627 <?php include( './admin-footer.php' ); ?>
Note: See TracChangeset
for help on using the changeset viewer.