Don't link active menu tabs. props koopersmith, fixes #13333.

git-svn-id: http://svn.automattic.com/wordpress/trunk@14667 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
nacin 2010-05-15 19:18:35 +00:00
parent 0f377dabc0
commit c5801cf36d
1 changed files with 17 additions and 15 deletions

View File

@ -447,21 +447,23 @@ require_once( 'admin-header.php' );
<div class="nav-tabs">
<?php
foreach( (array) $nav_menus as $_nav_menu ) :
?><a href="<?php
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';
else
echo ' hide-if-no-js';
?>"><?php echo esc_html( $_nav_menu->truncated_name ); ?></a><?php
if ( $nav_menu_selected_id == $_nav_menu->term_id ) : ?>
<span class="nav-tab nav-tab-active">
<?php echo esc_html( $_nav_menu->truncated_name ); ?>
</span>
<?php else : ?>
<a href="<?php
echo esc_url(add_query_arg(
array(
'action' => 'edit',
'menu' => $_nav_menu->term_id,
),
admin_url( 'nav-menus.php' )
));
?>" class="nav-tab hide-if-no-js">
<?php echo esc_html( $_nav_menu->truncated_name ); ?>
</a>
<?php endif;
endforeach;
?><a href="<?php
echo esc_url(add_query_arg(