function __construct()
 {
     parent::__construct();
     if (self::$isWikiaMobile === null) {
         self::$isWikiaMobile = $this->app->checkSkin('wikiamobile');
     }
     if (!self::$isWikiaMobile && empty($this->app->wg->RTEParserEnabled)) {
         self::$enabled = true;
     }
 }
Beispiel #2
0
 public static function isEnabled()
 {
     if (is_null(self::$enabled)) {
         $app = F::app();
         self::$enabled = false;
         if (self::$isWikiaMobile === null) {
             self::$isWikiaMobile = $app->checkSkin('wikiamobile');
         }
         if (!self::$isWikiaMobile && empty($app->wg->RTEParserEnabled)) {
             self::$enabled = true;
         }
     }
     return self::$enabled;
 }
 /**
  * Determines if image should be lazyloaded
  * @param WikiaController $controller
  * @param array $options
  * @return bool
  */
 public static function shouldLazyLoad(WikiaController $controller, array $options)
 {
     return empty($options['noLazyLoad']) && isset($controller->imgSrc) && ImageLazyLoad::isValidLazyLoadedImage($controller->imgSrc);
 }