/** * Fetches and returns the associative array containing the output of product links. * * If the first parameter is not given, * it will determine the RSS urls by the post IDs from the given arguments set in the constructor. * * @return array The array contains product information. */ public function fetch($aRSSURLs = array()) { $aRSSURLs = $this->formatRSSURLs(empty($aRSSURLs) ? $this->_aRSSURLs : $aRSSURLs); if (empty($aRSSURLs)) { return array(); } $_aExcludingRSSURLs = $this->formatRSSURLs($this->_aExcludingRSSURLs); $_oRSS = new AmazonAutoLinks_RSSClient($aRSSURLs, (int) $this->oUnitOption->get('cache_duration')); $this->_setBlackASINs($_oRSS->get()); $_oRSS = new AmazonAutoLinks_RSSClient($aRSSURLs, (int) $this->oUnitOption->get('cache_duration')); $_oRSS->sSortOrder = $this->_getSortOrder(); return $this->getProducts($_oRSS->get()); }
/** * * @callback do_{page_slug}_{tab slug} */ public function replyToDoTab($oFactory) { $_oRSS = new AmazonAutoLinks_RSSClient('http://feeds.feedburner.com/AmazonAutoLinksTemplates'); echo "<h3>" . __('Templates', 'amazon-auto-links') . "</h3>"; echo "<p>" . sprintf(__('Want your template to be listed here? Send the file to %1$s.', 'amazon-auto-links'), '*****@*****.**') . "</p>"; $_aItems = $_oRSS->get(); if (empty($_aItems)) { echo "<p>" . __('No extension has been found.', 'amazon-auto-links') . "</p>"; return; } // Format the description element. foreach ($_aItems as &$_aItem) { $_aItem = array('description' => $this->_getFormattedDescription($_aItem)) + $_aItem; } // Get the column output. $_oColumn = new AmazonAutoLinks_Column($_aItems, 3, 'amazon_auto_links_'); echo $_oColumn->get(); }