替换谷歌ajax和font

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]

© 版权声明
THE END
喜欢就支持一下吧
点赞0 分享