function fudd_filter($content) { $content = $content[1]; $patterns = array('%(r|l)%' => 'w', '%qu%' => 'qw', '%th(\\s)%' => 'f$1', '%th%' => 'd', '%n\\.%' => 'n, uh-hah-ha-ha.', '%(R|L)%' => 'W', '%(Qu|QW)%' => 'QW', '%TH(\\s)%' => 'F$1', '%Th%' => 'D', '%N\\.%' => 'N, uh-hah-hah-hah.'); $content = array_apply_regexp($patterns, $content); return $content; }
function FuddFilter($input) { $patterns = array('%(r|l)%' => 'w', '%qu%' => 'qw', '%th(\\s)%' => 'f$1', '%th%' => 'd', '%n\\.%' => 'n, uh-hah-ha-ha.', '%(R|L)%' => 'W', '%(Qu|QW)%' => 'QW', '%TH(\\s)%' => 'F$1', '%Th%' => 'D', '%N\\.%' => 'N, uh-hah-hah-hah.', '%\\[qwote%' => '[quote', '%\\[/qwote]%' => '[/quote]', '%\\[spoiwew%' => '[spoiler', '%\\[/spoiwew]%' => '[/spoiler]'); $foo = array_apply_regexp($patterns, $input); return $foo; }