[wp-trac] [WordPress Trac] #51325: Add a filter for script/style tags injected by wp_add_inline_{script|style}

WordPress Trac noreply at wordpress.org
Wed Sep 16 19:22:06 UTC 2020


#51325: Add a filter for script/style tags injected by wp_add_inline_{script|style}
-------------------------+-----------------------------
 Reporter:  pjohanneson  |      Owner:  (none)
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  General      |    Version:
 Severity:  normal       |   Keywords:
  Focuses:               |
-------------------------+-----------------------------
 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.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/51325>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list