wpml_element_has_translations

The NextGEN Gallery wpml element has translations hook.

Description

apply_filters( 'wpml_element_has_translations', (string) $var, (unknown) $displayed_gallery_id, (unknown) $displayed_gallery_type ); 

Parameters (3)

0. $var (string) => ''
The var.
1. $displayed_gallery_id (unknown)
The displayed gallery id.
2. $displayed_gallery_type (unknown)
The displayed gallery type.

Usage

To run the hook, copy the example below.
  1. $var = apply_filters( 'wpml_element_has_translations', $var, $displayed_gallery_id, $displayed_gallery_type ); 
  2.  
  3. if ( !empty( $var ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the wpml_element_has_translations callback 
  2. function filter_wpml_element_has_translations( $var, $displayed_gallery_id, $displayed_gallery_type ) { 
  3. // make filter magic happen here... 
  4. return $var
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'wpml_element_has_translations', 'filter_wpml_element_has_translations', 10, 3 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'wpml_element_has_translations', 'filter_wpml_element_has_translations', 10, 3 ); 

Defined (1)

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

/products/photocrati_nextgen/modules/i18n/module.i18n.php  
  1. $is_translated = apply_filters('wpml_element_has_translations', '', $displayed_gallery->ID, $displayed_gallery_type);