WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 5 years ago

#30617 closed enhancement (duplicate)

Create wp_add_inline_script()

Reported by: woodent Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.1
Component: Script Loader Keywords:
Focuses: Cc:

Description

WordPress has a wp_add_inline_style() function for easy inclusion of inline styles where an extra HTTP request would be overkill. However, there is no equivalent for including inline scripts. I propose we create wp_add_inline_script().

Change History (1)

#1 @TobiasBg
5 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Thanks for your suggestion, @woodent!
There's a ticket with a patch and possible implementation of such a function at ticket:14853#comment:10, so we can close this ticket as a duplicate of #14853 and continue the discussion in the that ticket.

Note: See TracTickets for help on using tickets.