public function search_box($text, $input_id) { if (!$this->search_box) { return ''; } parent::search_box($text, $input_id); }
/** * Render the view. */ public function render() { ?> <form method="GET"> <input type="hidden" name="page" value="<?php echo esc_attr($_GET['page']); ?> "> <?php if (isset($_GET['status'])) { ?> <input type="hidden" name="status" value="<?php echo esc_attr($_GET['status']); ?> "> <?php } ?> <?php $this->table->views(); ?> <?php $this->table->search_box(__("Search", Plugin::SLUG), 'itelic-search'); ?> <?php $this->table->display(); ?> </form> <?php }
/** * Displays the search box if it was enabled in table arguments. * * @since 4.0.0 * * @access public * @param string $text The search button text. * @param string $input_id The search input id. */ public function search_box($text, $input_id) { if (isset($this->_args['search_box']) && $this->_args['search_box']) { parent::search_box($text, $input_id); } }
/** * Display search box. * * @since 141111 First documented version. * * @param string $text The search button `value=""`. * This will default to a value of `Search`. * @param string $input_id The search input `id=""` attribute. * This parameter is always forced to an id-compatible value. * This will default to a value of `get_class($this).'::'.__FUNCTION__`. * * @throws \exception If unable to do `name="search-submit"` replacement. */ public function search_box($text = '', $input_id = '') { // @codingStandardsIgnoreEnd if (!$this->getFtSearchableColumns() && !$this->getSearchableColumns() && !$this->getNavigableFilters()) { return; // Not applicable. } $text = (string) $text; $input_id = (string) $input_id; $text = !$text ? __('Search', 'comment-mail') : esc_html($text); $input_id = !$input_id ? get_class($this) . '::' . __FUNCTION__ : $input_id; $input_id = trim(preg_replace('/[^a-z0-9\\-]/i', '-', $input_id), '-'); ob_start(); // Open an output buffer. parent::search_box($text, $input_id); $search_box = ob_get_clean(); $regex = '/\\b(?:name\\s*\\=\\s*(["\']).*?\\1\\s+)?id\\s*\\=\\s*(["\'])search\\-submit\\2/i'; if ($search_box) { // Only if there is a search box; it doesn't always display. if (!($search_box = preg_replace($regex, 'name="search-submit" id="search-submit"', $search_box, 1, $replacements)) || !$replacements) { throw new \exception(__('Unable to set `name="search-submit"` attribute.', 'comment-mail')); } } echo $search_box; // Display. }
/** * Display the search box. * * @param string $text The search button text * @param string $input_id The search input id */ public function search_box($text, $input_id) { if ($this->get_current_view() != 'related') { parent::search_box($text, $input_id); } }
public function search_box($text, $input_id) { return parent::search_box($text, $input_id); // TODO: Change the autogenerated stub }
function search_box($text, $input_id) { $this->search_box_called = true; parent::search_box($text, $input_id); $this->search_box_called = false; }
/** * Display Search box * * @since 1.4 * @returns html Search Form */ function search_box($text, $input_id) { parent::search_box($text, $input_id); }