View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0022397 | mantisbt | plug-ins | public | 2017-02-17 05:10 | 2017-02-17 05:10 |
Reporter | msoragni | Assigned To | |||
Priority | low | Severity | tweak | Reproducibility | always |
Status | new | Resolution | open | ||
Product Version | 2.1.0 | ||||
Summary | 0022397: Plugins menu link not highlighted as active | ||||
Description | When adding a link to a plugin page to the main menu, via the EVENT_MENU_MAIN hook inside the plugin, the menu link itself isn't highlighted as active when you visit that link. | ||||
Tags | No tags attached. | ||||
Attached Files | layout_api.php.diff (562 bytes)
--- mantisbt-2.1.0/core/layout_api.php 2017-01-31 09:53:59.000000000 +0100 +++ mantisbt-2.1.0-fix/core/layout_api.php 2017-02-17 11:02:37.945723377 +0100 @@ -917,7 +917,8 @@ */ function layout_sidebar_menu( $p_page, $p_title, $p_icon, $p_active_sidebar_page = null ) { if( $p_page == $p_active_sidebar_page || - $p_page == basename( $_SERVER['SCRIPT_NAME'] ) ) { + $p_page == basename( $_SERVER['SCRIPT_NAME'] ) || + $p_page == plugin_page( basename( $p_active_sidebar_page ) ) ) { echo '<li class="active">' . "\n"; } else { echo '<li>' . "\n"; | ||||