Make WordPress Core

Opened 12 years ago

Closed 12 years ago

#31273 closed enhancement (duplicate)

Register JavaScript templates with wp_enqueue_script()

Reported by: danielbachhuber Owned by:
Priority: normal Milestone:
Component: Script Loader Version:
Severity: normal Keywords: needs-patch
Cc: Focuses:

Description

This would make it much easier to conditionally include templates, instead of including them everywhere all the time.

Change History (3)

#1 @rmccue
12 years ago

This could almost be done via WP_Scripts::add_data, however there's no way to set the type or ID on that. (You could build a plugin solution via the script_loader_tag filter too.)

+1 on extending the data system to support that, +0 on adding support for templates specifically (not sure we need the full complexity there).

#2 @Funkatronic
12 years ago

Ticket #31281 is a possible duplicate (with a solution)

#3 @danielbachhuber
12 years ago

  • Milestone Future Release
  • Resolutionduplicate
  • Status newclosed

Duplicate of #31281.

Note: See TracTickets for help on using tickets.