diff options
author | Guy Brand <gb@unistra.fr> | 2014-05-05 22:51:26 +0200 |
---|---|---|
committer | Guy Brand <gb@unistra.fr> | 2014-05-05 22:51:26 +0200 |
commit | 43a2e077a27740ebb0f0bc49e4a3d288c8811d78 (patch) | |
tree | e22f94855951702e622d4c40ac44f3031b3d5819 /inc/plugin.php | |
parent | c6af9e94ed5d7f7713359faac18543db9a9aee48 (diff) | |
parent | 75930869ddcb31470ea7617eddfb882de02645df (diff) | |
download | rpg-43a2e077a27740ebb0f0bc49e4a3d288c8811d78.tar.gz rpg-43a2e077a27740ebb0f0bc49e4a3d288c8811d78.tar.bz2 |
Merge branch 'master' into stable
Diffstat (limited to 'inc/plugin.php')
-rw-r--r-- | inc/plugin.php | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/inc/plugin.php b/inc/plugin.php index dccd37bd9..7de4fbd74 100644 --- a/inc/plugin.php +++ b/inc/plugin.php @@ -239,10 +239,35 @@ class DokuWiki_Plugin { } /** + * A fallback to provide access to the old render() method + * + * Since syntax plugins provide their own render method with a different signature and they now + * inherit from Doku_Plugin we can no longer have a render() method here (Strict Standards Violation). + * Instead use render_text() + * + * @deprecated 2014-01-22 + * @param $name + * @param $arguments + * @return null|string + */ + function __call($name, $arguments) { + if($name == 'render'){ + if(!isset($arguments[1])) $arguments[1] = 'xhtml'; + return $this->render_text($arguments[0], $arguments[1]); + } + trigger_error("no such method $name", E_USER_ERROR); + return null; + } + + /** * output text string through the parser, allows dokuwiki markup to be used * very ineffecient for small pieces of data - try not to use + * + * @param string $text wiki markup to parse + * @param string $format output format + * @return null|string */ - function render($text, $format='xhtml') { + function render_text($text, $format='xhtml') { return p_render($format, p_get_instructions($text),$info); } |