WPML
SignaturePHP
add_action( 'wpml_st_loaded', callable $function_to_add );

Description

  • To make sure a WPML String Translation dependent code is executed at the right time, this code should be hooked into the wpml_st_loaded action. This action is called after WPML String Translation is fully configured and loaded.
  • If we do not hook into this wpml_st_loaded, sometimes the WPML String Translation dependent code might be called too early. Then even if WPML String Translation is active and configured, we may not get expected results.
  • wpml_st_loaded is executed during the plugins_loaded (opens in a new tab) and wpml_loaded actions.
  • There is a similar hook for WPML Translation Management wpml_tm_loaded.

Arguments

  • $function_to_addcallableRequired

    Your callback to be run when the filter is applied.

Example Usage

PHP
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' );