Hooks

From Tweeki
Revision as of 08:08, 5 April 2016 by Thai (talk | contribs)
Jump to: navigation, search

SkinTweekiStyleModules

works similar to SkinVectorStyleModules

public static function onSkinTweekiStyleModules( $skinTweeki, &$styles ) { ... }
$wgHooks['SkinTweekiStyleModules'][] = 'MyExtensionHooks::onSkinTweekiStyleModules';

SkinTweekiAdditionalBodyClasses

Use this hook in order to add dynamic custom classes to the <body> tag.

public static function onSkinTweekiAdditionalBodyClasses( $skinTweeki, &$additionalBodyClasses ) { 
  $newClass = 'rand' . rand(0,1);
  $additionalBodyClasses[] = $newClass;
  return true;
}
$wgHooks['SkinTweekiAdditionalBodyClasses'][] = 'MyExtensionHooks::onSkinTweekiAdditionalBodyClasses';