'MAG_FULLPAGENAME',
'MAG_FULLPAGENAMEE',
);
+wfRunHooks( 'MagicWordMagicWords', array( &$magicWords ) );
for ( $i = 0; $i < count( $magicWords ); ++$i )
define( $magicWords[$i], $i );
MAG_CURRENTDOW,
MAG_REVISIONID,
);
+wfRunHooks( 'MagicWordwgVariableIDs', array( &$wgVariableIDs ) );
/**
* This class encapsulates "magic words" such as #redirect, __NOTOC__, etc.
case MAG_SCRIPTPATH:
return $wgScriptPath;
default:
- return NULL;
+ $ret = null;
+ if ( wfRunHooks( 'ParserGetVariableValueSwitch', array( &$this, &$varCache, &$index, &$ret ) ) )
+ return $ret;
+ else
+ return null;
}
}
$extensionTypes = array(
'specialpage' => 'Special pages',
'parserhook' => 'Parser hooks',
+ 'variable' => 'Variables',
'other' => 'Other',
);
wfRunHooks( 'SpecialVersionExtensionTypes', array( &$extensionTypes ) );
# Fill a MagicWord object with data from here
function getMagic( &$mw ) {
$raw = $this->getMagicWords();
+
+ wfRunHooks( 'LanguageGetMagic', array( &$raw ) );
+
if( !isset( $raw[$mw->mId] ) ) {
# Fall back to English if local list is incomplete
$raw =& Language::getMagicWords();