请将以下代码添加到functions.php 要删除← 从翻译的字符串:
/**
* Remove ← from the \'← Back to %s\' translation
*/
add_action( \'login_init\', function()
{
add_filter( \'gettext\', \'wpse_back_to_site_text\', 10, 2 );
} );
function wpse_back_to_site_text( $translated, $untranslated )
{
// Target the untranslated string
if( \'← Back to %s\' === $untranslated )
{
// Remove the filter callback
remove_filter( current_filter(), __FUNCTION__ );
// Modify the translation
$translated = __( \'Back to %s\' );
}
return $translated;
}
我们在哪里开始我们的习惯
gettext 筛选器回调,仅在
login_init 钩子,将其限制为登录页面。
详情请参见source 和details