| | 513 | function search_box( $text, $input_id ) { |
| | 514 | if ( empty( $_REQUEST['s'] ) && !$this->has_items() ) |
| | 515 | return; |
| | 516 | |
| | 517 | $input_id = $input_id . '-search-input'; |
| | 518 | |
| | 519 | if ( ! empty( $_REQUEST['orderby'] ) ) |
| | 520 | echo '<input type="hidden" name="orderby" value="' . esc_attr( $_REQUEST['orderby'] ) . '" />'; |
| | 521 | if ( ! empty( $_REQUEST['order'] ) ) |
| | 522 | echo '<input type="hidden" name="order" value="' . esc_attr( $_REQUEST['order'] ) . '" />'; |
| | 523 | ?> |
| | 524 | <p class="search-box"> |
| | 525 | <label class="screen-reader-text" for="<?php echo $input_id ?>"><?php echo $text; ?>:</label> |
| | 526 | <input type="search" id="<?php echo $input_id ?>" name="s" value="<?php _admin_search_query(); ?>" /> |
| | 527 | <label for="<?php echo $input_id ?>_field"><strong>Field</strong></label> |
| | 528 | <select name="s_field" id="<?php echo $input_id ?>_field" value=""> |
| | 529 | <option value="">All</option> |
| | 530 | <option value="comment_author"<?php print (isset($_REQUEST['s_field']) && $_REQUEST['s_field'] == 'comment_author') ? ' selected="selected"' : ''; ?>>User Name</option> |
| | 531 | <option value="comment_author_url"<?php print (isset($_REQUEST['s_field']) && $_REQUEST['s_field'] == 'comment_author_url') ? ' selected="selected"' : ''; ?>>User URL</option> |
| | 532 | <option value="comment_author_IP"<?php print (isset($_REQUEST['s_field']) && $_REQUEST['s_field'] == 'comment_author_IP') ? ' selected="selected"' : ''; ?>>User IP</option> |
| | 533 | <option value="comment_author_email"<?php print (isset($_REQUEST['s_field']) && $_REQUEST['s_field'] == 'comment_author_email') ? ' selected="selected"' : ''; ?>>User E-mail</option> |
| | 534 | <option value="comment_content"<?php print (isset($_REQUEST['s_field']) && $_REQUEST['s_field'] == 'comment_content') ? ' selected="selected"' : ''; ?>>Comment Content</option> |
| | 535 | </select> |
| | 536 | <label for="<?php echo $input_id ?>_status"><strong>Status</strong></label> |
| | 537 | <select name="comment_status" id="<?php echo $input_id ?>_status" value=""> |
| | 538 | <option value="">Any</option> |
| | 539 | <option value="approved"<?php print (isset($_REQUEST['comment_status']) && $_REQUEST['comment_status'] == 'approved') ? ' selected="selected"' : ''; ?>>Approved</option> |
| | 540 | <option value="moderated"<?php print (isset($_REQUEST['comment_status']) && $_REQUEST['comment_status'] == 'moderated') ? ' selected="selected"' : ''; ?>>Pending</option> |
| | 541 | <option value="spam"<?php print (isset($_REQUEST['comment_status']) && $_REQUEST['comment_status'] == 'spam') ? ' selected="selected"' : ''; ?>>Spam</option> |
| | 542 | <option value="trash"<?php print (isset($_REQUEST['comment_status']) && $_REQUEST['comment_status'] == 'trash') ? ' selected="selected"' : ''; ?>>Trash</option> |
| | 543 | </select> |
| | 544 | <label for="<?php echo $input_id ?>_type_exact">Exact</label> <input type="radio" name="s_type" id="<?php echo $input_id ?>_type_exact" value="exact"<?php print (isset($_REQUEST['s_type']) && $_REQUEST['s_type'] == 'exact') ? ' checked="checked"' : ''; ?> /> |
| | 545 | <label for="<?php echo $input_id ?>_type_wildcard">Wildcard</label> <input type="radio" name="s_type" id="<?php echo $input_id ?>_type_wildcard" value="wildcard"<?php print (isset($_REQUEST['s_type']) && $_REQUEST['s_type'] == 'wildcard') ? ' checked="checked"' : ''; ?> /> |
| | 546 | <?php submit_button( $text, 'button', false, false, array('id' => 'search-submit') ); ?> |
| | 547 | </p> |
| | 548 | <?php |
| | 549 | } |
| | 550 | |