WordPress.org

Make WordPress Core

Opened 7 years ago

Closed 6 years ago

Last modified 6 years ago

#5190 closed defect (bug) (wontfix)

Widgets code run before admin_head hook is called

Reported by: omry Owned by:
Milestone: Priority: normal
Severity: normal Version: 2.3
Component: Administration Keywords:
Focuses: 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 omry7 years ago

  • Component changed from General to Administration

comment:2 filosofo7 years ago

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

comment:3 Viper007Bond7 years ago

  • 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().

comment:4 technosailor6 years ago

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

Agreed. Let's close this?

comment:5 thee176 years ago

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