Plugin Directory

Use Google Libraries

Technical Details

Use Google Libraries uses the following hooks (each with a priority of 1000).

wp_default_scripts

Use Google Libraries compares it's list of supported scripts to those registered, and replaces the standard registrations src with ones that point to Google's servers. Other attributes (like dependencies) are left intact.

print_scripts_array

If jQuery is enqued Use Google Libraries will inject a small javascript file to ensure that it is running in noConflict mode as it would with the standard WordPress version.

script_loader_src

Use Google Libraries removes the ver=x.y.z query string from the URL used to load the requested library if it is going to load the library from ajax.googleapis.com. Otherwise the URL is left unaltered. This both improves the chances of the given URL already being cached, and prevents script.aculo.us from including scripts multiple times.

References

Parts of this plugin (specificly, the dropping of the micro number) were inspired by John Blackbourn's Google AJAX Libraries, which has very similar goals to this plugin.

Future Plans

  • add ability to enable/disable loading from Google for specific libraries
  • add ability to request a newer version than your WordPress install registers by default

Download

FYI

Compatibility beta

Your Setup

Log in to vote.

The Consensus

No data
100,1,1

Average Rating

5 stars
4 stars
3 stars
2 stars
1 star
(16 ratings)