Tweak the Nav Menu UX, especially around menu creation.
props lessbloat, DrewAPicture, jkudish. fixes #23641 git-svn-id: http://core.svn.wordpress.org/trunk@23622 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
191272ff82
commit
68bc33d128
|
@ -7382,6 +7382,12 @@ a.rsswidget {
|
||||||
padding: 0px;
|
padding: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.nav-menus-php .add-new-menu-action {
|
||||||
|
float: left;
|
||||||
|
margin: 6px 0 0 6px;
|
||||||
|
line-height: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
.nav-menus-php .meta-sep,
|
.nav-menus-php .meta-sep,
|
||||||
.nav-menus-php .submitdelete,
|
.nav-menus-php .submitdelete,
|
||||||
.nav-menus-php .submitcancel {
|
.nav-menus-php .submitcancel {
|
||||||
|
|
|
@ -453,17 +453,21 @@ require_once( './admin-header.php' );
|
||||||
?>
|
?>
|
||||||
<div class="wrap">
|
<div class="wrap">
|
||||||
<?php screen_icon(); ?>
|
<?php screen_icon(); ?>
|
||||||
<h2><?php _e( 'Menus' ); ?> <a href="<?php echo esc_url( add_query_arg( array( 'action' => 'edit', 'menu' => 0, ), admin_url( 'nav-menus.php' ) ) ); ?>" class="add-new-h2"><?php _e( 'Add New' ); ?></a></h2>
|
<h2><?php _e( 'Menus' ); ?></h2>
|
||||||
<?php
|
<?php
|
||||||
foreach( $messages as $message ) :
|
foreach( $messages as $message ) :
|
||||||
echo $message . "\n";
|
echo $message . "\n";
|
||||||
endforeach;
|
endforeach;
|
||||||
?>
|
?>
|
||||||
<?php if ( 1 < $menu_count ) : ?>
|
<div class="manage-menus">
|
||||||
|
<?php if ( $menu_count < 2 ) : ?>
|
||||||
|
<span class="add-edit-menu-action">
|
||||||
|
<?php printf( __( 'Edit your menu below, or <a href="%s">create a new menu</a>.' ), esc_url( add_query_arg( array( 'action' => 'edit', 'menu' => 0 ), admin_url( 'nav-menus.php' ) ) ) ); ?>
|
||||||
|
</span><!-- /add-edit-menu-action -->
|
||||||
|
<?php else : ?>
|
||||||
<form method="post" action="<?php echo admin_url( 'nav-menus.php' ); ?>">
|
<form method="post" action="<?php echo admin_url( 'nav-menus.php' ); ?>">
|
||||||
<input type="hidden" name="action" value="edit" />
|
<input type="hidden" name="action" value="edit" />
|
||||||
<div class="manage-menus">
|
<label for="menu" class="selected-menu"><?php _e( 'Select a menu to edit:' ); ?></label>
|
||||||
<label for="menu" class="selected-menu"><?php _e('Select menu to edit'); ?></label>
|
|
||||||
<select name="menu" id="menu">
|
<select name="menu" id="menu">
|
||||||
<?php if ( $add_new_screen ) : ?>
|
<?php if ( $add_new_screen ) : ?>
|
||||||
<option value="0" selected="selected"><?php _e( '-- Select --' ); ?></option>
|
<option value="0" selected="selected"><?php _e( '-- Select --' ); ?></option>
|
||||||
|
@ -491,9 +495,12 @@ require_once( './admin-header.php' );
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
</select>
|
</select>
|
||||||
<span class="submit-btn"><input type="submit" class="button-secondary" value="<?php _e( 'Select' ); ?>"></span>
|
<span class="submit-btn"><input type="submit" class="button-secondary" value="<?php _e( 'Select' ); ?>"></span>
|
||||||
</div>
|
<span class="add-new-menu-action">
|
||||||
|
<?php printf( __( 'or <a href="%s">create a new menu</a>.' ), esc_url( add_query_arg( array( 'action' => 'edit', 'menu' => 0 ), admin_url( 'nav-menus.php' ) ) ) ); ?>
|
||||||
|
</span><!-- /add-new-menu-action -->
|
||||||
</form>
|
</form>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
</div><!-- /manage-menus -->
|
||||||
<div id="nav-menus-frame">
|
<div id="nav-menus-frame">
|
||||||
<div id="menu-settings-column" class="metabox-holder<?php if ( isset( $_GET['menu'] ) && '0' == $_GET['menu'] ) { echo ' metabox-holder-disabled'; } ?>">
|
<div id="menu-settings-column" class="metabox-holder<?php if ( isset( $_GET['menu'] ) && '0' == $_GET['menu'] ) { echo ' metabox-holder-disabled'; } ?>">
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue