自定义 WordPress 后台底部的版权和版本信息

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;
}

请根据自己的实际需要,修改代码中的文本内容。

本人擅长Ai、Fw、Fl、Br、Ae、Pr、Id、Ps等软件的安装与卸载,精通CSS、JavaScript、PHP、ASP、C、C++、C#、Java、Ruby、Perl、Lisp、Python、Objective-C、ActionScript、Pascal等单词的拼写,熟悉Windows、Linux、OS X、Android、iOS、WP8等系统的开关机。

通过下面的方式来联系我们:

电邮:138762189@qq.com

联系QQ:点击这里给我发消息

官方站:www.tadke.com

※ ※ 联系请加我的企鹅号 ※※

※ ※技术支持请微信联系站长 ※※

Copyright © 2023 Tadke.com. 琼ICP备20000547号