From f536c6eb2970ae82c2ae9546e78f7c6a4622056b Mon Sep 17 00:00:00 2001 From: John Bintz Date: Tue, 3 Nov 2009 22:49:11 -0500 Subject: [PATCH] remove search transcripts, use wdts --- .../SearchTranscripts/SearchTranscripts.inc | 68 ------------------- 1 file changed, 68 deletions(-) delete mode 100644 addons/SearchTranscripts/SearchTranscripts.inc diff --git a/addons/SearchTranscripts/SearchTranscripts.inc b/addons/SearchTranscripts/SearchTranscripts.inc deleted file mode 100644 index c91b42f..0000000 --- a/addons/SearchTranscripts/SearchTranscripts.inc +++ /dev/null @@ -1,68 +0,0 @@ - __("Search all of your comic posts' transcripts", 'comicpress'))); - - $this->comicpress = $comicpress; - } - - function search_custom_join($join) { - global $wpdb; - if (is_search() && $this->is_search_key()) { - $join = " LEFT JOIN $wpdb->postmeta ON $wpdb->posts.ID = $wpdb->postmeta.post_id "; - } - return $join; - } - - function search_custom_where($where) { - global $wp_query, $wp_version, $wpdb; - if (!empty($wp_query->query_vars['s']) && $this->is_search_key()) { - $search = $wp_query->query_vars['s']; - $key = $_GET['key']; - $status = ($wp_version >= 2.1) ? 'post_type = \'post\' AND post_status = \'publish\'' : 'post_status = \'publish\''; - $where = " AND $wpdb->postmeta.meta_key = '$key' AND $wpdb->postmeta.meta_value LIKE '%$search%' AND $status "; - } - return $where; - } - - function search_custom_template($template) { - if (is_search() && $this->is_search_key() && file_exists(get_template_directory() . '/' . $this->custom_template_default)) { - $template = get_template_directory() . '/' . $this->custom_template_default; - } - - if (!$template) { - $template = get_query_template('search'); - } - - return $template; - } - - function is_search_key($key='') { - if (isset($_GET['key'])) { - if (!empty($_GET['key']) || (!empty($key) && ($key = $_GET['key']))) { - return true; - } - } - return false; - } - - function render_widget() { - echo '
  • '; - include(get_template_directory() . '/searchform-transcript.php'); - echo '
  • '; - } -} - -?> \ No newline at end of file