I would wish to add a filter to _e()
and __()
functions. The filter is FilterTextOfEmail(). This will basically detect any emails and add anti-spam method to it.
I assume, the function for filtering should look like:
function my_wp_text_email_filtering ($content) {
return FilterTextOfEmail($content)
}
But how to call it?
The filter name is
gettext
, and you would add it like this:The $text argument is there also in case you want to access the pre-translated text.
You have to filter
'gettext'
. See this answer for an example.Always check the textdomain parameter to avoid conflicts with plugins and themes.