Opened 20 years ago
Closed 20 years ago
#1124 closed defect (bug) (fixed)
User-added subpages whose last 10 characters are the same as an existing WP subpage will be highlighted incorrectly
Reported by: | MC_incubus | Owned by: | ryan |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | minor | Version: | 1.5.1 |
Component: | Administration | Keywords: | |
Focuses: | Cc: |
Description
class="current" is being improperly applied to all "Manage" user-added subpage tabs when the "Comments" subpage is selected.
None of the other "Manage" default pages cause this to happen... it appears to be limited to "Comments."
Attachments (1)
Change History (9)
#3
@
20 years ago
Aha! Figured it out. The plugin was a new version of Subscribe to Comments that I've been working on.
The plugin's filename is "subscribe-to-comments.php"
Changing it to "subscribe-to-comments2.php" and activating it fixes the problem.
WP must be recognizing "subscribe-to-comments.php" as "edit-comments.php"
#5
@
20 years ago
I went on a journey back through time.
The -10 substr stuff was added way back in August... back then the code was in menu.php instead of menu-header.php
http://trac.wordpress.org/changeset/1551
It seems we just want to see if one filename is the same as another. Why not a direct comparison? AFAIK, it should be stuff like "edit-comments.php" == "subscribe-to-comments.php"
I'm uploading a patch that changes to direct comparison. I've tested it with the menu-test.php from here:
http://codex.wordpress.org/Adding_Administration_Menus
I've seen no ill effects... it works as it should in all observable instances.
#7
@
20 years ago
- Summary changed from All user-added "Manage" subpages highlighted when "Comments" selected to User-added subpages whose last 10 characters are the same as an existing WP subpage will be highlighted incorrectly
I can't make this happen with my menu test plugins. Can you provide a specific plugin that triggers the behavior?