wpml_st_force_translate_admin_options
- Type
- action
- Category
- Updating Content
- WPML Version
- 3.2.2
Description
WPML allows you to translate entries from the wp_options table. We call these Admin Texts.
To avoid confusion, when the user is editing these settings in the dashboard, these options aren’t translated in admin.
But we sometimes require translating them, even in admin. For example, when sending an email from the dashboard.
Arguments
The only required argument is an array of strings where each string is the name of an admin text.
Example usage
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' ) );
}Related hooks
wpml_apply_save_attachment_actions, wpml_set_translation_mode_for_post_type