[wp-trac] [WordPress Trac] #60331: Clarify in phpdoc that wp_print_inline_script_tag() and wp_get_inline_script_tag() are not only for JavaScript
WordPress Trac
noreply at wordpress.org
Fri Jan 26 17:05:24 UTC 2024
#60331: Clarify in phpdoc that wp_print_inline_script_tag() and
wp_get_inline_script_tag() are not only for JavaScript
----------------------------------------------------+---------------------
Reporter: westonruter | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 6.5
Component: Script Loader | Version: trunk
Severity: normal | Resolution:
Keywords: good-first-bug has-patch needs-testing | Focuses:
----------------------------------------------------+---------------------
Comment (by westonruter):
@vladimiraus Thanks for the patch!
For `wp_get_inline_script_tag()`, instead of "Wraps inline script in
`<script>` tag" what about:
> Constructs an inline script tag.
And for `wp_print_inline_script_tag()`:
> Prints an inline script tag.
These would seem less redundant and simpler.
Also, for the first argument, instead of `$script` what about `$text` or
`$data`? This would map to `script.text`
([https://html.spec.whatwg.org/multipage/scripting.html#dom-script-text
spec]) or `script.firstChild.data` in the DOM.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/60331#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list