Skip to content

Commit

Permalink
Add active class in summary menu for custom tabs
Browse files Browse the repository at this point in the history
Fixes #23418
  • Loading branch information
shaozi authored and vboctor committed Apr 13, 2019
1 parent bcac8d0 commit 113a270
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion core/html_api.php
Expand Up @@ -894,7 +894,10 @@ function print_summary_menu( $p_page = '', array $p_filter = null ) {

# Plugins menu items - these are cooked links
foreach ( $t_menu_options as $t_menu_item ) {
echo '<li>' . $t_menu_item . '</li>';
$t_active = $p_page && strpos( $t_menu_item, $p_page ) !== false
? ' class="active"'
: '';
echo "<li{$t_active}>{$t_menu_item}</li>";
}

echo '</ul>' . "\n";
Expand Down

0 comments on commit 113a270

Please sign in to comment.