WordPress.org

Make WordPress Core

Opened 2 days ago

#51325 new enhancement

Add a filter for script/style tags injected by wp_add_inline_{script|style}

Reported by: pjohanneson Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: General Keywords:
Focuses: Cc:

Description

In attempting to write a Content Security Policy for my WordPress site, I've run into issues with WordPress loading a few inline scripts and styles. I would like to be able to add a CSP nonce to each of the <script> and <style> tags, ideally with a WordPress filter. However, the tags appear to have no filters associated with them.

Something similar to the filters script_loader_tag and style_loader_tag (which I'm already using in my CSP attempts) would be very handy.

Change History (0)

Note: See TracTickets for help on using tickets.