[wp-trac] [WordPress Trac] #35264: wp_enqueue_script does not allow different types
WordPress Trac
noreply at wordpress.org
Wed Dec 30 13:58:37 UTC 2015
#35264: wp_enqueue_script does not allow different types
---------------------------+-------------------------
Reporter: mampf | Owner: swissspidy
Type: enhancement | Status: reviewing
Priority: normal | Milestone:
Component: Script Loader | Version: 4.4
Severity: normal | Resolution:
Keywords: | Focuses:
---------------------------+-------------------------
Changes (by swissspidy):
* owner: => swissspidy
* status: new => reviewing
* milestone: Awaiting Review =>
Comment:
Replying to [comment:2 mampf]:
> Replying to [comment:1 swissspidy]:
> > Why do you want to use `wp_enqueue_script()` for this? AFAIK json-Id
data needs to be inline, while `wp_enqueue_script()` is specifically for
external JavaScript.
>
> I'd love to use some kind of caching. You are right, it needs to be
inline. Is it even possible to cache an inline script?
It's not possible, but since it's just JSON, so you don't really have to
worry about client-side caching.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/35264#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list