User "^demon" posted a comment on MediaWiki.r94480.
Full URL: http://www.mediawiki.org/wiki/Special:Code/MediaWiki/94480#c20770
Commit summary:
Added Parser::recursivePreprocess(); like preprocess() but doesn't call
startParse() so that it can be used inside a parse operation using the same
context without having to mess with other functions
Simple use case (PHP 5.3+) that will work show the expand text passed to a
<preprocess> tag:
$wgHooks['ParserFirstCallInit'][] = function( $parser ) {
$parser->setHook( 'preprocess', function( $text, $attr, $parser, $frame
) {
return $parser->recursivePreprocess( $text, $frame );
} );
return true;
};
Comment:
I <3 5.3 examples.
_______________________________________________
MediaWiki-CodeReview mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-codereview