use strict; use MT::Template::Context; MT::Template::Context->add_global_filter(shrpshr => \&shrpshr); sub shrpshr { my ($string, $args, $ctx) = @_; my $comment = $ctx->stash('comment'); my $ip = $comment->ip; foreach (split(/,/, $args)) { if ($ip eq $_) { $string =~ s/[AEIOUaeiou]//g; } return $string; } }