add_filter gettext is irreversible
-
I have run a code like this:
add_filter('gettext', 'my_test_123', 20, 3); function my_test_123($translated_text, $text, $domain){ if ( $domain == 'domain' ) { if($text == 'from text') { $translated_text = 'to text'; } } return $translated_text; }
It seems there is no way around to get rid of the previous code, it inserts one or more rows into
wp_trp_gettext_en_us
table. I can remove them using$wpdb
to fix the issue but I can’t find a hook to remove the work of the previous filter.
Am I missing something?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘add_filter gettext is irreversible’ is closed to new replies.