mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/SyntaxHighlight_GeSHi
synced 2024-11-15 02:24:07 +00:00
show the version information of GeSHi currently using, only show the version when Special:Version is loaded using the SpecialVersionExtensionTypes hook.
Link to r52546, r52550 and r52555 as there have some comments on CodeReview.
This commit is contained in:
parent
bb149b0887
commit
e63f55da7d
|
@ -311,4 +311,14 @@ class SyntaxHighlight_GeSHi {
|
|||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the GeSHI's version information while Special:Version is read
|
||||
*/
|
||||
public static function hSpecialVersion_GeSHi( &$sp, &$extensionTypes ) {
|
||||
global $wgExtensionCredits;
|
||||
require_once( 'geshi/geshi.php' );
|
||||
$wgExtensionCredits['parserhook']['SyntaxHighlight_GeSHi']['version'] = GESHI_VERSION;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -55,6 +55,7 @@ $dir = dirname(__FILE__) . '/';
|
|||
$wgExtensionMessagesFiles['SyntaxHighlight_GeSHi'] = $dir . 'SyntaxHighlight_GeSHi.i18n.php';
|
||||
$wgAutoloadClasses['SyntaxHighlight_GeSHi'] = $dir . 'SyntaxHighlight_GeSHi.class.php';
|
||||
$wgHooks['ShowRawCssJs'][] = 'SyntaxHighlight_GeSHi::viewHook';
|
||||
$wgHooks['SpecialVersionExtensionTypes'][] = 'SyntaxHighlight_GeSHi::hSpecialVersion_GeSHi';
|
||||
if ( defined( 'MW_SUPPORTS_PARSERFIRSTCALLINIT' ) ) {
|
||||
$wgHooks['ParserFirstCallInit'][] = 'efSyntaxHighlight_GeSHiSetup';
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue