WordPress.org

Make WordPress Core

Opened 8 years ago

Closed 8 years ago

Last modified 8 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:

Description

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 8 years ago.

Download all attachments as: .zip

Change History (6)

comment:1 @foolswisdom8 years ago

  • Milestone changed from 2.1.2 to 2.2

comment:2 @ryan8 years ago

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

comment:3 @m0n5t3r8 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

comment:4 @ryan8 years ago

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

comment:5 @foolswisdom8 years ago

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