Changeset 2304 for sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments-network/includes/sponsor-invoices-dashboard.php
- Timestamp:
- 01/16/2016 12:39:01 AM (9 years ago)
- File:
-
- 1 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 ) {
Note: See TracChangeset
for help on using the changeset viewer.