问题描述

有没有办法编辑文本 「感谢您使用 Wordpress 创建」3.3.1 版本在 CMS 的底部?如果是这样,我需要编辑什么文件?

最佳解决方案

信用肯定是 @kaiser,但这里是一个全面的工作解决方案。您可以将此代码添加到您的 functions.php 文件 (在您的主题中):

function wpse_edit_footer() {
    add_filter( 'admin_footer_text', 'wpse_edit_text', 11 );
}

function wpse_edit_text($content) {
    return "New Footer Text";
}

add_action( 'admin_init', 'wpse_edit_footer' );

次佳解决方案

只是挂在过滤器。剩下的只有<hr />

/**
 * Change/Disable the footer text line
 * @return void
 */
function wpse_remove_footer()
{
    add_filter( 'admin_footer_text',    '__return_false', 11 );
    add_filter( 'update_footer',        '__return_false', 11 );
}
add_action( 'admin_init', 'wpse_remove_footer' );

如果你想改变它:

add_action( 'admin_init', function()
{
    add_filter( 'admin_footer_text', function() {
        echo "This is a custom admin footer text";
    }, 11 );
    add_filter( 'update_footer', function() {
        echo "This is a custom footer update text";
    }, 11 );
} );

参考文献

注:本文内容整合自 Google/Baidu/Bing 辅助翻译的英文资料结果。如果您对结果不满意,可以加入我们改善翻译效果:薇晓朵技术论坛。