当前位置: 首页>>代码示例>>PHP>>正文


PHP Wikia::getFaviconFullUrl方法代码示例

本文整理汇总了PHP中Wikia::getFaviconFullUrl方法的典型用法代码示例。如果您正苦于以下问题:PHP Wikia::getFaviconFullUrl方法的具体用法?PHP Wikia::getFaviconFullUrl怎么用?PHP Wikia::getFaviconFullUrl使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Wikia的用法示例。


在下文中一共展示了Wikia::getFaviconFullUrl方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getHeadLinks

 /**
  * @param $unused Unused
  * @param $addContentType bool
  *
  * @return string HTML tag links to be put in the header.
  */
 public function getHeadLinks($unused = null, $addContentType = false)
 {
     global $wgUniversalEditButton, $wgFavicon, $wgAppleTouchIcon, $wgEnableAPI, $wgSitename, $wgVersion, $wgHtml5, $wgMimeType, $wgFeed, $wgOverrideSiteFeed, $wgAdvertisedFeedTypes, $wgDisableLangConversion, $wgCanonicalLanguageLinks, $wgRightsPage, $wgRightsUrl, $wgDevelEnvironment, $wgStagingEnvironment;
     $tags = array();
     if ($addContentType) {
         if ($wgHtml5) {
             # More succinct than <meta http-equiv=Content-Type>, has the
             # same effect
             $tags[] = Html::element('meta', array('charset' => 'UTF-8'));
         } else {
             $tags[] = Html::element('meta', array('http-equiv' => 'Content-Type', 'content' => "{$wgMimeType}; charset=UTF-8"));
             $tags[] = Html::element('meta', array('http-equiv' => 'Content-Style-Type', 'content' => 'text/css'));
         }
     }
     $tags[] = Html::element('meta', array('name' => 'generator', 'content' => "MediaWiki {$wgVersion}"));
     $p = "{$this->mIndexPolicy},{$this->mFollowPolicy}";
     // Wikia change - begin
     if (!empty($wgDevelEnvironment) || !empty($wgStagingEnvironment)) {
         $p = "noindex,nofollow";
     }
     // Wikia change - end
     if ($p !== 'index,follow') {
         // http://www.robotstxt.org/wc/meta-user.html
         // Only show if it's different from the default robots policy
         $tags[] = Html::element('meta', array('name' => 'robots', 'content' => $p));
     }
     if (count($this->mKeywords) > 0) {
         $strip = array("/<.*?" . ">/" => '', "/_/" => ' ');
         $tags[] = Html::element('meta', array('name' => 'keywords', 'content' => preg_replace(array_keys($strip), array_values($strip), implode(',', $this->mKeywords))));
     }
     foreach ($this->mMetatags as $tag) {
         if (0 == strcasecmp('http:', substr($tag[0], 0, 5))) {
             $a = 'http-equiv';
             $tag[0] = substr($tag[0], 5);
         } elseif (0 == strcasecmp('property:', substr($tag[0], 0, 9))) {
             $a = 'property';
             $tag[0] = substr($tag[0], 9);
         } else {
             $a = 'name';
         }
         $tags[] = Html::element('meta', array($a => $tag[0], 'content' => $tag[1]));
     }
     foreach ($this->mLinktags as $tag) {
         $tags[] = Html::element('link', $tag);
     }
     # Universal edit button
     if ($wgUniversalEditButton && $this->isArticleRelated()) {
         $user = $this->getUser();
         if ($this->getTitle()->quickUserCan('edit', $user) && ($this->getTitle()->exists() || $this->getTitle()->quickUserCan('create', $user))) {
             // Original UniversalEditButton
             $msg = $this->msg('edit')->text();
             $tags[] = Html::element('link', array('rel' => 'alternate', 'type' => 'application/x-wiki', 'title' => $msg, 'href' => $this->getTitle()->getLocalURL('action=edit')));
             // Alternate edit link
             $tags[] = Html::element('link', array('rel' => 'edit', 'title' => $msg, 'href' => $this->getTitle()->getLocalURL('action=edit')));
         }
     }
     # Generally the order of the favicon and apple-touch-icon links
     # should not matter, but Konqueror (3.5.9 at least) incorrectly
     # uses whichever one appears later in the HTML source. Make sure
     # apple-touch-icon is specified first to avoid this.
     if ($wgAppleTouchIcon !== false) {
         // Wikia change begin - @author: macbre
         $appleTouchIcon = wfReplaceImageServer($wgAppleTouchIcon, SassUtil::getCacheBuster());
         // Wikia change end
         $tags[] = Html::element('link', array('rel' => 'apple-touch-icon', 'href' => $appleTouchIcon));
     }
     $tags[] = Html::element('link', array('rel' => 'shortcut icon', 'href' => Wikia::getFaviconFullUrl()));
     # OpenSearch description link
     $tags[] = Html::element('link', array('rel' => 'search', 'type' => 'application/opensearchdescription+xml', 'href' => wfScript('opensearch_desc'), 'title' => $this->msg('opensearch-desc')->inContentLanguage()->text()));
     if ($wgEnableAPI) {
         # Real Simple Discovery link, provides auto-discovery information
         # for the MediaWiki API (and potentially additional custom API
         # support such as WordPress or Twitter-compatible APIs for a
         # blogging extension, etc)
         $tags[] = Html::element('link', array('rel' => 'EditURI', 'type' => 'application/rsd+xml', 'href' => wfExpandUrl(wfAppendQuery(wfScript('api'), array('action' => 'rsd')), PROTO_RELATIVE)));
     }
     # Language variants
     if (!$wgDisableLangConversion && $wgCanonicalLanguageLinks) {
         $lang = $this->getTitle()->getPageLanguage();
         if ($lang->hasVariants()) {
             $urlvar = $lang->getURLVariant();
             if (!$urlvar) {
                 $variants = $lang->getVariants();
                 foreach ($variants as $_v) {
                     $tags[] = Html::element('link', array('rel' => 'alternate', 'hreflang' => $_v, 'href' => $this->getTitle()->getLocalURL(array('variant' => $_v))));
                 }
             } else {
                 $tags[] = Html::element('link', array('rel' => 'canonical', 'href' => $this->getTitle()->getCanonicalUrl()));
             }
         }
     }
     # Copyright
     $copyright = '';
     if ($wgRightsPage) {
//.........这里部分代码省略.........
开发者ID:Tjorriemorrie,项目名称:app,代码行数:101,代码来源:OutputPage.php

示例2: executeWordmarkTab

 public function executeWordmarkTab()
 {
     $this->faviconUrl = Wikia::getFaviconFullUrl();
 }
开发者ID:Tjorriemorrie,项目名称:app,代码行数:4,代码来源:ThemeDesignerController.class.php


注:本文中的Wikia::getFaviconFullUrl方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。