summaryrefslogtreecommitdiff
path: root/inc/parser/handler.php
diff options
context:
space:
mode:
Diffstat (limited to 'inc/parser/handler.php')
-rw-r--r--inc/parser/handler.php19
1 files changed, 19 insertions, 0 deletions
diff --git a/inc/parser/handler.php b/inc/parser/handler.php
index e1ded183a..2379d60ff 100644
--- a/inc/parser/handler.php
+++ b/inc/parser/handler.php
@@ -54,6 +54,25 @@ class Doku_Handler {
}
return FALSE;
}
+
+
+ /**
+ * Special plugin handler
+ *
+ * This handler is called for all modes starting with 'plugin_'.
+ * An additional parameter with the plugin name is passed
+ *
+ * @author Andreas Gohr <andi@splitbrain.org>
+ */
+ function plugin($match, $state, $pos, $pluginname){
+ $data = array($match);
+ $plugin = null;
+ if(plugin_load('syntax',$pluginname,$plugin)){
+ $data = $plugin->handle($match, $state, $pos, $handler);
+ }
+ $this->_addCall('plugin',array($pluginname,$data,$pos),$pos);
+ return TRUE;
+ }
function base($match, $state, $pos) {
switch ( $state ) {