function __construct($name = 'Custom', $params = array()) { $this->loadTranslations(); parent::__construct(sprintf(__('%1$s Search', 'wp-custom-fields-search'), $name), $params); add_filter('posts_join', array(&$this, 'join_meta')); add_filter('posts_where', array(&$this, 'sql_restrict')); add_filter('posts_groupby', array(&$this, 'sql_group')); add_filter('home_template', array(&$this, 'rewriteHome')); add_filter('page_template', array(&$this, 'rewriteHome')); add_filter('get_search_query', array(&$this, 'getSearchDescription')); add_action('wp_head', array(&$this, 'outputStylesheets'), 1); }
function __construct($name = 'Custom', $params = array()) { $this->loadTranslations(); parent::__construct(sprintf(__('%1$s Search', 'wp-custom-fields-search'), $name), $params); add_filter('posts_join', array(&$this, 'join_meta')); add_filter('posts_where', array(&$this, 'sql_restrict')); add_filter('posts_groupby', array(&$this, 'sql_group')); add_filter('posts_orderby', array(&$this, 'sql_order')); add_filter('home_template', array(&$this, 'rewriteHome')); add_filter('page_template', array(&$this, 'rewriteHome')); add_filter('get_search_query', array(&$this, 'getSearchDescription')); add_action('wp_head', array(&$this, 'outputStylesheets'), 1); add_action('pre_get_posts', array(&$this, 'setSearchVar')); /** These are for relevanssi compatibility */ add_filter('posts_request', array(&$this, 'store_search'), 9); add_filter('posts_request', array(&$this, 'restore_search'), 11); add_filter('the_posts', array(&$this, 'store_search'), 9); add_filter('the_posts', array(&$this, 'restore_search'), 11); }