[wp-trac] [WordPress Trac] #11520: print_scripts_l10n() should use json_encode()
WordPress Trac
wp-trac at lists.automattic.com
Thu Jul 28 17:04:07 UTC 2011
#11520: print_scripts_l10n() should use json_encode()
------------------------------------+------------------------
Reporter: scribu | Owner: azaozz
Type: enhancement | Status: reviewing
Priority: normal | Milestone: 3.3
Component: JavaScript | Version:
Severity: normal | Resolution:
Keywords: has-patch dev-feedback |
------------------------------------+------------------------
Comment (by azaozz):
Replying to [comment:33 scribu]:
> It's not the same thing, since inline styles don't have names.
True, but if two styles cover the same selector(s), the last printed one
wins.
> Even for scripts, I don't see why it would be a good idea for the first
one to win.
This is the current logic in WP_Dependencies. You cannot re-declare
already added script or style there, i.e. trying to add 'jquery' after
it's been queued (with different args, src, etc.) will fail.
Don't mind reversing that when adding inline scripts and styles but will
need to cover it nicely in the phpdoc there.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/11520#comment:35>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list