icl_t

The Polylang icl t function.

Description

icl_t( $context, (string) $name, (constant) $string = false, (constant) &$has_translation = null, (constant) $bool = false, (null) $lang = null ); 

Parameters (6)

0. $context
The context.
1. $name (string)
The name.
2. $string — Optional. (constant) => false
The string.
3. $has_translation — Optional. (constant) => &$has_translation = null
The has translation.
4. $bool — Optional. (constant) => false
The bool.
5. $lang — Optional. (null) => null
The lang.

Usage

  1. if ( !function_exists( 'icl_t' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'polylang/modules/wpml/wpml-legacy-api.php'; 
  3.  
  4. // The context. 
  5. $context = null; 
  6.  
  7. // The name. 
  8. $name = ''; 
  9.  
  10. // The string. 
  11. $string = false; 
  12.  
  13. // The has translation. 
  14. $has_translation = &$has_translation = null; 
  15.  
  16. // The bool. 
  17. $bool = false; 
  18.  
  19. // The lang. 
  20. $lang = null; 
  21.  
  22. // NOTICE! Understand what this does before running. 
  23. $result = icl_t($context, $name, $string, $has_translation, $bool, $lang); 
  24.  

Defined (1)

The function is defined in the following location(s).

/modules/wpml/wpml-legacy-api.php  
  1. function icl_t( $context, $name, $string = false, &$has_translation = null, $bool = false, $lang = null ) { 
  2. return icl_translate( $context, $name, $string, false, $has_translation, $lang );