WordPress 后台底部默认会显示WordPress版本信息和版本号,如果你运维一个多用户网站,并且其他用户可以访问后台,那么你可以自定义这些信息,隐藏版本号等。只要将下面的代码添加到主题的 functions.php 即可:
/**
* 自定义 WordPress 后台底部的版权和版本信息
* https://www.wpdaxue.com/change-admin-footer-text.html
*/
add_filter('admin_footer_text', 'left_admin_footer_text');
function left_admin_footer_text($text) {
// 左边信息
$text = '<span id="footer-thankyou">感谢使用<a href="http://cn.wordpress.org/">WordPress</a>进行创作</span>';
return $text;
}
add_filter('update_footer', 'right_admin_footer_text', 11);
function right_admin_footer_text($text) {
// 右边信息
$text = "3.6.1版本";
return $text;
} |
/**
* 自定义 WordPress 后台底部的版权和版本信息
* https://www.wpdaxue.com/change-admin-footer-text.html
*/
add_filter('admin_footer_text', 'left_admin_footer_text');
function left_admin_footer_text($text) {
// 左边信息
$text = '<span id="footer-thankyou">感谢使用<a href="http://cn.wordpress.org/">WordPress</a>进行创作</span>';
return $text;
}
add_filter('update_footer', 'right_admin_footer_text', 11);
function right_admin_footer_text($text) {
// 右边信息
$text = "3.6.1版本";
return $text;
}
请根据自己的实际需要,修改代码中的文本内容。
来源:
https://www.wpdaxue.com/change-admin-footer-text.html
微信公众号
手机浏览(小程序)
Warning: get_headers(): SSL operation failed with code 1. OpenSSL Error messages:
error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in
/mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line
57
Warning: get_headers(): Failed to enable crypto in
/mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line
57
Warning: get_headers(https://static.shanhubei.com/qrcode/qrcode_viewid_32422.jpg): failed to open stream: operation failed in
/mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line
57