闲来无事就喜欢折腾这些小玩意,很简单也就不多解释了,代码来源于网络。
//自定义登录页面的LOGO图片 function my_custom_login_logo() { echo '<style type="text/css"> .login h1 a { background-image:url("https://s.gravatar.com/avatar/c0182e19f4e87f7552aa9543b8d935ca") !important; height: 84px !important; width: 84px !important; -webkit-background-size: 84px !important; background-size: 84px !important; border-radius: 100px !important; } .login #backtoblog a, .login #nav a { color: #fff; text-decoration: none; } .login #backtoblog a:hover, .login #nav a:hover, .login h1 a:hover { color: #f44336; } </style>'; } add_action('login_head', 'my_custom_login_logo'); //自定义登录页面的LOGO链接为首页链接 add_filter('login_headerurl', create_function(false,"return get_bloginfo('url');")); //自定义登录界面LOGO链接为任意链接 function custom_loginlogo_url($url) { return 'https://www.mrwu.me'; //修改URL地址 } add_filter( 'login_headerurl', 'custom_loginlogo_url' ); //自定义登录页面的LOGO提示为网站名称 add_filter('login_headertitle', create_function(false,"return get_bloginfo('name');")); //自定义登录页面LOGO提示为任意文本 function custom_loginlogo_desc($url) { return 'Mr.Wu博客'; //修改文本信息 } add_filter( 'login_headertitle', 'custom_loginlogo_desc' ); //BING美图作为登录页面背景 function custom_login_head(){ $str=file_get_contents('https://cn.bing.com/HPImageArchive.aspx?idx=0&n=1'); if(preg_match("/<url>(.+?)<//url>/ies",$str,$matches)){ $imgurl='https://cn.bing.com'.$matches[1]; echo'<style type="text/css">body{background: url('.$imgurl.');width:100%;height:100%;background-image:url('.$imgurl.');-moz-background-size: 100% 100%;-o-background-size: 100% 100%;-webkit-background-size: 100% 100%;background-size: 100% 100%;-moz-border-image: url('.$imgurl.') 0;background-repeat:no-repeat/9;background-image:none/9;background-size:cover}</style>'; }} add_action('login_head', 'custom_login_head');
免责声明:文章中涉及的程序(方法)可能带有攻击性,仅供安全研究与教学之用,读者将其信息做其他用途,由读者承担全部法律及连带责任,本站不承担任何法律及连带责任;如有问题可邮件联系(建议使用企业邮箱或有效邮箱,避免邮件被拦截,联系方式见首页),望知悉。
- 左青龙
- 微信扫一扫
-
- 右白虎
- 微信扫一扫
-
评论