Commit df6c250d authored by Tobias Haider's avatar Tobias Haider
Browse files

Merge branch 'master' into development

parents 10150663 dfef93a6
......@@ -998,5 +998,13 @@ class TweekiHooks {
}
return true;
}
public static function onOutputPageBodyAttributes( $out, $sk, &$bodyAttrs ) {
if ( isset( $bodyAttrs['class'] ) && strlen( $bodyAttrs['class'] ) > 0 ) {
$bodyAttrs['class'] .= ' ' . implode( ' ', SkinTweeki::$bodyClasses );
} else {
$bodyAttrs['class'] = implode( ' ', SkinTweeki::$bodyClasses );
}
}
}
......@@ -42,7 +42,7 @@ class SkinTweeki extends SkinTemplate {
->makeConfig( 'tweeki' );
}
protected static $bodyClasses = array( 'tweeki-animateLayout' );
public static $bodyClasses = array( 'tweeki-animateLayout' );
/**
......@@ -121,21 +121,7 @@ class SkinTweeki extends SkinTemplate {
Hooks::run( 'SkinTweekiStyleModules', array( $this, &$styles ) );
$out->addModuleStyles( $styles );
}
/**
* Adds classes to the body element.
*
* @param $out OutputPage object
* @param &$bodyAttrs Array of attributes that will be set on the body element
*/
function addToBodyAttributes( $out, &$bodyAttrs ) {
if ( isset( $bodyAttrs['class'] ) && strlen( $bodyAttrs['class'] ) > 0 ) {
$bodyAttrs['class'] .= ' ' . implode( ' ', static::$bodyClasses );
} else {
$bodyAttrs['class'] = implode( ' ', static::$bodyClasses );
}
}
/**
* Override to pass our Config instance to it
* @param string $classname
......
......@@ -38,7 +38,8 @@
"MagicWordMagicWords": "TweekiHooks::onMagicWordMagicWords",
"MagicWordwgVariableIDs": "TweekiHooks::onMagicWordwgVariableIDs",
"InternalParseBeforeLinks": "TweekiHooks::onInternalParseBeforeLinks",
"OutputPageBeforeHTML": "TweekiHooks::onOutputPageBeforeHTML"
"OutputPageBeforeHTML": "TweekiHooks::onOutputPageBeforeHTML",
"OutputPageBodyAttributes": "TweekiHooks::onOutputPageBodyAttributes"
},
"ResourceModules": {
"skins.tweeki.messages": {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment