本文整理汇总了PHP中OutputPage::addExtensionStyle方法的典型用法代码示例。如果您正苦于以下问题:PHP OutputPage::addExtensionStyle方法的具体用法?PHP OutputPage::addExtensionStyle怎么用?PHP OutputPage::addExtensionStyle使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OutputPage
的用法示例。
在下文中一共展示了OutputPage::addExtensionStyle方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: wfCOBeforePageDisplay
function wfCOBeforePageDisplay(OutputPage &$out, &$sk)
{
global $wgExtensionsPath;
if (wfCOCheck()) {
$out->addExtensionStyle("{$wgExtensionsPath}/wikia/CommentsOnly/CommentsOnly.css");
}
return true;
}
示例2: AjaxLoginJS
/**
* Adds required JavaScript & CSS files to the HTML output of a page if AjaxLogin is enabled
*
* @param $out OutputPage object
* @return true
*/
function AjaxLoginJS(OutputPage $out)
{
global $wgEnableAjaxLogin, $wgScriptPath;
# Don't load anything if AjaxLogin isn't enabled or if we're on login page
if (!isset($wgEnableAjaxLogin) || $out->getTitle()->isSpecial('Userlogin')) {
return true;
}
// Our custom CSS
$out->addExtensionStyle($wgScriptPath . '/extensions/AjaxLogin/AjaxLogin.css');
// jQuery and JQModal scripts
$out->includeJQuery();
$out->addScriptFile($wgScriptPath . '/extensions/AjaxLogin/jqModal.js');
$out->addScriptFile($wgScriptPath . '/extensions/AjaxLogin/AjaxLogin.js');
return true;
}
示例3: ArticleCommentAddJS
/**
* @static
* @param OutputPage $out
* @param Skin $sk
* @return bool
*/
public static function ArticleCommentAddJS(&$out, &$sk)
{
global $wgExtensionsPath;
wfProfileIn(__METHOD__);
if (self::ArticleCommentCheck()) {
//FB#21244 this should run only for MonoBook, Oasis and WikiaMobile have their own SASS-based styling
if ($sk instanceof SkinMonoBook) {
$out->addExtensionStyle("{$wgExtensionsPath}/wikia/ArticleComments/css/ArticleComments.css");
}
}
wfProfileOut(__METHOD__);
return true;
}
示例4: wfWikiAnswersAddStyle
/**
* @param OutputPage $out
* @param $skin
* @return bool
*/
function wfWikiAnswersAddStyle(&$out, &$skin)
{
global $wgExtensionsPath;
$out->addExtensionStyle("{$wgExtensionsPath}/wikia/WikiAnswers/WikiAnswers.css");
return true;
}