Changeset 2304
- Timestamp:
- 01/16/2016 12:39:01 AM (9 years ago)
- Location:
- sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments-network/includes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments-network/includes/sponsor-invoices-dashboard.php
r2302 r2304 64 64 $list_table->prepare_items(); 65 65 66 switch ( $_GET['section']) {66 switch ( get_current_section() ) { 67 67 case 'submitted': 68 68 $section_explanation = 'These invoices have been completed by the organizer, but need to be approved by a deputy before being sent to the sponsor.'; … … 82 82 83 83 /** 84 * Get the current section 85 * 86 * @return string 87 */ 88 function get_current_section() { 89 $sections = array( 'submitted', 'approved', 'paid' ); 90 $current_section = 'submitted'; 91 92 if ( isset( $_GET['section'] ) && in_array( $_GET['section'], $sections, true ) ) { 93 $current_section = $_GET['section']; 94 } 95 96 return $current_section; 97 } 98 99 /** 84 100 * Get all the data needed to render the section tabs 85 101 * … … 89 105 $statuses = \WordCamp\Budgets\Sponsor_Invoices\get_custom_statuses(); 90 106 $sections = array(); 91 $current_section = sanitize_text_field( $_GET['section']);107 $current_section = get_current_section(); 92 108 93 109 foreach ( $statuses as $status_slug => $status_name ) { -
sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments-network/includes/sponsor-invoices-list-table.php
r2302 r2304 19 19 ); 20 20 21 if ( 'submitted' === $_GET['section']) {21 if ( 'submitted' === get_current_section() ) { 22 22 $columns['approve_invoice'] = 'Approve'; 23 23 } … … 49 49 50 50 $table_name = get_index_table_name(); 51 $status = 'wcbsi_' . $_GET['section'];51 $status = 'wcbsi_' . get_current_section(); 52 52 $paged = isset( $_REQUEST['paged'] ) ? absint( $_REQUEST['paged'] ) : 1; 53 53 $limit = 30;
Note: See TracChangeset
for help on using the changeset viewer.