wpml_translate_single_string

The YITH WooCommerce Compare wpml translate single string hook.

Description

apply_filters( 'wpml_translate_single_string', (unknown) $button_text, (string) $plugins, (string) $plugin_yit_compare_button_text ); 

Parameters (3)

0. $button_text (unknown)
The button text.
1. $plugins (string) => 'Plugins'
The plugins.
2. $plugin_yit_compare_button_text (string) => 'plugin_yit_compare_button_text'
The plugin yit compare button text.

Usage

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

Defined (1)

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

/includes/class.yith-woocompare-frontend.php  
  1. $button_text = apply_filters( 'wpml_translate_single_string', $button_text, 'Plugins', 'plugin_yit_compare_button_text' );