@@ -1,13 +1,13 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | /* @var Give_Updates $give_updates */ |
3 | -$plugins = $give_updates->get_updates( 'plugin' ); |
|
4 | -if ( empty( $plugins ) ) { |
|
3 | +$plugins = $give_updates->get_updates('plugin'); |
|
4 | +if (empty($plugins)) { |
|
5 | 5 | return; |
6 | 6 | } |
7 | 7 | |
8 | 8 | ob_start(); |
9 | -foreach ( $plugins as $plugin_data ) { |
|
10 | - if ( 'active' != $plugin_data['Status'] || 'add-on' != $plugin_data['Type'] ) { |
|
9 | +foreach ($plugins as $plugin_data) { |
|
10 | + if ('active' != $plugin_data['Status'] || 'add-on' != $plugin_data['Type']) { |
|
11 | 11 | continue; |
12 | 12 | } |
13 | 13 | |
@@ -15,36 +15,36 @@ discard block |
||
15 | 15 | $author_name = $plugin_data['Author']; |
16 | 16 | |
17 | 17 | // Link the plugin name to the plugin URL if available. |
18 | - if ( ! empty( $plugin_data['PluginURI'] ) ) { |
|
18 | + if ( ! empty($plugin_data['PluginURI'])) { |
|
19 | 19 | $plugin_name = sprintf( |
20 | 20 | '<a href="%s" title="%s">%s</a> (%s)', |
21 | - esc_url( $plugin_data['PluginURI'] ), |
|
22 | - esc_attr__( 'Visit plugin homepage', 'give' ), |
|
21 | + esc_url($plugin_data['PluginURI']), |
|
22 | + esc_attr__('Visit plugin homepage', 'give'), |
|
23 | 23 | $plugin_name, |
24 | - esc_html( $plugin_data['Version'] ) |
|
24 | + esc_html($plugin_data['Version']) |
|
25 | 25 | ); |
26 | 26 | } |
27 | 27 | |
28 | 28 | // Link the author name to the author URL if available. |
29 | - if ( ! empty( $plugin_data['AuthorURI'] ) ) { |
|
29 | + if ( ! empty($plugin_data['AuthorURI'])) { |
|
30 | 30 | $author_name = sprintf( |
31 | 31 | '<a href="%s" title="%s">%s</a>', |
32 | - esc_url( $plugin_data['AuthorURI'] ), |
|
33 | - esc_attr__( 'Visit author homepage', 'give' ), |
|
32 | + esc_url($plugin_data['AuthorURI']), |
|
33 | + esc_attr__('Visit author homepage', 'give'), |
|
34 | 34 | $author_name |
35 | 35 | ); |
36 | 36 | } |
37 | 37 | ?> |
38 | - <tr <?php echo( true !== $plugin_data['License'] ? 'data-tooltip="' . __( 'Unlicensed add-ons cannot be updated. Please purchase or renew a valid license.', 'give' ) . '"' : '' ); ?>> |
|
39 | - <td><?php echo wp_kses( $plugin_name, wp_kses_allowed_html( 'post' ) ); ?></td> |
|
38 | + <tr <?php echo(true !== $plugin_data['License'] ? 'data-tooltip="'.__('Unlicensed add-ons cannot be updated. Please purchase or renew a valid license.', 'give').'"' : ''); ?>> |
|
39 | + <td><?php echo wp_kses($plugin_name, wp_kses_allowed_html('post')); ?></td> |
|
40 | 40 | <td> |
41 | 41 | <?php |
42 | - echo ( true === $plugin_data['License'] ) ? '<span class="dashicons dashicons-yes"></span>' . __( 'Licensed', 'give' ) : '<span class="dashicons dashicons-no-alt"></span>' . __( 'Unlicensed', 'give' ); |
|
42 | + echo (true === $plugin_data['License']) ? '<span class="dashicons dashicons-yes"></span>'.__('Licensed', 'give') : '<span class="dashicons dashicons-no-alt"></span>'.__('Unlicensed', 'give'); |
|
43 | 43 | |
44 | 44 | echo sprintf( |
45 | 45 | ' – %s – %s', |
46 | - sprintf( _x( 'by %s', 'by author', 'give' ), wp_kses( $author_name, wp_kses_allowed_html( 'post' ) ) ), |
|
47 | - sprintf( __( '(Latest Version: %s)' ), $plugin_data['update']->new_version ) |
|
46 | + sprintf(_x('by %s', 'by author', 'give'), wp_kses($author_name, wp_kses_allowed_html('post'))), |
|
47 | + sprintf(__('(Latest Version: %s)'), $plugin_data['update']->new_version) |
|
48 | 48 | ); |
49 | 49 | ?> |
50 | 50 | </td> |
@@ -10,7 +10,7 @@ discard block |
||
10 | 10 | */ |
11 | 11 | |
12 | 12 | // Exit if accessed directly. |
13 | -if ( ! defined( 'ABSPATH' ) ) { |
|
13 | +if ( ! defined('ABSPATH')) { |
|
14 | 14 | exit; |
15 | 15 | } |
16 | 16 | |
@@ -27,34 +27,34 @@ discard block |
||
27 | 27 | * @return array $form_columns Updated array of forms columns |
28 | 28 | * Post Type List Table |
29 | 29 | */ |
30 | -function give_form_columns( $give_form_columns ) { |
|
30 | +function give_form_columns($give_form_columns) { |
|
31 | 31 | |
32 | 32 | // Standard columns |
33 | 33 | $give_form_columns = array( |
34 | 34 | 'cb' => '<input type="checkbox"/>', |
35 | - 'title' => __( 'Name', 'give' ), |
|
36 | - 'form_category' => __( 'Categories', 'give' ), |
|
37 | - 'form_tag' => __( 'Tags', 'give' ), |
|
38 | - 'price' => __( 'Amount', 'give' ), |
|
39 | - 'goal' => __( 'Goal', 'give' ), |
|
40 | - 'donations' => __( 'Donations', 'give' ), |
|
41 | - 'earnings' => __( 'Income', 'give' ), |
|
42 | - 'shortcode' => __( 'Shortcode', 'give' ), |
|
43 | - 'date' => __( 'Date', 'give' ), |
|
35 | + 'title' => __('Name', 'give'), |
|
36 | + 'form_category' => __('Categories', 'give'), |
|
37 | + 'form_tag' => __('Tags', 'give'), |
|
38 | + 'price' => __('Amount', 'give'), |
|
39 | + 'goal' => __('Goal', 'give'), |
|
40 | + 'donations' => __('Donations', 'give'), |
|
41 | + 'earnings' => __('Income', 'give'), |
|
42 | + 'shortcode' => __('Shortcode', 'give'), |
|
43 | + 'date' => __('Date', 'give'), |
|
44 | 44 | ); |
45 | 45 | |
46 | 46 | // Does the user want categories / tags? |
47 | - if ( ! give_is_setting_enabled( give_get_option( 'categories', 'disabled' ) ) ) { |
|
48 | - unset( $give_form_columns['form_category'] ); |
|
47 | + if ( ! give_is_setting_enabled(give_get_option('categories', 'disabled'))) { |
|
48 | + unset($give_form_columns['form_category']); |
|
49 | 49 | } |
50 | - if ( ! give_is_setting_enabled( give_get_option( 'tags', 'disabled' ) ) ) { |
|
51 | - unset( $give_form_columns['form_tag'] ); |
|
50 | + if ( ! give_is_setting_enabled(give_get_option('tags', 'disabled'))) { |
|
51 | + unset($give_form_columns['form_tag']); |
|
52 | 52 | } |
53 | 53 | |
54 | - return apply_filters( 'give_forms_columns', $give_form_columns ); |
|
54 | + return apply_filters('give_forms_columns', $give_form_columns); |
|
55 | 55 | } |
56 | 56 | |
57 | -add_filter( 'manage_edit-give_forms_columns', 'give_form_columns' ); |
|
57 | +add_filter('manage_edit-give_forms_columns', 'give_form_columns'); |
|
58 | 58 | |
59 | 59 | /** |
60 | 60 | * Render Give Form Columns |
@@ -66,59 +66,59 @@ discard block |
||
66 | 66 | * |
67 | 67 | * @return void |
68 | 68 | */ |
69 | -function give_render_form_columns( $column_name, $post_id ) { |
|
70 | - if ( get_post_type( $post_id ) == 'give_forms' ) { |
|
69 | +function give_render_form_columns($column_name, $post_id) { |
|
70 | + if (get_post_type($post_id) == 'give_forms') { |
|
71 | 71 | |
72 | - switch ( $column_name ) { |
|
72 | + switch ($column_name) { |
|
73 | 73 | case 'form_category': |
74 | - echo get_the_term_list( $post_id, 'give_forms_category', '', ', ', '' ); |
|
74 | + echo get_the_term_list($post_id, 'give_forms_category', '', ', ', ''); |
|
75 | 75 | break; |
76 | 76 | case 'form_tag': |
77 | - echo get_the_term_list( $post_id, 'give_forms_tag', '', ', ', '' ); |
|
77 | + echo get_the_term_list($post_id, 'give_forms_tag', '', ', ', ''); |
|
78 | 78 | break; |
79 | 79 | case 'price': |
80 | - if ( give_has_variable_prices( $post_id ) ) { |
|
81 | - echo give_price_range( $post_id ); |
|
80 | + if (give_has_variable_prices($post_id)) { |
|
81 | + echo give_price_range($post_id); |
|
82 | 82 | } else { |
83 | - echo give_price( $post_id, false ); |
|
84 | - echo '<input type="hidden" class="formprice-' . $post_id . '" value="' . give_get_form_price( $post_id ) . '" />'; |
|
83 | + echo give_price($post_id, false); |
|
84 | + echo '<input type="hidden" class="formprice-'.$post_id.'" value="'.give_get_form_price($post_id).'" />'; |
|
85 | 85 | } |
86 | 86 | break; |
87 | 87 | case 'goal': |
88 | - if ( give_is_setting_enabled( give_get_meta( $post_id, '_give_goal_option', true ) ) ) { |
|
89 | - echo give_goal( $post_id, false ); |
|
88 | + if (give_is_setting_enabled(give_get_meta($post_id, '_give_goal_option', true))) { |
|
89 | + echo give_goal($post_id, false); |
|
90 | 90 | } else { |
91 | - esc_html_e( 'No Goal Set', 'give' ); |
|
91 | + esc_html_e('No Goal Set', 'give'); |
|
92 | 92 | } |
93 | 93 | |
94 | - echo '<input type="hidden" class="formgoal-' . $post_id . '" value="' . give_get_form_goal( $post_id ) . '" />'; |
|
94 | + echo '<input type="hidden" class="formgoal-'.$post_id.'" value="'.give_get_form_goal($post_id).'" />'; |
|
95 | 95 | break; |
96 | 96 | case 'donations': |
97 | - if ( current_user_can( 'view_give_form_stats', $post_id ) ) { |
|
98 | - echo '<a href="' . esc_url( admin_url( 'edit.php?post_type=give_forms&page=give-payment-history&form_id=' . $post_id ) ) . '">'; |
|
99 | - echo give_get_form_sales_stats( $post_id ); |
|
97 | + if (current_user_can('view_give_form_stats', $post_id)) { |
|
98 | + echo '<a href="'.esc_url(admin_url('edit.php?post_type=give_forms&page=give-payment-history&form_id='.$post_id)).'">'; |
|
99 | + echo give_get_form_sales_stats($post_id); |
|
100 | 100 | echo '</a>'; |
101 | 101 | } else { |
102 | 102 | echo '-'; |
103 | 103 | } |
104 | 104 | break; |
105 | 105 | case 'earnings': |
106 | - if ( current_user_can( 'view_give_form_stats', $post_id ) ) { |
|
107 | - echo '<a href="' . esc_url( admin_url( 'edit.php?post_type=give_forms&page=give-reports&tab=forms&form-id=' . $post_id ) ) . '">'; |
|
108 | - echo give_currency_filter( give_format_amount( give_get_form_earnings_stats( $post_id ), array( 'sanitize' => false ) ) ); |
|
106 | + if (current_user_can('view_give_form_stats', $post_id)) { |
|
107 | + echo '<a href="'.esc_url(admin_url('edit.php?post_type=give_forms&page=give-reports&tab=forms&form-id='.$post_id)).'">'; |
|
108 | + echo give_currency_filter(give_format_amount(give_get_form_earnings_stats($post_id), array('sanitize' => false))); |
|
109 | 109 | echo '</a>'; |
110 | 110 | } else { |
111 | 111 | echo '-'; |
112 | 112 | } |
113 | 113 | break; |
114 | 114 | case 'shortcode': |
115 | - echo '<input onclick="this.setSelectionRange(0, this.value.length)" type="text" class="shortcode-input" readonly="" value="[give_form id="' . absint( $post_id ) . '"]">'; |
|
115 | + echo '<input onclick="this.setSelectionRange(0, this.value.length)" type="text" class="shortcode-input" readonly="" value="[give_form id="'.absint($post_id).'"]">'; |
|
116 | 116 | break; |
117 | 117 | }// End switch(). |
118 | 118 | }// End if(). |
119 | 119 | } |
120 | 120 | |
121 | -add_action( 'manage_posts_custom_column', 'give_render_form_columns', 10, 2 ); |
|
121 | +add_action('manage_posts_custom_column', 'give_render_form_columns', 10, 2); |
|
122 | 122 | |
123 | 123 | /** |
124 | 124 | * Registers the sortable columns in the list table |
@@ -129,7 +129,7 @@ discard block |
||
129 | 129 | * |
130 | 130 | * @return array $columns Array of sortable columns |
131 | 131 | */ |
132 | -function give_sortable_form_columns( $columns ) { |
|
132 | +function give_sortable_form_columns($columns) { |
|
133 | 133 | $columns['price'] = 'amount'; |
134 | 134 | $columns['sales'] = 'sales'; |
135 | 135 | $columns['earnings'] = 'earnings'; |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | return $columns; |
140 | 140 | } |
141 | 141 | |
142 | -add_filter( 'manage_edit-give_forms_sortable_columns', 'give_sortable_form_columns' ); |
|
142 | +add_filter('manage_edit-give_forms_sortable_columns', 'give_sortable_form_columns'); |
|
143 | 143 | |
144 | 144 | /** |
145 | 145 | * Sorts Columns in the Forms List Table |
@@ -150,13 +150,13 @@ discard block |
||
150 | 150 | * |
151 | 151 | * @return array $vars Array of all the sort variables. |
152 | 152 | */ |
153 | -function give_sort_forms( $vars ) { |
|
153 | +function give_sort_forms($vars) { |
|
154 | 154 | // Check if we're viewing the "give_forms" post type. |
155 | - if ( ! isset( $vars['post_type'] ) || ! isset( $vars['orderby'] ) || 'give_forms' !== $vars['post_type'] ) { |
|
155 | + if ( ! isset($vars['post_type']) || ! isset($vars['orderby']) || 'give_forms' !== $vars['post_type']) { |
|
156 | 156 | return $vars; |
157 | 157 | } |
158 | 158 | |
159 | - switch ( $vars['orderby'] ) { |
|
159 | + switch ($vars['orderby']) { |
|
160 | 160 | // Check if 'orderby' is set to "sales". |
161 | 161 | case 'sales': |
162 | 162 | $vars = array_merge( |
@@ -181,7 +181,7 @@ discard block |
||
181 | 181 | |
182 | 182 | // Check if "orderby" is set to "price/amount". |
183 | 183 | case 'amount': |
184 | - $multi_level_meta_key = ( 'asc' === $vars['order'] ) ? '_give_levels_minimum_amount' : '_give_levels_maximum_amount'; |
|
184 | + $multi_level_meta_key = ('asc' === $vars['order']) ? '_give_levels_minimum_amount' : '_give_levels_maximum_amount'; |
|
185 | 185 | |
186 | 186 | $vars['orderby'] = 'meta_value_num'; |
187 | 187 | $vars['meta_query'] = array( |
@@ -233,17 +233,17 @@ discard block |
||
233 | 233 | * |
234 | 234 | * @return array Array of all sort variables. |
235 | 235 | */ |
236 | -function give_filter_forms( $vars ) { |
|
237 | - if ( isset( $vars['post_type'] ) && 'give_forms' == $vars['post_type'] ) { |
|
236 | +function give_filter_forms($vars) { |
|
237 | + if (isset($vars['post_type']) && 'give_forms' == $vars['post_type']) { |
|
238 | 238 | |
239 | 239 | // If an author ID was passed, use it |
240 | - if ( isset( $_REQUEST['author'] ) && ! current_user_can( 'view_give_reports' ) ) { |
|
240 | + if (isset($_REQUEST['author']) && ! current_user_can('view_give_reports')) { |
|
241 | 241 | |
242 | 242 | $author_id = $_REQUEST['author']; |
243 | - if ( (int) $author_id !== get_current_user_id() ) { |
|
244 | - wp_die( esc_html__( 'You do not have permission to view this data.', 'give' ), esc_html__( 'Error', 'give' ), array( |
|
243 | + if ((int) $author_id !== get_current_user_id()) { |
|
244 | + wp_die(esc_html__('You do not have permission to view this data.', 'give'), esc_html__('Error', 'give'), array( |
|
245 | 245 | 'response' => 403, |
246 | - ) ); |
|
246 | + )); |
|
247 | 247 | } |
248 | 248 | $vars = array_merge( |
249 | 249 | $vars, |
@@ -267,11 +267,11 @@ discard block |
||
267 | 267 | * @return void |
268 | 268 | */ |
269 | 269 | function give_forms_load() { |
270 | - add_filter( 'request', 'give_sort_forms' ); |
|
271 | - add_filter( 'request', 'give_filter_forms' ); |
|
270 | + add_filter('request', 'give_sort_forms'); |
|
271 | + add_filter('request', 'give_filter_forms'); |
|
272 | 272 | } |
273 | 273 | |
274 | -add_action( 'load-edit.php', 'give_forms_load', 9999 ); |
|
274 | +add_action('load-edit.php', 'give_forms_load', 9999); |
|
275 | 275 | |
276 | 276 | /** |
277 | 277 | * Remove Forms Month Filter |
@@ -285,17 +285,17 @@ discard block |
||
285 | 285 | * @global $typenow The post type we are viewing. |
286 | 286 | * @return array Empty array disables the dropdown. |
287 | 287 | */ |
288 | -function give_remove_month_filter( $dates ) { |
|
288 | +function give_remove_month_filter($dates) { |
|
289 | 289 | global $typenow; |
290 | 290 | |
291 | - if ( $typenow == 'give_forms' ) { |
|
291 | + if ($typenow == 'give_forms') { |
|
292 | 292 | $dates = array(); |
293 | 293 | } |
294 | 294 | |
295 | 295 | return $dates; |
296 | 296 | } |
297 | 297 | |
298 | -add_filter( 'months_dropdown_results', 'give_remove_month_filter', 99 ); |
|
298 | +add_filter('months_dropdown_results', 'give_remove_month_filter', 99); |
|
299 | 299 | |
300 | 300 | /** |
301 | 301 | * Updates price when saving post |
@@ -306,23 +306,23 @@ discard block |
||
306 | 306 | * |
307 | 307 | * @return int|null |
308 | 308 | */ |
309 | -function give_price_save_quick_edit( $post_id ) { |
|
310 | - if ( ! isset( $_POST['post_type'] ) || 'give_forms' !== $_POST['post_type'] ) { |
|
309 | +function give_price_save_quick_edit($post_id) { |
|
310 | + if ( ! isset($_POST['post_type']) || 'give_forms' !== $_POST['post_type']) { |
|
311 | 311 | return; |
312 | 312 | } |
313 | - if ( ! current_user_can( 'edit_post', $post_id ) ) { |
|
313 | + if ( ! current_user_can('edit_post', $post_id)) { |
|
314 | 314 | return $post_id; |
315 | 315 | } |
316 | - if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) { |
|
316 | + if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) { |
|
317 | 317 | return $post_id; |
318 | 318 | } |
319 | 319 | |
320 | - if ( isset( $_REQUEST['_give_regprice'] ) ) { |
|
321 | - give_update_meta( $post_id, '_give_set_price', give_sanitize_amount_for_db( strip_tags( stripslashes( $_REQUEST['_give_regprice'] ) ) ) ); |
|
320 | + if (isset($_REQUEST['_give_regprice'])) { |
|
321 | + give_update_meta($post_id, '_give_set_price', give_sanitize_amount_for_db(strip_tags(stripslashes($_REQUEST['_give_regprice'])))); |
|
322 | 322 | } |
323 | 323 | } |
324 | 324 | |
325 | -add_action( 'save_post', 'give_price_save_quick_edit' ); |
|
325 | +add_action('save_post', 'give_price_save_quick_edit'); |
|
326 | 326 | |
327 | 327 | /** |
328 | 328 | * Process bulk edit actions via AJAX |
@@ -332,18 +332,18 @@ discard block |
||
332 | 332 | */ |
333 | 333 | function give_save_bulk_edit() { |
334 | 334 | |
335 | - $post_ids = ( isset( $_POST['post_ids'] ) && ! empty( $_POST['post_ids'] ) ) ? $_POST['post_ids'] : array(); |
|
335 | + $post_ids = (isset($_POST['post_ids']) && ! empty($_POST['post_ids'])) ? $_POST['post_ids'] : array(); |
|
336 | 336 | |
337 | - if ( ! empty( $post_ids ) && is_array( $post_ids ) ) { |
|
338 | - $price = isset( $_POST['price'] ) ? strip_tags( stripslashes( $_POST['price'] ) ) : 0; |
|
339 | - foreach ( $post_ids as $post_id ) { |
|
337 | + if ( ! empty($post_ids) && is_array($post_ids)) { |
|
338 | + $price = isset($_POST['price']) ? strip_tags(stripslashes($_POST['price'])) : 0; |
|
339 | + foreach ($post_ids as $post_id) { |
|
340 | 340 | |
341 | - if ( ! current_user_can( 'edit_post', $post_id ) ) { |
|
341 | + if ( ! current_user_can('edit_post', $post_id)) { |
|
342 | 342 | continue; |
343 | 343 | } |
344 | 344 | |
345 | - if ( ! empty( $price ) ) { |
|
346 | - give_update_meta( $post_id, '_give_set_price', give_sanitize_amount_for_db( $price ) ); |
|
345 | + if ( ! empty($price)) { |
|
346 | + give_update_meta($post_id, '_give_set_price', give_sanitize_amount_for_db($price)); |
|
347 | 347 | } |
348 | 348 | } |
349 | 349 | } |
@@ -351,4 +351,4 @@ discard block |
||
351 | 351 | die(); |
352 | 352 | } |
353 | 353 | |
354 | -add_action( 'wp_ajax_give_save_bulk_edit', 'give_save_bulk_edit' ); |
|
354 | +add_action('wp_ajax_give_save_bulk_edit', 'give_save_bulk_edit'); |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | */ |
10 | 10 | |
11 | 11 | // Exit if accessed directly. |
12 | -if ( ! defined( 'ABSPATH' ) ) { |
|
12 | +if ( ! defined('ABSPATH')) { |
|
13 | 13 | exit; |
14 | 14 | } |
15 | 15 | |
@@ -23,10 +23,10 @@ discard block |
||
23 | 23 | */ |
24 | 24 | public function __construct() { |
25 | 25 | |
26 | - $this->shortcode['title'] = esc_html__( 'Donation Form Goal', 'give' ); |
|
27 | - $this->shortcode['label'] = esc_html__( 'Donation Form Goal', 'give' ); |
|
26 | + $this->shortcode['title'] = esc_html__('Donation Form Goal', 'give'); |
|
27 | + $this->shortcode['label'] = esc_html__('Donation Form Goal', 'give'); |
|
28 | 28 | |
29 | - parent::__construct( 'give_goal' ); |
|
29 | + parent::__construct('give_goal'); |
|
30 | 30 | } |
31 | 31 | |
32 | 32 | /** |
@@ -38,8 +38,8 @@ discard block |
||
38 | 38 | |
39 | 39 | $create_form_link = sprintf( |
40 | 40 | /* translators: %s: create new form URL */ |
41 | - __( '<a href="%s">Create</a> a new Donation Form.', 'give' ), |
|
42 | - admin_url( 'post-new.php?post_type=give_forms' ) |
|
41 | + __('<a href="%s">Create</a> a new Donation Form.', 'give'), |
|
42 | + admin_url('post-new.php?post_type=give_forms') |
|
43 | 43 | ); |
44 | 44 | |
45 | 45 | return array( |
@@ -51,35 +51,35 @@ discard block |
||
51 | 51 | 'meta_value' => 'enabled', |
52 | 52 | ), |
53 | 53 | 'name' => 'id', |
54 | - 'tooltip' => esc_attr__( 'Select a Donation Form', 'give' ), |
|
55 | - 'placeholder' => '- ' . esc_attr__( 'Select a Donation Form', 'give' ) . ' -', |
|
54 | + 'tooltip' => esc_attr__('Select a Donation Form', 'give'), |
|
55 | + 'placeholder' => '- '.esc_attr__('Select a Donation Form', 'give').' -', |
|
56 | 56 | 'required' => array( |
57 | - 'alert' => esc_html__( 'You must first select a Form!', 'give' ), |
|
58 | - 'error' => sprintf( '<p class="strong">%s</p><p class="no-margin">%s</p>', esc_html__( 'No forms found.', 'give' ), $create_form_link ), |
|
57 | + 'alert' => esc_html__('You must first select a Form!', 'give'), |
|
58 | + 'error' => sprintf('<p class="strong">%s</p><p class="no-margin">%s</p>', esc_html__('No forms found.', 'give'), $create_form_link), |
|
59 | 59 | ), |
60 | 60 | ), |
61 | 61 | array( |
62 | 62 | 'type' => 'container', |
63 | - 'html' => sprintf( '<p class="strong margin-top">%s</p>', esc_html__( 'Optional settings', 'give' ) ), |
|
63 | + 'html' => sprintf('<p class="strong margin-top">%s</p>', esc_html__('Optional settings', 'give')), |
|
64 | 64 | ), |
65 | 65 | array( |
66 | 66 | 'type' => 'listbox', |
67 | 67 | 'name' => 'show_text', |
68 | - 'label' => esc_attr__( 'Show Text:', 'give' ), |
|
69 | - 'tooltip' => esc_attr__( 'This text displays the amount of income raised compared to the goal.', 'give' ), |
|
68 | + 'label' => esc_attr__('Show Text:', 'give'), |
|
69 | + 'tooltip' => esc_attr__('This text displays the amount of income raised compared to the goal.', 'give'), |
|
70 | 70 | 'options' => array( |
71 | - 'true' => esc_html__( 'Show', 'give' ), |
|
72 | - 'false' => esc_html__( 'Hide', 'give' ), |
|
71 | + 'true' => esc_html__('Show', 'give'), |
|
72 | + 'false' => esc_html__('Hide', 'give'), |
|
73 | 73 | ), |
74 | 74 | ), |
75 | 75 | array( |
76 | 76 | 'type' => 'listbox', |
77 | 77 | 'name' => 'show_bar', |
78 | - 'label' => esc_attr__( 'Show Progress Bar:', 'give' ), |
|
79 | - 'tooltip' => esc_attr__( 'Do you want to display the goal\'s progress bar?', 'give' ), |
|
78 | + 'label' => esc_attr__('Show Progress Bar:', 'give'), |
|
79 | + 'tooltip' => esc_attr__('Do you want to display the goal\'s progress bar?', 'give'), |
|
80 | 80 | 'options' => array( |
81 | - 'true' => esc_html__( 'Show', 'give' ), |
|
82 | - 'false' => esc_html__( 'Hide', 'give' ), |
|
81 | + 'true' => esc_html__('Show', 'give'), |
|
82 | + 'false' => esc_html__('Hide', 'give'), |
|
83 | 83 | ), |
84 | 84 | ), |
85 | 85 | ); |
@@ -2,7 +2,7 @@ discard block |
||
2 | 2 | /** |
3 | 3 | * This template is used to display the registration form with [give_register] |
4 | 4 | */ |
5 | -Give()->notices->render_frontend_notices( 0 ); ?> |
|
5 | +Give()->notices->render_frontend_notices(0); ?> |
|
6 | 6 | |
7 | 7 | <form id="give-register-form" class="give-form" action="" method="post"> |
8 | 8 | <?php |
@@ -13,11 +13,11 @@ discard block |
||
13 | 13 | * |
14 | 14 | * @since 1.0 |
15 | 15 | */ |
16 | - do_action( 'give_register_form_fields_top' ); |
|
16 | + do_action('give_register_form_fields_top'); |
|
17 | 17 | ?> |
18 | 18 | |
19 | 19 | <fieldset> |
20 | - <legend><?php esc_html_e( 'Register a New Account', 'give' ); ?></legend> |
|
20 | + <legend><?php esc_html_e('Register a New Account', 'give'); ?></legend> |
|
21 | 21 | |
22 | 22 | <?php |
23 | 23 | /** |
@@ -27,26 +27,26 @@ discard block |
||
27 | 27 | * |
28 | 28 | * @since 1.0 |
29 | 29 | */ |
30 | - do_action( 'give_register_form_fields_before' ); |
|
30 | + do_action('give_register_form_fields_before'); |
|
31 | 31 | ?> |
32 | 32 | |
33 | 33 | <div class="form-row form-row-first form-row-responsive"> |
34 | - <label for="give-user-login"><?php esc_html_e( 'Username', 'give' ); ?></label> |
|
34 | + <label for="give-user-login"><?php esc_html_e('Username', 'give'); ?></label> |
|
35 | 35 | <input id="give-user-login" class="required give-input" type="text" name="give_user_login" required aria-required="true" /> |
36 | 36 | </div> |
37 | 37 | |
38 | 38 | <div class="form-row form-row-last form-row-responsive"> |
39 | - <label for="give-user-email"><?php esc_html_e( 'Email', 'give' ); ?></label> |
|
39 | + <label for="give-user-email"><?php esc_html_e('Email', 'give'); ?></label> |
|
40 | 40 | <input id="give-user-email" class="required give-input" type="email" name="give_user_email" required aria-required="true" /> |
41 | 41 | </div> |
42 | 42 | |
43 | 43 | <div class="form-row form-row-first form-row-responsive"> |
44 | - <label for="give-user-pass"><?php esc_html_e( 'Password', 'give' ); ?></label> |
|
44 | + <label for="give-user-pass"><?php esc_html_e('Password', 'give'); ?></label> |
|
45 | 45 | <input id="give-user-pass" class="password required give-input" type="password" name="give_user_pass" required aria-required="true" /> |
46 | 46 | </div> |
47 | 47 | |
48 | 48 | <div class="form-row form-row-last form-row-responsive"> |
49 | - <label for="give-user-pass2"><?php esc_html_e( 'Confirm PW', 'give' ); ?></label> |
|
49 | + <label for="give-user-pass2"><?php esc_html_e('Confirm PW', 'give'); ?></label> |
|
50 | 50 | <input id="give-user-pass2" class="password required give-input" type="password" name="give_user_pass2" required aria-required="true" /> |
51 | 51 | </div> |
52 | 52 | |
@@ -58,17 +58,17 @@ discard block |
||
58 | 58 | * |
59 | 59 | * @since 1.0 |
60 | 60 | */ |
61 | - do_action( 'give_register_form_fields_before_submit' ); |
|
61 | + do_action('give_register_form_fields_before_submit'); |
|
62 | 62 | ?> |
63 | 63 | |
64 | 64 | <div class="give-hidden"> |
65 | 65 | <input type="hidden" name="give_honeypot" value="" /> |
66 | 66 | <input type="hidden" name="give_action" value="user_register" /> |
67 | - <input type="hidden" name="give_redirect" value="<?php echo esc_url( $give_register_redirect ); ?>" /> |
|
67 | + <input type="hidden" name="give_redirect" value="<?php echo esc_url($give_register_redirect); ?>" /> |
|
68 | 68 | </div> |
69 | 69 | |
70 | 70 | <div class="form-row"> |
71 | - <input class="button" name="give_register_submit" type="submit" value="<?php esc_attr_e( 'Register', 'give' ); ?>" /> |
|
71 | + <input class="button" name="give_register_submit" type="submit" value="<?php esc_attr_e('Register', 'give'); ?>" /> |
|
72 | 72 | </div> |
73 | 73 | |
74 | 74 | <?php |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | * |
80 | 80 | * @since 1.0 |
81 | 81 | */ |
82 | - do_action( 'give_register_form_fields_after' ); |
|
82 | + do_action('give_register_form_fields_after'); |
|
83 | 83 | ?> |
84 | 84 | |
85 | 85 | </fieldset> |
@@ -92,6 +92,6 @@ discard block |
||
92 | 92 | * |
93 | 93 | * @since 1.0 |
94 | 94 | */ |
95 | - do_action( 'give_register_form_fields_bottom' ); |
|
95 | + do_action('give_register_form_fields_bottom'); |
|
96 | 96 | ?> |
97 | 97 | </form> |
@@ -9,13 +9,13 @@ discard block |
||
9 | 9 | * @since 1.0 |
10 | 10 | */ |
11 | 11 | |
12 | -if ( ! defined( 'ABSPATH' ) ) { |
|
12 | +if ( ! defined('ABSPATH')) { |
|
13 | 13 | exit; // Exit if accessed directly. |
14 | 14 | } |
15 | 15 | |
16 | -$template = strtolower( get_option( 'template' ) ); |
|
16 | +$template = strtolower(get_option('template')); |
|
17 | 17 | |
18 | -switch ( $template ) { |
|
18 | +switch ($template) { |
|
19 | 19 | case 'twentyeleven' : |
20 | 20 | echo '<div id="primary" class="give-wrap"><div id="content" role="main" class="twentyeleven">'; |
21 | 21 | break; |
@@ -65,6 +65,6 @@ discard block |
||
65 | 65 | echo '<div class="wrapper hentry" style="box-sizing: border-box;">'; |
66 | 66 | break; |
67 | 67 | default : |
68 | - echo apply_filters( 'give_default_wrapper_start', '<div id="container" class="give-wrap container"><div id="content" role="main">' ); |
|
68 | + echo apply_filters('give_default_wrapper_start', '<div id="container" class="give-wrap container"><div id="content" role="main">'); |
|
69 | 69 | break; |
70 | 70 | } |
71 | 71 | \ No newline at end of file |
@@ -9,13 +9,13 @@ discard block |
||
9 | 9 | * @since 1.0 |
10 | 10 | */ |
11 | 11 | |
12 | -if ( ! defined( 'ABSPATH' ) ) { |
|
12 | +if ( ! defined('ABSPATH')) { |
|
13 | 13 | exit; // Exit if accessed directly. |
14 | 14 | } |
15 | 15 | |
16 | -$template = get_option( 'template' ); |
|
16 | +$template = get_option('template'); |
|
17 | 17 | |
18 | -switch ( $template ) { |
|
18 | +switch ($template) { |
|
19 | 19 | case 'twentyeleven' : |
20 | 20 | echo '</div></div>'; |
21 | 21 | break; |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | break; |
28 | 28 | case 'twentyfourteen' : |
29 | 29 | echo '</div></div></div>'; |
30 | - get_sidebar( 'content' ); |
|
30 | + get_sidebar('content'); |
|
31 | 31 | break; |
32 | 32 | case 'twentyfifteen' : |
33 | 33 | echo '</div></div>'; |
@@ -57,6 +57,6 @@ discard block |
||
57 | 57 | echo '</div>'; |
58 | 58 | break; |
59 | 59 | default : |
60 | - echo apply_filters( 'give_default_wrapper_end', '</div></div>' ); |
|
60 | + echo apply_filters('give_default_wrapper_end', '</div></div>'); |
|
61 | 61 | break; |
62 | 62 | } |
63 | 63 | \ No newline at end of file |
@@ -8,7 +8,7 @@ discard block |
||
8 | 8 | * @version 1.0 |
9 | 9 | */ |
10 | 10 | |
11 | -if ( ! defined( 'ABSPATH' ) ) { |
|
11 | +if ( ! defined('ABSPATH')) { |
|
12 | 12 | exit; // Exit if accessed directly. |
13 | 13 | } |
14 | 14 | |
@@ -21,11 +21,11 @@ discard block |
||
21 | 21 | * |
22 | 22 | * @since 1.0 |
23 | 23 | */ |
24 | -do_action( 'give_before_main_content' ); |
|
24 | +do_action('give_before_main_content'); |
|
25 | 25 | |
26 | -while ( have_posts() ) : the_post(); |
|
26 | +while (have_posts()) : the_post(); |
|
27 | 27 | |
28 | - give_get_template_part( 'single-give-form/content', 'single-give-form' ); |
|
28 | + give_get_template_part('single-give-form/content', 'single-give-form'); |
|
29 | 29 | |
30 | 30 | endwhile; // end of the loop. |
31 | 31 | |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | * |
37 | 37 | * @since 1.0 |
38 | 38 | */ |
39 | -do_action( 'give_after_main_content' ); |
|
39 | +do_action('give_after_main_content'); |
|
40 | 40 | |
41 | 41 | /** |
42 | 42 | * Fires in single form template, on the sidebar. |
@@ -45,6 +45,6 @@ discard block |
||
45 | 45 | * |
46 | 46 | * @since 1.0 |
47 | 47 | */ |
48 | -do_action( 'give_sidebar' ); |
|
48 | +do_action('give_sidebar'); |
|
49 | 49 | |
50 | 50 | get_footer(); |
51 | 51 | \ No newline at end of file |
@@ -10,7 +10,7 @@ discard block |
||
10 | 10 | * @since 1.0 |
11 | 11 | */ |
12 | 12 | |
13 | -if ( ! defined( 'ABSPATH' ) ) { |
|
13 | +if ( ! defined('ABSPATH')) { |
|
14 | 14 | exit; // Exit if accessed directly. |
15 | 15 | } |
16 | 16 | |
@@ -23,22 +23,22 @@ discard block |
||
23 | 23 | * |
24 | 24 | * @since 1.0 |
25 | 25 | */ |
26 | -do_action( 'give_pre_featured_thumbnail' ); |
|
26 | +do_action('give_pre_featured_thumbnail'); |
|
27 | 27 | ?> |
28 | 28 | |
29 | 29 | <div class="images"> |
30 | 30 | <?php //Featured Thumbnail |
31 | - if ( has_post_thumbnail() ) { |
|
31 | + if (has_post_thumbnail()) { |
|
32 | 32 | |
33 | - $image_size = give_get_option( 'featured_image_size' ); |
|
34 | - $image = get_the_post_thumbnail( $post->ID, apply_filters( 'single_give_form_large_thumbnail_size', ( ! empty( $image_size ) ? $image_size : 'large' ) ) ); |
|
33 | + $image_size = give_get_option('featured_image_size'); |
|
34 | + $image = get_the_post_thumbnail($post->ID, apply_filters('single_give_form_large_thumbnail_size', ( ! empty($image_size) ? $image_size : 'large'))); |
|
35 | 35 | |
36 | - echo apply_filters( 'single_give_form_image_html', $image ); |
|
36 | + echo apply_filters('single_give_form_image_html', $image); |
|
37 | 37 | |
38 | 38 | } else { |
39 | 39 | |
40 | 40 | //Placeholder Image |
41 | - echo apply_filters( 'single_give_form_image_html', sprintf( '<img src="%s" alt="%s" />', give_get_placeholder_img_src(), esc_attr__( 'Placeholder', 'give' ) ), $post->ID ); |
|
41 | + echo apply_filters('single_give_form_image_html', sprintf('<img src="%s" alt="%s" />', give_get_placeholder_img_src(), esc_attr__('Placeholder', 'give')), $post->ID); |
|
42 | 42 | |
43 | 43 | } ?> |
44 | 44 | </div> |
@@ -51,5 +51,5 @@ discard block |
||
51 | 51 | * |
52 | 52 | * @since 1.0 |
53 | 53 | */ |
54 | -do_action( 'give_post_featured_thumbnail' ); |
|
54 | +do_action('give_post_featured_thumbnail'); |
|
55 | 55 | ?> |
@@ -11,9 +11,9 @@ |
||
11 | 11 | * @since 1.0 |
12 | 12 | */ |
13 | 13 | |
14 | -if ( ! defined( 'ABSPATH' ) ) { |
|
14 | +if ( ! defined('ABSPATH')) { |
|
15 | 15 | exit; // Exit if accessed directly. |
16 | 16 | } |
17 | -if ( is_active_sidebar( 'give-forms-sidebar' ) ) { |
|
18 | - dynamic_sidebar( 'give-forms-sidebar' ); |
|
17 | +if (is_active_sidebar('give-forms-sidebar')) { |
|
18 | + dynamic_sidebar('give-forms-sidebar'); |
|
19 | 19 | } |
20 | 20 | \ No newline at end of file |