我使用的是WordPress的德语版本,在wp\\U编辑器中,“visual”和“html”的两个选项卡分别命名为“visuell”和“text”。
我想将“文本”选项卡更改为“html”。你知道我怎样才能做到吗?
这里有一个屏幕截图,告诉你我说的是哪个选项卡。
我使用的是WordPress的德语版本,在wp\\U编辑器中,“visual”和“html”的两个选项卡分别命名为“visuell”和“text”。
我想将“文本”选项卡更改为“html”。你知道我怎样才能做到吗?
这里有一个屏幕截图,告诉你我说的是哪个选项卡。
滤器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\';
}
我有一个主题,我正在开发一个HTML模板。我还设计了一个选项页面,以及主题本身内置的大量插件。我选择了一个选项卡式界面,并试图学习如何使用WordPress的设置API。我正在为主题的函数使用类结构。以下是注册设置等的声明。public function __admin_init() { register_setting( \'cncfps_twitter\', \'cncfps_twitter_options\', array( &$this, \'wp_cncfps_t