Make WordPress Core

Opened 17 years ago

Closed 17 years ago

#10888 closed enhancement (worksforme)

wp_head() arguments

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

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
17 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
17 years ago

  • Milestone Unassigned
  • Resolution → worksforme
  • Status new → closed
Note: See TracTickets for help on using tickets.