@@ -11,12 +11,12 @@ discard block |
||
11 | 11 | */ |
12 | 12 | |
13 | 13 | // Exit if accessed directly |
14 | -if ( ! defined( 'ABSPATH' ) ) { |
|
14 | +if ( ! defined('ABSPATH')) { |
|
15 | 15 | exit; |
16 | 16 | } |
17 | 17 | |
18 | -require_once GIVE_PLUGIN_DIR . 'includes/admin/reporting/class-export.php'; |
|
19 | -require_once GIVE_PLUGIN_DIR . 'includes/admin/reporting/export/export-actions.php'; |
|
18 | +require_once GIVE_PLUGIN_DIR.'includes/admin/reporting/class-export.php'; |
|
19 | +require_once GIVE_PLUGIN_DIR.'includes/admin/reporting/export/export-actions.php'; |
|
20 | 20 | |
21 | 21 | /** |
22 | 22 | * Process batch exports via ajax |
@@ -26,79 +26,79 @@ discard block |
||
26 | 26 | */ |
27 | 27 | function give_do_ajax_export() { |
28 | 28 | |
29 | - require_once GIVE_PLUGIN_DIR . 'includes/admin/reporting/export/class-batch-export.php'; |
|
29 | + require_once GIVE_PLUGIN_DIR.'includes/admin/reporting/export/class-batch-export.php'; |
|
30 | 30 | |
31 | - parse_str( $_POST['form'], $form ); |
|
31 | + parse_str($_POST['form'], $form); |
|
32 | 32 | |
33 | 33 | $_REQUEST = $form = (array) $form; |
34 | 34 | |
35 | - if ( ! wp_verify_nonce( $_REQUEST['give_ajax_export'], 'give_ajax_export' ) ) { |
|
36 | - die( '-2' ); |
|
35 | + if ( ! wp_verify_nonce($_REQUEST['give_ajax_export'], 'give_ajax_export')) { |
|
36 | + die('-2'); |
|
37 | 37 | } |
38 | 38 | |
39 | - do_action( 'give_batch_export_class_include', $form['give-export-class'] ); |
|
39 | + do_action('give_batch_export_class_include', $form['give-export-class']); |
|
40 | 40 | |
41 | - $step = absint( $_POST['step'] ); |
|
42 | - $class = sanitize_text_field( $form['give-export-class'] ); |
|
41 | + $step = absint($_POST['step']); |
|
42 | + $class = sanitize_text_field($form['give-export-class']); |
|
43 | 43 | |
44 | - $export = new $class( $step ); |
|
44 | + $export = new $class($step); |
|
45 | 45 | |
46 | - if ( ! $export->can_export() ) { |
|
47 | - die( '-1' ); |
|
46 | + if ( ! $export->can_export()) { |
|
47 | + die('-1'); |
|
48 | 48 | } |
49 | 49 | |
50 | - if ( ! $export->is_writable ) { |
|
50 | + if ( ! $export->is_writable) { |
|
51 | 51 | $json_args = array( |
52 | 52 | 'error' => true, |
53 | - 'message' => esc_html__( 'Export location or file not writable.', 'give' ) |
|
53 | + 'message' => esc_html__('Export location or file not writable.', 'give') |
|
54 | 54 | ); |
55 | 55 | echo json_encode($json_args); |
56 | 56 | exit; |
57 | 57 | } |
58 | 58 | |
59 | - $export->set_properties( $_REQUEST ); |
|
59 | + $export->set_properties($_REQUEST); |
|
60 | 60 | |
61 | 61 | $export->pre_fetch(); |
62 | 62 | |
63 | - $ret = $export->process_step( $step ); |
|
63 | + $ret = $export->process_step($step); |
|
64 | 64 | |
65 | 65 | $percentage = $export->get_percentage_complete(); |
66 | 66 | |
67 | - if ( $ret ) { |
|
67 | + if ($ret) { |
|
68 | 68 | |
69 | 69 | $step += 1; |
70 | - echo json_encode( array( 'step' => $step, 'percentage' => $percentage ) ); |
|
70 | + echo json_encode(array('step' => $step, 'percentage' => $percentage)); |
|
71 | 71 | exit; |
72 | 72 | |
73 | - } elseif ( true === $export->is_empty ) { |
|
73 | + } elseif (true === $export->is_empty) { |
|
74 | 74 | |
75 | - echo json_encode( array( |
|
75 | + echo json_encode(array( |
|
76 | 76 | 'error' => true, |
77 | - 'message' => esc_html__( 'No data found for export parameters.', 'give' ) |
|
78 | - ) ); |
|
77 | + 'message' => esc_html__('No data found for export parameters.', 'give') |
|
78 | + )); |
|
79 | 79 | exit; |
80 | 80 | |
81 | - } elseif ( true === $export->done && true === $export->is_void ) { |
|
81 | + } elseif (true === $export->done && true === $export->is_void) { |
|
82 | 82 | |
83 | - $message = ! empty( $export->message ) ? $export->message : esc_html__( 'Batch Processing Complete', 'give' ); |
|
84 | - echo json_encode( array( 'success' => true, 'message' => $message ) ); |
|
83 | + $message = ! empty($export->message) ? $export->message : esc_html__('Batch Processing Complete', 'give'); |
|
84 | + echo json_encode(array('success' => true, 'message' => $message)); |
|
85 | 85 | exit; |
86 | 86 | |
87 | 87 | } else { |
88 | 88 | |
89 | - $args = array_merge( $_REQUEST, array( |
|
89 | + $args = array_merge($_REQUEST, array( |
|
90 | 90 | 'step' => $step, |
91 | 91 | 'class' => $class, |
92 | - 'nonce' => wp_create_nonce( 'give-batch-export' ), |
|
92 | + 'nonce' => wp_create_nonce('give-batch-export'), |
|
93 | 93 | 'give_action' => 'form_batch_export', |
94 | - ) ); |
|
94 | + )); |
|
95 | 95 | |
96 | - $download_url = add_query_arg( $args, admin_url() ); |
|
96 | + $download_url = add_query_arg($args, admin_url()); |
|
97 | 97 | |
98 | - echo json_encode( array( 'step' => 'done', 'url' => $download_url ) ); |
|
98 | + echo json_encode(array('step' => 'done', 'url' => $download_url)); |
|
99 | 99 | exit; |
100 | 100 | |
101 | 101 | } |
102 | 102 | } |
103 | 103 | |
104 | -add_action( 'wp_ajax_give_do_ajax_export', 'give_do_ajax_export' ); |
|
104 | +add_action('wp_ajax_give_do_ajax_export', 'give_do_ajax_export'); |
@@ -8,7 +8,7 @@ discard block |
||
8 | 8 | */ |
9 | 9 | |
10 | 10 | // Exit if accessed directly |
11 | -if ( ! defined( 'ABSPATH' ) ) { |
|
11 | +if ( ! defined('ABSPATH')) { |
|
12 | 12 | exit; |
13 | 13 | } |
14 | 14 | |
@@ -26,12 +26,12 @@ discard block |
||
26 | 26 | * |
27 | 27 | * @param $_banner_details |
28 | 28 | */ |
29 | - function __construct( $_banner_details ) { |
|
29 | + function __construct($_banner_details) { |
|
30 | 30 | |
31 | 31 | global $current_user; |
32 | 32 | $this->banner_details = $_banner_details; |
33 | - $this->test_mode = ( $this->banner_details['testing'] == 'true' ) ? true : false; |
|
34 | - $this->nag_meta_key = 'give_addon_activation_ignore_' . sanitize_title( $this->banner_details['name'] ); |
|
33 | + $this->test_mode = ($this->banner_details['testing'] == 'true') ? true : false; |
|
34 | + $this->nag_meta_key = 'give_addon_activation_ignore_'.sanitize_title($this->banner_details['name']); |
|
35 | 35 | |
36 | 36 | //Get current user |
37 | 37 | $this->user_id = $current_user->ID; |
@@ -50,13 +50,13 @@ discard block |
||
50 | 50 | public function init() { |
51 | 51 | |
52 | 52 | //Testing? |
53 | - if ( $this->test_mode ) { |
|
54 | - delete_user_meta( $this->user_id, $this->nag_meta_key ); |
|
53 | + if ($this->test_mode) { |
|
54 | + delete_user_meta($this->user_id, $this->nag_meta_key); |
|
55 | 55 | } |
56 | 56 | |
57 | 57 | //Get the current page to add the notice to |
58 | - add_action( 'current_screen', array( $this, 'give_addon_notice_ignore' ) ); |
|
59 | - add_action( 'admin_notices', array( $this, 'give_addon_activation_admin_notice' ) ); |
|
58 | + add_action('current_screen', array($this, 'give_addon_notice_ignore')); |
|
59 | + add_action('admin_notices', array($this, 'give_addon_activation_admin_notice')); |
|
60 | 60 | |
61 | 61 | |
62 | 62 | } |
@@ -71,13 +71,13 @@ discard block |
||
71 | 71 | global $pagenow; |
72 | 72 | |
73 | 73 | //Make sure we're on the plugins page. |
74 | - if ( $pagenow !== 'plugins.php' ) { |
|
74 | + if ($pagenow !== 'plugins.php') { |
|
75 | 75 | return false; |
76 | 76 | } |
77 | 77 | |
78 | 78 | // If the user hasn't already dismissed our alert, |
79 | 79 | // Output the activation banner |
80 | - if ( ! get_user_meta( $this->user_id, $this->nag_meta_key ) ) { ?> |
|
80 | + if ( ! get_user_meta($this->user_id, $this->nag_meta_key)) { ?> |
|
81 | 81 | |
82 | 82 | <!-- * I output inline styles here |
83 | 83 | * because there's no reason to keep these |
@@ -157,15 +157,15 @@ discard block |
||
157 | 157 | <h3><?php |
158 | 158 | printf( |
159 | 159 | /* translators: %s: Add-on name */ |
160 | - esc_html__( "Thank you for installing Give's %s Add-on!", 'give' ), |
|
161 | - '<span>' . $this->banner_details['name'] . '</span>' |
|
160 | + esc_html__("Thank you for installing Give's %s Add-on!", 'give'), |
|
161 | + '<span>'.$this->banner_details['name'].'</span>' |
|
162 | 162 | ); |
163 | 163 | ?></h3> |
164 | 164 | |
165 | 165 | <a href="<?php |
166 | 166 | //The Dismiss Button |
167 | - $nag_admin_dismiss_url = 'plugins.php?' . $this->nag_meta_key . '=0'; |
|
168 | - echo admin_url( $nag_admin_dismiss_url ); ?>" class="dismiss"><span class="dashicons dashicons-dismiss"></span></a> |
|
167 | + $nag_admin_dismiss_url = 'plugins.php?'.$this->nag_meta_key.'=0'; |
|
168 | + echo admin_url($nag_admin_dismiss_url); ?>" class="dismiss"><span class="dashicons dashicons-dismiss"></span></a> |
|
169 | 169 | |
170 | 170 | <!-- * Now we output a few "actions" |
171 | 171 | * that the user can take from here --> |
@@ -173,21 +173,21 @@ discard block |
||
173 | 173 | <div class="alert-actions"> |
174 | 174 | |
175 | 175 | <?php //Point them to your settings page |
176 | - if ( isset( $this->banner_details['settings_url'] ) ) { ?> |
|
176 | + if (isset($this->banner_details['settings_url'])) { ?> |
|
177 | 177 | <a href="<?php echo $this->banner_details['settings_url']; ?>"> |
178 | - <span class="dashicons dashicons-admin-settings"></span><?php esc_html_e( 'Go to Settings', 'give' ); ?> |
|
178 | + <span class="dashicons dashicons-admin-settings"></span><?php esc_html_e('Go to Settings', 'give'); ?> |
|
179 | 179 | </a> |
180 | 180 | <?php } ?> |
181 | 181 | |
182 | 182 | <?php |
183 | 183 | // Show them how to configure the Addon |
184 | - if ( isset( $this->banner_details['documentation_url'] ) ) { ?> |
|
184 | + if (isset($this->banner_details['documentation_url'])) { ?> |
|
185 | 185 | <a href="<?php echo $this->banner_details['documentation_url'] ?>" target="_blank"> |
186 | 186 | <span class="dashicons dashicons-media-text"></span> |
187 | 187 | <?php |
188 | 188 | printf( |
189 | 189 | /* translators: %s: Add-on name */ |
190 | - esc_html__( 'Documentation: %s Add-on', 'give' ), |
|
190 | + esc_html__('Documentation: %s Add-on', 'give'), |
|
191 | 191 | $this->banner_details['name'] |
192 | 192 | ); |
193 | 193 | ?> |
@@ -195,10 +195,10 @@ discard block |
||
195 | 195 | <?php } ?> |
196 | 196 | <?php |
197 | 197 | //Let them signup for plugin updates |
198 | - if ( isset( $this->banner_details['support_url'] ) ) { ?> |
|
198 | + if (isset($this->banner_details['support_url'])) { ?> |
|
199 | 199 | |
200 | 200 | <a href="<?php echo $this->banner_details['support_url'] ?>" target="_blank"> |
201 | - <span class="dashicons dashicons-sos"></span><?php esc_html_e( 'Get Support', 'give' ); ?> |
|
201 | + <span class="dashicons dashicons-sos"></span><?php esc_html_e('Get Support', 'give'); ?> |
|
202 | 202 | </a> |
203 | 203 | |
204 | 204 | <?php } ?> |
@@ -220,13 +220,13 @@ discard block |
||
220 | 220 | /* If user clicks to ignore the notice, add that to their user meta the banner then checks whether this tag exists already or not. |
221 | 221 | * See here: http://codex.wordpress.org/Function_Reference/add_user_meta |
222 | 222 | */ |
223 | - if ( isset( $_GET[ $this->nag_meta_key ] ) && '0' == $_GET[ $this->nag_meta_key ] ) { |
|
223 | + if (isset($_GET[$this->nag_meta_key]) && '0' == $_GET[$this->nag_meta_key]) { |
|
224 | 224 | |
225 | 225 | //Get the global user |
226 | 226 | global $current_user; |
227 | 227 | $user_id = $current_user->ID; |
228 | 228 | |
229 | - add_user_meta( $user_id, $this->nag_meta_key, 'true', true ); |
|
229 | + add_user_meta($user_id, $this->nag_meta_key, 'true', true); |
|
230 | 230 | } |
231 | 231 | } |
232 | 232 |
@@ -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 | |
@@ -29,31 +29,31 @@ discard block |
||
29 | 29 | global $give_settings_page, $give_payments_page, $give_reports_page, $give_add_ons_page, $give_upgrades_screen, $give_donors_page; |
30 | 30 | |
31 | 31 | //Payments |
32 | - $give_payment = get_post_type_object( 'give_payment' ); |
|
33 | - $give_payments_page = add_submenu_page( 'edit.php?post_type=give_forms', $give_payment->labels->name, $give_payment->labels->menu_name, 'edit_give_payments', 'give-payment-history', 'give_payment_history_page' ); |
|
32 | + $give_payment = get_post_type_object('give_payment'); |
|
33 | + $give_payments_page = add_submenu_page('edit.php?post_type=give_forms', $give_payment->labels->name, $give_payment->labels->menu_name, 'edit_give_payments', 'give-payment-history', 'give_payment_history_page'); |
|
34 | 34 | |
35 | 35 | //Donors |
36 | - $give_donors_page = add_submenu_page( 'edit.php?post_type=give_forms', esc_html__( 'Donors', 'give' ), esc_html__( 'Donors', 'give' ), 'view_give_reports', 'give-donors', 'give_customers_page' ); |
|
36 | + $give_donors_page = add_submenu_page('edit.php?post_type=give_forms', esc_html__('Donors', 'give'), esc_html__('Donors', 'give'), 'view_give_reports', 'give-donors', 'give_customers_page'); |
|
37 | 37 | |
38 | 38 | //Reports` |
39 | - $give_reports_page = add_submenu_page( 'edit.php?post_type=give_forms', esc_html__( 'Donation Reports', 'give' ), esc_html__( 'Reports', 'give' ), 'view_give_reports', 'give-reports', 'give_reports_page' ); |
|
39 | + $give_reports_page = add_submenu_page('edit.php?post_type=give_forms', esc_html__('Donation Reports', 'give'), esc_html__('Reports', 'give'), 'view_give_reports', 'give-reports', 'give_reports_page'); |
|
40 | 40 | |
41 | 41 | //Settings |
42 | - $give_settings_page = add_submenu_page( 'edit.php?post_type=give_forms', esc_html__( 'Give Settings', 'give' ), esc_html__( 'Settings', 'give' ), 'manage_give_settings', 'give-settings', array( |
|
42 | + $give_settings_page = add_submenu_page('edit.php?post_type=give_forms', esc_html__('Give Settings', 'give'), esc_html__('Settings', 'give'), 'manage_give_settings', 'give-settings', array( |
|
43 | 43 | Give()->give_settings, |
44 | 44 | 'admin_page_display' |
45 | - ) ); |
|
45 | + )); |
|
46 | 46 | |
47 | 47 | //Add-ons |
48 | - $give_add_ons_page = add_submenu_page( 'edit.php?post_type=give_forms', esc_html__( 'Give Add-ons', 'give' ), esc_html__( 'Add-ons', 'give' ), 'install_plugins', 'give-addons', 'give_add_ons_page' ); |
|
48 | + $give_add_ons_page = add_submenu_page('edit.php?post_type=give_forms', esc_html__('Give Add-ons', 'give'), esc_html__('Add-ons', 'give'), 'install_plugins', 'give-addons', 'give_add_ons_page'); |
|
49 | 49 | |
50 | 50 | //Upgrades |
51 | - $give_upgrades_screen = add_submenu_page( null, esc_html__( 'Give Upgrades', 'give' ), esc_html__( 'Give Upgrades', 'give' ), 'manage_give_settings', 'give-upgrades', 'give_upgrades_screen' ); |
|
51 | + $give_upgrades_screen = add_submenu_page(null, esc_html__('Give Upgrades', 'give'), esc_html__('Give Upgrades', 'give'), 'manage_give_settings', 'give-upgrades', 'give_upgrades_screen'); |
|
52 | 52 | |
53 | 53 | |
54 | 54 | } |
55 | 55 | |
56 | -add_action( 'admin_menu', 'give_add_options_links', 10 ); |
|
56 | +add_action('admin_menu', 'give_add_options_links', 10); |
|
57 | 57 | |
58 | 58 | /** |
59 | 59 | * Determines whether the current admin page is a Give admin page. |
@@ -68,224 +68,224 @@ discard block |
||
68 | 68 | * |
69 | 69 | * @return bool True if Give admin page. |
70 | 70 | */ |
71 | -function give_is_admin_page( $passed_page = '', $passed_view = '' ) { |
|
71 | +function give_is_admin_page($passed_page = '', $passed_view = '') { |
|
72 | 72 | |
73 | 73 | global $pagenow, $typenow; |
74 | 74 | |
75 | 75 | $found = false; |
76 | - $post_type = isset( $_GET['post_type'] ) ? strtolower( $_GET['post_type'] ) : false; |
|
77 | - $action = isset( $_GET['action'] ) ? strtolower( $_GET['action'] ) : false; |
|
78 | - $taxonomy = isset( $_GET['taxonomy'] ) ? strtolower( $_GET['taxonomy'] ) : false; |
|
79 | - $page = isset( $_GET['page'] ) ? strtolower( $_GET['page'] ) : false; |
|
80 | - $view = isset( $_GET['view'] ) ? strtolower( $_GET['view'] ) : false; |
|
81 | - $tab = isset( $_GET['tab'] ) ? strtolower( $_GET['tab'] ) : false; |
|
76 | + $post_type = isset($_GET['post_type']) ? strtolower($_GET['post_type']) : false; |
|
77 | + $action = isset($_GET['action']) ? strtolower($_GET['action']) : false; |
|
78 | + $taxonomy = isset($_GET['taxonomy']) ? strtolower($_GET['taxonomy']) : false; |
|
79 | + $page = isset($_GET['page']) ? strtolower($_GET['page']) : false; |
|
80 | + $view = isset($_GET['view']) ? strtolower($_GET['view']) : false; |
|
81 | + $tab = isset($_GET['tab']) ? strtolower($_GET['tab']) : false; |
|
82 | 82 | |
83 | - switch ( $passed_page ) { |
|
83 | + switch ($passed_page) { |
|
84 | 84 | case 'give_forms': |
85 | - switch ( $passed_view ) { |
|
85 | + switch ($passed_view) { |
|
86 | 86 | case 'list-table': |
87 | - if ( ( 'give_forms' == $typenow || 'give_forms' === $post_type ) && $pagenow == 'edit.php' ) { |
|
87 | + if (('give_forms' == $typenow || 'give_forms' === $post_type) && $pagenow == 'edit.php') { |
|
88 | 88 | $found = true; |
89 | 89 | } |
90 | 90 | break; |
91 | 91 | case 'edit': |
92 | - if ( ( 'give_forms' == $typenow || 'give_forms' === $post_type ) && $pagenow == 'post.php' ) { |
|
92 | + if (('give_forms' == $typenow || 'give_forms' === $post_type) && $pagenow == 'post.php') { |
|
93 | 93 | $found = true; |
94 | 94 | } |
95 | 95 | break; |
96 | 96 | case 'new': |
97 | - if ( ( 'give_forms' == $typenow || 'give_forms' === $post_type ) && $pagenow == 'post-new.php' ) { |
|
97 | + if (('give_forms' == $typenow || 'give_forms' === $post_type) && $pagenow == 'post-new.php') { |
|
98 | 98 | $found = true; |
99 | 99 | } |
100 | 100 | break; |
101 | 101 | default: |
102 | - if ( ( 'give_forms' == $typenow || 'give_forms' === $post_type ) || 'give_forms' === $post_type || ( 'post-new.php' == $pagenow && 'give_forms' === $post_type ) ) { |
|
102 | + if (('give_forms' == $typenow || 'give_forms' === $post_type) || 'give_forms' === $post_type || ('post-new.php' == $pagenow && 'give_forms' === $post_type)) { |
|
103 | 103 | $found = true; |
104 | 104 | } |
105 | 105 | break; |
106 | 106 | } |
107 | 107 | break; |
108 | 108 | case 'categories': |
109 | - switch ( $passed_view ) { |
|
109 | + switch ($passed_view) { |
|
110 | 110 | case 'list-table': |
111 | 111 | case 'new': |
112 | - if ( ( 'give_forms' == $typenow || 'give_forms' === $post_type ) && $pagenow == 'edit-tags.php' && 'edit' !== $action && 'give_forms_category' === $taxonomy ) { |
|
112 | + if (('give_forms' == $typenow || 'give_forms' === $post_type) && $pagenow == 'edit-tags.php' && 'edit' !== $action && 'give_forms_category' === $taxonomy) { |
|
113 | 113 | $found = true; |
114 | 114 | } |
115 | 115 | break; |
116 | 116 | case 'edit': |
117 | - if ( ( 'give_forms' == $typenow || 'give_forms' === $post_type ) && $pagenow == 'edit-tags.php' && 'edit' === $action && 'give_forms_category' === $taxonomy ) { |
|
117 | + if (('give_forms' == $typenow || 'give_forms' === $post_type) && $pagenow == 'edit-tags.php' && 'edit' === $action && 'give_forms_category' === $taxonomy) { |
|
118 | 118 | $found = true; |
119 | 119 | } |
120 | 120 | break; |
121 | 121 | default: |
122 | - if ( ( 'give_forms' == $typenow || 'give_forms' === $post_type ) && $pagenow == 'edit-tags.php' && 'give_forms_category' === $taxonomy ) { |
|
122 | + if (('give_forms' == $typenow || 'give_forms' === $post_type) && $pagenow == 'edit-tags.php' && 'give_forms_category' === $taxonomy) { |
|
123 | 123 | $found = true; |
124 | 124 | } |
125 | 125 | break; |
126 | 126 | } |
127 | 127 | break; |
128 | 128 | case 'tags': |
129 | - switch ( $passed_view ) { |
|
129 | + switch ($passed_view) { |
|
130 | 130 | case 'list-table': |
131 | 131 | case 'new': |
132 | - if ( ( 'give_forms' == $typenow || 'give_forms' === $post_type ) && $pagenow == 'edit-tags.php' && 'edit' !== $action && 'give_forms_tag' === $taxonomy ) { |
|
132 | + if (('give_forms' == $typenow || 'give_forms' === $post_type) && $pagenow == 'edit-tags.php' && 'edit' !== $action && 'give_forms_tag' === $taxonomy) { |
|
133 | 133 | $found = true; |
134 | 134 | } |
135 | 135 | break; |
136 | 136 | case 'edit': |
137 | - if ( ( 'give_forms' == $typenow || 'give_forms' === $post_type ) && $pagenow == 'edit-tags.php' && 'edit' === $action && 'give_forms_tag' === $taxonomy ) { |
|
137 | + if (('give_forms' == $typenow || 'give_forms' === $post_type) && $pagenow == 'edit-tags.php' && 'edit' === $action && 'give_forms_tag' === $taxonomy) { |
|
138 | 138 | $found = true; |
139 | 139 | } |
140 | 140 | break; |
141 | 141 | default: |
142 | - if ( ( 'give_forms' == $typenow || 'give_forms' === $post_type ) && $pagenow == 'edit-tags.php' && 'give_forms_tag' === $taxonomy ) { |
|
142 | + if (('give_forms' == $typenow || 'give_forms' === $post_type) && $pagenow == 'edit-tags.php' && 'give_forms_tag' === $taxonomy) { |
|
143 | 143 | $found = true; |
144 | 144 | } |
145 | 145 | break; |
146 | 146 | } |
147 | 147 | break; |
148 | 148 | case 'payments': |
149 | - switch ( $passed_view ) { |
|
149 | + switch ($passed_view) { |
|
150 | 150 | case 'list-table': |
151 | - if ( ( 'give_forms' == $typenow || 'give_forms' === $post_type ) && $pagenow == 'edit.php' && 'give-payment-history' === $page && false === $view ) { |
|
151 | + if (('give_forms' == $typenow || 'give_forms' === $post_type) && $pagenow == 'edit.php' && 'give-payment-history' === $page && false === $view) { |
|
152 | 152 | $found = true; |
153 | 153 | } |
154 | 154 | break; |
155 | 155 | case 'edit': |
156 | - if ( ( 'give_forms' == $typenow || 'give_forms' === $post_type ) && $pagenow == 'edit.php' && 'give-payment-history' === $page && 'view-order-details' === $view ) { |
|
156 | + if (('give_forms' == $typenow || 'give_forms' === $post_type) && $pagenow == 'edit.php' && 'give-payment-history' === $page && 'view-order-details' === $view) { |
|
157 | 157 | $found = true; |
158 | 158 | } |
159 | 159 | break; |
160 | 160 | default: |
161 | - if ( ( 'give_forms' == $typenow || 'give_forms' === $post_type ) && $pagenow == 'edit.php' && 'give-payment-history' === $page ) { |
|
161 | + if (('give_forms' == $typenow || 'give_forms' === $post_type) && $pagenow == 'edit.php' && 'give-payment-history' === $page) { |
|
162 | 162 | $found = true; |
163 | 163 | } |
164 | 164 | break; |
165 | 165 | } |
166 | 166 | break; |
167 | 167 | case 'reports': |
168 | - switch ( $passed_view ) { |
|
168 | + switch ($passed_view) { |
|
169 | 169 | // If you want to do something like enqueue a script on a particular report's duration, look at $_GET[ 'range' ] |
170 | 170 | case 'earnings': |
171 | - if ( ( 'give_forms' == $typenow || 'give_forms' === $post_type ) && $pagenow == 'edit.php' && 'give-reports' === $page && ( 'earnings' === $view || '-1' === $view || false === $view ) ) { |
|
171 | + if (('give_forms' == $typenow || 'give_forms' === $post_type) && $pagenow == 'edit.php' && 'give-reports' === $page && ('earnings' === $view || '-1' === $view || false === $view)) { |
|
172 | 172 | $found = true; |
173 | 173 | } |
174 | 174 | break; |
175 | 175 | case 'donors': |
176 | - if ( ( 'give_forms' == $typenow || 'give_forms' === $post_type ) && $pagenow == 'edit.php' && 'give-reports' === $page && 'customers' === $view ) { |
|
176 | + if (('give_forms' == $typenow || 'give_forms' === $post_type) && $pagenow == 'edit.php' && 'give-reports' === $page && 'customers' === $view) { |
|
177 | 177 | $found = true; |
178 | 178 | } |
179 | 179 | break; |
180 | 180 | case 'gateways': |
181 | - if ( ( 'give_forms' == $typenow || 'give_forms' === $post_type ) && $pagenow == 'edit.php' && 'give-reports' === $page && 'gateways' === $view ) { |
|
181 | + if (('give_forms' == $typenow || 'give_forms' === $post_type) && $pagenow == 'edit.php' && 'give-reports' === $page && 'gateways' === $view) { |
|
182 | 182 | $found = true; |
183 | 183 | } |
184 | 184 | break; |
185 | 185 | case 'export': |
186 | - if ( ( 'give_forms' == $typenow || 'give_forms' === $post_type ) && $pagenow == 'edit.php' && 'give-reports' === $page && 'export' === $view ) { |
|
186 | + if (('give_forms' == $typenow || 'give_forms' === $post_type) && $pagenow == 'edit.php' && 'give-reports' === $page && 'export' === $view) { |
|
187 | 187 | $found = true; |
188 | 188 | } |
189 | 189 | break; |
190 | 190 | case 'logs': |
191 | - if ( ( 'give_forms' == $typenow || 'give_forms' === $post_type ) && $pagenow == 'edit.php' && 'give-reports' === $page && 'logs' === $view ) { |
|
191 | + if (('give_forms' == $typenow || 'give_forms' === $post_type) && $pagenow == 'edit.php' && 'give-reports' === $page && 'logs' === $view) { |
|
192 | 192 | $found = true; |
193 | 193 | } |
194 | 194 | break; |
195 | 195 | default: |
196 | - if ( ( 'give_forms' == $typenow || 'give_forms' === $post_type ) && $pagenow == 'edit.php' && 'give-reports' === $page ) { |
|
196 | + if (('give_forms' == $typenow || 'give_forms' === $post_type) && $pagenow == 'edit.php' && 'give-reports' === $page) { |
|
197 | 197 | $found = true; |
198 | 198 | } |
199 | 199 | break; |
200 | 200 | } |
201 | 201 | break; |
202 | 202 | case 'settings': |
203 | - switch ( $passed_view ) { |
|
203 | + switch ($passed_view) { |
|
204 | 204 | case 'general': |
205 | - if ( ( 'give_forms' == $typenow || 'give_forms' === $post_type ) && $pagenow == 'edit.php' && 'give-settings' === $page && ( 'general' === $tab || false === $tab ) ) { |
|
205 | + if (('give_forms' == $typenow || 'give_forms' === $post_type) && $pagenow == 'edit.php' && 'give-settings' === $page && ('general' === $tab || false === $tab)) { |
|
206 | 206 | $found = true; |
207 | 207 | } |
208 | 208 | break; |
209 | 209 | case 'gateways': |
210 | - if ( ( 'give_forms' == $typenow || 'give_forms' === $post_type ) && $pagenow == 'edit.php' && 'give-settings' === $page && 'gateways' === $tab ) { |
|
210 | + if (('give_forms' == $typenow || 'give_forms' === $post_type) && $pagenow == 'edit.php' && 'give-settings' === $page && 'gateways' === $tab) { |
|
211 | 211 | $found = true; |
212 | 212 | } |
213 | 213 | break; |
214 | 214 | case 'emails': |
215 | - if ( ( 'give_forms' == $typenow || 'give_forms' === $post_type ) && $pagenow == 'edit.php' && 'give-settings' === $page && 'emails' === $tab ) { |
|
215 | + if (('give_forms' == $typenow || 'give_forms' === $post_type) && $pagenow == 'edit.php' && 'give-settings' === $page && 'emails' === $tab) { |
|
216 | 216 | $found = true; |
217 | 217 | } |
218 | 218 | break; |
219 | 219 | case 'display': |
220 | - if ( ( 'give_forms' == $typenow || 'give_forms' === $post_type ) && $pagenow == 'edit.php' && 'give-settings' === $page && 'display' === $tab ) { |
|
220 | + if (('give_forms' == $typenow || 'give_forms' === $post_type) && $pagenow == 'edit.php' && 'give-settings' === $page && 'display' === $tab) { |
|
221 | 221 | $found = true; |
222 | 222 | } |
223 | 223 | break; |
224 | 224 | case 'licenses': |
225 | - if ( ( 'give_forms' == $typenow || 'give_forms' === $post_type ) && $pagenow == 'edit.php' && 'give-settings' === $page && 'licenses' === $tab ) { |
|
225 | + if (('give_forms' == $typenow || 'give_forms' === $post_type) && $pagenow == 'edit.php' && 'give-settings' === $page && 'licenses' === $tab) { |
|
226 | 226 | $found = true; |
227 | 227 | } |
228 | 228 | break; |
229 | 229 | case 'api': |
230 | - if ( ( 'give_forms' == $typenow || 'give_forms' === $post_type ) && $pagenow == 'edit.php' && 'give-settings' === $page && 'api' === $tab ) { |
|
230 | + if (('give_forms' == $typenow || 'give_forms' === $post_type) && $pagenow == 'edit.php' && 'give-settings' === $page && 'api' === $tab) { |
|
231 | 231 | $found = true; |
232 | 232 | } |
233 | 233 | break; |
234 | 234 | case 'advanced': |
235 | - if ( ( 'give_forms' == $typenow || 'give_forms' === $post_type ) && $pagenow == 'edit.php' && 'give-settings' === $page && 'advanced' === $tab ) { |
|
235 | + if (('give_forms' == $typenow || 'give_forms' === $post_type) && $pagenow == 'edit.php' && 'give-settings' === $page && 'advanced' === $tab) { |
|
236 | 236 | $found = true; |
237 | 237 | } |
238 | 238 | break; |
239 | 239 | case 'system_info': |
240 | - if ( ( 'give_forms' == $typenow || 'give_forms' === $post_type ) && $pagenow == 'edit.php' && 'give-settings' === $page && 'system_info' === $tab ) { |
|
240 | + if (('give_forms' == $typenow || 'give_forms' === $post_type) && $pagenow == 'edit.php' && 'give-settings' === $page && 'system_info' === $tab) { |
|
241 | 241 | $found = true; |
242 | 242 | } |
243 | 243 | break; |
244 | 244 | default: |
245 | - if ( ( 'give_forms' == $typenow || 'give_forms' === $post_type ) && $pagenow == 'edit.php' && 'give-settings' === $page ) { |
|
245 | + if (('give_forms' == $typenow || 'give_forms' === $post_type) && $pagenow == 'edit.php' && 'give-settings' === $page) { |
|
246 | 246 | $found = true; |
247 | 247 | } |
248 | 248 | break; |
249 | 249 | } |
250 | 250 | break; |
251 | 251 | case 'addons': |
252 | - if ( ( 'give_forms' == $typenow || 'give_forms' === $post_type ) && $pagenow == 'edit.php' && 'give-addons' === $page ) { |
|
252 | + if (('give_forms' == $typenow || 'give_forms' === $post_type) && $pagenow == 'edit.php' && 'give-addons' === $page) { |
|
253 | 253 | $found = true; |
254 | 254 | } |
255 | 255 | break; |
256 | 256 | case 'donors': |
257 | - switch ( $passed_view ) { |
|
257 | + switch ($passed_view) { |
|
258 | 258 | case 'list-table': |
259 | - if ( ( 'give_forms' == $typenow || 'give_forms' === $post_type ) && $pagenow == 'edit.php' && 'give-donors' === $page && false === $view ) { |
|
259 | + if (('give_forms' == $typenow || 'give_forms' === $post_type) && $pagenow == 'edit.php' && 'give-donors' === $page && false === $view) { |
|
260 | 260 | $found = true; |
261 | 261 | } |
262 | 262 | break; |
263 | 263 | case 'overview': |
264 | - if ( ( 'give_forms' == $typenow || 'give_forms' === $post_type ) && $pagenow == 'edit.php' && 'give-donors' === $page && 'overview' === $view ) { |
|
264 | + if (('give_forms' == $typenow || 'give_forms' === $post_type) && $pagenow == 'edit.php' && 'give-donors' === $page && 'overview' === $view) { |
|
265 | 265 | $found = true; |
266 | 266 | } |
267 | 267 | break; |
268 | 268 | case 'notes': |
269 | - if ( ( 'give_forms' == $typenow || 'give_forms' === $post_type ) && $pagenow == 'edit.php' && 'give-donors' === $page && 'notes' === $view ) { |
|
269 | + if (('give_forms' == $typenow || 'give_forms' === $post_type) && $pagenow == 'edit.php' && 'give-donors' === $page && 'notes' === $view) { |
|
270 | 270 | $found = true; |
271 | 271 | } |
272 | 272 | break; |
273 | 273 | default: |
274 | - if ( ( 'give_forms' == $typenow || 'give_forms' === $post_type ) && $pagenow == 'edit.php' && 'give-donors' === $page ) { |
|
274 | + if (('give_forms' == $typenow || 'give_forms' === $post_type) && $pagenow == 'edit.php' && 'give-donors' === $page) { |
|
275 | 275 | $found = true; |
276 | 276 | } |
277 | 277 | break; |
278 | 278 | } |
279 | 279 | break; |
280 | 280 | case 'reports': |
281 | - if ( ( 'give_forms' == $typenow || 'give_forms' === $post_type ) && $pagenow == 'edit.php' && 'give-reports' === $page ) { |
|
281 | + if (('give_forms' == $typenow || 'give_forms' === $post_type) && $pagenow == 'edit.php' && 'give-reports' === $page) { |
|
282 | 282 | $found = true; |
283 | 283 | } |
284 | 284 | break; |
285 | 285 | default: |
286 | 286 | global $give_payments_page, $give_settings_page, $give_reports_page, $give_system_info_page, $give_add_ons_page, $give_settings_export, $give_upgrades_screen, $give_customers_page; |
287 | 287 | |
288 | - $admin_pages = apply_filters( 'give_admin_pages', array( |
|
288 | + $admin_pages = apply_filters('give_admin_pages', array( |
|
289 | 289 | $give_payments_page, |
290 | 290 | $give_settings_page, |
291 | 291 | $give_reports_page, |
@@ -294,18 +294,18 @@ discard block |
||
294 | 294 | $give_upgrades_screen, |
295 | 295 | $give_settings_export, |
296 | 296 | $give_customers_page |
297 | - ) ); |
|
298 | - if ( 'give_forms' == $typenow || 'index.php' == $pagenow || 'post-new.php' == $pagenow || 'post.php' == $pagenow ) { |
|
297 | + )); |
|
298 | + if ('give_forms' == $typenow || 'index.php' == $pagenow || 'post-new.php' == $pagenow || 'post.php' == $pagenow) { |
|
299 | 299 | $found = true; |
300 | - if ( 'give-upgrades' === $page ) { |
|
300 | + if ('give-upgrades' === $page) { |
|
301 | 301 | $found = false; |
302 | 302 | } |
303 | - } elseif ( in_array( $pagenow, $admin_pages ) ) { |
|
303 | + } elseif (in_array($pagenow, $admin_pages)) { |
|
304 | 304 | $found = true; |
305 | 305 | } |
306 | 306 | break; |
307 | 307 | } |
308 | 308 | |
309 | - return (bool) apply_filters( 'give_is_admin_page', $found, $page, $view, $passed_page, $passed_view ); |
|
309 | + return (bool) apply_filters('give_is_admin_page', $found, $page, $view, $passed_page, $passed_view); |
|
310 | 310 | |
311 | 311 | } |
312 | 312 | \ No newline at end of file |
@@ -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 | |
@@ -23,9 +23,9 @@ discard block |
||
23 | 23 | */ |
24 | 24 | function give_get_country() { |
25 | 25 | global $give_options; |
26 | - $country = isset( $give_options['base_country'] ) ? $give_options['base_country'] : 'US'; |
|
26 | + $country = isset($give_options['base_country']) ? $give_options['base_country'] : 'US'; |
|
27 | 27 | |
28 | - return apply_filters( 'give_give_country', $country ); |
|
28 | + return apply_filters('give_give_country', $country); |
|
29 | 29 | } |
30 | 30 | |
31 | 31 | /** |
@@ -36,9 +36,9 @@ discard block |
||
36 | 36 | */ |
37 | 37 | function give_get_state() { |
38 | 38 | global $give_options; |
39 | - $state = isset( $give_options['base_state'] ) ? $give_options['base_state'] : false; |
|
39 | + $state = isset($give_options['base_state']) ? $give_options['base_state'] : false; |
|
40 | 40 | |
41 | - return apply_filters( 'give_give_state', $state ); |
|
41 | + return apply_filters('give_give_state', $state); |
|
42 | 42 | } |
43 | 43 | |
44 | 44 | /** |
@@ -50,14 +50,14 @@ discard block |
||
50 | 50 | * |
51 | 51 | * @return mixed|void A list of states for the shop's base country |
52 | 52 | */ |
53 | -function give_get_states( $country = null ) { |
|
53 | +function give_get_states($country = null) { |
|
54 | 54 | global $give_options; |
55 | 55 | |
56 | - if ( empty( $country ) ) { |
|
56 | + if (empty($country)) { |
|
57 | 57 | $country = give_get_country(); |
58 | 58 | } |
59 | 59 | |
60 | - switch ( $country ) : |
|
60 | + switch ($country) : |
|
61 | 61 | |
62 | 62 | case 'US' : |
63 | 63 | $states = give_get_states_list(); |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | |
108 | 108 | endswitch; |
109 | 109 | |
110 | - return apply_filters( 'give_give_states', $states ); |
|
110 | + return apply_filters('give_give_states', $states); |
|
111 | 111 | } |
112 | 112 | |
113 | 113 | |
@@ -120,253 +120,253 @@ discard block |
||
120 | 120 | function give_get_country_list() { |
121 | 121 | $countries = array( |
122 | 122 | '' => '', |
123 | - 'US' => esc_html__( 'United States', 'give' ), |
|
124 | - 'CA' => esc_html__( 'Canada', 'give' ), |
|
125 | - 'GB' => esc_html__( 'United Kingdom', 'give' ), |
|
126 | - 'AF' => esc_html__( 'Afghanistan', 'give' ), |
|
127 | - 'AL' => esc_html__( 'Albania', 'give' ), |
|
128 | - 'DZ' => esc_html__( 'Algeria', 'give' ), |
|
129 | - 'AS' => esc_html__( 'American Samoa', 'give' ), |
|
130 | - 'AD' => esc_html__( 'Andorra', 'give' ), |
|
131 | - 'AO' => esc_html__( 'Angola', 'give' ), |
|
132 | - 'AI' => esc_html__( 'Anguilla', 'give' ), |
|
133 | - 'AQ' => esc_html__( 'Antarctica', 'give' ), |
|
134 | - 'AG' => esc_html__( 'Antigua and Barbuda', 'give' ), |
|
135 | - 'AR' => esc_html__( 'Argentina', 'give' ), |
|
136 | - 'AM' => esc_html__( 'Armenia', 'give' ), |
|
137 | - 'AW' => esc_html__( 'Aruba', 'give' ), |
|
138 | - 'AU' => esc_html__( 'Australia', 'give' ), |
|
139 | - 'AT' => esc_html__( 'Austria', 'give' ), |
|
140 | - 'AZ' => esc_html__( 'Azerbaijan', 'give' ), |
|
141 | - 'BS' => esc_html__( 'Bahamas', 'give'), |
|
142 | - 'BH' => esc_html__( 'Bahrain', 'give' ), |
|
143 | - 'BD' => esc_html__( 'Bangladesh', 'give' ), |
|
144 | - 'BB' => esc_html__( 'Barbados', 'give' ), |
|
145 | - 'BY' => esc_html__( 'Belarus', 'give' ), |
|
146 | - 'BE' => esc_html__( 'Belgium', 'give' ), |
|
147 | - 'BZ' => esc_html__( 'Belize', 'give' ), |
|
148 | - 'BJ' => esc_html__( 'Benin', 'give' ), |
|
149 | - 'BM' => esc_html__( 'Bermuda', 'give' ), |
|
150 | - 'BT' => esc_html__( 'Bhutan', 'give' ), |
|
151 | - 'BO' => esc_html__( 'Bolivia', 'give' ), |
|
152 | - 'BA' => esc_html__( 'Bosnia and Herzegovina', 'give' ), |
|
153 | - 'BW' => esc_html__( 'Botswana', 'give' ), |
|
154 | - 'BV' => esc_html__( 'Bouvet Island', 'give' ), |
|
155 | - 'BR' => esc_html__( 'Brazil', 'give' ), |
|
156 | - 'IO' => esc_html__( 'British Indian Ocean Territory', 'give' ), |
|
157 | - 'BN' => esc_html__( 'Brunei Darrussalam', 'give' ), |
|
158 | - 'BG' => esc_html__( 'Bulgaria', 'give' ), |
|
159 | - 'BF' => esc_html__( 'Burkina Faso', 'give' ), |
|
160 | - 'BI' => esc_html__( 'Burundi', 'give' ), |
|
161 | - 'KH' => esc_html__( 'Cambodia', 'give' ), |
|
162 | - 'CM' => esc_html__( 'Cameroon', 'give' ), |
|
163 | - 'CV' => esc_html__( 'Cape Verde', 'give' ), |
|
164 | - 'KY' => esc_html__( 'Cayman Islands', 'give' ), |
|
165 | - 'CF' => esc_html__( 'Central African Republic', 'give' ), |
|
166 | - 'TD' => esc_html__( 'Chad', 'give' ), |
|
167 | - 'CL' => esc_html__( 'Chile', 'give' ), |
|
168 | - 'CN' => esc_html__( 'China', 'give' ), |
|
169 | - 'CX' => esc_html__( 'Christmas Island', 'give' ), |
|
170 | - 'CC' => esc_html__( 'Cocos Islands', 'give' ), |
|
171 | - 'CO' => esc_html__( 'Colombia', 'give' ), |
|
172 | - 'KM' => esc_html__( 'Comoros', 'give' ), |
|
173 | - 'CD' => esc_html__( 'Congo, Democratic People\'s Republic', 'give' ), |
|
174 | - 'CG' => esc_html__( 'Congo, Republic of', 'give' ), |
|
175 | - 'CK' => esc_html__( 'Cook Islands', 'give' ), |
|
176 | - 'CR' => esc_html__( 'Costa Rica', 'give' ), |
|
177 | - 'CI' => esc_html__( 'Cote d\'Ivoire', 'give' ), |
|
178 | - 'HR' => esc_html__( 'Croatia/Hrvatska', 'give' ), |
|
179 | - 'CU' => esc_html__( 'Cuba', 'give' ), |
|
180 | - 'CY' => esc_html__( 'Cyprus Island', 'give' ), |
|
181 | - 'CZ' => esc_html__( 'Czech Republic', 'give' ), |
|
182 | - 'DK' => esc_html__( 'Denmark', 'give' ), |
|
183 | - 'DJ' => esc_html__( 'Djibouti', 'give' ), |
|
184 | - 'DM' => esc_html__( 'Dominica', 'give' ), |
|
185 | - 'DO' => esc_html__( 'Dominican Republic', 'give' ), |
|
186 | - 'TP' => esc_html__( 'East Timor', 'give' ), |
|
187 | - 'EC' => esc_html__( 'Ecuador', 'give' ), |
|
188 | - 'EG' => esc_html__( 'Egypt', 'give' ), |
|
189 | - 'GQ' => esc_html__( 'Equatorial Guinea', 'give' ), |
|
190 | - 'SV' => esc_html__( 'El Salvador', 'give' ), |
|
191 | - 'ER' => esc_html__( 'Eritrea', 'give' ), |
|
192 | - 'EE' => esc_html__( 'Estonia', 'give' ), |
|
193 | - 'ET' => esc_html__( 'Ethiopia', 'give' ), |
|
194 | - 'FK' => esc_html__( 'Falkland Islands', 'give' ), |
|
195 | - 'FO' => esc_html__( 'Faroe Islands', 'give' ), |
|
196 | - 'FJ' => esc_html__( 'Fiji', 'give' ), |
|
197 | - 'FI' => esc_html__( 'Finland', 'give' ), |
|
198 | - 'FR' => esc_html__( 'France', 'give' ), |
|
199 | - 'GF' => esc_html__( 'French Guiana', 'give' ), |
|
200 | - 'PF' => esc_html__( 'French Polynesia', 'give' ), |
|
201 | - 'TF' => esc_html__( 'French Southern Territories', 'give' ), |
|
202 | - 'GA' => esc_html__( 'Gabon', 'give' ), |
|
203 | - 'GM' => esc_html__( 'Gambia', 'give' ), |
|
204 | - 'GE' => esc_html__( 'Georgia', 'give' ), |
|
205 | - 'DE' => esc_html__( 'Germany', 'give' ), |
|
206 | - 'GR' => esc_html__( 'Greece', 'give' ), |
|
207 | - 'GH' => esc_html__( 'Ghana', 'give' ), |
|
208 | - 'GI' => esc_html__( 'Gibraltar', 'give' ), |
|
209 | - 'GL' => esc_html__( 'Greenland', 'give' ), |
|
210 | - 'GD' => esc_html__( 'Grenada', 'give' ), |
|
211 | - 'GP' => esc_html__( 'Guadeloupe', 'give' ), |
|
212 | - 'GU' => esc_html__( 'Guam', 'give' ), |
|
213 | - 'GT' => esc_html__( 'Guatemala', 'give' ), |
|
214 | - 'GG' => esc_html__( 'Guernsey', 'give' ), |
|
215 | - 'GN' => esc_html__( 'Guinea', 'give' ), |
|
216 | - 'GW' => esc_html__( 'Guinea-Bissau', 'give' ), |
|
217 | - 'GY' => esc_html__( 'Guyana', 'give' ), |
|
218 | - 'HT' => esc_html__( 'Haiti', 'give' ), |
|
219 | - 'HM' => esc_html__( 'Heard and McDonald Islands', 'give' ), |
|
220 | - 'VA' => esc_html__( 'Holy See (City Vatican State)', 'give' ), |
|
221 | - 'HN' => esc_html__( 'Honduras', 'give' ), |
|
222 | - 'HK' => esc_html__( 'Hong Kong', 'give' ), |
|
223 | - 'HU' => esc_html__( 'Hungary', 'give' ), |
|
224 | - 'IS' => esc_html__( 'Iceland', 'give' ), |
|
225 | - 'IN' => esc_html__( 'India', 'give' ), |
|
226 | - 'ID' => esc_html__( 'Indonesia', 'give' ), |
|
227 | - 'IR' => esc_html__( 'Iran', 'give' ), |
|
228 | - 'IQ' => esc_html__( 'Iraq', 'give' ), |
|
229 | - 'IE' => esc_html__( 'Ireland', 'give' ), |
|
230 | - 'IM' => esc_html__( 'Isle of Man', 'give' ), |
|
231 | - 'IL' => esc_html__( 'Israel', 'give' ), |
|
232 | - 'IT' => esc_html__( 'Italy', 'give' ), |
|
233 | - 'JM' => esc_html__( 'Jamaica', 'give' ), |
|
234 | - 'JP' => esc_html__( 'Japan', 'give' ), |
|
235 | - 'JE' => esc_html__( 'Jersey', 'give' ), |
|
236 | - 'JO' => esc_html__( 'Jordan', 'give' ), |
|
237 | - 'KZ' => esc_html__( 'Kazakhstan', 'give' ), |
|
238 | - 'KE' => esc_html__( 'Kenya', 'give' ), |
|
239 | - 'KI' => esc_html__( 'Kiribati', 'give' ), |
|
240 | - 'KW' => esc_html__( 'Kuwait', 'give' ), |
|
241 | - 'KG' => esc_html__( 'Kyrgyzstan', 'give' ), |
|
242 | - 'LA' => esc_html__( 'Lao People\'s Democratic Republic', 'give' ), |
|
243 | - 'LV' => esc_html__( 'Latvia', 'give' ), |
|
244 | - 'LB' => esc_html__( 'Lebanon', 'give' ), |
|
245 | - 'LS' => esc_html__( 'Lesotho', 'give' ), |
|
246 | - 'LR' => esc_html__( 'Liberia', 'give' ), |
|
247 | - 'LY' => esc_html__( 'Libyan Arab Jamahiriya', 'give' ), |
|
248 | - 'LI' => esc_html__( 'Liechtenstein', 'give' ), |
|
249 | - 'LT' => esc_html__( 'Lithuania', 'give' ), |
|
250 | - 'LU' => esc_html__( 'Luxembourg', 'give' ), |
|
251 | - 'MO' => esc_html__( 'Macau', 'give' ), |
|
252 | - 'MK' => esc_html__( 'Macedonia', 'give' ), |
|
253 | - 'MG' => esc_html__( 'Madagascar', 'give' ), |
|
254 | - 'MW' => esc_html__( 'Malawi', 'give' ), |
|
255 | - 'MY' => esc_html__( 'Malaysia', 'give' ), |
|
256 | - 'MV' => esc_html__( 'Maldives', 'give' ), |
|
257 | - 'ML' => esc_html__( 'Mali', 'give' ), |
|
258 | - 'MT' => esc_html__( 'Malta', 'give' ), |
|
259 | - 'MH' => esc_html__( 'Marshall Islands', 'give' ), |
|
260 | - 'MQ' => esc_html__( 'Martinique', 'give' ), |
|
261 | - 'MR' => esc_html__( 'Mauritania', 'give' ), |
|
262 | - 'MU' => esc_html__( 'Mauritius', 'give' ), |
|
263 | - 'YT' => esc_html__( 'Mayotte', 'give' ), |
|
264 | - 'MX' => esc_html__( 'Mexico', 'give' ), |
|
265 | - 'FM' => esc_html__( 'Micronesia', 'give' ), |
|
266 | - 'MD' => esc_html__( 'Moldova, Republic of', 'give' ), |
|
267 | - 'MC' => esc_html__( 'Monaco', 'give' ), |
|
268 | - 'MN' => esc_html__( 'Mongolia', 'give' ), |
|
269 | - 'ME' => esc_html__( 'Montenegro', 'give' ), |
|
270 | - 'MS' => esc_html__( 'Montserrat', 'give' ), |
|
271 | - 'MA' => esc_html__( 'Morocco', 'give' ), |
|
272 | - 'MZ' => esc_html__( 'Mozambique', 'give' ), |
|
273 | - 'MM' => esc_html__( 'Myanmar', 'give' ), |
|
274 | - 'NA' => esc_html__( 'Namibia', 'give' ), |
|
275 | - 'NR' => esc_html__( 'Nauru', 'give' ), |
|
276 | - 'NP' => esc_html__( 'Nepal', 'give' ), |
|
277 | - 'NL' => esc_html__( 'Netherlands', 'give' ), |
|
278 | - 'AN' => esc_html__( 'Netherlands Antilles', 'give' ), |
|
279 | - 'NC' => esc_html__( 'New Caledonia', 'give' ), |
|
280 | - 'NZ' => esc_html__( 'New Zealand', 'give' ), |
|
281 | - 'NI' => esc_html__( 'Nicaragua', 'give' ), |
|
282 | - 'NE' => esc_html__( 'Niger', 'give' ), |
|
283 | - 'NG' => esc_html__( 'Nigeria', 'give' ), |
|
284 | - 'NU' => esc_html__( 'Niue', 'give' ), |
|
285 | - 'NF' => esc_html__( 'Norfolk Island', 'give' ), |
|
286 | - 'KP' => esc_html__( 'North Korea', 'give' ), |
|
287 | - 'MP' => esc_html__( 'Northern Mariana Islands', 'give' ), |
|
288 | - 'NO' => esc_html__( 'Norway', 'give' ), |
|
289 | - 'OM' => esc_html__( 'Oman', 'give' ), |
|
290 | - 'PK' => esc_html__( 'Pakistan', 'give' ), |
|
291 | - 'PW' => esc_html__( 'Palau', 'give' ), |
|
292 | - 'PS' => esc_html__( 'Palestinian Territories', 'give' ), |
|
293 | - 'PA' => esc_html__( 'Panama', 'give' ), |
|
294 | - 'PG' => esc_html__( 'Papua New Guinea', 'give' ), |
|
295 | - 'PY' => esc_html__( 'Paraguay', 'give' ), |
|
296 | - 'PE' => esc_html__( 'Peru', 'give' ), |
|
297 | - 'PH' => esc_html__( 'Phillipines', 'give' ), |
|
298 | - 'PN' => esc_html__( 'Pitcairn Island', 'give' ), |
|
299 | - 'PL' => esc_html__( 'Poland', 'give' ), |
|
300 | - 'PT' => esc_html__( 'Portugal', 'give' ), |
|
301 | - 'PR' => esc_html__( 'Puerto Rico', 'give' ), |
|
302 | - 'QA' => esc_html__( 'Qatar', 'give' ), |
|
303 | - 'RE' => esc_html__( 'Reunion Island', 'give' ), |
|
304 | - 'RO' => esc_html__( 'Romania', 'give' ), |
|
305 | - 'RU' => esc_html__( 'Russian Federation', 'give' ), |
|
306 | - 'RW' => esc_html__( 'Rwanda', 'give' ), |
|
307 | - 'SH' => esc_html__( 'Saint Helena', 'give' ), |
|
308 | - 'KN' => esc_html__( 'Saint Kitts and Nevis', 'give' ), |
|
309 | - 'LC' => esc_html__( 'Saint Lucia', 'give' ), |
|
310 | - 'PM' => esc_html__( 'Saint Pierre and Miquelon', 'give' ), |
|
311 | - 'VC' => esc_html__( 'Saint Vincent and the Grenadines', 'give' ), |
|
312 | - 'SM' => esc_html__( 'San Marino', 'give' ), |
|
313 | - 'ST' => esc_html__( 'Sao Tome and Principe', 'give' ), |
|
314 | - 'SA' => esc_html__( 'Saudi Arabia', 'give' ), |
|
315 | - 'SN' => esc_html__( 'Senegal', 'give' ), |
|
316 | - 'RS' => esc_html__( 'Serbia', 'give' ), |
|
317 | - 'SC' => esc_html__( 'Seychelles', 'give' ), |
|
318 | - 'SL' => esc_html__( 'Sierra Leone', 'give' ), |
|
319 | - 'SG' => esc_html__( 'Singapore', 'give' ), |
|
320 | - 'SK' => esc_html__( 'Slovak Republic', 'give' ), |
|
321 | - 'SI' => esc_html__( 'Slovenia', 'give' ), |
|
322 | - 'SB' => esc_html__( 'Solomon Islands', 'give' ), |
|
323 | - 'SO' => esc_html__( 'Somalia', 'give' ), |
|
324 | - 'ZA' => esc_html__( 'South Africa', 'give' ), |
|
325 | - 'GS' => esc_html__( 'South Georgia', 'give' ), |
|
326 | - 'KR' => esc_html__( 'South Korea', 'give' ), |
|
327 | - 'ES' => esc_html__( 'Spain', 'give' ), |
|
328 | - 'LK' => esc_html__( 'Sri Lanka', 'give' ), |
|
329 | - 'SD' => esc_html__( 'Sudan', 'give' ), |
|
330 | - 'SR' => esc_html__( 'Suriname', 'give' ), |
|
331 | - 'SJ' => esc_html__( 'Svalbard and Jan Mayen Islands', 'give' ), |
|
332 | - 'SZ' => esc_html__( 'Swaziland', 'give' ), |
|
333 | - 'SE' => esc_html__( 'Sweden', 'give' ), |
|
334 | - 'CH' => esc_html__( 'Switzerland', 'give' ), |
|
335 | - 'SY' => esc_html__( 'Syrian Arab Republic', 'give' ), |
|
336 | - 'TW' => esc_html__( 'Taiwan', 'give' ), |
|
337 | - 'TJ' => esc_html__( 'Tajikistan', 'give' ), |
|
338 | - 'TZ' => esc_html__( 'Tanzania', 'give' ), |
|
339 | - 'TG' => esc_html__( 'Togo', 'give' ), |
|
340 | - 'TK' => esc_html__( 'Tokelau', 'give' ), |
|
341 | - 'TO' => esc_html__( 'Tonga', 'give' ), |
|
342 | - 'TH' => esc_html__( 'Thailand', 'give' ), |
|
343 | - 'TT' => esc_html__( 'Trinidad and Tobago', 'give' ), |
|
344 | - 'TN' => esc_html__( 'Tunisia', 'give' ), |
|
345 | - 'TR' => esc_html__( 'Turkey', 'give' ), |
|
346 | - 'TM' => esc_html__( 'Turkmenistan', 'give' ), |
|
347 | - 'TC' => esc_html__( 'Turks and Caicos Islands', 'give' ), |
|
348 | - 'TV' => esc_html__( 'Tuvalu', 'give' ), |
|
349 | - 'UG' => esc_html__( 'Uganda', 'give' ), |
|
350 | - 'UA' => esc_html__( 'Ukraine', 'give' ), |
|
351 | - 'AE' => esc_html__( 'United Arab Emirates', 'give' ), |
|
352 | - 'UY' => esc_html__( 'Uruguay', 'give' ), |
|
353 | - 'UM' => esc_html__( 'US Minor Outlying Islands', 'give' ), |
|
354 | - 'UZ' => esc_html__( 'Uzbekistan', 'give' ), |
|
355 | - 'VU' => esc_html__( 'Vanuatu', 'give' ), |
|
356 | - 'VE' => esc_html__( 'Venezuela', 'give' ), |
|
357 | - 'VN' => esc_html__( 'Vietnam', 'give' ), |
|
358 | - 'VG' => esc_html__( 'Virgin Islands (British)', 'give' ), |
|
359 | - 'VI' => esc_html__( 'Virgin Islands (USA)', 'give' ), |
|
360 | - 'WF' => esc_html__( 'Wallis and Futuna Islands', 'give' ), |
|
361 | - 'EH' => esc_html__( 'Western Sahara', 'give' ), |
|
362 | - 'WS' => esc_html__( 'Western Samoa', 'give' ), |
|
363 | - 'YE' => esc_html__( 'Yemen', 'give' ), |
|
364 | - 'YU' => esc_html__( 'Yugoslavia', 'give' ), |
|
365 | - 'ZM' => esc_html__( 'Zambia', 'give' ), |
|
366 | - 'ZW' => esc_html__( 'Zimbabwe', 'give' ) |
|
123 | + 'US' => esc_html__('United States', 'give'), |
|
124 | + 'CA' => esc_html__('Canada', 'give'), |
|
125 | + 'GB' => esc_html__('United Kingdom', 'give'), |
|
126 | + 'AF' => esc_html__('Afghanistan', 'give'), |
|
127 | + 'AL' => esc_html__('Albania', 'give'), |
|
128 | + 'DZ' => esc_html__('Algeria', 'give'), |
|
129 | + 'AS' => esc_html__('American Samoa', 'give'), |
|
130 | + 'AD' => esc_html__('Andorra', 'give'), |
|
131 | + 'AO' => esc_html__('Angola', 'give'), |
|
132 | + 'AI' => esc_html__('Anguilla', 'give'), |
|
133 | + 'AQ' => esc_html__('Antarctica', 'give'), |
|
134 | + 'AG' => esc_html__('Antigua and Barbuda', 'give'), |
|
135 | + 'AR' => esc_html__('Argentina', 'give'), |
|
136 | + 'AM' => esc_html__('Armenia', 'give'), |
|
137 | + 'AW' => esc_html__('Aruba', 'give'), |
|
138 | + 'AU' => esc_html__('Australia', 'give'), |
|
139 | + 'AT' => esc_html__('Austria', 'give'), |
|
140 | + 'AZ' => esc_html__('Azerbaijan', 'give'), |
|
141 | + 'BS' => esc_html__('Bahamas', 'give'), |
|
142 | + 'BH' => esc_html__('Bahrain', 'give'), |
|
143 | + 'BD' => esc_html__('Bangladesh', 'give'), |
|
144 | + 'BB' => esc_html__('Barbados', 'give'), |
|
145 | + 'BY' => esc_html__('Belarus', 'give'), |
|
146 | + 'BE' => esc_html__('Belgium', 'give'), |
|
147 | + 'BZ' => esc_html__('Belize', 'give'), |
|
148 | + 'BJ' => esc_html__('Benin', 'give'), |
|
149 | + 'BM' => esc_html__('Bermuda', 'give'), |
|
150 | + 'BT' => esc_html__('Bhutan', 'give'), |
|
151 | + 'BO' => esc_html__('Bolivia', 'give'), |
|
152 | + 'BA' => esc_html__('Bosnia and Herzegovina', 'give'), |
|
153 | + 'BW' => esc_html__('Botswana', 'give'), |
|
154 | + 'BV' => esc_html__('Bouvet Island', 'give'), |
|
155 | + 'BR' => esc_html__('Brazil', 'give'), |
|
156 | + 'IO' => esc_html__('British Indian Ocean Territory', 'give'), |
|
157 | + 'BN' => esc_html__('Brunei Darrussalam', 'give'), |
|
158 | + 'BG' => esc_html__('Bulgaria', 'give'), |
|
159 | + 'BF' => esc_html__('Burkina Faso', 'give'), |
|
160 | + 'BI' => esc_html__('Burundi', 'give'), |
|
161 | + 'KH' => esc_html__('Cambodia', 'give'), |
|
162 | + 'CM' => esc_html__('Cameroon', 'give'), |
|
163 | + 'CV' => esc_html__('Cape Verde', 'give'), |
|
164 | + 'KY' => esc_html__('Cayman Islands', 'give'), |
|
165 | + 'CF' => esc_html__('Central African Republic', 'give'), |
|
166 | + 'TD' => esc_html__('Chad', 'give'), |
|
167 | + 'CL' => esc_html__('Chile', 'give'), |
|
168 | + 'CN' => esc_html__('China', 'give'), |
|
169 | + 'CX' => esc_html__('Christmas Island', 'give'), |
|
170 | + 'CC' => esc_html__('Cocos Islands', 'give'), |
|
171 | + 'CO' => esc_html__('Colombia', 'give'), |
|
172 | + 'KM' => esc_html__('Comoros', 'give'), |
|
173 | + 'CD' => esc_html__('Congo, Democratic People\'s Republic', 'give'), |
|
174 | + 'CG' => esc_html__('Congo, Republic of', 'give'), |
|
175 | + 'CK' => esc_html__('Cook Islands', 'give'), |
|
176 | + 'CR' => esc_html__('Costa Rica', 'give'), |
|
177 | + 'CI' => esc_html__('Cote d\'Ivoire', 'give'), |
|
178 | + 'HR' => esc_html__('Croatia/Hrvatska', 'give'), |
|
179 | + 'CU' => esc_html__('Cuba', 'give'), |
|
180 | + 'CY' => esc_html__('Cyprus Island', 'give'), |
|
181 | + 'CZ' => esc_html__('Czech Republic', 'give'), |
|
182 | + 'DK' => esc_html__('Denmark', 'give'), |
|
183 | + 'DJ' => esc_html__('Djibouti', 'give'), |
|
184 | + 'DM' => esc_html__('Dominica', 'give'), |
|
185 | + 'DO' => esc_html__('Dominican Republic', 'give'), |
|
186 | + 'TP' => esc_html__('East Timor', 'give'), |
|
187 | + 'EC' => esc_html__('Ecuador', 'give'), |
|
188 | + 'EG' => esc_html__('Egypt', 'give'), |
|
189 | + 'GQ' => esc_html__('Equatorial Guinea', 'give'), |
|
190 | + 'SV' => esc_html__('El Salvador', 'give'), |
|
191 | + 'ER' => esc_html__('Eritrea', 'give'), |
|
192 | + 'EE' => esc_html__('Estonia', 'give'), |
|
193 | + 'ET' => esc_html__('Ethiopia', 'give'), |
|
194 | + 'FK' => esc_html__('Falkland Islands', 'give'), |
|
195 | + 'FO' => esc_html__('Faroe Islands', 'give'), |
|
196 | + 'FJ' => esc_html__('Fiji', 'give'), |
|
197 | + 'FI' => esc_html__('Finland', 'give'), |
|
198 | + 'FR' => esc_html__('France', 'give'), |
|
199 | + 'GF' => esc_html__('French Guiana', 'give'), |
|
200 | + 'PF' => esc_html__('French Polynesia', 'give'), |
|
201 | + 'TF' => esc_html__('French Southern Territories', 'give'), |
|
202 | + 'GA' => esc_html__('Gabon', 'give'), |
|
203 | + 'GM' => esc_html__('Gambia', 'give'), |
|
204 | + 'GE' => esc_html__('Georgia', 'give'), |
|
205 | + 'DE' => esc_html__('Germany', 'give'), |
|
206 | + 'GR' => esc_html__('Greece', 'give'), |
|
207 | + 'GH' => esc_html__('Ghana', 'give'), |
|
208 | + 'GI' => esc_html__('Gibraltar', 'give'), |
|
209 | + 'GL' => esc_html__('Greenland', 'give'), |
|
210 | + 'GD' => esc_html__('Grenada', 'give'), |
|
211 | + 'GP' => esc_html__('Guadeloupe', 'give'), |
|
212 | + 'GU' => esc_html__('Guam', 'give'), |
|
213 | + 'GT' => esc_html__('Guatemala', 'give'), |
|
214 | + 'GG' => esc_html__('Guernsey', 'give'), |
|
215 | + 'GN' => esc_html__('Guinea', 'give'), |
|
216 | + 'GW' => esc_html__('Guinea-Bissau', 'give'), |
|
217 | + 'GY' => esc_html__('Guyana', 'give'), |
|
218 | + 'HT' => esc_html__('Haiti', 'give'), |
|
219 | + 'HM' => esc_html__('Heard and McDonald Islands', 'give'), |
|
220 | + 'VA' => esc_html__('Holy See (City Vatican State)', 'give'), |
|
221 | + 'HN' => esc_html__('Honduras', 'give'), |
|
222 | + 'HK' => esc_html__('Hong Kong', 'give'), |
|
223 | + 'HU' => esc_html__('Hungary', 'give'), |
|
224 | + 'IS' => esc_html__('Iceland', 'give'), |
|
225 | + 'IN' => esc_html__('India', 'give'), |
|
226 | + 'ID' => esc_html__('Indonesia', 'give'), |
|
227 | + 'IR' => esc_html__('Iran', 'give'), |
|
228 | + 'IQ' => esc_html__('Iraq', 'give'), |
|
229 | + 'IE' => esc_html__('Ireland', 'give'), |
|
230 | + 'IM' => esc_html__('Isle of Man', 'give'), |
|
231 | + 'IL' => esc_html__('Israel', 'give'), |
|
232 | + 'IT' => esc_html__('Italy', 'give'), |
|
233 | + 'JM' => esc_html__('Jamaica', 'give'), |
|
234 | + 'JP' => esc_html__('Japan', 'give'), |
|
235 | + 'JE' => esc_html__('Jersey', 'give'), |
|
236 | + 'JO' => esc_html__('Jordan', 'give'), |
|
237 | + 'KZ' => esc_html__('Kazakhstan', 'give'), |
|
238 | + 'KE' => esc_html__('Kenya', 'give'), |
|
239 | + 'KI' => esc_html__('Kiribati', 'give'), |
|
240 | + 'KW' => esc_html__('Kuwait', 'give'), |
|
241 | + 'KG' => esc_html__('Kyrgyzstan', 'give'), |
|
242 | + 'LA' => esc_html__('Lao People\'s Democratic Republic', 'give'), |
|
243 | + 'LV' => esc_html__('Latvia', 'give'), |
|
244 | + 'LB' => esc_html__('Lebanon', 'give'), |
|
245 | + 'LS' => esc_html__('Lesotho', 'give'), |
|
246 | + 'LR' => esc_html__('Liberia', 'give'), |
|
247 | + 'LY' => esc_html__('Libyan Arab Jamahiriya', 'give'), |
|
248 | + 'LI' => esc_html__('Liechtenstein', 'give'), |
|
249 | + 'LT' => esc_html__('Lithuania', 'give'), |
|
250 | + 'LU' => esc_html__('Luxembourg', 'give'), |
|
251 | + 'MO' => esc_html__('Macau', 'give'), |
|
252 | + 'MK' => esc_html__('Macedonia', 'give'), |
|
253 | + 'MG' => esc_html__('Madagascar', 'give'), |
|
254 | + 'MW' => esc_html__('Malawi', 'give'), |
|
255 | + 'MY' => esc_html__('Malaysia', 'give'), |
|
256 | + 'MV' => esc_html__('Maldives', 'give'), |
|
257 | + 'ML' => esc_html__('Mali', 'give'), |
|
258 | + 'MT' => esc_html__('Malta', 'give'), |
|
259 | + 'MH' => esc_html__('Marshall Islands', 'give'), |
|
260 | + 'MQ' => esc_html__('Martinique', 'give'), |
|
261 | + 'MR' => esc_html__('Mauritania', 'give'), |
|
262 | + 'MU' => esc_html__('Mauritius', 'give'), |
|
263 | + 'YT' => esc_html__('Mayotte', 'give'), |
|
264 | + 'MX' => esc_html__('Mexico', 'give'), |
|
265 | + 'FM' => esc_html__('Micronesia', 'give'), |
|
266 | + 'MD' => esc_html__('Moldova, Republic of', 'give'), |
|
267 | + 'MC' => esc_html__('Monaco', 'give'), |
|
268 | + 'MN' => esc_html__('Mongolia', 'give'), |
|
269 | + 'ME' => esc_html__('Montenegro', 'give'), |
|
270 | + 'MS' => esc_html__('Montserrat', 'give'), |
|
271 | + 'MA' => esc_html__('Morocco', 'give'), |
|
272 | + 'MZ' => esc_html__('Mozambique', 'give'), |
|
273 | + 'MM' => esc_html__('Myanmar', 'give'), |
|
274 | + 'NA' => esc_html__('Namibia', 'give'), |
|
275 | + 'NR' => esc_html__('Nauru', 'give'), |
|
276 | + 'NP' => esc_html__('Nepal', 'give'), |
|
277 | + 'NL' => esc_html__('Netherlands', 'give'), |
|
278 | + 'AN' => esc_html__('Netherlands Antilles', 'give'), |
|
279 | + 'NC' => esc_html__('New Caledonia', 'give'), |
|
280 | + 'NZ' => esc_html__('New Zealand', 'give'), |
|
281 | + 'NI' => esc_html__('Nicaragua', 'give'), |
|
282 | + 'NE' => esc_html__('Niger', 'give'), |
|
283 | + 'NG' => esc_html__('Nigeria', 'give'), |
|
284 | + 'NU' => esc_html__('Niue', 'give'), |
|
285 | + 'NF' => esc_html__('Norfolk Island', 'give'), |
|
286 | + 'KP' => esc_html__('North Korea', 'give'), |
|
287 | + 'MP' => esc_html__('Northern Mariana Islands', 'give'), |
|
288 | + 'NO' => esc_html__('Norway', 'give'), |
|
289 | + 'OM' => esc_html__('Oman', 'give'), |
|
290 | + 'PK' => esc_html__('Pakistan', 'give'), |
|
291 | + 'PW' => esc_html__('Palau', 'give'), |
|
292 | + 'PS' => esc_html__('Palestinian Territories', 'give'), |
|
293 | + 'PA' => esc_html__('Panama', 'give'), |
|
294 | + 'PG' => esc_html__('Papua New Guinea', 'give'), |
|
295 | + 'PY' => esc_html__('Paraguay', 'give'), |
|
296 | + 'PE' => esc_html__('Peru', 'give'), |
|
297 | + 'PH' => esc_html__('Phillipines', 'give'), |
|
298 | + 'PN' => esc_html__('Pitcairn Island', 'give'), |
|
299 | + 'PL' => esc_html__('Poland', 'give'), |
|
300 | + 'PT' => esc_html__('Portugal', 'give'), |
|
301 | + 'PR' => esc_html__('Puerto Rico', 'give'), |
|
302 | + 'QA' => esc_html__('Qatar', 'give'), |
|
303 | + 'RE' => esc_html__('Reunion Island', 'give'), |
|
304 | + 'RO' => esc_html__('Romania', 'give'), |
|
305 | + 'RU' => esc_html__('Russian Federation', 'give'), |
|
306 | + 'RW' => esc_html__('Rwanda', 'give'), |
|
307 | + 'SH' => esc_html__('Saint Helena', 'give'), |
|
308 | + 'KN' => esc_html__('Saint Kitts and Nevis', 'give'), |
|
309 | + 'LC' => esc_html__('Saint Lucia', 'give'), |
|
310 | + 'PM' => esc_html__('Saint Pierre and Miquelon', 'give'), |
|
311 | + 'VC' => esc_html__('Saint Vincent and the Grenadines', 'give'), |
|
312 | + 'SM' => esc_html__('San Marino', 'give'), |
|
313 | + 'ST' => esc_html__('Sao Tome and Principe', 'give'), |
|
314 | + 'SA' => esc_html__('Saudi Arabia', 'give'), |
|
315 | + 'SN' => esc_html__('Senegal', 'give'), |
|
316 | + 'RS' => esc_html__('Serbia', 'give'), |
|
317 | + 'SC' => esc_html__('Seychelles', 'give'), |
|
318 | + 'SL' => esc_html__('Sierra Leone', 'give'), |
|
319 | + 'SG' => esc_html__('Singapore', 'give'), |
|
320 | + 'SK' => esc_html__('Slovak Republic', 'give'), |
|
321 | + 'SI' => esc_html__('Slovenia', 'give'), |
|
322 | + 'SB' => esc_html__('Solomon Islands', 'give'), |
|
323 | + 'SO' => esc_html__('Somalia', 'give'), |
|
324 | + 'ZA' => esc_html__('South Africa', 'give'), |
|
325 | + 'GS' => esc_html__('South Georgia', 'give'), |
|
326 | + 'KR' => esc_html__('South Korea', 'give'), |
|
327 | + 'ES' => esc_html__('Spain', 'give'), |
|
328 | + 'LK' => esc_html__('Sri Lanka', 'give'), |
|
329 | + 'SD' => esc_html__('Sudan', 'give'), |
|
330 | + 'SR' => esc_html__('Suriname', 'give'), |
|
331 | + 'SJ' => esc_html__('Svalbard and Jan Mayen Islands', 'give'), |
|
332 | + 'SZ' => esc_html__('Swaziland', 'give'), |
|
333 | + 'SE' => esc_html__('Sweden', 'give'), |
|
334 | + 'CH' => esc_html__('Switzerland', 'give'), |
|
335 | + 'SY' => esc_html__('Syrian Arab Republic', 'give'), |
|
336 | + 'TW' => esc_html__('Taiwan', 'give'), |
|
337 | + 'TJ' => esc_html__('Tajikistan', 'give'), |
|
338 | + 'TZ' => esc_html__('Tanzania', 'give'), |
|
339 | + 'TG' => esc_html__('Togo', 'give'), |
|
340 | + 'TK' => esc_html__('Tokelau', 'give'), |
|
341 | + 'TO' => esc_html__('Tonga', 'give'), |
|
342 | + 'TH' => esc_html__('Thailand', 'give'), |
|
343 | + 'TT' => esc_html__('Trinidad and Tobago', 'give'), |
|
344 | + 'TN' => esc_html__('Tunisia', 'give'), |
|
345 | + 'TR' => esc_html__('Turkey', 'give'), |
|
346 | + 'TM' => esc_html__('Turkmenistan', 'give'), |
|
347 | + 'TC' => esc_html__('Turks and Caicos Islands', 'give'), |
|
348 | + 'TV' => esc_html__('Tuvalu', 'give'), |
|
349 | + 'UG' => esc_html__('Uganda', 'give'), |
|
350 | + 'UA' => esc_html__('Ukraine', 'give'), |
|
351 | + 'AE' => esc_html__('United Arab Emirates', 'give'), |
|
352 | + 'UY' => esc_html__('Uruguay', 'give'), |
|
353 | + 'UM' => esc_html__('US Minor Outlying Islands', 'give'), |
|
354 | + 'UZ' => esc_html__('Uzbekistan', 'give'), |
|
355 | + 'VU' => esc_html__('Vanuatu', 'give'), |
|
356 | + 'VE' => esc_html__('Venezuela', 'give'), |
|
357 | + 'VN' => esc_html__('Vietnam', 'give'), |
|
358 | + 'VG' => esc_html__('Virgin Islands (British)', 'give'), |
|
359 | + 'VI' => esc_html__('Virgin Islands (USA)', 'give'), |
|
360 | + 'WF' => esc_html__('Wallis and Futuna Islands', 'give'), |
|
361 | + 'EH' => esc_html__('Western Sahara', 'give'), |
|
362 | + 'WS' => esc_html__('Western Samoa', 'give'), |
|
363 | + 'YE' => esc_html__('Yemen', 'give'), |
|
364 | + 'YU' => esc_html__('Yugoslavia', 'give'), |
|
365 | + 'ZM' => esc_html__('Zambia', 'give'), |
|
366 | + 'ZW' => esc_html__('Zimbabwe', 'give') |
|
367 | 367 | ); |
368 | 368 | |
369 | - return apply_filters( 'give_countries', $countries ); |
|
369 | + return apply_filters('give_countries', $countries); |
|
370 | 370 | } |
371 | 371 | |
372 | 372 | /** |
@@ -447,7 +447,7 @@ discard block |
||
447 | 447 | 'AP' => 'Armed Forces - Pacific' |
448 | 448 | ); |
449 | 449 | |
450 | - return apply_filters( 'give_us_states', $states ); |
|
450 | + return apply_filters('give_us_states', $states); |
|
451 | 451 | } |
452 | 452 | |
453 | 453 | /** |
@@ -460,22 +460,22 @@ discard block |
||
460 | 460 | function give_get_provinces_list() { |
461 | 461 | $provinces = array( |
462 | 462 | '' => '', |
463 | - 'AB' => esc_html__('Alberta', 'give' ), |
|
464 | - 'BC' => esc_html__('British Columbia', 'give' ), |
|
465 | - 'MB' => esc_html__('Manitoba', 'give' ), |
|
466 | - 'NB' => esc_html__('New Brunswick', 'give' ), |
|
467 | - 'NL' => esc_html__('Newfoundland and Labrador', 'give' ), |
|
468 | - 'NS' => esc_html__('Nova Scotia', 'give' ), |
|
469 | - 'NT' => esc_html__('Northwest Territories', 'give' ), |
|
470 | - 'NU' => esc_html__('Nunavut', 'give' ), |
|
471 | - 'ON' => esc_html__('Ontario', 'give' ), |
|
472 | - 'PE' => esc_html__('Prince Edward Island', 'give' ), |
|
473 | - 'QC' => esc_html__('Quebec', 'give' ), |
|
474 | - 'SK' => esc_html__('Saskatchewan', 'give' ), |
|
475 | - 'YT' => esc_html__('Yukon', 'give' ) |
|
463 | + 'AB' => esc_html__('Alberta', 'give'), |
|
464 | + 'BC' => esc_html__('British Columbia', 'give'), |
|
465 | + 'MB' => esc_html__('Manitoba', 'give'), |
|
466 | + 'NB' => esc_html__('New Brunswick', 'give'), |
|
467 | + 'NL' => esc_html__('Newfoundland and Labrador', 'give'), |
|
468 | + 'NS' => esc_html__('Nova Scotia', 'give'), |
|
469 | + 'NT' => esc_html__('Northwest Territories', 'give'), |
|
470 | + 'NU' => esc_html__('Nunavut', 'give'), |
|
471 | + 'ON' => esc_html__('Ontario', 'give'), |
|
472 | + 'PE' => esc_html__('Prince Edward Island', 'give'), |
|
473 | + 'QC' => esc_html__('Quebec', 'give'), |
|
474 | + 'SK' => esc_html__('Saskatchewan', 'give'), |
|
475 | + 'YT' => esc_html__('Yukon', 'give') |
|
476 | 476 | ); |
477 | 477 | |
478 | - return apply_filters( 'give_canada_provinces', $provinces ); |
|
478 | + return apply_filters('give_canada_provinces', $provinces); |
|
479 | 479 | } |
480 | 480 | |
481 | 481 | /** |
@@ -497,7 +497,7 @@ discard block |
||
497 | 497 | 'WA' => 'Western Australia' |
498 | 498 | ); |
499 | 499 | |
500 | - return apply_filters( 'give_australian_states', $states ); |
|
500 | + return apply_filters('give_australian_states', $states); |
|
501 | 501 | } |
502 | 502 | |
503 | 503 | /** |
@@ -538,7 +538,7 @@ discard block |
||
538 | 538 | 'TO' => 'Tocantins' |
539 | 539 | ); |
540 | 540 | |
541 | - return apply_filters( 'give_brazil_states', $states ); |
|
541 | + return apply_filters('give_brazil_states', $states); |
|
542 | 542 | } |
543 | 543 | |
544 | 544 | /** |
@@ -555,7 +555,7 @@ discard block |
||
555 | 555 | 'NEW TERRITORIES' => 'New Territories' |
556 | 556 | ); |
557 | 557 | |
558 | - return apply_filters( 'give_hong_kong_states', $states ); |
|
558 | + return apply_filters('give_hong_kong_states', $states); |
|
559 | 559 | } |
560 | 560 | |
561 | 561 | /** |
@@ -589,7 +589,7 @@ discard block |
||
589 | 589 | 'ZA' => 'Zala' |
590 | 590 | ); |
591 | 591 | |
592 | - return apply_filters( 'give_hungary_states', $states ); |
|
592 | + return apply_filters('give_hungary_states', $states); |
|
593 | 593 | } |
594 | 594 | |
595 | 595 | /** |
@@ -635,7 +635,7 @@ discard block |
||
635 | 635 | 'CN32' => 'Xinjiang / 新疆' |
636 | 636 | ); |
637 | 637 | |
638 | - return apply_filters( 'give_chinese_states', $states ); |
|
638 | + return apply_filters('give_chinese_states', $states); |
|
639 | 639 | } |
640 | 640 | |
641 | 641 | /** |
@@ -664,7 +664,7 @@ discard block |
||
664 | 664 | 'WC' => 'West Coast' |
665 | 665 | ); |
666 | 666 | |
667 | - return apply_filters( 'give_new_zealand_states', $states ); |
|
667 | + return apply_filters('give_new_zealand_states', $states); |
|
668 | 668 | } |
669 | 669 | |
670 | 670 | /** |
@@ -712,7 +712,7 @@ discard block |
||
712 | 712 | 'PB' => 'Papua Barat' |
713 | 713 | ); |
714 | 714 | |
715 | - return apply_filters( 'give_indonesia_states', $states ); |
|
715 | + return apply_filters('give_indonesia_states', $states); |
|
716 | 716 | } |
717 | 717 | |
718 | 718 | /** |
@@ -762,7 +762,7 @@ discard block |
||
762 | 762 | 'PY' => 'Pondicherry (Puducherry)' |
763 | 763 | ); |
764 | 764 | |
765 | - return apply_filters( 'give_indian_states', $states ); |
|
765 | + return apply_filters('give_indian_states', $states); |
|
766 | 766 | } |
767 | 767 | |
768 | 768 | /** |
@@ -792,7 +792,7 @@ discard block |
||
792 | 792 | 'PJY' => 'W.P. Putrajaya' |
793 | 793 | ); |
794 | 794 | |
795 | - return apply_filters( 'give_malaysian_states', $states ); |
|
795 | + return apply_filters('give_malaysian_states', $states); |
|
796 | 796 | } |
797 | 797 | |
798 | 798 | /** |
@@ -815,7 +815,7 @@ discard block |
||
815 | 815 | 'WC' => 'Western Cape' |
816 | 816 | ); |
817 | 817 | |
818 | - return apply_filters( 'give_south_african_states', $states ); |
|
818 | + return apply_filters('give_south_african_states', $states); |
|
819 | 819 | } |
820 | 820 | |
821 | 821 | /** |
@@ -906,7 +906,7 @@ discard block |
||
906 | 906 | 'TH-35' => 'Yasothon (ยโสธร)' |
907 | 907 | ); |
908 | 908 | |
909 | - return apply_filters( 'give_thailand_states', $states ); |
|
909 | + return apply_filters('give_thailand_states', $states); |
|
910 | 910 | } |
911 | 911 | |
912 | 912 | /** |
@@ -918,59 +918,59 @@ discard block |
||
918 | 918 | function give_get_spain_states_list() { |
919 | 919 | $states = array( |
920 | 920 | '' => '', |
921 | - 'C' => esc_html__( 'A Coruña', 'give' ), |
|
922 | - 'VI' => esc_html__( 'Araba', 'give' ), |
|
923 | - 'AB' => esc_html__( 'Albacete', 'give' ), |
|
924 | - 'A' => esc_html__( 'Alicante', 'give' ), |
|
925 | - 'AL' => esc_html__( 'Almería', 'give' ), |
|
926 | - 'O' => esc_html__( 'Asturias', 'give' ), |
|
927 | - 'AV' => esc_html__( 'Ávila', 'give' ), |
|
928 | - 'BA' => esc_html__( 'Badajoz', 'give' ), |
|
929 | - 'PM' => esc_html__( 'Baleares', 'give' ), |
|
930 | - 'B' => esc_html__( 'Barcelona', 'give' ), |
|
931 | - 'BU' => esc_html__( 'Burgos', 'give' ), |
|
932 | - 'CC' => esc_html__( 'Cáceres', 'give' ), |
|
933 | - 'CA' => esc_html__( 'Cádiz', 'give' ), |
|
934 | - 'S' => esc_html__( 'Cantabria', 'give' ), |
|
935 | - 'CS' => esc_html__( 'Castellón', 'give' ), |
|
936 | - 'CE' => esc_html__( 'Ceuta', 'give' ), |
|
937 | - 'CR' => esc_html__( 'Ciudad Real', 'give' ), |
|
938 | - 'CO' => esc_html__( 'Córdoba', 'give' ), |
|
939 | - 'CU' => esc_html__( 'Cuenca', 'give' ), |
|
940 | - 'GI' => esc_html__( 'Girona', 'give' ), |
|
941 | - 'GR' => esc_html__( 'Granada', 'give' ), |
|
942 | - 'GU' => esc_html__( 'Guadalajara', 'give' ), |
|
943 | - 'SS' => esc_html__( 'Gipuzkoa', 'give' ), |
|
944 | - 'H' => esc_html__( 'Huelva', 'give' ), |
|
945 | - 'HU' => esc_html__( 'Huesca', 'give' ), |
|
946 | - 'J' => esc_html__( 'Jaén', 'give' ), |
|
947 | - 'LO' => esc_html__( 'La Rioja', 'give' ), |
|
948 | - 'GC' => esc_html__( 'Las Palmas', 'give' ), |
|
949 | - 'LE' => esc_html__( 'León', 'give' ), |
|
950 | - 'L' => esc_html__( 'Lleida', 'give' ), |
|
951 | - 'LU' => esc_html__( 'Lugo', 'give' ), |
|
952 | - 'M' => esc_html__( 'Madrid', 'give' ), |
|
953 | - 'MA' => esc_html__( 'Málaga', 'give' ), |
|
954 | - 'ML' => esc_html__( 'Melilla', 'give' ), |
|
955 | - 'MU' => esc_html__( 'Murcia', 'give' ), |
|
956 | - 'NA' => esc_html__( 'Navarra', 'give' ), |
|
957 | - 'OR' => esc_html__( 'Ourense', 'give' ), |
|
958 | - 'P' => esc_html__( 'Palencia', 'give' ), |
|
959 | - 'PO' => esc_html__( 'Pontevedra', 'give' ), |
|
960 | - 'SA' => esc_html__( 'Salamanca', 'give' ), |
|
961 | - 'TF' => esc_html__( 'Santa Cruz de Tenerife', 'give' ), |
|
962 | - 'SG' => esc_html__( 'Segovia', 'give' ), |
|
963 | - 'SE' => esc_html__( 'Sevilla', 'give' ), |
|
964 | - 'SO' => esc_html__( 'Soria', 'give' ), |
|
965 | - 'T' => esc_html__( 'Tarragona', 'give' ), |
|
966 | - 'TE' => esc_html__( 'Teruel', 'give' ), |
|
967 | - 'TO' => esc_html__( 'Toledo', 'give' ), |
|
968 | - 'V' => esc_html__( 'Valencia', 'give' ), |
|
969 | - 'VA' => esc_html__( 'Valladolid', 'give' ), |
|
970 | - 'BI' => esc_html__( 'Bizkaia', 'give' ), |
|
971 | - 'ZA' => esc_html__( 'Zamora', 'give' ), |
|
972 | - 'Z' => esc_html__( 'Zaragoza', 'give' ) |
|
921 | + 'C' => esc_html__('A Coruña', 'give'), |
|
922 | + 'VI' => esc_html__('Araba', 'give'), |
|
923 | + 'AB' => esc_html__('Albacete', 'give'), |
|
924 | + 'A' => esc_html__('Alicante', 'give'), |
|
925 | + 'AL' => esc_html__('Almería', 'give'), |
|
926 | + 'O' => esc_html__('Asturias', 'give'), |
|
927 | + 'AV' => esc_html__('Ávila', 'give'), |
|
928 | + 'BA' => esc_html__('Badajoz', 'give'), |
|
929 | + 'PM' => esc_html__('Baleares', 'give'), |
|
930 | + 'B' => esc_html__('Barcelona', 'give'), |
|
931 | + 'BU' => esc_html__('Burgos', 'give'), |
|
932 | + 'CC' => esc_html__('Cáceres', 'give'), |
|
933 | + 'CA' => esc_html__('Cádiz', 'give'), |
|
934 | + 'S' => esc_html__('Cantabria', 'give'), |
|
935 | + 'CS' => esc_html__('Castellón', 'give'), |
|
936 | + 'CE' => esc_html__('Ceuta', 'give'), |
|
937 | + 'CR' => esc_html__('Ciudad Real', 'give'), |
|
938 | + 'CO' => esc_html__('Córdoba', 'give'), |
|
939 | + 'CU' => esc_html__('Cuenca', 'give'), |
|
940 | + 'GI' => esc_html__('Girona', 'give'), |
|
941 | + 'GR' => esc_html__('Granada', 'give'), |
|
942 | + 'GU' => esc_html__('Guadalajara', 'give'), |
|
943 | + 'SS' => esc_html__('Gipuzkoa', 'give'), |
|
944 | + 'H' => esc_html__('Huelva', 'give'), |
|
945 | + 'HU' => esc_html__('Huesca', 'give'), |
|
946 | + 'J' => esc_html__('Jaén', 'give'), |
|
947 | + 'LO' => esc_html__('La Rioja', 'give'), |
|
948 | + 'GC' => esc_html__('Las Palmas', 'give'), |
|
949 | + 'LE' => esc_html__('León', 'give'), |
|
950 | + 'L' => esc_html__('Lleida', 'give'), |
|
951 | + 'LU' => esc_html__('Lugo', 'give'), |
|
952 | + 'M' => esc_html__('Madrid', 'give'), |
|
953 | + 'MA' => esc_html__('Málaga', 'give'), |
|
954 | + 'ML' => esc_html__('Melilla', 'give'), |
|
955 | + 'MU' => esc_html__('Murcia', 'give'), |
|
956 | + 'NA' => esc_html__('Navarra', 'give'), |
|
957 | + 'OR' => esc_html__('Ourense', 'give'), |
|
958 | + 'P' => esc_html__('Palencia', 'give'), |
|
959 | + 'PO' => esc_html__('Pontevedra', 'give'), |
|
960 | + 'SA' => esc_html__('Salamanca', 'give'), |
|
961 | + 'TF' => esc_html__('Santa Cruz de Tenerife', 'give'), |
|
962 | + 'SG' => esc_html__('Segovia', 'give'), |
|
963 | + 'SE' => esc_html__('Sevilla', 'give'), |
|
964 | + 'SO' => esc_html__('Soria', 'give'), |
|
965 | + 'T' => esc_html__('Tarragona', 'give'), |
|
966 | + 'TE' => esc_html__('Teruel', 'give'), |
|
967 | + 'TO' => esc_html__('Toledo', 'give'), |
|
968 | + 'V' => esc_html__('Valencia', 'give'), |
|
969 | + 'VA' => esc_html__('Valladolid', 'give'), |
|
970 | + 'BI' => esc_html__('Bizkaia', 'give'), |
|
971 | + 'ZA' => esc_html__('Zamora', 'give'), |
|
972 | + 'Z' => esc_html__('Zaragoza', 'give') |
|
973 | 973 | ); |
974 | 974 | |
975 | - return apply_filters( 'give_spain_states', $states ); |
|
975 | + return apply_filters('give_spain_states', $states); |
|
976 | 976 | } |
@@ -42,16 +42,16 @@ |
||
42 | 42 | 'minWidth' => 320, |
43 | 43 | 'tooltip' => esc_attr__( 'Enter an URL here to redirect to after login.', 'give' ), |
44 | 44 | ), |
45 | - array( |
|
46 | - 'type' => 'container', |
|
47 | - 'html' => sprintf( '<p class="no-margin">%s</p>', esc_html__( 'Logout Redirect URL (optional):', 'give' ) ), |
|
48 | - ), |
|
49 | - array( |
|
50 | - 'type' => 'textbox', |
|
51 | - 'name' => 'logout-redirect', |
|
52 | - 'minWidth' => 320, |
|
53 | - 'tooltip' => esc_attr__( 'Enter an URL here to redirect to after logout.', 'give' ), |
|
54 | - ), |
|
45 | + array( |
|
46 | + 'type' => 'container', |
|
47 | + 'html' => sprintf( '<p class="no-margin">%s</p>', esc_html__( 'Logout Redirect URL (optional):', 'give' ) ), |
|
48 | + ), |
|
49 | + array( |
|
50 | + 'type' => 'textbox', |
|
51 | + 'name' => 'logout-redirect', |
|
52 | + 'minWidth' => 320, |
|
53 | + 'tooltip' => esc_attr__( 'Enter an URL here to redirect to after logout.', 'give' ), |
|
54 | + ), |
|
55 | 55 | ); |
56 | 56 | } |
57 | 57 | } |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | * @since 1.3.0 |
10 | 10 | */ |
11 | 11 | |
12 | -defined( 'ABSPATH' ) or exit; |
|
12 | +defined('ABSPATH') or exit; |
|
13 | 13 | |
14 | 14 | class Give_Shortcode_Login extends Give_Shortcode_Generator { |
15 | 15 | |
@@ -18,10 +18,10 @@ discard block |
||
18 | 18 | */ |
19 | 19 | public function __construct() { |
20 | 20 | |
21 | - $this->shortcode['title'] = esc_html__( 'Login', 'give' ); |
|
22 | - $this->shortcode['label'] = esc_html__( 'Login', 'give' ); |
|
21 | + $this->shortcode['title'] = esc_html__('Login', 'give'); |
|
22 | + $this->shortcode['label'] = esc_html__('Login', 'give'); |
|
23 | 23 | |
24 | - parent::__construct( 'give_login' ); |
|
24 | + parent::__construct('give_login'); |
|
25 | 25 | } |
26 | 26 | |
27 | 27 | /** |
@@ -34,23 +34,23 @@ discard block |
||
34 | 34 | return array( |
35 | 35 | array( |
36 | 36 | 'type' => 'container', |
37 | - 'html' => sprintf( '<p class="no-margin">%s</p>', esc_html__( 'Login Redirect URL (optional):', 'give' ) ), |
|
37 | + 'html' => sprintf('<p class="no-margin">%s</p>', esc_html__('Login Redirect URL (optional):', 'give')), |
|
38 | 38 | ), |
39 | 39 | array( |
40 | 40 | 'type' => 'textbox', |
41 | 41 | 'name' => 'login-redirect', |
42 | 42 | 'minWidth' => 320, |
43 | - 'tooltip' => esc_attr__( 'Enter an URL here to redirect to after login.', 'give' ), |
|
43 | + 'tooltip' => esc_attr__('Enter an URL here to redirect to after login.', 'give'), |
|
44 | 44 | ), |
45 | 45 | array( |
46 | 46 | 'type' => 'container', |
47 | - 'html' => sprintf( '<p class="no-margin">%s</p>', esc_html__( 'Logout Redirect URL (optional):', 'give' ) ), |
|
47 | + 'html' => sprintf('<p class="no-margin">%s</p>', esc_html__('Logout Redirect URL (optional):', 'give')), |
|
48 | 48 | ), |
49 | 49 | array( |
50 | 50 | 'type' => 'textbox', |
51 | 51 | 'name' => 'logout-redirect', |
52 | 52 | 'minWidth' => 320, |
53 | - 'tooltip' => esc_attr__( 'Enter an URL here to redirect to after logout.', 'give' ), |
|
53 | + 'tooltip' => esc_attr__('Enter an URL here to redirect to after logout.', 'give'), |
|
54 | 54 | ), |
55 | 55 | ); |
56 | 56 | } |
@@ -248,8 +248,8 @@ |
||
248 | 248 | |
249 | 249 | // do not reindex array! |
250 | 250 | $field['options'] = array( |
251 | - '' => ( $field['placeholder'] ? $field['placeholder'] : esc_attr__( '- Select -', 'give' ) ), |
|
252 | - ) + $field['options']; |
|
251 | + '' => ( $field['placeholder'] ? $field['placeholder'] : esc_attr__( '- Select -', 'give' ) ), |
|
252 | + ) + $field['options']; |
|
253 | 253 | |
254 | 254 | foreach ( $field['options'] as $value => $text ) { |
255 | 255 | $new_listbox['values'][] = array( |
@@ -10,7 +10,7 @@ discard block |
||
10 | 10 | * @since 1.3 |
11 | 11 | */ |
12 | 12 | |
13 | -defined( 'ABSPATH' ) or exit; |
|
13 | +defined('ABSPATH') or exit; |
|
14 | 14 | |
15 | 15 | /** |
16 | 16 | * Class Give_Shortcode_Generator |
@@ -59,12 +59,12 @@ discard block |
||
59 | 59 | * |
60 | 60 | * @since 1.0 |
61 | 61 | */ |
62 | - public function __construct( $shortcode ) { |
|
62 | + public function __construct($shortcode) { |
|
63 | 63 | |
64 | 64 | |
65 | 65 | $this->shortcode_tag = $shortcode; |
66 | 66 | |
67 | - add_action( 'admin_init', array( $this, 'init' ) ); |
|
67 | + add_action('admin_init', array($this, 'init')); |
|
68 | 68 | |
69 | 69 | } |
70 | 70 | |
@@ -75,9 +75,9 @@ discard block |
||
75 | 75 | */ |
76 | 76 | public function init() { |
77 | 77 | |
78 | - if ( $this->shortcode_tag ) { |
|
78 | + if ($this->shortcode_tag) { |
|
79 | 79 | |
80 | - $this->self = get_class( $this ); |
|
80 | + $this->self = get_class($this); |
|
81 | 81 | |
82 | 82 | $this->errors = array(); |
83 | 83 | $this->required = array(); |
@@ -86,18 +86,18 @@ discard block |
||
86 | 86 | $fields = $this->get_fields(); |
87 | 87 | |
88 | 88 | $defaults = array( |
89 | - 'btn_close' => esc_html__( 'Close', 'give' ), |
|
90 | - 'btn_okay' => esc_html__( 'Insert Shortcode', 'give' ), |
|
89 | + 'btn_close' => esc_html__('Close', 'give'), |
|
90 | + 'btn_okay' => esc_html__('Insert Shortcode', 'give'), |
|
91 | 91 | 'errors' => $this->errors, |
92 | 92 | 'fields' => $fields, |
93 | - 'label' => '[' . $this->shortcode_tag . ']', |
|
93 | + 'label' => '['.$this->shortcode_tag.']', |
|
94 | 94 | 'required' => $this->required, |
95 | - 'title' => esc_html__( 'Insert Shortcode', 'give' ), |
|
95 | + 'title' => esc_html__('Insert Shortcode', 'give'), |
|
96 | 96 | ); |
97 | 97 | |
98 | - if ( user_can_richedit() ) { |
|
98 | + if (user_can_richedit()) { |
|
99 | 99 | |
100 | - Give_Shortcode_Button::$shortcodes[ $this->shortcode_tag ] = wp_parse_args( $this->shortcode, $defaults ); |
|
100 | + Give_Shortcode_Button::$shortcodes[$this->shortcode_tag] = wp_parse_args($this->shortcode, $defaults); |
|
101 | 101 | |
102 | 102 | } |
103 | 103 | } |
@@ -126,13 +126,13 @@ discard block |
||
126 | 126 | * |
127 | 127 | * @since 1.0 |
128 | 128 | */ |
129 | - protected function generate_fields( $defined_fields ) { |
|
129 | + protected function generate_fields($defined_fields) { |
|
130 | 130 | |
131 | 131 | $fields = array(); |
132 | 132 | |
133 | - if ( is_array( $defined_fields ) ) { |
|
133 | + if (is_array($defined_fields)) { |
|
134 | 134 | |
135 | - foreach ( $defined_fields as $field ) { |
|
135 | + foreach ($defined_fields as $field) { |
|
136 | 136 | |
137 | 137 | $defaults = array( |
138 | 138 | 'label' => false, |
@@ -143,14 +143,14 @@ discard block |
||
143 | 143 | 'type' => '', |
144 | 144 | ); |
145 | 145 | |
146 | - $field = wp_parse_args( (array) $field, $defaults ); |
|
147 | - $method = 'generate_' . strtolower( $field['type'] ); |
|
146 | + $field = wp_parse_args((array) $field, $defaults); |
|
147 | + $method = 'generate_'.strtolower($field['type']); |
|
148 | 148 | |
149 | - if ( method_exists( $this, $method ) ) { |
|
149 | + if (method_exists($this, $method)) { |
|
150 | 150 | |
151 | - $field = call_user_func( array( $this, $method ), $field ); |
|
151 | + $field = call_user_func(array($this, $method), $field); |
|
152 | 152 | |
153 | - if ( $field ) { |
|
153 | + if ($field) { |
|
154 | 154 | $fields[] = $field; |
155 | 155 | } |
156 | 156 | } |
@@ -170,22 +170,22 @@ discard block |
||
170 | 170 | protected function get_fields() { |
171 | 171 | |
172 | 172 | $defined_fields = $this->define_fields(); |
173 | - $generated_fields = $this->generate_fields( $defined_fields ); |
|
173 | + $generated_fields = $this->generate_fields($defined_fields); |
|
174 | 174 | |
175 | 175 | $errors = array(); |
176 | 176 | |
177 | - if ( ! empty( $this->errors ) ) { |
|
178 | - foreach ( $this->required as $name => $alert ) { |
|
179 | - if ( false === array_search( $name, array_column( $generated_fields, 'name' ) ) ) { |
|
177 | + if ( ! empty($this->errors)) { |
|
178 | + foreach ($this->required as $name => $alert) { |
|
179 | + if (false === array_search($name, array_column($generated_fields, 'name'))) { |
|
180 | 180 | |
181 | - $errors[] = $this->errors[ $name ]; |
|
181 | + $errors[] = $this->errors[$name]; |
|
182 | 182 | } |
183 | 183 | } |
184 | 184 | |
185 | 185 | $this->errors = $errors; |
186 | 186 | } |
187 | 187 | |
188 | - if ( ! empty( $errors ) ) { |
|
188 | + if ( ! empty($errors)) { |
|
189 | 189 | |
190 | 190 | return $errors; |
191 | 191 | } |
@@ -202,9 +202,9 @@ discard block |
||
202 | 202 | * |
203 | 203 | * @since 1.0 |
204 | 204 | */ |
205 | - protected function generate_container( $field ) { |
|
205 | + protected function generate_container($field) { |
|
206 | 206 | |
207 | - if ( array_key_exists( 'html', $field ) ) { |
|
207 | + if (array_key_exists('html', $field)) { |
|
208 | 208 | |
209 | 209 | return array( |
210 | 210 | 'type' => $field['type'], |
@@ -224,36 +224,36 @@ discard block |
||
224 | 224 | * |
225 | 225 | * @since 1.0 |
226 | 226 | */ |
227 | - protected function generate_listbox( $field ) { |
|
227 | + protected function generate_listbox($field) { |
|
228 | 228 | |
229 | - $listbox = shortcode_atts( array( |
|
229 | + $listbox = shortcode_atts(array( |
|
230 | 230 | 'label' => '', |
231 | 231 | 'minWidth' => '', |
232 | 232 | 'name' => false, |
233 | 233 | 'tooltip' => '', |
234 | 234 | 'type' => '', |
235 | 235 | 'value' => '', |
236 | - ), $field ); |
|
236 | + ), $field); |
|
237 | 237 | |
238 | - if ( $this->validate( $field ) ) { |
|
238 | + if ($this->validate($field)) { |
|
239 | 239 | |
240 | 240 | $new_listbox = array(); |
241 | 241 | |
242 | - foreach ( $listbox as $key => $value ) { |
|
242 | + foreach ($listbox as $key => $value) { |
|
243 | 243 | |
244 | - if ( $key == 'value' && empty( $value ) ) { |
|
245 | - $new_listbox[ $key ] = $listbox['name']; |
|
246 | - } else if ( $value ) { |
|
247 | - $new_listbox[ $key ] = $value; |
|
244 | + if ($key == 'value' && empty($value)) { |
|
245 | + $new_listbox[$key] = $listbox['name']; |
|
246 | + } else if ($value) { |
|
247 | + $new_listbox[$key] = $value; |
|
248 | 248 | } |
249 | 249 | } |
250 | 250 | |
251 | 251 | // do not reindex array! |
252 | 252 | $field['options'] = array( |
253 | - '' => ( $field['placeholder'] ? $field['placeholder'] : esc_attr__( '- Select -', 'give' ) ), |
|
253 | + '' => ($field['placeholder'] ? $field['placeholder'] : esc_attr__('- Select -', 'give')), |
|
254 | 254 | ) + $field['options']; |
255 | 255 | |
256 | - foreach ( $field['options'] as $value => $text ) { |
|
256 | + foreach ($field['options'] as $value => $text) { |
|
257 | 257 | $new_listbox['values'][] = array( |
258 | 258 | 'text' => $text, |
259 | 259 | 'value' => $value, |
@@ -275,7 +275,7 @@ discard block |
||
275 | 275 | * |
276 | 276 | * @since 1.0 |
277 | 277 | */ |
278 | - protected function generate_post( $field ) { |
|
278 | + protected function generate_post($field) { |
|
279 | 279 | |
280 | 280 | $args = array( |
281 | 281 | 'post_type' => 'post', |
@@ -284,23 +284,23 @@ discard block |
||
284 | 284 | 'posts_per_page' => 30, |
285 | 285 | ); |
286 | 286 | |
287 | - $args = wp_parse_args( (array) $field['query_args'], $args ); |
|
288 | - $posts = get_posts( $args ); |
|
287 | + $args = wp_parse_args((array) $field['query_args'], $args); |
|
288 | + $posts = get_posts($args); |
|
289 | 289 | $options = array(); |
290 | 290 | |
291 | - if ( $posts ) { |
|
292 | - foreach ( $posts as $post ) { |
|
293 | - $options[ absint( $post->ID ) ] = $post->post_title; |
|
291 | + if ($posts) { |
|
292 | + foreach ($posts as $post) { |
|
293 | + $options[absint($post->ID)] = $post->post_title; |
|
294 | 294 | } |
295 | 295 | |
296 | 296 | $field['type'] = 'listbox'; |
297 | 297 | $field['options'] = $options; |
298 | 298 | |
299 | - return $this->generate_listbox( $field ); |
|
299 | + return $this->generate_listbox($field); |
|
300 | 300 | } |
301 | 301 | |
302 | 302 | // perform validation here before returning false |
303 | - $this->validate( $field ); |
|
303 | + $this->validate($field); |
|
304 | 304 | |
305 | 305 | return false; |
306 | 306 | } |
@@ -314,9 +314,9 @@ discard block |
||
314 | 314 | * |
315 | 315 | * @since 1.0 |
316 | 316 | */ |
317 | - protected function generate_textbox( $field ) { |
|
317 | + protected function generate_textbox($field) { |
|
318 | 318 | |
319 | - $textbox = shortcode_atts( array( |
|
319 | + $textbox = shortcode_atts(array( |
|
320 | 320 | 'label' => '', |
321 | 321 | 'maxLength' => '', |
322 | 322 | 'minHeight' => '', |
@@ -326,10 +326,10 @@ discard block |
||
326 | 326 | 'tooltip' => '', |
327 | 327 | 'type' => '', |
328 | 328 | 'value' => '', |
329 | - ), $field ); |
|
329 | + ), $field); |
|
330 | 330 | |
331 | - if ( $this->validate( $field ) ) { |
|
332 | - return array_filter( $textbox, array( $this, 'return_textbox_value' ) ); |
|
331 | + if ($this->validate($field)) { |
|
332 | + return array_filter($textbox, array($this, 'return_textbox_value')); |
|
333 | 333 | } |
334 | 334 | |
335 | 335 | return false; |
@@ -342,7 +342,7 @@ discard block |
||
342 | 342 | * |
343 | 343 | * @return bool |
344 | 344 | */ |
345 | - function return_textbox_value( $value ) { |
|
345 | + function return_textbox_value($value) { |
|
346 | 346 | return $value !== ''; |
347 | 347 | } |
348 | 348 | |
@@ -358,9 +358,9 @@ discard block |
||
358 | 358 | * |
359 | 359 | * @since 1.0 |
360 | 360 | */ |
361 | - protected function validate( $field ) { |
|
361 | + protected function validate($field) { |
|
362 | 362 | |
363 | - extract( shortcode_atts( |
|
363 | + extract(shortcode_atts( |
|
364 | 364 | array( |
365 | 365 | 'name' => false, |
366 | 366 | 'required' => false, |
@@ -368,36 +368,36 @@ discard block |
||
368 | 368 | ), $field ) |
369 | 369 | ); |
370 | 370 | |
371 | - if ( $name ) { |
|
371 | + if ($name) { |
|
372 | 372 | |
373 | - if ( isset( $required['error'] ) ) { |
|
373 | + if (isset($required['error'])) { |
|
374 | 374 | |
375 | 375 | $error = array( |
376 | 376 | 'type' => 'container', |
377 | 377 | 'html' => $required['error'], |
378 | 378 | ); |
379 | 379 | |
380 | - $this->errors[ $name ] = $this->generate_container( $error ); |
|
380 | + $this->errors[$name] = $this->generate_container($error); |
|
381 | 381 | } |
382 | 382 | |
383 | - if ( ! ! $required || is_array( $required ) ) { |
|
383 | + if ( ! ! $required || is_array($required)) { |
|
384 | 384 | |
385 | - $alert = esc_html__( 'Some of the shortcode options are required.', 'give' ); |
|
385 | + $alert = esc_html__('Some of the shortcode options are required.', 'give'); |
|
386 | 386 | |
387 | - if ( isset( $required['alert'] ) ) { |
|
387 | + if (isset($required['alert'])) { |
|
388 | 388 | |
389 | 389 | $alert = $required['alert']; |
390 | 390 | |
391 | - } else if ( ! empty( $label ) ) { |
|
391 | + } else if ( ! empty($label)) { |
|
392 | 392 | |
393 | 393 | $alert = sprintf( |
394 | 394 | /* translators: %s: option label */ |
395 | - esc_html__( 'The "%s" option is required.', 'give' ), |
|
396 | - str_replace( ':', '', $label ) |
|
395 | + esc_html__('The "%s" option is required.', 'give'), |
|
396 | + str_replace(':', '', $label) |
|
397 | 397 | ); |
398 | 398 | } |
399 | 399 | |
400 | - $this->required[ $name ] = $alert; |
|
400 | + $this->required[$name] = $alert; |
|
401 | 401 | } |
402 | 402 | |
403 | 403 | return true; |
@@ -10,13 +10,13 @@ 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 | |
17 | 17 | // Load WP_List_Table if not loaded |
18 | -if ( ! class_exists( 'WP_List_Table' ) ) { |
|
19 | - require_once ABSPATH . 'wp-admin/includes/class-wp-list-table.php'; |
|
18 | +if ( ! class_exists('WP_List_Table')) { |
|
19 | + require_once ABSPATH.'wp-admin/includes/class-wp-list-table.php'; |
|
20 | 20 | } |
21 | 21 | |
22 | 22 | /** |
@@ -50,13 +50,13 @@ discard block |
||
50 | 50 | global $status, $page; |
51 | 51 | |
52 | 52 | // Set parent defaults |
53 | - parent::__construct( array( |
|
54 | - 'singular' => give_get_forms_label_singular(), // Singular name of the listed records |
|
55 | - 'plural' => give_get_forms_label_plural(), // Plural name of the listed records |
|
53 | + parent::__construct(array( |
|
54 | + 'singular' => give_get_forms_label_singular(), // Singular name of the listed records |
|
55 | + 'plural' => give_get_forms_label_plural(), // Plural name of the listed records |
|
56 | 56 | 'ajax' => false // Does this table support ajax? |
57 | - ) ); |
|
57 | + )); |
|
58 | 58 | |
59 | - add_action( 'give_report_view_actions', array( $this, 'category_filter' ) ); |
|
59 | + add_action('give_report_view_actions', array($this, 'category_filter')); |
|
60 | 60 | $this->query(); |
61 | 61 | |
62 | 62 | } |
@@ -72,18 +72,18 @@ discard block |
||
72 | 72 | * |
73 | 73 | * @return string Column Name |
74 | 74 | */ |
75 | - public function column_default( $item, $column_name ) { |
|
76 | - switch ( $column_name ) { |
|
75 | + public function column_default($item, $column_name) { |
|
76 | + switch ($column_name) { |
|
77 | 77 | case 'earnings' : |
78 | - return give_currency_filter( give_format_amount( $item[ $column_name ] ) ); |
|
78 | + return give_currency_filter(give_format_amount($item[$column_name])); |
|
79 | 79 | case 'average_sales' : |
80 | - return round( $item[ $column_name ] ); |
|
80 | + return round($item[$column_name]); |
|
81 | 81 | case 'average_earnings' : |
82 | - return give_currency_filter( give_format_amount( $item[ $column_name ] ) ); |
|
82 | + return give_currency_filter(give_format_amount($item[$column_name])); |
|
83 | 83 | case 'details' : |
84 | - return '<a href="' . admin_url( 'edit.php?post_type=give_forms&page=give-reports&view=forms&form-id=' . $item['ID'] ) . '">' . esc_html__( 'View Detailed Report', 'give' ) . '</a>'; |
|
84 | + return '<a href="'.admin_url('edit.php?post_type=give_forms&page=give-reports&view=forms&form-id='.$item['ID']).'">'.esc_html__('View Detailed Report', 'give').'</a>'; |
|
85 | 85 | default: |
86 | - return $item[ $column_name ]; |
|
86 | + return $item[$column_name]; |
|
87 | 87 | } |
88 | 88 | } |
89 | 89 | |
@@ -97,11 +97,11 @@ discard block |
||
97 | 97 | public function get_columns() { |
98 | 98 | $columns = array( |
99 | 99 | 'title' => give_get_forms_label_singular(), |
100 | - 'sales' => esc_html__( 'Donations', 'give' ), |
|
101 | - 'earnings' => esc_html__( 'Income', 'give' ), |
|
102 | - 'average_sales' => esc_html__( 'Monthly Average Donations', 'give' ), |
|
103 | - 'average_earnings' => esc_html__( 'Monthly Average Income', 'give' ), |
|
104 | - 'details' => esc_html__( 'Detailed Report', 'give' ) |
|
100 | + 'sales' => esc_html__('Donations', 'give'), |
|
101 | + 'earnings' => esc_html__('Income', 'give'), |
|
102 | + 'average_sales' => esc_html__('Monthly Average Donations', 'give'), |
|
103 | + 'average_earnings' => esc_html__('Monthly Average Income', 'give'), |
|
104 | + 'details' => esc_html__('Detailed Report', 'give') |
|
105 | 105 | ); |
106 | 106 | |
107 | 107 | return $columns; |
@@ -116,9 +116,9 @@ discard block |
||
116 | 116 | */ |
117 | 117 | public function get_sortable_columns() { |
118 | 118 | return array( |
119 | - 'title' => array( 'title', true ), |
|
120 | - 'sales' => array( 'sales', false ), |
|
121 | - 'earnings' => array( 'earnings', false ), |
|
119 | + 'title' => array('title', true), |
|
120 | + 'sales' => array('sales', false), |
|
121 | + 'earnings' => array('earnings', false), |
|
122 | 122 | ); |
123 | 123 | } |
124 | 124 | |
@@ -130,7 +130,7 @@ discard block |
||
130 | 130 | * @return int Current page number |
131 | 131 | */ |
132 | 132 | public function get_paged() { |
133 | - return isset( $_GET['paged'] ) ? absint( $_GET['paged'] ) : 1; |
|
133 | + return isset($_GET['paged']) ? absint($_GET['paged']) : 1; |
|
134 | 134 | } |
135 | 135 | |
136 | 136 | |
@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | * @return int Category ID |
143 | 143 | */ |
144 | 144 | public function get_category() { |
145 | - return isset( $_GET['category'] ) ? absint( $_GET['category'] ) : 0; |
|
145 | + return isset($_GET['category']) ? absint($_GET['category']) : 0; |
|
146 | 146 | } |
147 | 147 | |
148 | 148 | |
@@ -155,8 +155,8 @@ discard block |
||
155 | 155 | */ |
156 | 156 | public function get_total_forms() { |
157 | 157 | $total = 0; |
158 | - $counts = wp_count_posts( 'give_forms', 'readable' ); |
|
159 | - foreach ( $counts as $status => $count ) { |
|
158 | + $counts = wp_count_posts('give_forms', 'readable'); |
|
159 | + foreach ($counts as $status => $count) { |
|
160 | 160 | $total += $count; |
161 | 161 | } |
162 | 162 | |
@@ -170,7 +170,7 @@ discard block |
||
170 | 170 | * @since 1.0 |
171 | 171 | * @return void |
172 | 172 | */ |
173 | - public function bulk_actions( $which = '' ) { |
|
173 | + public function bulk_actions($which = '') { |
|
174 | 174 | // These aren't really bulk actions but this outputs the markup in the right place |
175 | 175 | give_report_views(); |
176 | 176 | } |
@@ -183,23 +183,23 @@ discard block |
||
183 | 183 | * |
184 | 184 | * @param string $which |
185 | 185 | */ |
186 | - protected function display_tablenav( $which ) { |
|
186 | + protected function display_tablenav($which) { |
|
187 | 187 | |
188 | - if ( 'top' == $which ) { |
|
189 | - wp_nonce_field( 'bulk-' . $this->_args['plural'] ); |
|
188 | + if ('top' == $which) { |
|
189 | + wp_nonce_field('bulk-'.$this->_args['plural']); |
|
190 | 190 | } |
191 | 191 | ?> |
192 | - <div class="tablenav give-clearfix <?php echo esc_attr( $which ); ?>"> |
|
192 | + <div class="tablenav give-clearfix <?php echo esc_attr($which); ?>"> |
|
193 | 193 | |
194 | - <h3 class="alignleft reports-earnings-title"><span><?php esc_html_e( 'Donation Forms Report', 'give' ); ?></span></h3> |
|
194 | + <h3 class="alignleft reports-earnings-title"><span><?php esc_html_e('Donation Forms Report', 'give'); ?></span></h3> |
|
195 | 195 | |
196 | 196 | <div class="alignright tablenav-right"> |
197 | 197 | <div class="actions bulkactions"> |
198 | - <?php $this->bulk_actions( $which ); ?> |
|
198 | + <?php $this->bulk_actions($which); ?> |
|
199 | 199 | </div> |
200 | 200 | <?php |
201 | - $this->extra_tablenav( $which ); |
|
202 | - $this->pagination( $which ); |
|
201 | + $this->extra_tablenav($which); |
|
202 | + $this->pagination($which); |
|
203 | 203 | ?> |
204 | 204 | </div> |
205 | 205 | |
@@ -219,9 +219,9 @@ discard block |
||
219 | 219 | */ |
220 | 220 | public function category_filter() { |
221 | 221 | |
222 | - $categories = get_terms( 'form_category' ); |
|
223 | - if ( $categories && ! is_wp_error( $categories ) ) { |
|
224 | - echo Give()->html->category_dropdown( 'category', $this->get_category() ); |
|
222 | + $categories = get_terms('form_category'); |
|
223 | + if ($categories && ! is_wp_error($categories)) { |
|
224 | + echo Give()->html->category_dropdown('category', $this->get_category()); |
|
225 | 225 | } |
226 | 226 | } |
227 | 227 | |
@@ -235,8 +235,8 @@ discard block |
||
235 | 235 | */ |
236 | 236 | public function query() { |
237 | 237 | |
238 | - $orderby = isset( $_GET['orderby'] ) ? $_GET['orderby'] : 'title'; |
|
239 | - $order = isset( $_GET['order'] ) ? $_GET['order'] : 'DESC'; |
|
238 | + $orderby = isset($_GET['orderby']) ? $_GET['orderby'] : 'title'; |
|
239 | + $order = isset($_GET['order']) ? $_GET['order'] : 'DESC'; |
|
240 | 240 | $category = $this->get_category(); |
241 | 241 | |
242 | 242 | $args = array( |
@@ -249,7 +249,7 @@ discard block |
||
249 | 249 | 'suppress_filters' => true |
250 | 250 | ); |
251 | 251 | |
252 | - if ( ! empty( $category ) ) { |
|
252 | + if ( ! empty($category)) { |
|
253 | 253 | $args['tax_query'] = array( |
254 | 254 | array( |
255 | 255 | 'taxonomy' => 'form_category', |
@@ -258,7 +258,7 @@ discard block |
||
258 | 258 | ); |
259 | 259 | } |
260 | 260 | |
261 | - switch ( $orderby ) : |
|
261 | + switch ($orderby) : |
|
262 | 262 | case 'title' : |
263 | 263 | $args['orderby'] = 'title'; |
264 | 264 | break; |
@@ -274,9 +274,9 @@ discard block |
||
274 | 274 | break; |
275 | 275 | endswitch; |
276 | 276 | |
277 | - $args = apply_filters( 'give_form_reports_prepare_items_args', $args, $this ); |
|
277 | + $args = apply_filters('give_form_reports_prepare_items_args', $args, $this); |
|
278 | 278 | |
279 | - $this->products = new WP_Query( $args ); |
|
279 | + $this->products = new WP_Query($args); |
|
280 | 280 | |
281 | 281 | } |
282 | 282 | |
@@ -292,15 +292,15 @@ discard block |
||
292 | 292 | |
293 | 293 | $give_forms = $this->products->posts; |
294 | 294 | |
295 | - if ( $give_forms ) { |
|
296 | - foreach ( $give_forms as $form ) { |
|
295 | + if ($give_forms) { |
|
296 | + foreach ($give_forms as $form) { |
|
297 | 297 | $reports_data[] = array( |
298 | 298 | 'ID' => $form, |
299 | - 'title' => get_the_title( $form ), |
|
300 | - 'sales' => give_get_form_sales_stats( $form ), |
|
301 | - 'earnings' => give_get_form_earnings_stats( $form ), |
|
302 | - 'average_sales' => give_get_average_monthly_form_sales( $form ), |
|
303 | - 'average_earnings' => give_get_average_monthly_form_earnings( $form ) |
|
299 | + 'title' => get_the_title($form), |
|
300 | + 'sales' => give_get_form_sales_stats($form), |
|
301 | + 'earnings' => give_get_form_earnings_stats($form), |
|
302 | + 'average_sales' => give_get_average_monthly_form_sales($form), |
|
303 | + 'average_earnings' => give_get_average_monthly_form_earnings($form) |
|
304 | 304 | ); |
305 | 305 | } |
306 | 306 | } |
@@ -328,7 +328,7 @@ discard block |
||
328 | 328 | |
329 | 329 | $sortable = $this->get_sortable_columns(); |
330 | 330 | |
331 | - $this->_column_headers = array( $columns, $hidden, $sortable ); |
|
331 | + $this->_column_headers = array($columns, $hidden, $sortable); |
|
332 | 332 | |
333 | 333 | $data = $this->reports_data(); |
334 | 334 | |
@@ -336,10 +336,10 @@ discard block |
||
336 | 336 | |
337 | 337 | $this->items = $data; |
338 | 338 | |
339 | - $this->set_pagination_args( array( |
|
339 | + $this->set_pagination_args(array( |
|
340 | 340 | 'total_items' => $total_items, |
341 | 341 | 'per_page' => $this->per_page, |
342 | - 'total_pages' => ceil( $total_items / $this->per_page ) |
|
342 | + 'total_pages' => ceil($total_items / $this->per_page) |
|
343 | 343 | ) |
344 | 344 | ); |
345 | 345 | } |
@@ -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 | |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | * |
24 | 24 | * @return array The altered list of views |
25 | 25 | */ |
26 | -function give_register_default_customer_views( $views ) { |
|
26 | +function give_register_default_customer_views($views) { |
|
27 | 27 | |
28 | 28 | $default_views = array( |
29 | 29 | 'overview' => 'give_customers_view', |
@@ -31,11 +31,11 @@ discard block |
||
31 | 31 | 'notes' => 'give_customer_notes_view' |
32 | 32 | ); |
33 | 33 | |
34 | - return array_merge( $views, $default_views ); |
|
34 | + return array_merge($views, $default_views); |
|
35 | 35 | |
36 | 36 | } |
37 | 37 | |
38 | -add_filter( 'give_customer_views', 'give_register_default_customer_views', 1, 1 ); |
|
38 | +add_filter('give_customer_views', 'give_register_default_customer_views', 1, 1); |
|
39 | 39 | |
40 | 40 | /** |
41 | 41 | * Register a tab for the single customer view |
@@ -46,17 +46,17 @@ discard block |
||
46 | 46 | * |
47 | 47 | * @return array The altered list of tabs |
48 | 48 | */ |
49 | -function give_register_default_customer_tabs( $tabs ) { |
|
49 | +function give_register_default_customer_tabs($tabs) { |
|
50 | 50 | |
51 | 51 | $default_tabs = array( |
52 | - 'overview' => array( 'dashicon' => 'dashicons-admin-users', 'title' => esc_html__( 'Donor Profile', 'give' ) ), |
|
53 | - 'notes' => array( 'dashicon' => 'dashicons-admin-comments', 'title' => esc_html__( 'Donor Notes', 'give' ) ) |
|
52 | + 'overview' => array('dashicon' => 'dashicons-admin-users', 'title' => esc_html__('Donor Profile', 'give')), |
|
53 | + 'notes' => array('dashicon' => 'dashicons-admin-comments', 'title' => esc_html__('Donor Notes', 'give')) |
|
54 | 54 | ); |
55 | 55 | |
56 | - return array_merge( $tabs, $default_tabs ); |
|
56 | + return array_merge($tabs, $default_tabs); |
|
57 | 57 | } |
58 | 58 | |
59 | -add_filter( 'give_customer_tabs', 'give_register_default_customer_tabs', 1, 1 ); |
|
59 | +add_filter('give_customer_tabs', 'give_register_default_customer_tabs', 1, 1); |
|
60 | 60 | |
61 | 61 | /** |
62 | 62 | * Register the Delete icon as late as possible so it's at the bottom |
@@ -67,11 +67,11 @@ discard block |
||
67 | 67 | * |
68 | 68 | * @return array The altered list of tabs, with 'delete' at the bottom |
69 | 69 | */ |
70 | -function give_register_delete_customer_tab( $tabs ) { |
|
70 | +function give_register_delete_customer_tab($tabs) { |
|
71 | 71 | |
72 | - $tabs['delete'] = array( 'dashicon' => 'dashicons-trash', 'title' => esc_html__( 'Delete Donor', 'give' ) ); |
|
72 | + $tabs['delete'] = array('dashicon' => 'dashicons-trash', 'title' => esc_html__('Delete Donor', 'give')); |
|
73 | 73 | |
74 | 74 | return $tabs; |
75 | 75 | } |
76 | 76 | |
77 | -add_filter( 'give_customer_tabs', 'give_register_delete_customer_tab', PHP_INT_MAX, 1 ); |
|
77 | +add_filter('give_customer_tabs', 'give_register_delete_customer_tab', PHP_INT_MAX, 1); |
@@ -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 | |
@@ -29,8 +29,8 @@ discard block |
||
29 | 29 | * @see Give_Cron::weekly_events() |
30 | 30 | */ |
31 | 31 | public function __construct() { |
32 | - add_filter( 'cron_schedules', array( $this, 'add_schedules' ) ); |
|
33 | - add_action( 'wp', array( $this, 'schedule_Events' ) ); |
|
32 | + add_filter('cron_schedules', array($this, 'add_schedules')); |
|
33 | + add_action('wp', array($this, 'schedule_Events')); |
|
34 | 34 | } |
35 | 35 | |
36 | 36 | /** |
@@ -42,11 +42,11 @@ discard block |
||
42 | 42 | * |
43 | 43 | * @return array |
44 | 44 | */ |
45 | - public function add_schedules( $schedules = array() ) { |
|
45 | + public function add_schedules($schedules = array()) { |
|
46 | 46 | // Adds once weekly to the existing schedules. |
47 | 47 | $schedules['weekly'] = array( |
48 | 48 | 'interval' => 604800, |
49 | - 'display' => esc_html__( 'Once Weekly', 'give' ) |
|
49 | + 'display' => esc_html__('Once Weekly', 'give') |
|
50 | 50 | ); |
51 | 51 | |
52 | 52 | return $schedules; |
@@ -72,8 +72,8 @@ discard block |
||
72 | 72 | * @return void |
73 | 73 | */ |
74 | 74 | private function weekly_events() { |
75 | - if ( ! wp_next_scheduled( 'give_weekly_scheduled_events' ) ) { |
|
76 | - wp_schedule_event( current_time( 'timestamp' ), 'weekly', 'give_weekly_scheduled_events' ); |
|
75 | + if ( ! wp_next_scheduled('give_weekly_scheduled_events')) { |
|
76 | + wp_schedule_event(current_time('timestamp'), 'weekly', 'give_weekly_scheduled_events'); |
|
77 | 77 | } |
78 | 78 | } |
79 | 79 | |
@@ -85,8 +85,8 @@ discard block |
||
85 | 85 | * @return void |
86 | 86 | */ |
87 | 87 | private function daily_events() { |
88 | - if ( ! wp_next_scheduled( 'give_daily_scheduled_events' ) ) { |
|
89 | - wp_schedule_event( current_time( 'timestamp' ), 'daily', 'give_daily_scheduled_events' ); |
|
88 | + if ( ! wp_next_scheduled('give_daily_scheduled_events')) { |
|
89 | + wp_schedule_event(current_time('timestamp'), 'daily', 'give_daily_scheduled_events'); |
|
90 | 90 | } |
91 | 91 | } |
92 | 92 |