你可以用gettext
按以下方式过滤。
function rename_header_to_logo( $translated, $original, $domain ) {
$strings = array(
\'Header\' => \'Logo\',
\'Custom Header\' => \'Custom Logo\',
\'You can upload a custom header image to be shown at the top of your site instead of the default one. On the next screen you will be able to crop the image.\' => \'You can upload a custom logo to be shown at the top of your site instead of the default one. On the next screen you will be able to crop the image.\'
);
if ( isset( $strings[$original] ) && is_admin() ) {
$translations = &get_translations_for_domain( $domain );
$translated = $translations->translate( $strings[$original] );
}
return $translated;
}
add_filter( \'gettext\', \'rename_header_to_logo\', 10, 3 );
您可能需要检查文本是否与其他地方的另一个“标题”文本冲突。