Version Description
- using
wp_remote_head
to query that the replacement URL is actually hosted by google. If it's not, then the WordPress supplied version will be used. - Using the Transient API to store the replacement URLS, rather than recalculating and re-querying them every load.
Download this release
Release Info
Developer | jczorkmid |
Plugin | Use Google Libraries |
Version | 1.5 |
Comparing to | |
See all releases |
Code changes from version 1.5b1 to 1.5
- README.txt +4 -4
- use-google-libraries.php +3 -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.
|
7 |
-
Stable tag: 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.
|
@@ -192,8 +192,8 @@ from [Peter Wilson](http://peterwilson.cc/).
|
|
192 |
|
193 |
== Upgrade Notice ==
|
194 |
|
195 |
-
= 1.
|
196 |
-
Required for WordPress 3.
|
197 |
|
198 |
== A Request ==
|
199 |
|
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.4
|
7 |
+
Stable tag: 1.5
|
8 |
|
9 |
Allows your site to use common javascript libraries from Google's AJAX
|
10 |
Libraries CDN, rather than from WordPress's own copies.
|
192 |
|
193 |
== Upgrade Notice ==
|
194 |
|
195 |
+
= 1.5 =
|
196 |
+
Detects when Google isn't hosting requested version. Required for WordPress 3.4!
|
197 |
|
198 |
== A Request ==
|
199 |
|
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.
|
7 |
Author: Jason Penney
|
8 |
Author URI: http://jasonpenney.net/
|
9 |
*/
|
@@ -40,7 +40,7 @@ if ( !class_exists( 'JCP_UseGoogleLibraries' ) ) {
|
|
40 |
class JCP_UseGoogleLibraries {
|
41 |
|
42 |
private static $instance;
|
43 |
-
private static $version = '1.
|
44 |
public static function get_instance() {
|
45 |
if ( !isset( self::$instance ) ) {
|
46 |
self::$instance = new JCP_UseGoogleLibraries();
|
@@ -53,7 +53,7 @@ if ( !class_exists( 'JCP_UseGoogleLibraries' ) ) {
|
|
53 |
protected $noconflict_next;
|
54 |
protected $is_ssl;
|
55 |
protected static $cache_id = 'JCP_UseGoogleLibraries_cache';
|
56 |
-
protected static $cache_len =
|
57 |
protected static $script_before_init_notice =
|
58 |
'Another plugin has registered or enqued a script before the "init" action. Attempting to work around it.';
|
59 |
/**
|
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.5
|
7 |
Author: Jason Penney
|
8 |
Author URI: http://jasonpenney.net/
|
9 |
*/
|
40 |
class JCP_UseGoogleLibraries {
|
41 |
|
42 |
private static $instance;
|
43 |
+
private static $version = '1.5';
|
44 |
public static function get_instance() {
|
45 |
if ( !isset( self::$instance ) ) {
|
46 |
self::$instance = new JCP_UseGoogleLibraries();
|
53 |
protected $noconflict_next;
|
54 |
protected $is_ssl;
|
55 |
protected static $cache_id = 'JCP_UseGoogleLibraries_cache';
|
56 |
+
protected static $cache_len = 90000; // 25 hours
|
57 |
protected static $script_before_init_notice =
|
58 |
'Another plugin has registered or enqued a script before the "init" action. Attempting to work around it.';
|
59 |
/**
|