[wp-trac] [WordPress Trac] #20558: allow wp_localize_script data to be added to existing objects
WordPress Trac
noreply at wordpress.org
Sat Sep 13 17:03:17 UTC 2014
#20558: allow wp_localize_script data to be added to existing objects
--------------------------------------+------------------------------
Reporter: ryanve | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Script Loader | Version: 3.3
Severity: normal | Resolution:
Keywords: dev-feedback 2nd-opinion | Focuses:
--------------------------------------+------------------------------
Comment (by abdessamad idrissi):
+1 for this. I'm using requirejs in one of my themes, and the script needs
to be called with '''data-main''' attribute set, like:
{{{
<script data-main="path/to/main" src="path/to/require.js"></script>
}}}
I suggest passing an extra array of attributes to the
''wp_register_script/wp_enqueue_script''.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/20558#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list