PluginProbe
GiveWP – Donation Plugin and Fundraising Platform / 4.17.0
GiveWP – Donation Plugin and Fundraising Platform v4.17.0
4.17.0 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 All 256 releases
← All changes | includes/admin/tools/export/class-give-export-donations.php +30 -29 2.3.0 → 4.17.0 View file →
@@ -3,9 +3,9 @@
3 3 * Give Export Donations Settings
4 4 *
5 5 * @package Give
6 6 * @subpackage Classes/Give_Settings_Data
7 - * @copyright Copyright (c) 2016, WordImpress
7 + * @copyright Copyright (c) 2016, GiveWP
8 8 * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
9 9 * @since 2.1
10 10 */
11 11
@@ -35,9 +35,9 @@
35 35 * Instance.
36 36 *
37 37 * @since 2.1
38 38 */
39 - static private $instance;
39 + private static $instance;
40 40
41 41 /**
42 42 * Singleton pattern.
43 43 *
@@ -91,24 +91,24 @@
91 91
92 92 // Do not render main export tools page.
93 93 remove_action(
94 94 'give_admin_field_tools_export',
95 - array(
95 + [
96 96 'Give_Settings_Export',
97 97 'render_export_field',
98 - ),
98 + ],
99 99 10
100 100 );
101 101
102 102 // Render donation export page
103 - add_action( 'give_admin_field_tools_export', array( $this, 'render_page' ) );
103 + add_action( 'give_admin_field_tools_export', [ $this, 'render_page' ] );
104 104
105 105 // Print the HTML.
106 - add_action( 'give_tools_export_donations_form_start', array( $this, 'html' ) );
106 + add_action( 'give_tools_export_donations_form_start', [ $this, 'html' ] );
107 107 }
108 108
109 109 /**
110 - * Filter to modity the Taxonomy args
110 + * Filter to modify the Taxonomy args
111 111 *
112 112 * @since 2.1
113 113 *
114 114 * @param array $args args for Taxonomy
@@ -139,9 +139,9 @@
139 139 </tr>
140 140
141 141 <?php
142 142 if ( give_is_setting_enabled( give_get_option( 'categories' ) ) ) {
143 - add_filter( 'give_forms_category_dropdown', array( $this, 'give_forms_taxonomy_dropdown' ) );
143 + add_filter( 'give_forms_category_dropdown', [ $this, 'give_forms_taxonomy_dropdown' ] );
144 144 ?>
145 145 <tr>
146 146 <td scope="row" class="row-title">
147 147 <label
@@ -152,18 +152,18 @@
152 152 <?php
153 153 echo Give()->html->category_dropdown(
154 154 'give_forms_categories[]',
155 155 0,
156 - array(
156 + [
157 157 'id' => 'give_forms_categories',
158 158 'class' => 'give_forms_categories',
159 159 'chosen' => true,
160 160 'multiple' => true,
161 - 'selected' => array(),
161 + 'selected' => [],
162 162 'show_option_all' => false,
163 163 'placeholder' => __( 'Choose one or more from categories', 'give' ),
164 - 'data' => array( 'search-type' => 'categories' ),
165 - )
164 + 'data' => [ 'search-type' => 'categories' ],
165 + ]
166 166 );
167 167 ?>
168 168 </div>
169 169 </td>
@@ -168,13 +168,13 @@
168 168 </div>
169 169 </td>
170 170 </tr>
171 171 <?php
172 - remove_filter( 'give_forms_category_dropdown', array( $this, 'give_forms_taxonomy_dropdown' ) );
172 + remove_filter( 'give_forms_category_dropdown', [ $this, 'give_forms_taxonomy_dropdown' ] );
173 173 }
174 174
175 175 if ( give_is_setting_enabled( give_get_option( 'tags' ) ) ) {
176 - add_filter( 'give_forms_tag_dropdown', array( $this, 'give_forms_taxonomy_dropdown' ) );
176 + add_filter( 'give_forms_tag_dropdown', [ $this, 'give_forms_taxonomy_dropdown' ] );
177 177 ?>
178 178 <tr>
179 179 <td scope="row" class="row-title">
180 180 <label
@@ -185,18 +185,18 @@
185 185 <?php
186 186 echo Give()->html->tags_dropdown(
187 187 'give_forms_tags[]',
188 188 0,
189 - array(
189 + [
190 190 'id' => 'give_forms_tags',
191 191 'class' => 'give_forms_tags',
192 192 'chosen' => true,
193 193 'multiple' => true,
194 - 'selected' => array(),
194 + 'selected' => [],
195 195 'show_option_all' => false,
196 196 'placeholder' => __( 'Choose one or more from tags', 'give' ),
197 - 'data' => array( 'search-type' => 'tags' ),
198 - )
197 + 'data' => [ 'search-type' => 'tags' ],
198 + ]
199 199 );
200 200 ?>
201 201 </div>
202 202 </td>
@@ -201,9 +201,9 @@
201 201 </div>
202 202 </td>
203 203 </tr>
204 204 <?php
205 - remove_filter( 'give_forms_tag_dropdown', array( $this, 'give_forms_taxonomy_dropdown' ) );
205 + remove_filter( 'give_forms_tag_dropdown', [ $this, 'give_forms_taxonomy_dropdown' ] );
206 206 }
207 207 ?>
208 208
209 209 <tr class="give-export-donation-form">
@@ -213,15 +213,16 @@
213 213 </td>
214 214 <td class="give-field-wrap">
215 215 <div class="give-clearfix">
216 216 <?php
217 - $args = array(
217 + $args = [
218 218 'name' => 'forms',
219 219 'id' => 'give-payment-form-select',
220 + 'class' => 'give-width-25em',
220 221 'chosen' => true,
221 222 'placeholder' => __( 'All Forms', 'give' ),
222 - 'data' => array( 'no-form' => __( 'No donation forms found', 'give' ) ),
223 - );
223 + 'data' => [ 'no-form' => __( 'No donation forms found', 'give' ) ],
224 + ];
224 225 echo Give()->html->forms_dropdown( $args );
225 226 ?>
226 227
227 228 <input type="hidden" name="form_ids" class="form_ids" />
@@ -235,23 +236,23 @@
235 236 </td>
236 237 <td class="give-field-wrap">
237 238 <div class="give-clearfix">
238 239 <?php
239 - $args = array(
240 + $args = [
240 241 'id' => 'give-payment-export-start',
241 242 'name' => 'start',
242 243 'placeholder' => __( 'Start Date', 'give' ),
243 244 'autocomplete' => 'off',
244 - );
245 + ];
245 246 echo Give()->html->date_field( $args );
246 247 ?>
247 248 <?php
248 - $args = array(
249 + $args = [
249 250 'id' => 'give-payment-export-end',
250 251 'name' => 'end',
251 252 'placeholder' => __( 'End Date', 'give' ),
252 - 'autocomplete' => 'off'
253 - );
253 + 'autocomplete' => 'off',
254 + ];
254 255 echo Give()->html->date_field( $args );
255 256 ?>
256 257 </div>
257 258 </td>
@@ -315,9 +316,9 @@
315 316 * @since 2.1
316 317 */
317 318 do_action( 'give_tools_export_donations_main_before' );
318 319 ?>
319 - <div id="poststuff">
320 + <div id="poststuff" class="give-clearfix">
320 321 <div class="postbox">
321 322 <h1 class="give-export-h1" align="center"><?php _e( 'Export Donations', 'give' ); ?></h1>
322 323 <div class="inside give-tools-setting-page-export give-export_donations">
323 324 <?php
@@ -328,9 +329,9 @@
328 329 */
329 330 do_action( 'give_tools_export_donations_form_before_start' );
330 331 ?>
331 332 <form method="post"
332 - id="give-export_donations-form"
333 + id="give-export_donations-form"
333 334 class="give-export-form tools-setting-page-export tools-setting-page-export"
334 335 enctype="multipart/form-data">
335 336
336 337 <?php