Make WordPress Core

Opened 15 years ago

Closed 15 years ago

#10888 closed enhancement (worksforme)

wp_head() arguments

Reported by: prometh's profile prometh Owned by:
Milestone: Priority: normal
Severity: normal Version: 2.8.4
Component: Template Keywords: 2nd-opinion
Focuses: Cc:

Description

It'd be great if we could organize our <head> more. We could do this by separating things with wp_head() with 1 argument that would refer to a filter.

wp_head('link');
wp_head('meta');
wp_head('script');

with wp_head() echo'ing all. This would increase backwards compatibility.

Adding to the wp_head filters could work this:

add_action('wp_head_link', 'functionName');
add_action('wp_head_meta', 'functionName');
add_action('wp_head_script', 'functionName');

with add_action('wp_head', functionName); still working as it currently does.

Change History (2)

#1 @scribu
15 years ago

  • Keywords 2nd-opinion added; wp_head removed

I don't see a lot of people using this.

You could just add

do_action('wp_head_script');

to your theme, if that's what you need.

#2 @nacin
15 years ago

  • Milestone Unassigned deleted
  • Resolution set to worksforme
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.