Use Google Libraries - Version 1.1.2

Version Description

  • Updated jQuery UI to work with WordPress 3.1rc1
Download this release

Release Info

Developer jczorkmid
Plugin Icon wp plugin Use Google Libraries
Version 1.1.2
Comparing to
See all releases

Code changes from version 1.1.0.1 to 1.1.2

Files changed (3) hide show
  1. README.txt +14 -9
  2. js/jQnc.js +0 -1
  3. use-google-libraries.php +62 -7
README.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: jczorkmid
3
  Donate link: http://jasonpenney.net/donate
4
  Tags: javascript, performance, CDN, Google, jQuery, Prototype, MooTools, Dojo, Google AJAX Libraries API, YSlow, Page Speed
5
  Requires at least: 2.9.1
6
- Tested up to: 3.0
7
- Stable tag: 1.1.0.1
8
 
9
  Allows your site to use common javascript libraries from Google's AJAX
10
  Libraries CDN, rather than from WordPress's own copies.
@@ -80,6 +80,10 @@ using K2.
80
 
81
  == Changelog ==
82
 
 
 
 
 
83
  = 1.1.0.1 =
84
 
85
  + Re-disable script concatenation. Seemed to break widget admin page.
@@ -143,6 +147,11 @@ from [Peter Wilson](http://peterwilson.cc/).
143
  changes, so will the URL so there's no worry that you'll keep
144
  loading an old version.
145
 
 
 
 
 
 
146
  == A Request ==
147
 
148
  If you're going to flag the plugin as "broken" in the WordPress Plugin
@@ -161,13 +170,6 @@ registered, and replaces the standard registrations `src` with ones that
161
  point to Google's servers. Other attributes (like dependencies) are left
162
  intact.
163
 
164
- = print_scripts_array =
165
-
166
- If jQuery is enqued **Use Google Libraries** will inject a small javascript file
167
- to ensure that it is running in
168
- [noConflict mode](http://docs.jquery.com/Core/jQuery.noConflict) as it would
169
- with the standard WordPress version.
170
-
171
  = script_loader_src =
172
 
173
  **Use Google Libraries** removes the `ver=x.y.z` query string from the URL
@@ -176,6 +178,9 @@ used to load the requested library *if* it is going to load the library from
176
  improves the chances of the given URL already being cached, and prevents
177
  **script.aculo.us** from including scripts multiple times.
178
 
 
 
 
179
 
180
  == References ==
181
 
3
  Donate link: http://jasonpenney.net/donate
4
  Tags: javascript, performance, CDN, Google, jQuery, Prototype, MooTools, Dojo, Google AJAX Libraries API, YSlow, Page Speed
5
  Requires at least: 2.9.1
6
+ Tested up to: 3.1
7
+ Stable tag: 1.1.2
8
 
9
  Allows your site to use common javascript libraries from Google's AJAX
10
  Libraries CDN, rather than from WordPress's own copies.
80
 
81
  == Changelog ==
82
 
83
+ = 1.1.2 =
84
+
85
+ + Updated jQuery UI to work with WordPress 3.1rc1
86
+
87
  = 1.1.0.1 =
88
 
89
  + Re-disable script concatenation. Seemed to break widget admin page.
147
  changes, so will the URL so there's no worry that you'll keep
148
  loading an old version.
149
 
150
+ == Upgrade Notice ==
151
+
152
+ = 1.1.2 =
153
+ Updated for better WordPress 3.1 compatibility.
154
+
155
  == A Request ==
156
 
157
  If you're going to flag the plugin as "broken" in the WordPress Plugin
170
  point to Google's servers. Other attributes (like dependencies) are left
171
  intact.
172
 
 
 
 
 
 
 
 
173
  = script_loader_src =
174
 
175
  **Use Google Libraries** removes the `ver=x.y.z` query string from the URL
178
  improves the chances of the given URL already being cached, and prevents
179
  **script.aculo.us** from including scripts multiple times.
180
 
181
+ If jQuery is enqued **Use Google Libraries** will inject a bit of
182
+ javascript before the next enqueued script enabling jQuery's [noConflict mode](http://docs.jquery.com/Core/jQuery.noConflict) as it would
183
+ with the standard WordPress version.
184
 
185
  == References ==
186
 
js/jQnc.js DELETED
@@ -1 +0,0 @@
1
- jQuery.noConflict();
 
use-google-libraries.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Use Google Libraries
4
  Plugin URI: http://jasonpenney.net/wordpress-plugins/use-google-libraries/
5
  Description:Allows your site to use common javascript libraries from Google's AJAX Libraries CDN, rather than from Wordpress's own copies.
6
- Version: 1.1.0.1
7
  Author: Jason Penney
8
  Author URI: http://jasonpenney.net/
9
  */
@@ -28,7 +28,6 @@
28
 
29
  if (!class_exists('JCP_UseGoogleLibraries')) {
30
 
31
-
32
  if ( ! defined( 'WP_CONTENT_URL' ) )
33
  define( 'WP_CONTENT_URL', get_option( 'siteurl' ) . '/wp-content' );
34
  if ( ! defined( 'WP_CONTENT_DIR' ) )
@@ -67,14 +66,53 @@ if (!class_exists('JCP_UseGoogleLibraries')) {
67
  function __construct(){
68
  $this->google_scripts =
69
  array(
 
 
 
 
 
70
  'jquery' => array( 'jquery','jquery.min'),
 
 
71
  'jquery-ui-core' => array('jqueryui','jquery-ui.min'),
72
- 'jquery-ui-tabs' => array('',''),
73
- 'jquery-ui-sortable' => array('',''),
 
 
 
74
  'jquery-ui-draggable' => array('',''),
 
 
 
 
 
75
  'jquery-ui-resizable' => array('',''),
76
- 'jquery-ui-dialog' => array('',''),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
77
  'prototype' => array('prototype','prototype'),
 
 
78
  'scriptaculous-root' => array('scriptaculous', 'scriptaculous'),
79
  'scriptaculous-builder' => array('',''),
80
  'scriptaculous-effects' => array('',''),
@@ -82,11 +120,22 @@ if (!class_exists('JCP_UseGoogleLibraries')) {
82
  'scriptaculous-controls' => array('',''),
83
  'scriptaculous-slider' => array('',''),
84
  'scriptaculous-sound' => array('',''),
 
 
85
  'mootools' => array('mootools','mootools-yui-compressed'),
 
 
86
  'dojo' => array('dojo','dojo.xd'),
 
 
87
  'swfobject' => array('swfobject','swfobject'),
 
 
88
  'yui' => array('yui','build/yuiloader/yuiloader-min'),
 
 
89
  'ext-core' => array('ext-core','ext-core')
 
90
  );
91
  $this->noconflict_url = WP_PLUGIN_URL . '/use-google-libraries/js/jQnc.js';
92
 
@@ -110,7 +159,6 @@ if (!class_exists('JCP_UseGoogleLibraries')) {
110
  }
111
 
112
  static function configure_plugin() {
113
-
114
  add_action( 'wp_default_scripts',
115
  array( 'JCP_UseGoogleLibraries',
116
  'replace_default_scripts_action'),
@@ -156,8 +204,9 @@ if (!class_exists('JCP_UseGoogleLibraries')) {
156
  * all loaded locally.
157
  */
158
  function setup() {
159
- global $concatenate_scripts, $wp_version;
160
  $concatenate_scripts = false;
 
161
  }
162
 
163
 
@@ -188,6 +237,10 @@ if (!class_exists('JCP_UseGoogleLibraries')) {
188
  $ver = '1.8';
189
  }
190
 
 
 
 
 
191
  // if $lib is empty, then this script does not need to be
192
  // exlicitly loaded when using googleapis.com, but we need to keep
193
  // it around for dependencies
@@ -268,3 +321,5 @@ if (class_exists('JCP_UseGoogleLibraries')){
268
  JCP_UseGoogleLibraries::configure_plugin();
269
  }
270
 
 
 
3
  Plugin Name: Use Google Libraries
4
  Plugin URI: http://jasonpenney.net/wordpress-plugins/use-google-libraries/
5
  Description:Allows your site to use common javascript libraries from Google's AJAX Libraries CDN, rather than from Wordpress's own copies.
6
+ Version: 1.1.2
7
  Author: Jason Penney
8
  Author URI: http://jasonpenney.net/
9
  */
28
 
29
  if (!class_exists('JCP_UseGoogleLibraries')) {
30
 
 
31
  if ( ! defined( 'WP_CONTENT_URL' ) )
32
  define( 'WP_CONTENT_URL', get_option( 'siteurl' ) . '/wp-content' );
33
  if ( ! defined( 'WP_CONTENT_DIR' ) )
66
  function __construct(){
67
  $this->google_scripts =
68
  array(
69
+ // any extra scripts listed here not provided by WordPress
70
+ // or another plugin will not be registered. This liste
71
+ // is just used to chancge where things load from.
72
+
73
+ /* jQuery */
74
  'jquery' => array( 'jquery','jquery.min'),
75
+
76
+ /* jQuery UI */
77
  'jquery-ui-core' => array('jqueryui','jquery-ui.min'),
78
+ 'jquery-ui-accordion' => array('',''),
79
+ 'jquery-ui-autocomplete' => array('',''), /* jQueri UI 1.8 */
80
+ 'jquery-ui-button' => array('',''), /* jQuery UI 1.8 */
81
+ 'jquery-ui-datepicker' => array('',''),
82
+ 'jquery-ui-dialog' => array('',''),
83
  'jquery-ui-draggable' => array('',''),
84
+ 'jquery-ui-droppable' => array('',''),
85
+ 'jquery-ui-menu' => array('',''),
86
+ 'jquery-ui-mouse' => array('',''), /* jQuery UI 1.8 */
87
+ 'jquery-ui-position' => array('',''), /* jQuery UI 1.8 */
88
+ 'jquery-ui-progressbar' => array('',''),
89
  'jquery-ui-resizable' => array('',''),
90
+ 'jquery-ui-selectable' => array('',''),
91
+ 'jquery-ui-slider' => array('',''),
92
+ 'jquery-ui-sortable' => array('',''),
93
+ 'jquery-ui-tabs' => array('',''),
94
+ 'jquery-ui-widget' => array('',''), /* jQuery UI 1.8 */
95
+
96
+ /* jQuery Effects */
97
+ 'jquery-effects-core' => array('',''),
98
+ 'jquery-effects-blind' => array('',''),
99
+ 'jquery-effects-bounce' => array('',''),
100
+ 'jquery-effects-clip' => array('',''),
101
+ 'jquery-effects-drop' => array('',''),
102
+ 'jquery-effects-explode' => array('',''),
103
+ 'jquery-effects-fade' => array('',''), /* jQuery UI 1.8 */
104
+ 'jquery-effects-fold' => array('',''),
105
+ 'jquery-effects-highlight' => array('',''),
106
+ 'jquery-effects-pulsate' => array('',''),
107
+ 'jquery-effects-scale' => array('',''),
108
+ 'jquery-effects-shake' => array('',''),
109
+ 'jquery-effects-slide' => array('',''),
110
+ 'jquery-effects-transfer' => array('',''),
111
+
112
+ /* prototype */
113
  'prototype' => array('prototype','prototype'),
114
+
115
+ /* scriptaculous */
116
  'scriptaculous-root' => array('scriptaculous', 'scriptaculous'),
117
  'scriptaculous-builder' => array('',''),
118
  'scriptaculous-effects' => array('',''),
120
  'scriptaculous-controls' => array('',''),
121
  'scriptaculous-slider' => array('',''),
122
  'scriptaculous-sound' => array('',''),
123
+
124
+ /* moo tools */
125
  'mootools' => array('mootools','mootools-yui-compressed'),
126
+
127
+ /* Dojo */
128
  'dojo' => array('dojo','dojo.xd'),
129
+
130
+ /* swfobject */
131
  'swfobject' => array('swfobject','swfobject'),
132
+
133
+ /* YUI */
134
  'yui' => array('yui','build/yuiloader/yuiloader-min'),
135
+
136
+ /* Ext Core */
137
  'ext-core' => array('ext-core','ext-core')
138
+
139
  );
140
  $this->noconflict_url = WP_PLUGIN_URL . '/use-google-libraries/js/jQnc.js';
141
 
159
  }
160
 
161
  static function configure_plugin() {
 
162
  add_action( 'wp_default_scripts',
163
  array( 'JCP_UseGoogleLibraries',
164
  'replace_default_scripts_action'),
204
  * all loaded locally.
205
  */
206
  function setup() {
207
+ global $concatenate_scripts;
208
  $concatenate_scripts = false;
209
+
210
  }
211
 
212
 
237
  $ver = '1.8';
238
  }
239
 
240
+ if ($name == 'jquery-effects-core') {
241
+ $script->deps[] = 'jquery-ui-core';
242
+ }
243
+
244
  // if $lib is empty, then this script does not need to be
245
  // exlicitly loaded when using googleapis.com, but we need to keep
246
  // it around for dependencies
321
  JCP_UseGoogleLibraries::configure_plugin();
322
  }
323
 
324
+
325
+