Created
April 29, 2010 12:14
-
-
Save livingston/383512 to your computer and use it in GitHub Desktop.
Cleanup Wordpress Header & use Google Hosted jQuery
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* Cleanup Wordpress Header & use Google Hosted jQuery */ | |
function cleanUp() { | |
function restatement_scripts_unversion($src) { | |
if( strpos($src,'ajax.googleapis.com') ) | |
$src=remove_query_arg('ver', $src); | |
return $src; | |
} | |
remove_action('wp_head', 'rsd_link'); | |
remove_action('wp_head', 'feed_links', 2); | |
remove_action('wp_head', 'wlwmanifest_link'); | |
remove_action('wp_head', 'wp_generator'); | |
remove_action('wp_head', 'bloginfo'); | |
wp_deregister_script('jquery'); | |
wp_register_script('jquery', ('http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js'), false, false, true); | |
wp_enqueue_script('jquery'); | |
add_filter('script_loader_src','restatement_scripts_unversion'); | |
} | |
add_action('init', 'cleanUp'); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment