Make WordPress Core

Opened 6 years ago

Closed 6 years ago

#34784 closed feature request (duplicate)

Adding a function for custom scripts

Reported by: abiralneupane Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.3.1
Component: Script Loader Keywords:
Focuses: Cc:



I noticed that there is no function to add internal scripts in WordPress.

There is a function wp_add_inline_style() for stylesheet but not for script.

Maybe adding wp_add_inline_script() will be nice.


Change History (1)

#1 @swissspidy
6 years ago

  • Component changed from General to Script Loader
  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

A new wp_add_inline_script() function is already being discussed in #14853. Just needs a new patch.

Note: See TracTickets for help on using tickets.