WPML
add_action( 'wpml_st_loaded', callable $function_to_add );
Tipo
action
Categoria
Varie
Versione di WPML
3.2.1

Descrizione

  • Per assicurarti che un codice dipendente da WPML Traduzione stringhe venga eseguito al momento giusto, questo codice dovrebbe essere agganciato all’azione wpml_st_loaded. Questa azione viene richiamata dopo che WPML Traduzione stringhe è stato completamente configurato e caricato.
  • Se non ci agganciamo a questo wpml_st_loaded, a volte il codice dipendente da WPML Traduzione stringhe potrebbe essere richiamato troppo presto. Quindi, anche se WPML Traduzione stringhe è attivo e configurato, potremmo non ottenere i risultati previsti.
  • wpml_st_loaded viene eseguito durante le azioni plugins_loaded e wpml_loaded.
  • Esiste un hook simile per WPML Gestione traduzioni wpml_tm_loaded.

Argomenti

$function_to_add
(callable) (Obbligatorio) La tua callback da eseguire quando viene applicato il filtro.

Esempio di utilizzo

Esempio
function my_plugin_wpml_st_code() {
  // Run WPML String Translation dependent actions
  // These actions will be executed right after WPML String Translation is fully configured and loaded.
}

add_action( 'wpml_st_loaded', 'my_plugin_wpml_st_code' );

icl_ls_languages, wpml_sync_custom_field_copied_value, wpml_ls_enable_ajax_navigation, wpml_element_type, wpml_setting, wpml_sub_setting, wpml_exclude_post_from_auto_translate, wpml_forms_config_ninja-forms, wpml_forms_config_wpforms, wpml_tf_feedback_open_link

Tutti i 30 hook della categoria Varie →