public function print_column_headers($with_id = true) { if ($this->display_col_headers) { parent::print_column_headers($with_id); } }
/** * Form is POST not GET. Override parent method to compensate. * * @param bool $with_id */ function print_column_headers($with_id = true) { if (empty($_GET['s']) && !empty($_POST['s'])) { $_SERVER['REQUEST_URI'] = esc_url(add_query_arg('s', $_POST['s'])); } if (empty($_GET['orderby']) && !empty($_POST['orderby'])) { $_GET['orderby'] = $_POST['orderby']; } if (empty($_GET['order']) && !empty($_POST['order'])) { $_GET['order'] = $_POST['order']; } parent::print_column_headers($with_id); }
/** * Print column headers, adding view, search and filter arguments * * @since 1.42 * * @param bool $with_id Whether to set the id attribute or not */ function print_column_headers($with_id = true) { $save_uri = $_SERVER['REQUEST_URI']; $_SERVER['REQUEST_URI'] = add_query_arg(self::mla_submenu_arguments(), $save_uri); parent::print_column_headers($with_id); $_SERVER['REQUEST_URI'] = $save_uri; }
function print_column_headers($with_id = true) { if ($with_id) { parent::print_column_headers($with_id); } }
/** * Prints column headers. * * @since 141111 First documented version. * * @param bool $with_id Add an `id=""` attribute? */ public function print_column_headers($with_id = true) { // @codingStandardsIgnoreEnd ob_start(); // Open an output buffer. parent::print_column_headers($with_id); $column_headers = ob_get_clean(); $regex = '/\\b(href\\s*\\=\\s*)(["\'])(.+?)(\\2)/i'; if ($raw_search_query = $this->getRawSearchQuery()) { $column_headers = preg_replace_callback($regex, function ($m) use($raw_search_query) { $m[3] = wp_specialchars_decode($m[3], ENT_QUOTES); $m[3] = add_query_arg('s', urlencode($raw_search_query), $m[3]); return $m[1] . $m[2] . esc_attr($m[3]) . $m[4]; # }, $column_headers); } echo $column_headers; // Display. }
/** * Form is POST not GET. Override parent method to compensate. * * @param bool $with_id */ function print_column_headers($with_id = true) { if (isset($_POST['pb_catalog_search'])) { if (!wp_verify_nonce(esc_attr($_POST['pb_catalog_search']), 'pb_catalog_search')) { die('Security check.'); } } if (empty($_GET['s']) && !empty($_POST['s'])) { $_SERVER['REQUEST_URI'] = esc_url(add_query_arg('s', $_POST['s'])); } if (empty($_GET['orderby']) && !empty($_POST['orderby'])) { $_GET['orderby'] = $_POST['orderby']; } if (empty($_GET['order']) && !empty($_POST['order'])) { $_GET['order'] = $_POST['order']; } parent::print_column_headers($with_id); }