asp_icl_t

Fires before the translation for front-end components

Every text appearing on the front-end of the search is going through this hook - including the placeholder text, filter labels etc..

Syntax

apply_filters('asp_icl_t', $value, $name, $esc_html);

Parameters

  • $value (string) - The field value

  • $name (string) - The field name

  • $esc_html (bool) - If the field is to be used as an attribute later.

Usage

add_filter('asp_icl_t', 'asp_icl_t_my_filter', 10, 3);
function asp_icl_t_my_filter($value, $name, $esc_html) {
  $ret = $value;
  if ($value== 'Search here...') {
    $ret = 'My custom text';
  }
  
  return $ret;
}

Last updated

Copyright Ernest Marcinko