Making WordPress.org


Ignore:
Timestamp:
11/03/2015 07:18:51 PM (11 years ago)
Author:
kovshenin
Message:

WordCamp.org: Add search functionality to the payments dashboard.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments-network/includes/class-list-table.php

    r2035 r2036  
    4444        ?>
    4545        <style>
     46        #wcp-list-table .search-box {
     47            margin-top: 12px;
     48        }
     49
    4650        #wcp-list-table .manage-column.column-payment {
    4751            width: 30%;
     
    6771        $limit = '';
    6872
     73        $per_page = 10;
    6974        $orderby = 'due';
    7075        $order = 'asc';
     
    8287        }
    8388
     89        if ( ! empty( $_REQUEST['s'] ) ) {
     90            $where .= $wpdb->prepare( " AND `keywords` LIKE %s ", '%' . $wpdb->esc_like( wp_unslash( $_REQUEST['s'] ) ) . '%' );
     91        }
     92
    8493        if ( ! empty( $_REQUEST['orderby'] ) && in_array( $_REQUEST['orderby'], array_values( $this->get_sortable_columns() ) ) )
    8594            $orderby = $_REQUEST['orderby'];
     
    91100
    92101        $paged = isset( $_REQUEST['paged'] ) ? absint( $_REQUEST['paged'] ) : 1;
    93         $per_page = 10;
    94102
    95103        $limit .= sprintf( " LIMIT %d OFFSET %d ", $per_page, $per_page * ( $paged - 1 ) );
Note: See TracChangeset for help on using the changeset viewer.