WordPress 后台底部默认会显示WordPress版本信息和版本号,如果你运维一个多用户网站,并且其他用户可以访问后台,那么你可以自定义这些信息,隐藏版本号等。只要将下面的代码添加到主题的 functions.php 即可:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
/** * 自定义 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;
}
请根据自己的实际需要,修改代码中的文本内容。
RSS