修改主题下的functions.php
隐藏后台登录错误提示:
function no_errors_please(){
return 'ERROR!!';
}
add_filter( 'login_errors', 'no_errors_please' );
关闭wordpress的猜测网址功能,显示404错误:
function stop_guessing($url) {
if (is_404()) {
return false;
}
return $url;
}
add_filter('redirect_canonical', 'stop_guessing');
停用回复的html功能:
add_filter( 'pre_comment_content', 'wp_specialchars' );