wpml_st_force_translate_admin_options
- 类型
- action
- 类别
- 更新内容
- WPML 版本
- 3.2.2
说明
WPML 允许您翻译 wp_options 表中的条目。我们将这些称为管理后台文本。
为了避免混淆,当用户在仪表盘中编辑这些设置时,这些选项在管理后台中不会被翻译。
但有时即使在管理后台中,我们也需要翻译它们。例如,从仪表盘发送电子邮件时。
参数
唯一必填的参数是一个字符串数组,其中每个字符串都是一个管理后台文本的名称。
使用示例
Translating the header and footer of an email sent from the WordPress admin
if ( $sending ) {
do_action( 'wpml_st_force_translate_admin_options', array( 'email_header', 'email_footer' ) );
}相关钩子
wpml_apply_save_attachment_actions, wpml_set_translation_mode_for_post_type