[wp-trac] [WordPress Trac] #54777: passing empty object to wp_localize_script will convert it to empty array instead of empty object
WordPress Trac
noreply at wordpress.org
Mon Jan 10 12:56:47 UTC 2022
#54777: passing empty object to wp_localize_script will convert it to empty array
instead of empty object
---------------------------+------------------------------
Reporter: erikdemarco | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Script Loader | Version:
Severity: normal | Resolution:
Keywords: | Focuses:
---------------------------+------------------------------
Changes (by swissspidy):
* component: General => Script Loader
Comment:
Related: #25280
The recommend approach is to use `wp_add_inline_script()` for this use
case.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/54777#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list