wordpress一些优化小细节整理
关闭wordpress订阅
//关闭Feed订阅
function disable_all_feeds() {
wp_die( '本站不提供feed,请直接访问 www.zhujiceping.com' );
}
add_action('do_feed', 'disable_all_feeds', 1);
add_action('do_feed_rdf', 'disable_all_feeds', 1);
add_action('do_feed_rss', 'disable_all_feeds', 1);
add_action('do_feed_rss2', 'disable_all_feeds', 1);
add_action('do_feed_atom', 'disable_all_feeds', 1);