function test_version() { $this->assertEquals('1.4.1', c2c_DisableSearch::version()); }
* @param string $form The search form to be displayed. * @return string Always returns an empty string. */ public static function get_search_form($form) { return ''; } /** * Unsets all search-related variables in WP_Query object and sets the * request as a 404 if a search was attempted. * * @param object $obj A WP_Query object. * @return null */ public static function parse_query($obj) { if ($obj->is_search && $obj->is_main_query()) { unset($_GET['s']); unset($_POST['s']); unset($_REQUEST['s']); unset($obj->query['s']); $obj->set('s', ''); $obj->is_search = false; $obj->set_404(); } } } // end c2c_DisableSearch c2c_DisableSearch::init(); } // end if !class_exists()