PluginProbe
GiveWP – Donation Plugin and Fundraising Platform / 4.16.9
GiveWP – Donation Plugin and Fundraising Platform v4.16.9
4.16.9 4.16.8.1 4.16.8 4.16.7.2 4.16.7.1 4.16.7 4.16.6.1 4.16.6 4.16.5.1 4.16.5 4.16.4 4.16.3 4.16.2 4.16.1 4.16.0 4.15.5 4.15.4 4.15.3 4.15.2 4.15.1 4.15.0 2.3.0 2.3.1 2.3.2 2.30.0 All 255 releases
← All changes | includes/admin/tools/export/class-export.php +8 -7 2.3.04.16.9 View file →
@@ -5,9 +5,9 @@
5 5 * This is the base class for all export methods. Each data export type (donors, payments, etc) extend this class
6 6 *
7 7 * @package Give
8 8 * @subpackage Admin/Reports
9 - * @copyright Copyright (c) 2016, WordImpress
9 + * @copyright Copyright (c) 2016, GiveWP
10 10 * @license https://opensource.org/licenses/gpl-license GNU Public License
11 11 * @since 1.0
12 12 */
13 13
@@ -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 );