Make WordPress Core

Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#3835 closed defect (bug) (wontfix)

plugin page hooks and actions confusion

Reported by: m0n5t3r Owned by:
Milestone: Priority: low
Severity: normal Version: 2.1
Component: Administration Keywords: has-patch
Focuses: Cc:


admin_head.php relies on the existence of the variable $page_hook to determine the name of the action to execute; however, $page_hook is always set in admin.php, causing admin_head.php to ignore actions like admin_head-my_plugin/page.php.

the attached patch contains one of the solutions; the other one is to unset($page_hook) in admin.php if empty

it would also be interesting to know why we have 2 action naming schemes, one like admin_head-some/file.php and another one like admin_head-management_page_file (i'm not sure it isn't a feature ;)

Attachments (1)

admin_header_actions.fix.diff (881 bytes) - added by m0n5t3r 11 years ago.

Download all attachments as: .zip

Change History (6)

#1 @foolswisdom
11 years ago

  • Milestone changed from 2.1.2 to 2.2

#2 @ryan
11 years ago

plugin page is the old scheme. page hook is the new one. plugin page is only around for back compat.

#3 @m0n5t3r
11 years ago

hmm, after digging a bit more through the source, it looks like the plugin pge hooks weren't intended for direct use, anyway; feel free to close this if you feel it's useless

#4 @ryan
11 years ago

  • Resolution set to wontfix
  • Status changed from new to closed

#5 @foolswisdom
11 years ago

  • Milestone 2.2 deleted
Note: See TracTickets for help on using tickets.