/** * * @since 3.1.0 */ public function replyToLoadRSS2Feed() { $_aArguments = $_GET; $_aArguments['template_path'] = AmazonAutoLinks_Registry::$sDirPath . '/template/rss2/template.php'; $_aArguments['credit_link'] = false; header('Content-Type: ' . feed_content_type('rss-http') . '; charset=' . get_option('blog_charset'), true); AmazonAutoLinks($_aArguments, true); exit; }
/** * Returns the output of the widget. * @return string */ private function _getOutput($aFormData, $aArguments) { $_oContextualSearch = new AmazonAutoLinks_ContextualProductWidget_SearchKeyword($aFormData['criteria'], $aFormData['additional_keywords']); $_aSearchKeywords = $_oContextualSearch->get(); // get as an array if (empty($_aSearchKeywords)) { return ''; } shuffle($_aSearchKeywords); array_splice($_aSearchKeywords, 5); // up to 5 keywords. return AmazonAutoLinks(array('Keywords' => implode(',', $_aSearchKeywords), 'Operation' => 'ItemSearch', 'search_per_keyword' => true) + $aFormData, false); }
/** * Print out the contents in the front-end. * * Alternatively you may use the content_{instantiated class name} method. */ public function content($sContent, $aArguments, $aFormData) { $aFormData = $this->_getFormattedFormData($aFormData); if (!in_array(AmazonAutoLinks_PluginUtility::getCurrentPageType(), $aFormData['available_page_types'])) { $this->oProp->bShowWidgetTitle = false; return $sContent; } return $sContent . AmazonAutoLinks($aFormData, false); }
protected function echoContents($arrInstance) { AmazonAutoLinks($arrInstance); // var_dump( $arrInstance ); }
/** * Returns the output based on the shortcode arguments. * * @since 2.0.0 * @since 2.1.1 Change the name from `getOutput()`. */ public function _replyToGetOutput($aArguments) { return AmazonAutoLinks($aArguments, false); }