Tweak the Nav Menu UX, especially around menu creation.
props lessbloat, DrewAPicture, jkudish. fixes #23641 git-svn-id: https://develop.svn.wordpress.org/trunk@23622 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
32d99413f3
commit
d422fd5331
|
@ -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">
|
||||||
<form method="post" action="<?php echo admin_url( 'nav-menus.php' ); ?>">
|
<?php if ( $menu_count < 2 ) : ?>
|
||||||
<input type="hidden" name="action" value="edit" />
|
<span class="add-edit-menu-action">
|
||||||
<div class="manage-menus">
|
<?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' ) ) ) ); ?>
|
||||||
<label for="menu" class="selected-menu"><?php _e('Select menu to edit'); ?></label>
|
</span><!-- /add-edit-menu-action -->
|
||||||
|
<?php else : ?>
|
||||||
|
<form method="post" action="<?php echo admin_url( 'nav-menus.php' ); ?>">
|
||||||
|
<input type="hidden" name="action" value="edit" />
|
||||||
|
<label for="menu" class="selected-menu"><?php _e( 'Select a 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">
|
||||||
</form>
|
<?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>
|
||||||
<?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