Opened 6 years ago

Closed 5 years ago

Last modified 5 years ago

#5190 closed defect (bug) (wontfix)

Widgets code run before admin_head hook is called

Reported by: omry Owned by: anonymous
Priority: normal Milestone:
Component: Administration Version: 2.3
Severity: normal Keywords:
Cc:

Description

When opening the widgets page in the administration section, the widgets are initialized before admin_head is called.
many plugin initializes in an admin_head callback, and in some cases the widgets initialization depends on the plugin initialization.

Logically it's also appropriate to call admin_head action first.

Change History (5)

comment:1   omry6 years ago

  • Component changed from General to Administration

omry, what is an example of a plugin that this creates a problem for? Shouldn't it be initializing at 'init' anyways?

  • Version set to 2.3

admin_head should not be used to trigger events. It's only purpose is to output stuff for the <head>.

Instead, as filosofo said, use init and is_admin().

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

Agreed. Let's close this?

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