Ensure valid HTML in the nav menu UI. props ocean90, see #13220.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14482 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
c9e06743d8
commit
1e13b43af0
|
@ -154,12 +154,12 @@ class Walker_Nav_Menu_Edit extends Walker_Nav_Menu {
|
|||
<p class="field-description description description-wide">
|
||||
<label for="edit-menu-item-description-<?php echo $item_id; ?>">
|
||||
<?php _e( 'Description' ); ?><br />
|
||||
<textarea id="edit-menu-item-description-<?php echo $item_id; ?>" class="widefat edit-menu-item-description" rows="3" name="menu-item-description[<?php echo $item_id; ?>]"><?php echo esc_html( $item->description ); ?></textarea>
|
||||
<textarea id="edit-menu-item-description-<?php echo $item_id; ?>" class="widefat edit-menu-item-description" rows="3" cols="20" name="menu-item-description[<?php echo $item_id; ?>]"><?php echo esc_html( $item->description ); ?></textarea>
|
||||
<span class="description"><?php _e('The description will be displayed in the menu if the current theme supports it.'); ?></span>
|
||||
</label>
|
||||
</p>
|
||||
|
||||
<span class="menu-item-actions description-wide submitbox">
|
||||
<div class="menu-item-actions description-wide submitbox">
|
||||
<?php if( 'custom' != $item->type ) : ?>
|
||||
<p class="link-to-original"><?php
|
||||
_e('Original ');
|
||||
|
@ -182,14 +182,14 @@ class Walker_Nav_Menu_Edit extends Walker_Nav_Menu {
|
|||
'delete-menu_item_' . $item_id
|
||||
); ?>"><?php _e('Remove'); ?></a> | <a class="item-close submitclose" id="close-<?php echo $item_id; ?>" href="<?php echo admin_url( 'nav-menus.php' ); ?>"><?php _e('Close'); ?></a>
|
||||
<input class="button-primary save-menu-item" name="save_menu_item" type="submit" value="<?php esc_attr_e('Save Menu Item'); ?>" />
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<input class="menu-item-data-append" type="hidden" name="menu-item-append[<?php echo $item_id; ?>]" value="<?php echo $item->append; ?>" />
|
||||
<input class="menu-item-data-db-id" type="hidden" name="menu-item-db-id[<?php echo $item_id; ?>]" value="<?php echo $item_id; ?>" />
|
||||
<input class="menu-item-data-object-id" type="hidden" name="menu-item-object-id[<?php echo $item_id; ?>]" value="<?php echo esc_attr( $item->object_id ); ?>" />
|
||||
<input class="menu-item-data-object" type="hidden" name="menu-item-object[<?php echo $item_id; ?>]" value="<?php echo esc_attr( $item->object ); ?>" />
|
||||
<input class="menu-item-data-parent-id" type="hidden" name="menu-item-parent-id[<?php echo $item_id; ?>]" value="<?php echo esc_attr( $item->menu_item_parent ); ?>" />
|
||||
<input class="menu-item-data-position" type="hidden" class="menu-item-position" name="menu-item-position[<?php echo $item_id; ?>]" value="<?php echo esc_attr( $item->menu_order ); ?>" />
|
||||
<input class="menu-item-data-position" type="hidden" name="menu-item-position[<?php echo $item_id; ?>]" value="<?php echo esc_attr( $item->menu_order ); ?>" />
|
||||
<input class="menu-item-data-type" type="hidden" name="menu-item-type[<?php echo $item_id; ?>]" value="<?php echo esc_attr( $item->type ); ?>" />
|
||||
</div><!-- .menu-item-settings-->
|
||||
<ul class="menu-item-transport"></ul>
|
||||
|
@ -566,8 +566,8 @@ function wp_nav_menu_item_post_type_meta_box( $object, $post_type ) {
|
|||
?>
|
||||
<div id="posttype-<?php echo $post_type_name; ?>" class="posttypediv">
|
||||
<ul id="posttype-<?php echo $post_type_name; ?>-tabs" class="posttype-tabs add-menu-item-tabs">
|
||||
<li <?php echo ( 'all' == $current_tab ? ' class="tabs"' : '' ); ?>><a class="nav-tab-link" href="<?php echo add_query_arg($post_type_name . '-tab', 'all', remove_query_arg($removed_args)); ?>#<?php echo $post_type_name; ?>-all"><?php _e('View All'); ?></a></li>
|
||||
<li <?php echo ( 'search' == $current_tab ? ' class="tabs"' : '' ); ?>><a class="nav-tab-link" href="<?php echo add_query_arg($post_type_name . '-tab', 'search', remove_query_arg($removed_args)); ?>#tabs-panel-posttype-<?php echo $post_type_name; ?>-search"><?php _e('Search'); ?></a></li>
|
||||
<li <?php echo ( 'all' == $current_tab ? ' class="tabs"' : '' ); ?>><a class="nav-tab-link" href="<?php echo esc_url(add_query_arg($post_type_name . '-tab', 'all', remove_query_arg($removed_args))); ?>#<?php echo $post_type_name; ?>-all"><?php _e('View All'); ?></a></li>
|
||||
<li <?php echo ( 'search' == $current_tab ? ' class="tabs"' : '' ); ?>><a class="nav-tab-link" href="<?php echo esc_url(add_query_arg($post_type_name . '-tab', 'search', remove_query_arg($removed_args))); ?>#tabs-panel-posttype-<?php echo $post_type_name; ?>-search"><?php _e('Search'); ?></a></li>
|
||||
</ul>
|
||||
|
||||
<div class="tabs-panel <?php
|
||||
|
@ -629,13 +629,13 @@ function wp_nav_menu_item_post_type_meta_box( $object, $post_type ) {
|
|||
<p class="button-controls">
|
||||
<span class="list-controls">
|
||||
<a href="<?php
|
||||
echo add_query_arg(
|
||||
echo esc_url(add_query_arg(
|
||||
array(
|
||||
$post_type_name . '-tab' => 'all',
|
||||
'selectall' => 1,
|
||||
),
|
||||
remove_query_arg($removed_args)
|
||||
);
|
||||
));
|
||||
?>#posttype-<?php echo $post_type_name; ?>" class="select-all"><?php _e('Select All'); ?></a>
|
||||
</span>
|
||||
|
||||
|
@ -727,9 +727,9 @@ function wp_nav_menu_item_taxonomy_meta_box( $object, $taxonomy ) {
|
|||
?>
|
||||
<div id="taxonomy-<?php echo $taxonomy_name; ?>" class="taxonomydiv">
|
||||
<ul id="taxonomy-<?php echo $taxonomy_name; ?>-tabs" class="taxonomy-tabs add-menu-item-tabs">
|
||||
<li <?php echo ( 'most-used' == $current_tab ? ' class="tabs"' : '' ); ?>><a class="nav-tab-link" href="<?php echo add_query_arg($taxonomy_name . '-tab', 'most-used', remove_query_arg($removed_args)); ?>#tabs-panel-<?php echo $taxonomy_name; ?>-pop"><?php _e('Most Used'); ?></a></li>
|
||||
<li <?php echo ( 'search' == $current_tab ? ' class="tabs"' : '' ); ?>><a class="nav-tab-link" href="<?php echo add_query_arg($taxonomy_name . '-tab', 'search', remove_query_arg($removed_args)); ?>#tabs-panel-search-taxonomy-<?php echo $taxonomy_name; ?>"><?php _e('Search'); ?></a></li>
|
||||
<li <?php echo ( 'all' == $current_tab ? ' class="tabs"' : '' ); ?>><a class="nav-tab-link" href="<?php echo add_query_arg($taxonomy_name . '-tab', 'all', remove_query_arg($removed_args)); ?>#tabs-panel-<?php echo $taxonomy_name; ?>-all"><?php _e('View All'); ?></a></li>
|
||||
<li <?php echo ( 'most-used' == $current_tab ? ' class="tabs"' : '' ); ?>><a class="nav-tab-link" href="<?php echo esc_url(add_query_arg($taxonomy_name . '-tab', 'most-used', remove_query_arg($removed_args))); ?>#tabs-panel-<?php echo $taxonomy_name; ?>-pop"><?php _e('Most Used'); ?></a></li>
|
||||
<li <?php echo ( 'search' == $current_tab ? ' class="tabs"' : '' ); ?>><a class="nav-tab-link" href="<?php echo esc_url(add_query_arg($taxonomy_name . '-tab', 'search', remove_query_arg($removed_args))); ?>#tabs-panel-search-taxonomy-<?php echo $taxonomy_name; ?>"><?php _e('Search'); ?></a></li>
|
||||
<li <?php echo ( 'all' == $current_tab ? ' class="tabs"' : '' ); ?>><a class="nav-tab-link" href="<?php echo esc_url(add_query_arg($taxonomy_name . '-tab', 'all', remove_query_arg($removed_args))); ?>#tabs-panel-<?php echo $taxonomy_name; ?>-all"><?php _e('View All'); ?></a></li>
|
||||
</ul>
|
||||
|
||||
<div id="tabs-panel-<?php echo $taxonomy_name; ?>-pop" class="tabs-panel <?php
|
||||
|
@ -797,13 +797,13 @@ function wp_nav_menu_item_taxonomy_meta_box( $object, $taxonomy ) {
|
|||
<p class="button-controls">
|
||||
<span class="list-controls">
|
||||
<a href="<?php
|
||||
echo add_query_arg(
|
||||
echo esc_url(add_query_arg(
|
||||
array(
|
||||
$taxonomy_name . '-tab' => 'all',
|
||||
'selectall' => 1,
|
||||
),
|
||||
remove_query_arg($removed_args)
|
||||
);
|
||||
));
|
||||
?>#taxonomy-<?php echo $taxonomy_name; ?>" class="select-all"><?php _e('Select All'); ?></a>
|
||||
</span>
|
||||
|
||||
|
|
|
@ -421,9 +421,9 @@ require_once( 'admin-header.php' );
|
|||
<div id="menu-management-liquid">
|
||||
<div id="menu-management">
|
||||
<div id="select-nav-menu-container" class="hide-if-js">
|
||||
<form id="select-nav-menu">
|
||||
<form id="select-nav-menu" action="">
|
||||
<strong><label for="select-nav-menu"><?php esc_html_e( 'Select Menu: ' ); ?></label></strong>
|
||||
<select id="select-nav-menu" name="menu">
|
||||
<select class="select-nav-menu" name="menu">
|
||||
<?php foreach( (array) $nav_menus as $_nav_menu ) : ?>
|
||||
<option value="<?php echo esc_attr($_nav_menu->term_id) ?>" <?php selected($nav_menu_selected_id, $_nav_menu->term_id); ?>>
|
||||
<?php echo esc_html( $_nav_menu->truncated_name ); ?>
|
||||
|
@ -441,13 +441,13 @@ require_once( 'admin-header.php' );
|
|||
foreach( (array) $nav_menus as $_nav_menu ) :
|
||||
|
||||
?><a href="<?php
|
||||
echo add_query_arg(
|
||||
echo esc_url(add_query_arg(
|
||||
array(
|
||||
'action' => 'edit',
|
||||
'menu' => $_nav_menu->term_id,
|
||||
),
|
||||
admin_url( 'nav-menus.php' )
|
||||
);
|
||||
));
|
||||
?>" class="nav-tab<?php
|
||||
if ( $nav_menu_selected_id == $_nav_menu->term_id )
|
||||
echo ' nav-tab-active';
|
||||
|
@ -456,13 +456,13 @@ require_once( 'admin-header.php' );
|
|||
?>"><?php echo esc_html( $_nav_menu->truncated_name ); ?></a><?php
|
||||
endforeach;
|
||||
?><a href="<?php
|
||||
echo add_query_arg(
|
||||
echo esc_url(add_query_arg(
|
||||
array(
|
||||
'action' => 'edit',
|
||||
'menu' => 0,
|
||||
),
|
||||
admin_url( 'nav-menus.php' )
|
||||
);
|
||||
));
|
||||
?>" class="nav-tab menu-add-new<?php
|
||||
if ( 0 == $nav_menu_selected_id )
|
||||
echo ' nav-tab-active';
|
||||
|
@ -476,7 +476,7 @@ require_once( 'admin-header.php' );
|
|||
<div class="major-publishing-actions">
|
||||
<label class="menu-name-label howto open-label" for="menu-name">
|
||||
<span><?php _e('Menu Name'); ?></span>
|
||||
<input name="menu-name" type="text" class="menu-name regular-text menu-item-textbox input-with-default-title" title="Enter menu name here." value="<?php echo esc_attr( $nav_menu_selected_title ); ?>" />
|
||||
<input name="menu-name" id="menu-name" type="text" class="menu-name regular-text menu-item-textbox input-with-default-title" title="Enter menu name here." value="<?php echo esc_attr( $nav_menu_selected_title ); ?>" />
|
||||
<br class="clear" />
|
||||
</label>
|
||||
|
||||
|
@ -486,7 +486,7 @@ require_once( 'admin-header.php' );
|
|||
|
||||
<?php if ( ! empty( $nav_menu_selected_id ) ) : ?>
|
||||
<div class="delete-action">
|
||||
<a class="submitdelete deletion menu-delete" href="<?php echo wp_nonce_url( admin_url('nav-menus.php?action=delete&menu=' . $nav_menu_selected_id), 'delete-nav_menu-' . $nav_menu_selected_id ); ?>"><?php _e('Delete Menu'); ?></a>
|
||||
<a class="submitdelete deletion menu-delete" href="<?php echo esc_url( wp_nonce_url( admin_url('nav-menus.php?action=delete&menu=' . $nav_menu_selected_id), 'delete-nav_menu-' . $nav_menu_selected_id ) ); ?>"><?php _e('Delete Menu'); ?></a>
|
||||
</div><!--END .delete-action-->
|
||||
<?php endif; ?>
|
||||
<br class="clear" />
|
||||
|
|
Loading…
Reference in New Issue