全新安装WordPress可能需要做的工作

仅自己记录使用

关闭历史修订:
编辑 wp-config.php 文件(博客根目录),在下面代码之前:
define(‘ABSPATH’, dirname(FILE).’/’);
添加以下代码:
define(‘WP_POST_REVISIONS’,false);

//禁用WordPress前台搜索功能(当前主题functions.php)

function disable_search( $query, $error = true ) {
	if (is_search() && !is_admin()) {
		$query->is_search = false;
		$query->query_vars['s'] = false;
		$query->query['s'] = false;
		if ( $error == true )
		// 执行搜索后显示的错误页面
		// $query->is_home = true; //跳转到首页
		$query->is_404 = true;//跳转到404页
	}
}
add_action( 'parse_query', 'disable_search' );
add_filter( 'get_search_form', create_function( '$a', "return null;" ) );

//当前主题functions.php最后
//禁用Googlefont

class Disable_Google_Fonts {
        public function __construct() {
                add_filter( 'gettext_with_context', array( $this, 'disable_open_sans' ), 888, 4 );
        }
        public function disable_open_sans( $translations, $text, $context, $domain ) {
                if ( 'Open Sans font: on or off' == $context && 'on' == $text ) {
                        $translations = 'off';
                }
                return $translations;
        }
}
$disable_google_fonts = new Disable_Google_Fonts;

如果是justnews主题:

主题内panel.php,搜索以下
function get_theme_options

关闭懒加载
$options[‘post_img_lazyload’]=’0′;

打开评论

$options[‘comments_open’]=’1′;

主题内single.php 分享到微信
http://qr.liantu.com/api.php?text=

https://api.qrserver.com/v1/create-qr-code/?data=

主题内setup.php jquery外链
主题内header.php respond.min.js外链