From 1d2982addcb94dbd10471a995119a5d7fcce9773 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Mon, 19 Sep 2005 13:09:28 +0000 Subject: [PATCH] * Adding a basic extension for testing extensions in the parser tests --- maintenance/parserTestsParserHook.php | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 maintenance/parserTestsParserHook.php diff --git a/maintenance/parserTestsParserHook.php b/maintenance/parserTestsParserHook.php new file mode 100644 index 0000000000..cb15614566 --- /dev/null +++ b/maintenance/parserTestsParserHook.php @@ -0,0 +1,25 @@ + + * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later + */ + +$wgHooks['ParserTestParser'][] = 'wfParserSetup'; + +function wfParserSetup( &$parser ) { + $parser->setHook( 'tag', 'wfParserHook' ); +} + +function wfParserHook( $in, $argv ) { + if ( count( $argv ) ) + return "
\n" . print_r( $argv, true ) . '
'; + else + return $in; +} -- 2.20.1