getSettings(); // If using local tags then just process the ones on this page otherwise search categories. if (strcasecmp($categories, "local") != 0) { // First process all post content for the selected categories $content = ''; $lastposts = get_posts("numberposts=$last&cat=$categories"); foreach ($lastposts as $id => $post) { $content .= $post->post_content; } $saved_tags = array_unique($this->tags); unset($this->tags); $this->tags = array(); $this->contentFilter($content, FALSE, FALSE); $this->Settings = $Settings; // Reset settings as contentFilter will overwrite them } if ((count($this->tags) != 0) && is_array($this->tags)) { $this->tags = array_unique($this->tags); $output = '
"; print_r($request); echo ""; $pxml = $this->doQuery($request); if ($pxml === False) { $output .= __('Amazon query failed to return any results - Have you configured the AWS settings?', 'amazon-link'); $output .= print_r($request, true); $Items=array(); } else { $Items=$pxml['Cart']['SimilarProducts']['SimilarProduct']; } foreach ($Items as $Item => $Details) $ASINs[] = $Details['ASIN']; } else if (strcasecmp($Settings['wishlist_type'],'random') == 0) { shuffle($this->tags); $ASINs = $this->tags; } else if (strcasecmp($Settings['wishlist_type'],'multi') == 0) { $ASINs = $this->tags; } $ASINs = array_slice($ASINs,0,$Settings['wishlist_items']); if (!isset($Settings['template'])) $this->Settings['template'] = $Settings['wishlist_template']; $output .= $this->make_links($ASINs, $Settings['text']); $output .= "