# Process Tags 1.0 # Tag post-processing plugin for Movable Type # # Copyright 2002 Kalsey Consulting Group # http://kalsey.com/ # Using this software signifies your acceptance of the license # file that accompanies this software. # # Installation and usage instructions can be found at # http://kalsey.com/blog/ use strict; use MT::Template::Context; MT::Template::Context->add_global_filter(process_tags => \&process_tags); sub process_tags { my ($string, $args, $ctx) = @_; my $builder = $ctx->stash('builder'); my $tokens = $ctx->stash('tokens'); my $tok = $builder->compile($ctx, $string); my $out = $builder->build($ctx, $tok); return $ctx->error("Error processing tags with Process Tags plugin: ".$builder->errstr) unless defined $out; $string = $out; }