WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 4 years ago

#12166 closed defect (bug) (fixed)

activate_header action should be in wp_head

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

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 4 years ago.
Fixes activate_header action placement

Download all attachments as: .zip

Change History (4)

freddyware4 years ago

Fixes activate_header action placement

comment:1 wpmuguru4 years ago

  • Milestone changed from Unassigned to Future 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.

comment:2 dd324 years ago

  • Milestone changed from Future Release to 3.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.

comment:3 dd324 years ago

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

See [13073]

Note: See TracTickets for help on using tickets.