| @@ -23,8 +23,9 @@ | ||
| 23 | 23 | */ |
| 24 | 24 | class Give_Export { |
| 25 | 25 | /** |
| 26 | 26 | * Our export type. Used for export-type specific filters/actions |
| 27 | + * | |
| 27 | 28 | * @var string |
| 28 | 29 | * @since 1.0 |
| 29 | 30 | */ |
| 30 | 31 | public $export_type = 'default'; |
| @@ -36,9 +37,9 @@ | ||
| 36 | 37 | * @since 1.0 |
| 37 | 38 | * @return bool Whether we can export or not |
| 38 | 39 | */ |
| 39 | 40 | public function can_export() { |
| 40 | - return (bool) apply_filters( 'give_export_capability', current_user_can( 'export_give_reports' ) ); | |
| 41 | + return (bool) apply_filters( 'give_export_capability', current_user_can( 'export_give_reports' )); | |
| 41 | 42 | } |
| 42 | 43 | |
| 43 | 44 | /** |
| 44 | 45 | * Set the export headers |
| @@ -64,9 +65,9 @@ | ||
| 64 | 65 | |
| 65 | 66 | nocache_headers(); |
| 66 | 67 | header( 'Content-Type: text/csv; charset=utf-8' ); |
| 67 | 68 | header( 'Content-Disposition: attachment; filename=' . $file_name . '.csv' ); |
| 68 | - header( "Expires: 0" ); | |
| 69 | + header( 'Expires: 0' ); | |
| 69 | 70 | } |
| 70 | 71 | |
| 71 | 72 | /** |
| 72 | 73 | * Set the CSV columns |
| @@ -77,9 +78,9 @@ | ||
| 77 | 78 | */ |
| 78 | 79 | public function csv_cols() { |
| 79 | 80 | $cols = array( |
| 80 | 81 | 'id' => __( 'ID', 'give' ), |
| 81 | - 'date' => __( 'Date', 'give' ) | |
| 82 | + 'date' => __( 'Date', 'give' ), | |
| 82 | 83 | ); |
| 83 | 84 | |
| 84 | 85 | return $cols; |
| 85 | 86 | } |
| @@ -127,14 +128,14 @@ | ||
| 127 | 128 | // Just a sample data array |
| 128 | 129 | $data = array( |
| 129 | 130 | 0 => array( |
| 130 | 131 | 'id' => '', |
| 131 | - 'data' => date( 'F j, Y' ) | |
| 132 | + 'data' => date( 'F j, Y' ), | |
| 132 | 133 | ), |
| 133 | 134 | 1 => array( |
| 134 | 135 | 'id' => '', |
| 135 | - 'data' => date( 'F j, Y' ) | |
| 136 | - ) | |
| 136 | + 'data' => date( 'F j, Y' ), | |
| 137 | + ), | |
| 137 | 138 | ); |
| 138 | 139 | |
| 139 | 140 | $data = apply_filters( 'give_export_get_data', $data ); |
| 140 | 141 | $data = apply_filters( "give_export_get_data_{$this->export_type}", $data ); |