滤器gettext_with_context
并在此处更改名称:
<?php # -*- coding: utf-8 -*-
/* Plugin Name: Rename \'Text\' editor to \'HTML\' */
add_filter( \'gettext_with_context\', \'change_editor_name_to_html\', 10, 4 );
function change_editor_name_to_html( $translated, $text, $context, $domain )
{
if ( \'default\' !== $domain )
return $translated;
if ( \'Text\' !== $text )
return $translated;
if ( \'Name for the Text editor tab (formerly HTML)\' !== $context )
return $translated;
return \'HTML\';
}
结果