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); $this->tags = array(); $this->content_filter($content, FALSE); $this->Settings = $Settings; // Reset settings as content filter will overwrite them } if ((count($this->tags) != 0) && is_array($this->tags)) { $this->tags = array_unique($this->tags); $output = '
'.__('Amazon query failed to return any results - Have you configured the AWS settings?', 'amazon-link').'
'; $output .= ''; $Items=array(); } 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; } if ( is_array($ASINs) && !empty($ASINs)) { $ASINs = array_slice($ASINs,0,$Settings['wishlist_items']); $Settings['live'] = 1; if (!isset($Settings['template'])) $Settings['template'] = $Settings['wishlist_template']; $output .= $this->make_links($ASINs, $Settings['text'], $Settings); $output .= "