Make WordPress Core

Opened 17 years ago

Closed 17 years ago

#12166 closed defect (bug) (fixed)

activate_header action should be in wp_head

Reported by: freddyware Owned by:
Priority: normal Milestone: 3.0
Component: Multisite Version: 3.0
Severity: normal Keywords: has-patch
Cc: Focuses:

Description

In wp-activate.php, the activate_header action is executed without wrapping it in a function that inserts it into wp_head.

do_action("activate_header");

is directly called on line 19.

By contrast, wp-signup.php wraps it in a function which is inserted into wp_head, so a plugin can add stylesheets and so on without having it appear before the DOCTYPE.

function do_signup_header() {
	do_action("signup_header");
}
add_action( 'wp_head', 'do_signup_header' );

I am submitting a patch to fix this in wp-activate.php.

Attachments (1)

wp-activate_activateheader.diff (463 bytes ) - added by freddyware 17 years ago.
Fixes activate_header action placement

Download all attachments as: .zip

Change History (4)

@freddyware
17 years ago

Fixes activate_header action placement

#1 @wpmuguru
17 years ago

  • Milestone UnassignedFuture Release

You can work around this in a plugin as follows:

function my_activate_check() {
add_action('wp_head','my_activate_header');
}
function my_activate_header() {
// your header code
}
add_action('activate_header','my_activate_check');

punting.

#2 @dd32
17 years ago

  • Milestone Future Release3.0

Pulling back to 3.0 as there is no inherit issues as to why this should be punted IMO

We can hook it at <10 priority to allow plugins which currently use the work around to continue to work. Perhaps a 1 priority would be correct here.

#3 @dd32
17 years ago

  • Resolutionfixed
  • Status newclosed

See [13073]

Note: See TracTickets for help on using tickets.