Version Description
- Added check for WordPress including non-standard versions of scripts (fixes WordPress 3.2.2/swfobject).
- Fixed incorrect case in HTTPS check.
Download this release
Release Info
Developer | jczorkmid |
Plugin | Use Google Libraries |
Version | 1.2.1 |
Comparing to | |
See all releases |
Code changes from version 1.2 to 1.2.1
- README.txt +16 -4
- use-google-libraries.php +9 -3
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.3
|
7 |
-
Stable tag: 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.
|
@@ -69,6 +69,12 @@ enabled, a message will be logged letting you know this is happening.
|
|
69 |
Please see the section on **Incompatible Plugins** and
|
70 |
**Incompatible Themes** for specific information.
|
71 |
|
|
|
|
|
|
|
|
|
|
|
|
|
72 |
== Incompatible Plugins ==
|
73 |
|
74 |
|
@@ -81,6 +87,12 @@ using K2.
|
|
81 |
|
82 |
== Changelog ==
|
83 |
|
|
|
|
|
|
|
|
|
|
|
|
|
84 |
= 1.2 =
|
85 |
|
86 |
+ Reworked handling for cases where multiple js files are combined
|
@@ -157,8 +169,8 @@ from [Peter Wilson](http://peterwilson.cc/).
|
|
157 |
|
158 |
== Upgrade Notice ==
|
159 |
|
160 |
-
= 1.2 =
|
161 |
-
|
162 |
|
163 |
== A Request ==
|
164 |
|
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.3.2
|
7 |
+
Stable tag: 1.2.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.
|
69 |
Please see the section on **Incompatible Plugins** and
|
70 |
**Incompatible Themes** for specific information.
|
71 |
|
72 |
+
= How do I use the libraries supplied by Use Google Libraries? =
|
73 |
+
|
74 |
+
The same way you use them when Use Google Libraries isn't installed using
|
75 |
+
'wp_enqueue_script'. In fact you should develop your theme or plugin without
|
76 |
+
Use Google Libraries being enabled at all, then test it both ways.
|
77 |
+
|
78 |
== Incompatible Plugins ==
|
79 |
|
80 |
|
87 |
|
88 |
== Changelog ==
|
89 |
|
90 |
+
= 1.2.1 =
|
91 |
+
|
92 |
+
+ Added check for WordPress including non-standard versions of scripts (fixes
|
93 |
+
WordPress 3.2.2/swfobject).
|
94 |
+
+ Fixed incorrect case in HTTPS check.
|
95 |
+
|
96 |
= 1.2 =
|
97 |
|
98 |
+ Reworked handling for cases where multiple js files are combined
|
169 |
|
170 |
== Upgrade Notice ==
|
171 |
|
172 |
+
= 1.2.1 =
|
173 |
+
Required for WordPress 3.3.2
|
174 |
|
175 |
== A Request ==
|
176 |
|
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.2
|
7 |
Author: Jason Penney
|
8 |
Author URI: http://jasonpenney.net/
|
9 |
*/
|
@@ -54,7 +54,6 @@ if ( !class_exists( 'JCP_UseGoogleLibraries' ) ) {
|
|
54 |
protected $is_ssl;
|
55 |
protected static $script_before_init_notice =
|
56 |
'<strong>Use Google Libraries</strong>: Another plugin has registered or enqued a script before the "init" action. Attempting to work around it.';
|
57 |
-
|
58 |
/**
|
59 |
* PHP 4 Compatible Constructor
|
60 |
*/
|
@@ -151,7 +150,7 @@ if ( !class_exists( 'JCP_UseGoogleLibraries' ) ) {
|
|
151 |
( getenv( 'SERVER_PORT' ) == '433' ) ) )
|
152 |
or
|
153 |
( isset( $_SERVER ) and
|
154 |
-
( ( isset( $_SERVER['HTTPS'] ) and $_SERVER['
|
155 |
or
|
156 |
( isset( $_SERVER['SERVER_PORT'] ) and $_SERVER['SERVER_PORT'] == '443' ) ) ) ) {
|
157 |
$is_ssl = true;
|
@@ -226,6 +225,13 @@ if ( !class_exists( 'JCP_UseGoogleLibraries' ) ) {
|
|
226 |
|
227 |
// default to requested ver
|
228 |
$ver = $script->ver;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
229 |
|
230 |
// TODO: replace with more flexible option
|
231 |
// quick and dirty work around for scriptaculous 1.8.0
|
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.2.1
|
7 |
Author: Jason Penney
|
8 |
Author URI: http://jasonpenney.net/
|
9 |
*/
|
54 |
protected $is_ssl;
|
55 |
protected static $script_before_init_notice =
|
56 |
'<strong>Use Google Libraries</strong>: Another plugin has registered or enqued a script before the "init" action. Attempting to work around it.';
|
|
|
57 |
/**
|
58 |
* PHP 4 Compatible Constructor
|
59 |
*/
|
150 |
( getenv( 'SERVER_PORT' ) == '433' ) ) )
|
151 |
or
|
152 |
( isset( $_SERVER ) and
|
153 |
+
( ( isset( $_SERVER['HTTPS'] ) and $_SERVER['HTTPS'] !='' and $_SERVER['HTTPS'] != 'off' )
|
154 |
or
|
155 |
( isset( $_SERVER['SERVER_PORT'] ) and $_SERVER['SERVER_PORT'] == '443' ) ) ) ) {
|
156 |
$is_ssl = true;
|
225 |
|
226 |
// default to requested ver
|
227 |
$ver = $script->ver;
|
228 |
+
|
229 |
+
if ( strpos( $ver, '-' ) !== false ) {
|
230 |
+
if ( WP_DEBUG !== false ) {
|
231 |
+
error_log("WordPress appears to be using a non-standard version of $name (version $ver). Use Google Libraries not enabled for $name.");
|
232 |
+
}
|
233 |
+
continue;
|
234 |
+
}
|
235 |
|
236 |
// TODO: replace with more flexible option
|
237 |
// quick and dirty work around for scriptaculous 1.8.0
|