/** * Loads the file of active template of the given file name. * * @since 2.3.9 * @param string $sFileName The file base name with file extension to load. * @param string $sMethod The method to load. Either 'include' or 'enqueue_style' is accepted. Use 'enqueue_style' for styles. */ private function _loadFileOfActiveTemplatesByFileName($sFileName = 'functions.php', $sMethod = 'include') { $_oOption = FetchTweets_Option::getInstance(); foreach ($_oOption->getActiveTemplates() as $_aTemplate) { $_oTemplate = new FetchTweets_Template($_aTemplate['sSlug']); $_sFilePath = $_oTemplate->getPathByFileName($sFileName); if (!$_sFilePath) { continue; } if (in_array($_sFilePath, self::$_aLoaded)) { continue; } self::$_aLoaded[$_sFilePath] = $_sFilePath; switch ($sMethod) { default: case 'include': include $_sFilePath; break; case 'enqueue_style': wp_register_style("fetch-tweets-" . md5($_aTemplate['sDirPath']), FetchTweets_WPUtilities::getSRCFromPath($_sFilePath)); wp_enqueue_style("fetch-tweets-" . md5($_aTemplate['sDirPath'])); break; } } }
/** * Returns the thumbnail url. * @since 2.3.9 */ public function getThumbnailURL() { return FetchTweets_WPUtilities::getSRCFromPath($this->getThumbnailPath()); }