Make WordPress Core

Timestamp:
02/02/2021 08:53:53 PM (4 years ago)
Author:
adamsilverstein
Message:

Security: add Content-Security-Policy script loaders.

Add new functions wp_get_script_tag, wp_print_script_tag, wp_print_inline_script_tag and wp_get_inline_script_tag that support script attributes. Enables passing attributes such as async or nonce, creating a path forward for enabling a Content-Security-Policy in core, plugins and themes.

Props tomdxw, johnbillion, jadeddragoon, jrchamp, mallorydxw, epicfaace, alinod, enricocarraro, ocean90.
Fixes #39941.

File:
1 added

Note: See TracChangeset for help on using the changeset viewer.