ajax.googleapis.com
替换为
ajax.proxy.ustclug.org
如WordPress的
[code]
//禁用谷歌ajax,替换为中科大的
function yt_cdn_callback($buffer) {
return str_replace(‘googleapis.com’, ‘proxy.ustclug.org’, $buffer);
}
function yt_buffer_start() {
ob_start("yt_cdn_callback");
}
function yt_buffer_end() {
ob_end_flush();
}
add_action(‘init’, ‘yt_buffer_start’);
add_action(‘shutdown’, ‘yt_buffer_end’);
[/code]