/* 登陆地址安全防护 登陆地址要这样wp-login.php?wowww=bnetuuu 注意前台用户登陆的也要关闭了,不然在前台都可以破解*/
function login_protection(){
if($_GET['wowww'] != 'bnetuuu')header('Location: /');
}
add_action('login_enqueue_scripts','login_protection');
/*作者存档链接中的用户名改为用户ID -修改url重写后的作者存档页的链接变量*/
add_filter( 'author_link', 'uuu_yundanran_author_link', 10, 2 );
function uuu_yundanran_author_link( $link, $author_id) {
global $wp_rewrite;
$author_id = (int) $author_id;
$link = $wp_rewrite->get_author_permastruct();
if ( empty($link) ) {
$file = home_url( '/' );
$link = $file . '?author=' . $author_id;
} else {
$link = str_replace('%author%', $author_id, $link);
$link = home_url( user_trailingslashit( $link ) );