Opened 4 weeks ago
Closed 3 weeks ago
#64511 closed task (blessed) (fixed)
Deprecate wp_sanitize_script_attributes()
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 7.0 | Priority: | normal |
| Severity: | normal | Version: | |
| Component: | Script Loader | Keywords: | has-patch has-unit-tests commit |
| Focuses: | Cc: |
Description (last modified by )
The wp_sanitize_script_attributes() function is no longer used by WordPress Core since [61485]. Its additional utility of adding a type attribute was removed in [61415] as part of #64442.
WordPress offers robust functionality for working with script tags: wp_get_script_tag() and wp_get_inline_script_tag(). Developers are better off with these tools that work with complete SCRIPT tags instead of partial snippets of HTML text.
Change History (7)
This ticket was mentioned in PR #10742 on WordPress/wordpress-develop by @jonsurrell.
4 weeks ago
#3
- Keywords has-patch has-unit-tests added
Deprecate wp_sanitize_script_attributes(). It is unused in Core and superseded by better alternatives like wp_get_script_tag() and wp_get_inline_script_tag().
Trac ticket: https://core.trac.wordpress.org/ticket/64511
See this discussion for some background.