#28936 closed defect (bug) (fixed)
Plugin submenu first item has strange behaviors
Reported by: | MikeHansenMe | Owned by: | SergeyBiryukov |
---|---|---|---|
Milestone: | 4.0 | Priority: | normal |
Severity: | normal | Version: | 4.0 |
Component: | Administration | Keywords: | has-patch commit |
Focuses: | Cc: |
Description
When testing the current version of trunk I found that any plugins that add menu items have strange behaviours. The first item has the same hover effects as top level even though it is in the submenu. To reproduce install Jetpack on trunk.
The lines that seem to have changed in trunk are:
- <li class="wp-first-item"> <a class="wp-first-item" href="admin.php?page=jetpack">Jetpack</a> + <li class="wp-first-item menu-top toplevel_page_jetpack"> <a class="wp-first-item menu-top toplevel_page_jetpack" href="admin.php?page=jetpack">Jetpack</a>
Attachments (7)
Change History (15)
#1
@
11 years ago
It looks like plugins that use CPTs are not effected. Only when add_menu_page is used.
#4
@
11 years ago
- Keywords has-patch commit added
Caused by add_submenu_page()
copying the parent item, including classes:
tags/3.9.1/src/wp-admin/includes/plugin.php#L1122.
I think we can just skip adding custom classes for the first submenu item, see 28936.2.diff.
#5
@
11 years ago
A better fix would probably be to avoid copying classes in add_submenu_page()
. See 28936.3.diff.
#7
@
11 years ago
- Owner set to SergeyBiryukov
- Resolution set to fixed
- Status changed from new to closed
In 29326:
Jetpack on 391