WP Content Filter: Possible to replace text with nothing?
-
Hello dgwyer,
I had made some changes in the plugin’s code so that I could replace text with nothing rather than replacing it with other text characters. The recent upgrade overwrote my changes, but I believe that I can restore them easily enough.
I’m wondering: Would it be possible for you to add an option to the plugin to replace text with nothing in addition to the other options? If you need the changes I made to the old code, here it is.
if($wildcard_char == ‘star’){
$wildcard = ‘*’;
} else if($wildcard_char == ‘strn’) {
$wildcard = ‘$’;
} else if($wildcard_char == ‘quest’) {
$wildcard = ‘?’;
} else if($wildcard_char == ‘excl’) {
$wildcard = ‘!’;
} else if($wildcard_char == ‘dash’) {
$wildcard = ‘-‘;
} else if($wildcard_char == ‘hash’) {
$wildcard = ‘#’;
} else if($wildcard_char == ’tilde’) {
$wildcard = ‘~’;
} else {
$wildcard = ”;
}The only problem with the addition is that if you visit the plugin’s options page, you have to re-set the option for no replacement.
- The topic ‘WP Content Filter: Possible to replace text with nothing?’ is closed to new replies.