Jump to content

User:DJ Jeri/extensions/LinkTag

From mediawiki.org
<?php
$wgExtensionFunctions[] = 'wfLinkTagSetup';
 
function wfLinkTagSetup() {
    global $wgParser;
    $wgParser->setHook( 'link', 'efLinkTagRender' );
}
 
function efLinkTagRender( $input, $argv, &$parser ) {
    $parser->disableCache();    
    $output = "<link rel=\"{$argv['rel']}\" type=\"{$argv['type']}\" title=\"{$argv['title']}\" href=\"{$argv['href']}\" />";
    echo $output;

    return true;
}