Commit Graph

38 Commits

Author SHA1 Message Date
Andrew Nacin 8a9ea82d2b If someone tries to localize 'jquery', which is now an alias with jquery-core and jquery-migrate dependencies, add the data to jquery-core.
fixes #24197.



git-svn-id: https://develop.svn.wordpress.org/trunk@24635 602fd350-edb4-49c9-b593-d223f7449a82
2013-07-10 05:38:17 +00:00
Andrew Nacin a0f7d641b7 Allow protocol-relative URLs when registering/enqueueing scripts and styles.
props mimecine, TobiasBg, georgestephanis.
props kurtpayne for the test coverage.
fixes #16560.



git-svn-id: https://develop.svn.wordpress.org/trunk@21166 602fd350-edb4-49c9-b593-d223f7449a82
2012-06-28 20:18:38 +00:00
Andrew Nacin b57365f7ff If a plugin triggers the WP_Scripts constructor prior to init, fire wp_default_scripts()
then and again on init.

Only add our localized strings once we've fired init, in case we do have the situation
where we fire wp_default_scripts() twice.

Fixes issues where plugins or themes try to enqueue a default script handle prior to
init. Does not allow #19959 to regress.

see #20971 for trunk.



git-svn-id: https://develop.svn.wordpress.org/trunk@21132 602fd350-edb4-49c9-b593-d223f7449a82
2012-06-26 05:33:19 +00:00
Ryan Boren 89e9bcc1d6 Pinking shears 6-20000
git-svn-id: https://develop.svn.wordpress.org/trunk@20000 602fd350-edb4-49c9-b593-d223f7449a82
2012-02-27 19:46:52 +00:00
Andrew Nacin 51ded65294 Coverage for load-scripts.php. fixes #19959.
git-svn-id: https://develop.svn.wordpress.org/trunk@19872 602fd350-edb4-49c9-b593-d223f7449a82
2012-02-08 16:15:24 +00:00
Andrew Nacin b90754dbca Wait until init to fire wp_default_scripts. Fixes localization issues when a plugin calls wp_enqueue_script() too early (in spite of the _doing_it_wrong warning signs added in #11526). fixes #19959.
git-svn-id: https://develop.svn.wordpress.org/trunk@19865 602fd350-edb4-49c9-b593-d223f7449a82
2012-02-08 15:29:24 +00:00
Andrew Ozz 469745d625 Move an unsightly semicolon to where it belongs in wp_localize_script(), props tw2113, fixes #19830
git-svn-id: https://develop.svn.wordpress.org/trunk@19832 602fd350-edb4-49c9-b593-d223f7449a82
2012-02-06 18:52:57 +00:00
Ryan Boren 676ba7043e Use one space, not two, after trailing punctuation. fixes #19537
git-svn-id: https://develop.svn.wordpress.org/trunk@19593 602fd350-edb4-49c9-b593-d223f7449a82
2011-12-13 23:45:31 +00:00
Andrew Nacin 248eba8b48 Remove wp_add_script_before() from 3.3. Continue to use wp_localize_script() for your data-passing needs. fixes #11520.
git-svn-id: https://develop.svn.wordpress.org/trunk@19573 602fd350-edb4-49c9-b593-d223f7449a82
2011-12-08 20:46:58 +00:00
Andrew Ozz 8e37911c0c Ressurect WP_Scripts::localize() and fix public function names, fixes #11520
git-svn-id: https://develop.svn.wordpress.org/trunk@19217 602fd350-edb4-49c9-b593-d223f7449a82
2011-11-08 18:05:59 +00:00
Andrew Ozz 03375fa844 Recursively convert html entities in script localization strings, see #11520
git-svn-id: https://develop.svn.wordpress.org/trunk@18813 602fd350-edb4-49c9-b593-d223f7449a82
2011-09-29 06:43:46 +00:00
Andrew Nacin 2c6d998b91 Revert [18804] until we have a proper solution. see #11520.
git-svn-id: https://develop.svn.wordpress.org/trunk@18810 602fd350-edb4-49c9-b593-d223f7449a82
2011-09-29 05:50:44 +00:00
Andrew Ozz 440ea79d5e Convert html entities in script localization strings, see #11520
git-svn-id: https://develop.svn.wordpress.org/trunk@18804 602fd350-edb4-49c9-b593-d223f7449a82
2011-09-29 00:34:24 +00:00
Andrew Ozz 461ceba60d Editor API enhancement, first run (still needs some work), see #17144
git-svn-id: https://develop.svn.wordpress.org/trunk@18498 602fd350-edb4-49c9-b593-d223f7449a82
2011-08-03 10:19:00 +00:00
Andrew Ozz 27e866dfd1 Optimize script-loader a bit, see #11520
git-svn-id: https://develop.svn.wordpress.org/trunk@18496 602fd350-edb4-49c9-b593-d223f7449a82
2011-08-03 01:54:29 +00:00
Andrew Ozz 0191ed92cd Introduce WP_Dependencies::get_data() method, change scripts and styles priority to follow the "natural" order in HTML, i.e. the last one wins, props scribu, see #11520
git-svn-id: https://develop.svn.wordpress.org/trunk@18480 602fd350-edb4-49c9-b593-d223f7449a82
2011-07-28 18:24:00 +00:00
Andrew Ozz 06f33f29ba Use json_encode() for adding script data (formerly l10n). Add the same functionality to WP_Styles for adding inline css after a stylesheet has been outputted. See #11520
git-svn-id: https://develop.svn.wordpress.org/trunk@18464 602fd350-edb4-49c9-b593-d223f7449a82
2011-07-25 00:36:06 +00:00
Andrew Ozz c1779932f1 Support for using wp_enqueue_script() and wp_enqueue_style() in the HTML body. All scripts and styles are added in the footer, fixes #9346
git-svn-id: https://develop.svn.wordpress.org/trunk@18446 602fd350-edb4-49c9-b593-d223f7449a82
2011-07-21 16:32:01 +00:00
Andrew Nacin ccea27cbe7 More param fixes, props duck_. see #14783.
git-svn-id: https://develop.svn.wordpress.org/trunk@16469 602fd350-edb4-49c9-b593-d223f7449a82
2010-11-18 19:12:48 +00:00
Ryan Boren 4b33a0e9c4 Pinking shears
git-svn-id: https://develop.svn.wordpress.org/trunk@16438 602fd350-edb4-49c9-b593-d223f7449a82
2010-11-17 18:47:34 +00:00
Peter Westwood 6b1be702c4 Move the l10n helper function into a seperate js file so we can always output it first.
Fixes #15124.

git-svn-id: https://develop.svn.wordpress.org/trunk@16282 602fd350-edb4-49c9-b593-d223f7449a82
2010-11-10 21:53:30 +00:00
Andrew Ozz 78dcefaa71 Too many question marks, see #11315
git-svn-id: https://develop.svn.wordpress.org/trunk@12559 602fd350-edb4-49c9-b593-d223f7449a82
2009-12-28 00:56:41 +00:00
Andrew Ozz 80d135a608 WP_Dependencies: pass NULL to disable script and style version query strings, props scribu amattie, fixes #11315
git-svn-id: https://develop.svn.wordpress.org/trunk@12558 602fd350-edb4-49c9-b593-d223f7449a82
2009-12-28 00:48:20 +00:00
Mark Jaquith ba1c3bdd5b Deprecate sanitize_url() and clean_url() in favor of esc_url_raw() and esc_url()
git-svn-id: https://develop.svn.wordpress.org/trunk@11383 602fd350-edb4-49c9-b593-d223f7449a82
2009-05-18 16:00:33 +00:00
Mark Jaquith 8d6cb67233 esc_js(). Shorter, follows new escaping naming convention.
git-svn-id: https://develop.svn.wordpress.org/trunk@11245 602fd350-edb4-49c9-b593-d223f7449a82
2009-05-09 07:27:22 +00:00
Andrew Ozz bb93b6bab4 Queue all default scripts for the head when a custom script lists them as dependencies, fixes #9620
git-svn-id: https://develop.svn.wordpress.org/trunk@11058 602fd350-edb4-49c9-b593-d223f7449a82
2009-04-22 21:01:36 +00:00
Andrew Ozz 4d58681aa4 Improvements to the script loader: allows plugins to queue scripts for the front end head and footer, adds hooks for server side caching of compressed scripts, adds support for ENFORCE_GZIP constant (deflate is used by default since it's faster), see #8628, fixes #8884
git-svn-id: https://develop.svn.wordpress.org/trunk@10442 602fd350-edb4-49c9-b593-d223f7449a82
2009-01-26 12:59:10 +00:00
Andrew Ozz 97839ac498 Let plugins register footer scripts easier and add filters to the concatenating functions
git-svn-id: https://develop.svn.wordpress.org/trunk@10367 602fd350-edb4-49c9-b593-d223f7449a82
2009-01-15 19:50:23 +00:00
Andrew Ozz f36563c215 Add action hook in admin footer so plugins can output scripts there on specific pages only, props GamerZ, fixes #8859
git-svn-id: https://develop.svn.wordpress.org/trunk@10362 602fd350-edb4-49c9-b593-d223f7449a82
2009-01-15 00:08:20 +00:00
Andrew Ozz bdf9472e38 Remove unused var
git-svn-id: https://develop.svn.wordpress.org/trunk@10358 602fd350-edb4-49c9-b593-d223f7449a82
2009-01-14 14:40:08 +00:00
Andrew Ozz 22eddf34d2 Split the script queue in head and footer part, concatenate and compress the default js and css, first run, see #8628
git-svn-id: https://develop.svn.wordpress.org/trunk@10357 602fd350-edb4-49c9-b593-d223f7449a82
2009-01-14 14:18:51 +00:00
Andrew Ozz 274079e8d4 Fix external dependencies in class.wp-scripts.php, fixes #8505
git-svn-id: https://develop.svn.wordpress.org/trunk@10135 602fd350-edb4-49c9-b593-d223f7449a82
2008-12-09 02:50:28 +00:00
Peter Westwood 24f1c22adf Move convertEntities js function into the BackPress scriptloader. Fixes #8505 props sambauers.
git-svn-id: https://develop.svn.wordpress.org/trunk@10086 602fd350-edb4-49c9-b593-d223f7449a82
2008-12-06 09:54:24 +00:00
Andrew Ozz 2f23018db2 Filter HTML entities when inserting strings with js, includes patch by nbachiyski, fixes #8254
git-svn-id: https://develop.svn.wordpress.org/trunk@9809 602fd350-edb4-49c9-b593-d223f7449a82
2008-11-20 10:54:59 +00:00
Peter Westwood 81cec198a1 phpdoc updates for wp-includes See #7550 props jacobsantos.
git-svn-id: https://develop.svn.wordpress.org/trunk@9002 602fd350-edb4-49c9-b593-d223f7449a82
2008-09-27 10:06:18 +00:00
Ryan Boren 0fba0a6d4a Introduce content_url(). Don't prepend base url to content url in script loader. see #6938 #7001
git-svn-id: https://develop.svn.wordpress.org/trunk@8301 602fd350-edb4-49c9-b593-d223f7449a82
2008-07-09 17:24:36 +00:00
Ryan Boren ce3388a5ea Add wp_default_styles(), convert wp_admin_css(). Props mdawaffe. see #7011
git-svn-id: https://develop.svn.wordpress.org/trunk@7976 602fd350-edb4-49c9-b593-d223f7449a82
2008-05-21 23:24:23 +00:00
Ryan Boren 6fad8c567f Style loader from mdawaffe. see #7011
git-svn-id: https://develop.svn.wordpress.org/trunk@7970 602fd350-edb4-49c9-b593-d223f7449a82
2008-05-21 05:56:04 +00:00