Code
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 | |
function load_cdn() { | |
if ( !is_admin() ) { | |
wp_deregister_script('jquery'); | |
wp_enqueue_script('jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js', array(), '1.6.1'); | |
} | |
} | |
add_action('init', 'load_cdn'); | |
?> |
Note
Description | CDNのjQueryと本体内蔵のjQueryを置き換える。尚、管理画面には読み込まないようにする。 |
---|---|
WordPress Ver. | 3.3.1 |
Via | – |