@@ -19,6 +19,6 @@ |
||
| 19 | 19 | * @return void |
| 20 | 20 | */ |
| 21 | 21 | function give_disable_mandrill_nl2br() { |
| 22 | - add_filter( 'mandrill_nl2br', '__return_false' ); |
|
| 22 | + add_filter('mandrill_nl2br', '__return_false'); |
|
| 23 | 23 | } |
| 24 | -add_action( 'give_email_send_before', 'give_disable_mandrill_nl2br'); |
|
| 24 | +add_action('give_email_send_before', 'give_disable_mandrill_nl2br'); |
|
@@ -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 | |
@@ -21,12 +21,12 @@ discard block |
||
| 21 | 21 | * @return void |
| 22 | 22 | */ |
| 23 | 23 | function give_register_dashboard_widgets() { |
| 24 | - if ( current_user_can( apply_filters( 'give_dashboard_stats_cap', 'view_give_reports' ) ) ) { |
|
| 25 | - wp_add_dashboard_widget( 'give_dashboard_sales', esc_html__( 'Give: Donation Statistics', 'give' ), 'give_dashboard_sales_widget' ); |
|
| 24 | + if (current_user_can(apply_filters('give_dashboard_stats_cap', 'view_give_reports'))) { |
|
| 25 | + wp_add_dashboard_widget('give_dashboard_sales', esc_html__('Give: Donation Statistics', 'give'), 'give_dashboard_sales_widget'); |
|
| 26 | 26 | } |
| 27 | 27 | } |
| 28 | 28 | |
| 29 | -add_action( 'wp_dashboard_setup', 'give_register_dashboard_widgets', 10 ); |
|
| 29 | +add_action('wp_dashboard_setup', 'give_register_dashboard_widgets', 10); |
|
| 30 | 30 | |
| 31 | 31 | /** |
| 32 | 32 | * Sales Summary Dashboard Widget |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | */ |
| 39 | 39 | function give_dashboard_sales_widget() { |
| 40 | 40 | |
| 41 | - if ( ! current_user_can( apply_filters( 'give_dashboard_stats_cap', 'view_give_reports' ) ) ) { |
|
| 41 | + if ( ! current_user_can(apply_filters('give_dashboard_stats_cap', 'view_give_reports'))) { |
|
| 42 | 42 | return; |
| 43 | 43 | } |
| 44 | 44 | $stats = new Give_Payment_Stats; ?> |
@@ -46,27 +46,27 @@ discard block |
||
| 46 | 46 | <div class="give-dashboard-widget"> |
| 47 | 47 | |
| 48 | 48 | <div class="give-dashboard-today give-clearfix"> |
| 49 | - <h3 class="give-dashboard-date-today"><?php echo date( _x( 'F j, Y', 'dashboard widget', 'give' ) ); ?></h3> |
|
| 49 | + <h3 class="give-dashboard-date-today"><?php echo date(_x('F j, Y', 'dashboard widget', 'give')); ?></h3> |
|
| 50 | 50 | |
| 51 | 51 | <p class="give-dashboard-happy-day"><?php |
| 52 | 52 | printf( |
| 53 | 53 | /* translators: %s: day of the week */ |
| 54 | - esc_html__( 'Happy %s!', 'give' ), |
|
| 55 | - date( 'l', current_time( 'timestamp' ) ) |
|
| 54 | + esc_html__('Happy %s!', 'give'), |
|
| 55 | + date('l', current_time('timestamp')) |
|
| 56 | 56 | ); |
| 57 | 57 | ?></p> |
| 58 | 58 | |
| 59 | 59 | <p class="give-dashboard-today-earnings"><?php |
| 60 | - $earnings_today = $stats->get_earnings( 0, 'today', false ); |
|
| 61 | - echo give_currency_filter( give_format_amount( $earnings_today ) ); |
|
| 60 | + $earnings_today = $stats->get_earnings(0, 'today', false); |
|
| 61 | + echo give_currency_filter(give_format_amount($earnings_today)); |
|
| 62 | 62 | ?></p> |
| 63 | 63 | |
| 64 | 64 | <p class="give-orders-today"><?php |
| 65 | - $donations_today = $stats->get_sales( 0, 'today', false ); |
|
| 65 | + $donations_today = $stats->get_sales(0, 'today', false); |
|
| 66 | 66 | printf( |
| 67 | 67 | /* translators: %s: daily donation count */ |
| 68 | - esc_html__( '%s donations today', 'give' ), |
|
| 69 | - give_format_amount( $donations_today, false ) |
|
| 68 | + esc_html__('%s donations today', 'give'), |
|
| 69 | + give_format_amount($donations_today, false) |
|
| 70 | 70 | ); |
| 71 | 71 | ?></p> |
| 72 | 72 | |
@@ -76,34 +76,34 @@ discard block |
||
| 76 | 76 | <table class="give-table-stats"> |
| 77 | 77 | <thead style="display: none;"> |
| 78 | 78 | <tr> |
| 79 | - <th><?php esc_html_e( 'This Week', 'give' ); ?></th> |
|
| 80 | - <th><?php esc_html_e( 'This Month', 'give' ); ?></th> |
|
| 81 | - <th><?php esc_html_e( 'Past 30 Days', 'give' ); ?></th> |
|
| 79 | + <th><?php esc_html_e('This Week', 'give'); ?></th> |
|
| 80 | + <th><?php esc_html_e('This Month', 'give'); ?></th> |
|
| 81 | + <th><?php esc_html_e('Past 30 Days', 'give'); ?></th> |
|
| 82 | 82 | </tr> |
| 83 | 83 | </thead> |
| 84 | 84 | <tbody> |
| 85 | 85 | <tr id="give-table-stats-tr-1"> |
| 86 | 86 | <td> |
| 87 | - <p class="give-dashboard-stat-total"><?php echo give_currency_filter( give_format_amount( $stats->get_earnings( 0, 'this_week' ) ) ); ?></p> |
|
| 87 | + <p class="give-dashboard-stat-total"><?php echo give_currency_filter(give_format_amount($stats->get_earnings(0, 'this_week'))); ?></p> |
|
| 88 | 88 | |
| 89 | - <p class="give-dashboard-stat-total-label"><?php esc_html_e( 'This Week', 'give' ); ?></p> |
|
| 89 | + <p class="give-dashboard-stat-total-label"><?php esc_html_e('This Week', 'give'); ?></p> |
|
| 90 | 90 | </td> |
| 91 | 91 | <td> |
| 92 | - <p class="give-dashboard-stat-total"><?php echo give_currency_filter( give_format_amount( $stats->get_earnings( 0, 'this_month' ) ) ); ?></p> |
|
| 92 | + <p class="give-dashboard-stat-total"><?php echo give_currency_filter(give_format_amount($stats->get_earnings(0, 'this_month'))); ?></p> |
|
| 93 | 93 | |
| 94 | - <p class="give-dashboard-stat-total-label"><?php esc_html_e( 'This Month', 'give' ); ?></p> |
|
| 94 | + <p class="give-dashboard-stat-total-label"><?php esc_html_e('This Month', 'give'); ?></p> |
|
| 95 | 95 | </td> |
| 96 | 96 | </tr> |
| 97 | 97 | <tr id="give-table-stats-tr-2"> |
| 98 | 98 | <td> |
| 99 | - <p class="give-dashboard-stat-total"><?php echo give_currency_filter( give_format_amount( $stats->get_earnings( 0, 'last_month' ) ) ) ?></p> |
|
| 99 | + <p class="give-dashboard-stat-total"><?php echo give_currency_filter(give_format_amount($stats->get_earnings(0, 'last_month'))) ?></p> |
|
| 100 | 100 | |
| 101 | - <p class="give-dashboard-stat-total-label"><?php esc_html_e( 'Last Month', 'give' ); ?></p> |
|
| 101 | + <p class="give-dashboard-stat-total-label"><?php esc_html_e('Last Month', 'give'); ?></p> |
|
| 102 | 102 | </td> |
| 103 | 103 | <td> |
| 104 | - <p class="give-dashboard-stat-total"><?php echo give_currency_filter( give_format_amount( $stats->get_earnings( 0, 'this_year', false ) ) ) ?></p> |
|
| 104 | + <p class="give-dashboard-stat-total"><?php echo give_currency_filter(give_format_amount($stats->get_earnings(0, 'this_year', false))) ?></p> |
|
| 105 | 105 | |
| 106 | - <p class="give-dashboard-stat-total-label"><?php esc_html_e( 'This Year', 'give' ); ?></p> |
|
| 106 | + <p class="give-dashboard-stat-total-label"><?php esc_html_e('This Year', 'give'); ?></p> |
|
| 107 | 107 | </td> |
| 108 | 108 | </tr> |
| 109 | 109 | </tbody> |
@@ -123,23 +123,23 @@ discard block |
||
| 123 | 123 | * |
| 124 | 124 | * @return array |
| 125 | 125 | */ |
| 126 | -function give_dashboard_at_a_glance_widget( $items ) { |
|
| 127 | - $num_posts = wp_count_posts( 'give_forms' ); |
|
| 126 | +function give_dashboard_at_a_glance_widget($items) { |
|
| 127 | + $num_posts = wp_count_posts('give_forms'); |
|
| 128 | 128 | |
| 129 | - if ( $num_posts && $num_posts->publish ) { |
|
| 129 | + if ($num_posts && $num_posts->publish) { |
|
| 130 | 130 | |
| 131 | 131 | $text = sprintf( |
| 132 | 132 | /* translators: %s: number of posts published */ |
| 133 | - _n( '%s Give Form', '%s Give Forms', $num_posts->publish, 'give' ), |
|
| 133 | + _n('%s Give Form', '%s Give Forms', $num_posts->publish, 'give'), |
|
| 134 | 134 | $num_posts->publish |
| 135 | 135 | ); |
| 136 | 136 | |
| 137 | - $text = sprintf( $text, number_format_i18n( $num_posts->publish ) ); |
|
| 137 | + $text = sprintf($text, number_format_i18n($num_posts->publish)); |
|
| 138 | 138 | |
| 139 | - if ( current_user_can( 'edit_give_forms', get_current_user_id() ) ) { |
|
| 139 | + if (current_user_can('edit_give_forms', get_current_user_id())) { |
|
| 140 | 140 | $text = sprintf( |
| 141 | 141 | '<a class="give-forms-count" href="%1$s">%2$s</a>', |
| 142 | - admin_url( 'edit.php?post_type=give_forms' ), |
|
| 142 | + admin_url('edit.php?post_type=give_forms'), |
|
| 143 | 143 | $text |
| 144 | 144 | ); |
| 145 | 145 | } else { |
@@ -155,4 +155,4 @@ discard block |
||
| 155 | 155 | return $items; |
| 156 | 156 | } |
| 157 | 157 | |
| 158 | -add_filter( 'dashboard_glance_items', 'give_dashboard_at_a_glance_widget', 1, 1 ); |
|
| 158 | +add_filter('dashboard_glance_items', 'give_dashboard_at_a_glance_widget', 1, 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 | |
@@ -25,12 +25,12 @@ discard block |
||
| 25 | 25 | */ |
| 26 | 26 | function give_payment_history_page() { |
| 27 | 27 | |
| 28 | - $give_payment = get_post_type_object( 'give_payment' ); |
|
| 28 | + $give_payment = get_post_type_object('give_payment'); |
|
| 29 | 29 | |
| 30 | - if ( isset( $_GET['view'] ) && 'view-order-details' == $_GET['view'] ) { |
|
| 31 | - require_once GIVE_PLUGIN_DIR . 'includes/admin/payments/view-order-details.php'; |
|
| 30 | + if (isset($_GET['view']) && 'view-order-details' == $_GET['view']) { |
|
| 31 | + require_once GIVE_PLUGIN_DIR.'includes/admin/payments/view-order-details.php'; |
|
| 32 | 32 | } else { |
| 33 | - require_once GIVE_PLUGIN_DIR . 'includes/admin/payments/class-payments-table.php'; |
|
| 33 | + require_once GIVE_PLUGIN_DIR.'includes/admin/payments/class-payments-table.php'; |
|
| 34 | 34 | $payments_table = new Give_Payment_History_Table(); |
| 35 | 35 | $payments_table->prepare_items(); |
| 36 | 36 | ?> |
@@ -44,10 +44,10 @@ discard block |
||
| 44 | 44 | * |
| 45 | 45 | * @since 1.7 |
| 46 | 46 | */ |
| 47 | - do_action( 'give_payments_page_top' ); |
|
| 47 | + do_action('give_payments_page_top'); |
|
| 48 | 48 | ?> |
| 49 | 49 | |
| 50 | - <form id="give-payments-filter" method="get" action="<?php echo admin_url( 'edit.php?post_type=give_forms&page=give-payment-history' ); ?>"> |
|
| 50 | + <form id="give-payments-filter" method="get" action="<?php echo admin_url('edit.php?post_type=give_forms&page=give-payment-history'); ?>"> |
|
| 51 | 51 | <input type="hidden" name="post_type" value="give_forms" /> |
| 52 | 52 | <input type="hidden" name="page" value="give-payment-history" /> |
| 53 | 53 | <?php $payments_table->views() ?> |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | * |
| 62 | 62 | * @since 1.7 |
| 63 | 63 | */ |
| 64 | - do_action( 'give_payments_page_bottom' ); |
|
| 64 | + do_action('give_payments_page_bottom'); |
|
| 65 | 65 | ?> |
| 66 | 66 | |
| 67 | 67 | </div> |
@@ -78,29 +78,29 @@ discard block |
||
| 78 | 78 | * @param $title |
| 79 | 79 | * @return string |
| 80 | 80 | */ |
| 81 | -function give_view_order_details_title( $admin_title, $title ) { |
|
| 81 | +function give_view_order_details_title($admin_title, $title) { |
|
| 82 | 82 | |
| 83 | - if ( 'give_forms_page_give-payment-history' != get_current_screen()->base ) { |
|
| 83 | + if ('give_forms_page_give-payment-history' != get_current_screen()->base) { |
|
| 84 | 84 | return $admin_title; |
| 85 | 85 | } |
| 86 | 86 | |
| 87 | - if( ! isset( $_GET['give-action'] ) ) { |
|
| 87 | + if ( ! isset($_GET['give-action'])) { |
|
| 88 | 88 | return $admin_title; |
| 89 | 89 | } |
| 90 | 90 | |
| 91 | - switch( $_GET['give-action'] ) : |
|
| 91 | + switch ($_GET['give-action']) : |
|
| 92 | 92 | |
| 93 | 93 | case 'view-order-details' : |
| 94 | 94 | $title = sprintf( |
| 95 | 95 | /* translators: %s: admin title */ |
| 96 | - esc_html__( 'View Donation Details - %s', 'give' ), |
|
| 96 | + esc_html__('View Donation Details - %s', 'give'), |
|
| 97 | 97 | $admin_title |
| 98 | 98 | ); |
| 99 | 99 | break; |
| 100 | 100 | case 'edit-payment' : |
| 101 | 101 | $title = sprintf( |
| 102 | 102 | /* translators: %s: admin title */ |
| 103 | - esc_html__( 'Edit Donation - %s', 'give' ), |
|
| 103 | + esc_html__('Edit Donation - %s', 'give'), |
|
| 104 | 104 | $admin_title |
| 105 | 105 | ); |
| 106 | 106 | break; |
@@ -111,7 +111,7 @@ discard block |
||
| 111 | 111 | |
| 112 | 112 | return $title; |
| 113 | 113 | } |
| 114 | -add_filter( 'admin_title', 'give_view_order_details_title', 10, 2 ); |
|
| 114 | +add_filter('admin_title', 'give_view_order_details_title', 10, 2); |
|
| 115 | 115 | |
| 116 | 116 | /** |
| 117 | 117 | * Intercept default Edit post links for Give payments and rewrite them to the View Order Details screen |
@@ -123,20 +123,20 @@ discard block |
||
| 123 | 123 | * @param $context |
| 124 | 124 | * @return string |
| 125 | 125 | */ |
| 126 | -function give_override_edit_post_for_payment_link( $url, $post_id = 0, $context ) { |
|
| 126 | +function give_override_edit_post_for_payment_link($url, $post_id = 0, $context) { |
|
| 127 | 127 | |
| 128 | - $post = get_post( $post_id ); |
|
| 128 | + $post = get_post($post_id); |
|
| 129 | 129 | |
| 130 | - if( ! $post ) { |
|
| 130 | + if ( ! $post) { |
|
| 131 | 131 | return $url; |
| 132 | 132 | } |
| 133 | 133 | |
| 134 | - if( 'give_payment' != $post->post_type ) { |
|
| 134 | + if ('give_payment' != $post->post_type) { |
|
| 135 | 135 | return $url; |
| 136 | 136 | } |
| 137 | 137 | |
| 138 | - $url = admin_url( 'edit.php?post_type=give_forms&page=give-payment-history&view=view-order-details&id=' . $post_id ); |
|
| 138 | + $url = admin_url('edit.php?post_type=give_forms&page=give-payment-history&view=view-order-details&id='.$post_id); |
|
| 139 | 139 | |
| 140 | 140 | return $url; |
| 141 | 141 | } |
| 142 | -add_filter( 'get_edit_post_link', 'give_override_edit_post_for_payment_link', 10, 3 ); |
|
| 142 | +add_filter('get_edit_post_link', 'give_override_edit_post_for_payment_link', 10, 3); |
|
@@ -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 | $give_options = give_get_settings(); |
| 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 | $give_options = give_get_settings(); |
| 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,13 +50,13 @@ 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 | |
| 55 | - if ( empty( $country ) ) { |
|
| 55 | + if (empty($country)) { |
|
| 56 | 56 | $country = give_get_country(); |
| 57 | 57 | } |
| 58 | 58 | |
| 59 | - switch ( $country ) : |
|
| 59 | + switch ($country) : |
|
| 60 | 60 | |
| 61 | 61 | case 'US' : |
| 62 | 62 | $states = give_get_states_list(); |
@@ -106,7 +106,7 @@ discard block |
||
| 106 | 106 | |
| 107 | 107 | endswitch; |
| 108 | 108 | |
| 109 | - return apply_filters( 'give_give_states', $states ); |
|
| 109 | + return apply_filters('give_give_states', $states); |
|
| 110 | 110 | } |
| 111 | 111 | |
| 112 | 112 | |
@@ -119,253 +119,253 @@ discard block |
||
| 119 | 119 | function give_get_country_list() { |
| 120 | 120 | $countries = array( |
| 121 | 121 | '' => '', |
| 122 | - 'US' => esc_html__( 'United States', 'give' ), |
|
| 123 | - 'CA' => esc_html__( 'Canada', 'give' ), |
|
| 124 | - 'GB' => esc_html__( 'United Kingdom', 'give' ), |
|
| 125 | - 'AF' => esc_html__( 'Afghanistan', 'give' ), |
|
| 126 | - 'AL' => esc_html__( 'Albania', 'give' ), |
|
| 127 | - 'DZ' => esc_html__( 'Algeria', 'give' ), |
|
| 128 | - 'AS' => esc_html__( 'American Samoa', 'give' ), |
|
| 129 | - 'AD' => esc_html__( 'Andorra', 'give' ), |
|
| 130 | - 'AO' => esc_html__( 'Angola', 'give' ), |
|
| 131 | - 'AI' => esc_html__( 'Anguilla', 'give' ), |
|
| 132 | - 'AQ' => esc_html__( 'Antarctica', 'give' ), |
|
| 133 | - 'AG' => esc_html__( 'Antigua and Barbuda', 'give' ), |
|
| 134 | - 'AR' => esc_html__( 'Argentina', 'give' ), |
|
| 135 | - 'AM' => esc_html__( 'Armenia', 'give' ), |
|
| 136 | - 'AW' => esc_html__( 'Aruba', 'give' ), |
|
| 137 | - 'AU' => esc_html__( 'Australia', 'give' ), |
|
| 138 | - 'AT' => esc_html__( 'Austria', 'give' ), |
|
| 139 | - 'AZ' => esc_html__( 'Azerbaijan', 'give' ), |
|
| 140 | - 'BS' => esc_html__( 'Bahamas', 'give'), |
|
| 141 | - 'BH' => esc_html__( 'Bahrain', 'give' ), |
|
| 142 | - 'BD' => esc_html__( 'Bangladesh', 'give' ), |
|
| 143 | - 'BB' => esc_html__( 'Barbados', 'give' ), |
|
| 144 | - 'BY' => esc_html__( 'Belarus', 'give' ), |
|
| 145 | - 'BE' => esc_html__( 'Belgium', 'give' ), |
|
| 146 | - 'BZ' => esc_html__( 'Belize', 'give' ), |
|
| 147 | - 'BJ' => esc_html__( 'Benin', 'give' ), |
|
| 148 | - 'BM' => esc_html__( 'Bermuda', 'give' ), |
|
| 149 | - 'BT' => esc_html__( 'Bhutan', 'give' ), |
|
| 150 | - 'BO' => esc_html__( 'Bolivia', 'give' ), |
|
| 151 | - 'BA' => esc_html__( 'Bosnia and Herzegovina', 'give' ), |
|
| 152 | - 'BW' => esc_html__( 'Botswana', 'give' ), |
|
| 153 | - 'BV' => esc_html__( 'Bouvet Island', 'give' ), |
|
| 154 | - 'BR' => esc_html__( 'Brazil', 'give' ), |
|
| 155 | - 'IO' => esc_html__( 'British Indian Ocean Territory', 'give' ), |
|
| 156 | - 'BN' => esc_html__( 'Brunei Darrussalam', 'give' ), |
|
| 157 | - 'BG' => esc_html__( 'Bulgaria', 'give' ), |
|
| 158 | - 'BF' => esc_html__( 'Burkina Faso', 'give' ), |
|
| 159 | - 'BI' => esc_html__( 'Burundi', 'give' ), |
|
| 160 | - 'KH' => esc_html__( 'Cambodia', 'give' ), |
|
| 161 | - 'CM' => esc_html__( 'Cameroon', 'give' ), |
|
| 162 | - 'CV' => esc_html__( 'Cape Verde', 'give' ), |
|
| 163 | - 'KY' => esc_html__( 'Cayman Islands', 'give' ), |
|
| 164 | - 'CF' => esc_html__( 'Central African Republic', 'give' ), |
|
| 165 | - 'TD' => esc_html__( 'Chad', 'give' ), |
|
| 166 | - 'CL' => esc_html__( 'Chile', 'give' ), |
|
| 167 | - 'CN' => esc_html__( 'China', 'give' ), |
|
| 168 | - 'CX' => esc_html__( 'Christmas Island', 'give' ), |
|
| 169 | - 'CC' => esc_html__( 'Cocos Islands', 'give' ), |
|
| 170 | - 'CO' => esc_html__( 'Colombia', 'give' ), |
|
| 171 | - 'KM' => esc_html__( 'Comoros', 'give' ), |
|
| 172 | - 'CD' => esc_html__( 'Congo, Democratic People\'s Republic', 'give' ), |
|
| 173 | - 'CG' => esc_html__( 'Congo, Republic of', 'give' ), |
|
| 174 | - 'CK' => esc_html__( 'Cook Islands', 'give' ), |
|
| 175 | - 'CR' => esc_html__( 'Costa Rica', 'give' ), |
|
| 176 | - 'CI' => esc_html__( 'Cote d\'Ivoire', 'give' ), |
|
| 177 | - 'HR' => esc_html__( 'Croatia/Hrvatska', 'give' ), |
|
| 178 | - 'CU' => esc_html__( 'Cuba', 'give' ), |
|
| 179 | - 'CY' => esc_html__( 'Cyprus Island', 'give' ), |
|
| 180 | - 'CZ' => esc_html__( 'Czech Republic', 'give' ), |
|
| 181 | - 'DK' => esc_html__( 'Denmark', 'give' ), |
|
| 182 | - 'DJ' => esc_html__( 'Djibouti', 'give' ), |
|
| 183 | - 'DM' => esc_html__( 'Dominica', 'give' ), |
|
| 184 | - 'DO' => esc_html__( 'Dominican Republic', 'give' ), |
|
| 185 | - 'TP' => esc_html__( 'East Timor', 'give' ), |
|
| 186 | - 'EC' => esc_html__( 'Ecuador', 'give' ), |
|
| 187 | - 'EG' => esc_html__( 'Egypt', 'give' ), |
|
| 188 | - 'GQ' => esc_html__( 'Equatorial Guinea', 'give' ), |
|
| 189 | - 'SV' => esc_html__( 'El Salvador', 'give' ), |
|
| 190 | - 'ER' => esc_html__( 'Eritrea', 'give' ), |
|
| 191 | - 'EE' => esc_html__( 'Estonia', 'give' ), |
|
| 192 | - 'ET' => esc_html__( 'Ethiopia', 'give' ), |
|
| 193 | - 'FK' => esc_html__( 'Falkland Islands', 'give' ), |
|
| 194 | - 'FO' => esc_html__( 'Faroe Islands', 'give' ), |
|
| 195 | - 'FJ' => esc_html__( 'Fiji', 'give' ), |
|
| 196 | - 'FI' => esc_html__( 'Finland', 'give' ), |
|
| 197 | - 'FR' => esc_html__( 'France', 'give' ), |
|
| 198 | - 'GF' => esc_html__( 'French Guiana', 'give' ), |
|
| 199 | - 'PF' => esc_html__( 'French Polynesia', 'give' ), |
|
| 200 | - 'TF' => esc_html__( 'French Southern Territories', 'give' ), |
|
| 201 | - 'GA' => esc_html__( 'Gabon', 'give' ), |
|
| 202 | - 'GM' => esc_html__( 'Gambia', 'give' ), |
|
| 203 | - 'GE' => esc_html__( 'Georgia', 'give' ), |
|
| 204 | - 'DE' => esc_html__( 'Germany', 'give' ), |
|
| 205 | - 'GR' => esc_html__( 'Greece', 'give' ), |
|
| 206 | - 'GH' => esc_html__( 'Ghana', 'give' ), |
|
| 207 | - 'GI' => esc_html__( 'Gibraltar', 'give' ), |
|
| 208 | - 'GL' => esc_html__( 'Greenland', 'give' ), |
|
| 209 | - 'GD' => esc_html__( 'Grenada', 'give' ), |
|
| 210 | - 'GP' => esc_html__( 'Guadeloupe', 'give' ), |
|
| 211 | - 'GU' => esc_html__( 'Guam', 'give' ), |
|
| 212 | - 'GT' => esc_html__( 'Guatemala', 'give' ), |
|
| 213 | - 'GG' => esc_html__( 'Guernsey', 'give' ), |
|
| 214 | - 'GN' => esc_html__( 'Guinea', 'give' ), |
|
| 215 | - 'GW' => esc_html__( 'Guinea-Bissau', 'give' ), |
|
| 216 | - 'GY' => esc_html__( 'Guyana', 'give' ), |
|
| 217 | - 'HT' => esc_html__( 'Haiti', 'give' ), |
|
| 218 | - 'HM' => esc_html__( 'Heard and McDonald Islands', 'give' ), |
|
| 219 | - 'VA' => esc_html__( 'Holy See (City Vatican State)', 'give' ), |
|
| 220 | - 'HN' => esc_html__( 'Honduras', 'give' ), |
|
| 221 | - 'HK' => esc_html__( 'Hong Kong', 'give' ), |
|
| 222 | - 'HU' => esc_html__( 'Hungary', 'give' ), |
|
| 223 | - 'IS' => esc_html__( 'Iceland', 'give' ), |
|
| 224 | - 'IN' => esc_html__( 'India', 'give' ), |
|
| 225 | - 'ID' => esc_html__( 'Indonesia', 'give' ), |
|
| 226 | - 'IR' => esc_html__( 'Iran', 'give' ), |
|
| 227 | - 'IQ' => esc_html__( 'Iraq', 'give' ), |
|
| 228 | - 'IE' => esc_html__( 'Ireland', 'give' ), |
|
| 229 | - 'IM' => esc_html__( 'Isle of Man', 'give' ), |
|
| 230 | - 'IL' => esc_html__( 'Israel', 'give' ), |
|
| 231 | - 'IT' => esc_html__( 'Italy', 'give' ), |
|
| 232 | - 'JM' => esc_html__( 'Jamaica', 'give' ), |
|
| 233 | - 'JP' => esc_html__( 'Japan', 'give' ), |
|
| 234 | - 'JE' => esc_html__( 'Jersey', 'give' ), |
|
| 235 | - 'JO' => esc_html__( 'Jordan', 'give' ), |
|
| 236 | - 'KZ' => esc_html__( 'Kazakhstan', 'give' ), |
|
| 237 | - 'KE' => esc_html__( 'Kenya', 'give' ), |
|
| 238 | - 'KI' => esc_html__( 'Kiribati', 'give' ), |
|
| 239 | - 'KW' => esc_html__( 'Kuwait', 'give' ), |
|
| 240 | - 'KG' => esc_html__( 'Kyrgyzstan', 'give' ), |
|
| 241 | - 'LA' => esc_html__( 'Lao People\'s Democratic Republic', 'give' ), |
|
| 242 | - 'LV' => esc_html__( 'Latvia', 'give' ), |
|
| 243 | - 'LB' => esc_html__( 'Lebanon', 'give' ), |
|
| 244 | - 'LS' => esc_html__( 'Lesotho', 'give' ), |
|
| 245 | - 'LR' => esc_html__( 'Liberia', 'give' ), |
|
| 246 | - 'LY' => esc_html__( 'Libyan Arab Jamahiriya', 'give' ), |
|
| 247 | - 'LI' => esc_html__( 'Liechtenstein', 'give' ), |
|
| 248 | - 'LT' => esc_html__( 'Lithuania', 'give' ), |
|
| 249 | - 'LU' => esc_html__( 'Luxembourg', 'give' ), |
|
| 250 | - 'MO' => esc_html__( 'Macau', 'give' ), |
|
| 251 | - 'MK' => esc_html__( 'Macedonia', 'give' ), |
|
| 252 | - 'MG' => esc_html__( 'Madagascar', 'give' ), |
|
| 253 | - 'MW' => esc_html__( 'Malawi', 'give' ), |
|
| 254 | - 'MY' => esc_html__( 'Malaysia', 'give' ), |
|
| 255 | - 'MV' => esc_html__( 'Maldives', 'give' ), |
|
| 256 | - 'ML' => esc_html__( 'Mali', 'give' ), |
|
| 257 | - 'MT' => esc_html__( 'Malta', 'give' ), |
|
| 258 | - 'MH' => esc_html__( 'Marshall Islands', 'give' ), |
|
| 259 | - 'MQ' => esc_html__( 'Martinique', 'give' ), |
|
| 260 | - 'MR' => esc_html__( 'Mauritania', 'give' ), |
|
| 261 | - 'MU' => esc_html__( 'Mauritius', 'give' ), |
|
| 262 | - 'YT' => esc_html__( 'Mayotte', 'give' ), |
|
| 263 | - 'MX' => esc_html__( 'Mexico', 'give' ), |
|
| 264 | - 'FM' => esc_html__( 'Micronesia', 'give' ), |
|
| 265 | - 'MD' => esc_html__( 'Moldova, Republic of', 'give' ), |
|
| 266 | - 'MC' => esc_html__( 'Monaco', 'give' ), |
|
| 267 | - 'MN' => esc_html__( 'Mongolia', 'give' ), |
|
| 268 | - 'ME' => esc_html__( 'Montenegro', 'give' ), |
|
| 269 | - 'MS' => esc_html__( 'Montserrat', 'give' ), |
|
| 270 | - 'MA' => esc_html__( 'Morocco', 'give' ), |
|
| 271 | - 'MZ' => esc_html__( 'Mozambique', 'give' ), |
|
| 272 | - 'MM' => esc_html__( 'Myanmar', 'give' ), |
|
| 273 | - 'NA' => esc_html__( 'Namibia', 'give' ), |
|
| 274 | - 'NR' => esc_html__( 'Nauru', 'give' ), |
|
| 275 | - 'NP' => esc_html__( 'Nepal', 'give' ), |
|
| 276 | - 'NL' => esc_html__( 'Netherlands', 'give' ), |
|
| 277 | - 'AN' => esc_html__( 'Netherlands Antilles', 'give' ), |
|
| 278 | - 'NC' => esc_html__( 'New Caledonia', 'give' ), |
|
| 279 | - 'NZ' => esc_html__( 'New Zealand', 'give' ), |
|
| 280 | - 'NI' => esc_html__( 'Nicaragua', 'give' ), |
|
| 281 | - 'NE' => esc_html__( 'Niger', 'give' ), |
|
| 282 | - 'NG' => esc_html__( 'Nigeria', 'give' ), |
|
| 283 | - 'NU' => esc_html__( 'Niue', 'give' ), |
|
| 284 | - 'NF' => esc_html__( 'Norfolk Island', 'give' ), |
|
| 285 | - 'KP' => esc_html__( 'North Korea', 'give' ), |
|
| 286 | - 'MP' => esc_html__( 'Northern Mariana Islands', 'give' ), |
|
| 287 | - 'NO' => esc_html__( 'Norway', 'give' ), |
|
| 288 | - 'OM' => esc_html__( 'Oman', 'give' ), |
|
| 289 | - 'PK' => esc_html__( 'Pakistan', 'give' ), |
|
| 290 | - 'PW' => esc_html__( 'Palau', 'give' ), |
|
| 291 | - 'PS' => esc_html__( 'Palestinian Territories', 'give' ), |
|
| 292 | - 'PA' => esc_html__( 'Panama', 'give' ), |
|
| 293 | - 'PG' => esc_html__( 'Papua New Guinea', 'give' ), |
|
| 294 | - 'PY' => esc_html__( 'Paraguay', 'give' ), |
|
| 295 | - 'PE' => esc_html__( 'Peru', 'give' ), |
|
| 296 | - 'PH' => esc_html__( 'Phillipines', 'give' ), |
|
| 297 | - 'PN' => esc_html__( 'Pitcairn Island', 'give' ), |
|
| 298 | - 'PL' => esc_html__( 'Poland', 'give' ), |
|
| 299 | - 'PT' => esc_html__( 'Portugal', 'give' ), |
|
| 300 | - 'PR' => esc_html__( 'Puerto Rico', 'give' ), |
|
| 301 | - 'QA' => esc_html__( 'Qatar', 'give' ), |
|
| 302 | - 'RE' => esc_html__( 'Reunion Island', 'give' ), |
|
| 303 | - 'RO' => esc_html__( 'Romania', 'give' ), |
|
| 304 | - 'RU' => esc_html__( 'Russian Federation', 'give' ), |
|
| 305 | - 'RW' => esc_html__( 'Rwanda', 'give' ), |
|
| 306 | - 'SH' => esc_html__( 'Saint Helena', 'give' ), |
|
| 307 | - 'KN' => esc_html__( 'Saint Kitts and Nevis', 'give' ), |
|
| 308 | - 'LC' => esc_html__( 'Saint Lucia', 'give' ), |
|
| 309 | - 'PM' => esc_html__( 'Saint Pierre and Miquelon', 'give' ), |
|
| 310 | - 'VC' => esc_html__( 'Saint Vincent and the Grenadines', 'give' ), |
|
| 311 | - 'SM' => esc_html__( 'San Marino', 'give' ), |
|
| 312 | - 'ST' => esc_html__( 'Sao Tome and Principe', 'give' ), |
|
| 313 | - 'SA' => esc_html__( 'Saudi Arabia', 'give' ), |
|
| 314 | - 'SN' => esc_html__( 'Senegal', 'give' ), |
|
| 315 | - 'RS' => esc_html__( 'Serbia', 'give' ), |
|
| 316 | - 'SC' => esc_html__( 'Seychelles', 'give' ), |
|
| 317 | - 'SL' => esc_html__( 'Sierra Leone', 'give' ), |
|
| 318 | - 'SG' => esc_html__( 'Singapore', 'give' ), |
|
| 319 | - 'SK' => esc_html__( 'Slovak Republic', 'give' ), |
|
| 320 | - 'SI' => esc_html__( 'Slovenia', 'give' ), |
|
| 321 | - 'SB' => esc_html__( 'Solomon Islands', 'give' ), |
|
| 322 | - 'SO' => esc_html__( 'Somalia', 'give' ), |
|
| 323 | - 'ZA' => esc_html__( 'South Africa', 'give' ), |
|
| 324 | - 'GS' => esc_html__( 'South Georgia', 'give' ), |
|
| 325 | - 'KR' => esc_html__( 'South Korea', 'give' ), |
|
| 326 | - 'ES' => esc_html__( 'Spain', 'give' ), |
|
| 327 | - 'LK' => esc_html__( 'Sri Lanka', 'give' ), |
|
| 328 | - 'SD' => esc_html__( 'Sudan', 'give' ), |
|
| 329 | - 'SR' => esc_html__( 'Suriname', 'give' ), |
|
| 330 | - 'SJ' => esc_html__( 'Svalbard and Jan Mayen Islands', 'give' ), |
|
| 331 | - 'SZ' => esc_html__( 'Swaziland', 'give' ), |
|
| 332 | - 'SE' => esc_html__( 'Sweden', 'give' ), |
|
| 333 | - 'CH' => esc_html__( 'Switzerland', 'give' ), |
|
| 334 | - 'SY' => esc_html__( 'Syrian Arab Republic', 'give' ), |
|
| 335 | - 'TW' => esc_html__( 'Taiwan', 'give' ), |
|
| 336 | - 'TJ' => esc_html__( 'Tajikistan', 'give' ), |
|
| 337 | - 'TZ' => esc_html__( 'Tanzania', 'give' ), |
|
| 338 | - 'TG' => esc_html__( 'Togo', 'give' ), |
|
| 339 | - 'TK' => esc_html__( 'Tokelau', 'give' ), |
|
| 340 | - 'TO' => esc_html__( 'Tonga', 'give' ), |
|
| 341 | - 'TH' => esc_html__( 'Thailand', 'give' ), |
|
| 342 | - 'TT' => esc_html__( 'Trinidad and Tobago', 'give' ), |
|
| 343 | - 'TN' => esc_html__( 'Tunisia', 'give' ), |
|
| 344 | - 'TR' => esc_html__( 'Turkey', 'give' ), |
|
| 345 | - 'TM' => esc_html__( 'Turkmenistan', 'give' ), |
|
| 346 | - 'TC' => esc_html__( 'Turks and Caicos Islands', 'give' ), |
|
| 347 | - 'TV' => esc_html__( 'Tuvalu', 'give' ), |
|
| 348 | - 'UG' => esc_html__( 'Uganda', 'give' ), |
|
| 349 | - 'UA' => esc_html__( 'Ukraine', 'give' ), |
|
| 350 | - 'AE' => esc_html__( 'United Arab Emirates', 'give' ), |
|
| 351 | - 'UY' => esc_html__( 'Uruguay', 'give' ), |
|
| 352 | - 'UM' => esc_html__( 'US Minor Outlying Islands', 'give' ), |
|
| 353 | - 'UZ' => esc_html__( 'Uzbekistan', 'give' ), |
|
| 354 | - 'VU' => esc_html__( 'Vanuatu', 'give' ), |
|
| 355 | - 'VE' => esc_html__( 'Venezuela', 'give' ), |
|
| 356 | - 'VN' => esc_html__( 'Vietnam', 'give' ), |
|
| 357 | - 'VG' => esc_html__( 'Virgin Islands (British)', 'give' ), |
|
| 358 | - 'VI' => esc_html__( 'Virgin Islands (USA)', 'give' ), |
|
| 359 | - 'WF' => esc_html__( 'Wallis and Futuna Islands', 'give' ), |
|
| 360 | - 'EH' => esc_html__( 'Western Sahara', 'give' ), |
|
| 361 | - 'WS' => esc_html__( 'Western Samoa', 'give' ), |
|
| 362 | - 'YE' => esc_html__( 'Yemen', 'give' ), |
|
| 363 | - 'YU' => esc_html__( 'Yugoslavia', 'give' ), |
|
| 364 | - 'ZM' => esc_html__( 'Zambia', 'give' ), |
|
| 365 | - 'ZW' => esc_html__( 'Zimbabwe', 'give' ) |
|
| 122 | + 'US' => esc_html__('United States', 'give'), |
|
| 123 | + 'CA' => esc_html__('Canada', 'give'), |
|
| 124 | + 'GB' => esc_html__('United Kingdom', 'give'), |
|
| 125 | + 'AF' => esc_html__('Afghanistan', 'give'), |
|
| 126 | + 'AL' => esc_html__('Albania', 'give'), |
|
| 127 | + 'DZ' => esc_html__('Algeria', 'give'), |
|
| 128 | + 'AS' => esc_html__('American Samoa', 'give'), |
|
| 129 | + 'AD' => esc_html__('Andorra', 'give'), |
|
| 130 | + 'AO' => esc_html__('Angola', 'give'), |
|
| 131 | + 'AI' => esc_html__('Anguilla', 'give'), |
|
| 132 | + 'AQ' => esc_html__('Antarctica', 'give'), |
|
| 133 | + 'AG' => esc_html__('Antigua and Barbuda', 'give'), |
|
| 134 | + 'AR' => esc_html__('Argentina', 'give'), |
|
| 135 | + 'AM' => esc_html__('Armenia', 'give'), |
|
| 136 | + 'AW' => esc_html__('Aruba', 'give'), |
|
| 137 | + 'AU' => esc_html__('Australia', 'give'), |
|
| 138 | + 'AT' => esc_html__('Austria', 'give'), |
|
| 139 | + 'AZ' => esc_html__('Azerbaijan', 'give'), |
|
| 140 | + 'BS' => esc_html__('Bahamas', 'give'), |
|
| 141 | + 'BH' => esc_html__('Bahrain', 'give'), |
|
| 142 | + 'BD' => esc_html__('Bangladesh', 'give'), |
|
| 143 | + 'BB' => esc_html__('Barbados', 'give'), |
|
| 144 | + 'BY' => esc_html__('Belarus', 'give'), |
|
| 145 | + 'BE' => esc_html__('Belgium', 'give'), |
|
| 146 | + 'BZ' => esc_html__('Belize', 'give'), |
|
| 147 | + 'BJ' => esc_html__('Benin', 'give'), |
|
| 148 | + 'BM' => esc_html__('Bermuda', 'give'), |
|
| 149 | + 'BT' => esc_html__('Bhutan', 'give'), |
|
| 150 | + 'BO' => esc_html__('Bolivia', 'give'), |
|
| 151 | + 'BA' => esc_html__('Bosnia and Herzegovina', 'give'), |
|
| 152 | + 'BW' => esc_html__('Botswana', 'give'), |
|
| 153 | + 'BV' => esc_html__('Bouvet Island', 'give'), |
|
| 154 | + 'BR' => esc_html__('Brazil', 'give'), |
|
| 155 | + 'IO' => esc_html__('British Indian Ocean Territory', 'give'), |
|
| 156 | + 'BN' => esc_html__('Brunei Darrussalam', 'give'), |
|
| 157 | + 'BG' => esc_html__('Bulgaria', 'give'), |
|
| 158 | + 'BF' => esc_html__('Burkina Faso', 'give'), |
|
| 159 | + 'BI' => esc_html__('Burundi', 'give'), |
|
| 160 | + 'KH' => esc_html__('Cambodia', 'give'), |
|
| 161 | + 'CM' => esc_html__('Cameroon', 'give'), |
|
| 162 | + 'CV' => esc_html__('Cape Verde', 'give'), |
|
| 163 | + 'KY' => esc_html__('Cayman Islands', 'give'), |
|
| 164 | + 'CF' => esc_html__('Central African Republic', 'give'), |
|
| 165 | + 'TD' => esc_html__('Chad', 'give'), |
|
| 166 | + 'CL' => esc_html__('Chile', 'give'), |
|
| 167 | + 'CN' => esc_html__('China', 'give'), |
|
| 168 | + 'CX' => esc_html__('Christmas Island', 'give'), |
|
| 169 | + 'CC' => esc_html__('Cocos Islands', 'give'), |
|
| 170 | + 'CO' => esc_html__('Colombia', 'give'), |
|
| 171 | + 'KM' => esc_html__('Comoros', 'give'), |
|
| 172 | + 'CD' => esc_html__('Congo, Democratic People\'s Republic', 'give'), |
|
| 173 | + 'CG' => esc_html__('Congo, Republic of', 'give'), |
|
| 174 | + 'CK' => esc_html__('Cook Islands', 'give'), |
|
| 175 | + 'CR' => esc_html__('Costa Rica', 'give'), |
|
| 176 | + 'CI' => esc_html__('Cote d\'Ivoire', 'give'), |
|
| 177 | + 'HR' => esc_html__('Croatia/Hrvatska', 'give'), |
|
| 178 | + 'CU' => esc_html__('Cuba', 'give'), |
|
| 179 | + 'CY' => esc_html__('Cyprus Island', 'give'), |
|
| 180 | + 'CZ' => esc_html__('Czech Republic', 'give'), |
|
| 181 | + 'DK' => esc_html__('Denmark', 'give'), |
|
| 182 | + 'DJ' => esc_html__('Djibouti', 'give'), |
|
| 183 | + 'DM' => esc_html__('Dominica', 'give'), |
|
| 184 | + 'DO' => esc_html__('Dominican Republic', 'give'), |
|
| 185 | + 'TP' => esc_html__('East Timor', 'give'), |
|
| 186 | + 'EC' => esc_html__('Ecuador', 'give'), |
|
| 187 | + 'EG' => esc_html__('Egypt', 'give'), |
|
| 188 | + 'GQ' => esc_html__('Equatorial Guinea', 'give'), |
|
| 189 | + 'SV' => esc_html__('El Salvador', 'give'), |
|
| 190 | + 'ER' => esc_html__('Eritrea', 'give'), |
|
| 191 | + 'EE' => esc_html__('Estonia', 'give'), |
|
| 192 | + 'ET' => esc_html__('Ethiopia', 'give'), |
|
| 193 | + 'FK' => esc_html__('Falkland Islands', 'give'), |
|
| 194 | + 'FO' => esc_html__('Faroe Islands', 'give'), |
|
| 195 | + 'FJ' => esc_html__('Fiji', 'give'), |
|
| 196 | + 'FI' => esc_html__('Finland', 'give'), |
|
| 197 | + 'FR' => esc_html__('France', 'give'), |
|
| 198 | + 'GF' => esc_html__('French Guiana', 'give'), |
|
| 199 | + 'PF' => esc_html__('French Polynesia', 'give'), |
|
| 200 | + 'TF' => esc_html__('French Southern Territories', 'give'), |
|
| 201 | + 'GA' => esc_html__('Gabon', 'give'), |
|
| 202 | + 'GM' => esc_html__('Gambia', 'give'), |
|
| 203 | + 'GE' => esc_html__('Georgia', 'give'), |
|
| 204 | + 'DE' => esc_html__('Germany', 'give'), |
|
| 205 | + 'GR' => esc_html__('Greece', 'give'), |
|
| 206 | + 'GH' => esc_html__('Ghana', 'give'), |
|
| 207 | + 'GI' => esc_html__('Gibraltar', 'give'), |
|
| 208 | + 'GL' => esc_html__('Greenland', 'give'), |
|
| 209 | + 'GD' => esc_html__('Grenada', 'give'), |
|
| 210 | + 'GP' => esc_html__('Guadeloupe', 'give'), |
|
| 211 | + 'GU' => esc_html__('Guam', 'give'), |
|
| 212 | + 'GT' => esc_html__('Guatemala', 'give'), |
|
| 213 | + 'GG' => esc_html__('Guernsey', 'give'), |
|
| 214 | + 'GN' => esc_html__('Guinea', 'give'), |
|
| 215 | + 'GW' => esc_html__('Guinea-Bissau', 'give'), |
|
| 216 | + 'GY' => esc_html__('Guyana', 'give'), |
|
| 217 | + 'HT' => esc_html__('Haiti', 'give'), |
|
| 218 | + 'HM' => esc_html__('Heard and McDonald Islands', 'give'), |
|
| 219 | + 'VA' => esc_html__('Holy See (City Vatican State)', 'give'), |
|
| 220 | + 'HN' => esc_html__('Honduras', 'give'), |
|
| 221 | + 'HK' => esc_html__('Hong Kong', 'give'), |
|
| 222 | + 'HU' => esc_html__('Hungary', 'give'), |
|
| 223 | + 'IS' => esc_html__('Iceland', 'give'), |
|
| 224 | + 'IN' => esc_html__('India', 'give'), |
|
| 225 | + 'ID' => esc_html__('Indonesia', 'give'), |
|
| 226 | + 'IR' => esc_html__('Iran', 'give'), |
|
| 227 | + 'IQ' => esc_html__('Iraq', 'give'), |
|
| 228 | + 'IE' => esc_html__('Ireland', 'give'), |
|
| 229 | + 'IM' => esc_html__('Isle of Man', 'give'), |
|
| 230 | + 'IL' => esc_html__('Israel', 'give'), |
|
| 231 | + 'IT' => esc_html__('Italy', 'give'), |
|
| 232 | + 'JM' => esc_html__('Jamaica', 'give'), |
|
| 233 | + 'JP' => esc_html__('Japan', 'give'), |
|
| 234 | + 'JE' => esc_html__('Jersey', 'give'), |
|
| 235 | + 'JO' => esc_html__('Jordan', 'give'), |
|
| 236 | + 'KZ' => esc_html__('Kazakhstan', 'give'), |
|
| 237 | + 'KE' => esc_html__('Kenya', 'give'), |
|
| 238 | + 'KI' => esc_html__('Kiribati', 'give'), |
|
| 239 | + 'KW' => esc_html__('Kuwait', 'give'), |
|
| 240 | + 'KG' => esc_html__('Kyrgyzstan', 'give'), |
|
| 241 | + 'LA' => esc_html__('Lao People\'s Democratic Republic', 'give'), |
|
| 242 | + 'LV' => esc_html__('Latvia', 'give'), |
|
| 243 | + 'LB' => esc_html__('Lebanon', 'give'), |
|
| 244 | + 'LS' => esc_html__('Lesotho', 'give'), |
|
| 245 | + 'LR' => esc_html__('Liberia', 'give'), |
|
| 246 | + 'LY' => esc_html__('Libyan Arab Jamahiriya', 'give'), |
|
| 247 | + 'LI' => esc_html__('Liechtenstein', 'give'), |
|
| 248 | + 'LT' => esc_html__('Lithuania', 'give'), |
|
| 249 | + 'LU' => esc_html__('Luxembourg', 'give'), |
|
| 250 | + 'MO' => esc_html__('Macau', 'give'), |
|
| 251 | + 'MK' => esc_html__('Macedonia', 'give'), |
|
| 252 | + 'MG' => esc_html__('Madagascar', 'give'), |
|
| 253 | + 'MW' => esc_html__('Malawi', 'give'), |
|
| 254 | + 'MY' => esc_html__('Malaysia', 'give'), |
|
| 255 | + 'MV' => esc_html__('Maldives', 'give'), |
|
| 256 | + 'ML' => esc_html__('Mali', 'give'), |
|
| 257 | + 'MT' => esc_html__('Malta', 'give'), |
|
| 258 | + 'MH' => esc_html__('Marshall Islands', 'give'), |
|
| 259 | + 'MQ' => esc_html__('Martinique', 'give'), |
|
| 260 | + 'MR' => esc_html__('Mauritania', 'give'), |
|
| 261 | + 'MU' => esc_html__('Mauritius', 'give'), |
|
| 262 | + 'YT' => esc_html__('Mayotte', 'give'), |
|
| 263 | + 'MX' => esc_html__('Mexico', 'give'), |
|
| 264 | + 'FM' => esc_html__('Micronesia', 'give'), |
|
| 265 | + 'MD' => esc_html__('Moldova, Republic of', 'give'), |
|
| 266 | + 'MC' => esc_html__('Monaco', 'give'), |
|
| 267 | + 'MN' => esc_html__('Mongolia', 'give'), |
|
| 268 | + 'ME' => esc_html__('Montenegro', 'give'), |
|
| 269 | + 'MS' => esc_html__('Montserrat', 'give'), |
|
| 270 | + 'MA' => esc_html__('Morocco', 'give'), |
|
| 271 | + 'MZ' => esc_html__('Mozambique', 'give'), |
|
| 272 | + 'MM' => esc_html__('Myanmar', 'give'), |
|
| 273 | + 'NA' => esc_html__('Namibia', 'give'), |
|
| 274 | + 'NR' => esc_html__('Nauru', 'give'), |
|
| 275 | + 'NP' => esc_html__('Nepal', 'give'), |
|
| 276 | + 'NL' => esc_html__('Netherlands', 'give'), |
|
| 277 | + 'AN' => esc_html__('Netherlands Antilles', 'give'), |
|
| 278 | + 'NC' => esc_html__('New Caledonia', 'give'), |
|
| 279 | + 'NZ' => esc_html__('New Zealand', 'give'), |
|
| 280 | + 'NI' => esc_html__('Nicaragua', 'give'), |
|
| 281 | + 'NE' => esc_html__('Niger', 'give'), |
|
| 282 | + 'NG' => esc_html__('Nigeria', 'give'), |
|
| 283 | + 'NU' => esc_html__('Niue', 'give'), |
|
| 284 | + 'NF' => esc_html__('Norfolk Island', 'give'), |
|
| 285 | + 'KP' => esc_html__('North Korea', 'give'), |
|
| 286 | + 'MP' => esc_html__('Northern Mariana Islands', 'give'), |
|
| 287 | + 'NO' => esc_html__('Norway', 'give'), |
|
| 288 | + 'OM' => esc_html__('Oman', 'give'), |
|
| 289 | + 'PK' => esc_html__('Pakistan', 'give'), |
|
| 290 | + 'PW' => esc_html__('Palau', 'give'), |
|
| 291 | + 'PS' => esc_html__('Palestinian Territories', 'give'), |
|
| 292 | + 'PA' => esc_html__('Panama', 'give'), |
|
| 293 | + 'PG' => esc_html__('Papua New Guinea', 'give'), |
|
| 294 | + 'PY' => esc_html__('Paraguay', 'give'), |
|
| 295 | + 'PE' => esc_html__('Peru', 'give'), |
|
| 296 | + 'PH' => esc_html__('Phillipines', 'give'), |
|
| 297 | + 'PN' => esc_html__('Pitcairn Island', 'give'), |
|
| 298 | + 'PL' => esc_html__('Poland', 'give'), |
|
| 299 | + 'PT' => esc_html__('Portugal', 'give'), |
|
| 300 | + 'PR' => esc_html__('Puerto Rico', 'give'), |
|
| 301 | + 'QA' => esc_html__('Qatar', 'give'), |
|
| 302 | + 'RE' => esc_html__('Reunion Island', 'give'), |
|
| 303 | + 'RO' => esc_html__('Romania', 'give'), |
|
| 304 | + 'RU' => esc_html__('Russian Federation', 'give'), |
|
| 305 | + 'RW' => esc_html__('Rwanda', 'give'), |
|
| 306 | + 'SH' => esc_html__('Saint Helena', 'give'), |
|
| 307 | + 'KN' => esc_html__('Saint Kitts and Nevis', 'give'), |
|
| 308 | + 'LC' => esc_html__('Saint Lucia', 'give'), |
|
| 309 | + 'PM' => esc_html__('Saint Pierre and Miquelon', 'give'), |
|
| 310 | + 'VC' => esc_html__('Saint Vincent and the Grenadines', 'give'), |
|
| 311 | + 'SM' => esc_html__('San Marino', 'give'), |
|
| 312 | + 'ST' => esc_html__('Sao Tome and Principe', 'give'), |
|
| 313 | + 'SA' => esc_html__('Saudi Arabia', 'give'), |
|
| 314 | + 'SN' => esc_html__('Senegal', 'give'), |
|
| 315 | + 'RS' => esc_html__('Serbia', 'give'), |
|
| 316 | + 'SC' => esc_html__('Seychelles', 'give'), |
|
| 317 | + 'SL' => esc_html__('Sierra Leone', 'give'), |
|
| 318 | + 'SG' => esc_html__('Singapore', 'give'), |
|
| 319 | + 'SK' => esc_html__('Slovak Republic', 'give'), |
|
| 320 | + 'SI' => esc_html__('Slovenia', 'give'), |
|
| 321 | + 'SB' => esc_html__('Solomon Islands', 'give'), |
|
| 322 | + 'SO' => esc_html__('Somalia', 'give'), |
|
| 323 | + 'ZA' => esc_html__('South Africa', 'give'), |
|
| 324 | + 'GS' => esc_html__('South Georgia', 'give'), |
|
| 325 | + 'KR' => esc_html__('South Korea', 'give'), |
|
| 326 | + 'ES' => esc_html__('Spain', 'give'), |
|
| 327 | + 'LK' => esc_html__('Sri Lanka', 'give'), |
|
| 328 | + 'SD' => esc_html__('Sudan', 'give'), |
|
| 329 | + 'SR' => esc_html__('Suriname', 'give'), |
|
| 330 | + 'SJ' => esc_html__('Svalbard and Jan Mayen Islands', 'give'), |
|
| 331 | + 'SZ' => esc_html__('Swaziland', 'give'), |
|
| 332 | + 'SE' => esc_html__('Sweden', 'give'), |
|
| 333 | + 'CH' => esc_html__('Switzerland', 'give'), |
|
| 334 | + 'SY' => esc_html__('Syrian Arab Republic', 'give'), |
|
| 335 | + 'TW' => esc_html__('Taiwan', 'give'), |
|
| 336 | + 'TJ' => esc_html__('Tajikistan', 'give'), |
|
| 337 | + 'TZ' => esc_html__('Tanzania', 'give'), |
|
| 338 | + 'TG' => esc_html__('Togo', 'give'), |
|
| 339 | + 'TK' => esc_html__('Tokelau', 'give'), |
|
| 340 | + 'TO' => esc_html__('Tonga', 'give'), |
|
| 341 | + 'TH' => esc_html__('Thailand', 'give'), |
|
| 342 | + 'TT' => esc_html__('Trinidad and Tobago', 'give'), |
|
| 343 | + 'TN' => esc_html__('Tunisia', 'give'), |
|
| 344 | + 'TR' => esc_html__('Turkey', 'give'), |
|
| 345 | + 'TM' => esc_html__('Turkmenistan', 'give'), |
|
| 346 | + 'TC' => esc_html__('Turks and Caicos Islands', 'give'), |
|
| 347 | + 'TV' => esc_html__('Tuvalu', 'give'), |
|
| 348 | + 'UG' => esc_html__('Uganda', 'give'), |
|
| 349 | + 'UA' => esc_html__('Ukraine', 'give'), |
|
| 350 | + 'AE' => esc_html__('United Arab Emirates', 'give'), |
|
| 351 | + 'UY' => esc_html__('Uruguay', 'give'), |
|
| 352 | + 'UM' => esc_html__('US Minor Outlying Islands', 'give'), |
|
| 353 | + 'UZ' => esc_html__('Uzbekistan', 'give'), |
|
| 354 | + 'VU' => esc_html__('Vanuatu', 'give'), |
|
| 355 | + 'VE' => esc_html__('Venezuela', 'give'), |
|
| 356 | + 'VN' => esc_html__('Vietnam', 'give'), |
|
| 357 | + 'VG' => esc_html__('Virgin Islands (British)', 'give'), |
|
| 358 | + 'VI' => esc_html__('Virgin Islands (USA)', 'give'), |
|
| 359 | + 'WF' => esc_html__('Wallis and Futuna Islands', 'give'), |
|
| 360 | + 'EH' => esc_html__('Western Sahara', 'give'), |
|
| 361 | + 'WS' => esc_html__('Western Samoa', 'give'), |
|
| 362 | + 'YE' => esc_html__('Yemen', 'give'), |
|
| 363 | + 'YU' => esc_html__('Yugoslavia', 'give'), |
|
| 364 | + 'ZM' => esc_html__('Zambia', 'give'), |
|
| 365 | + 'ZW' => esc_html__('Zimbabwe', 'give') |
|
| 366 | 366 | ); |
| 367 | 367 | |
| 368 | - return apply_filters( 'give_countries', $countries ); |
|
| 368 | + return apply_filters('give_countries', $countries); |
|
| 369 | 369 | } |
| 370 | 370 | |
| 371 | 371 | /** |
@@ -446,7 +446,7 @@ discard block |
||
| 446 | 446 | 'AP' => 'Armed Forces - Pacific' |
| 447 | 447 | ); |
| 448 | 448 | |
| 449 | - return apply_filters( 'give_us_states', $states ); |
|
| 449 | + return apply_filters('give_us_states', $states); |
|
| 450 | 450 | } |
| 451 | 451 | |
| 452 | 452 | /** |
@@ -459,22 +459,22 @@ discard block |
||
| 459 | 459 | function give_get_provinces_list() { |
| 460 | 460 | $provinces = array( |
| 461 | 461 | '' => '', |
| 462 | - 'AB' => esc_html__('Alberta', 'give' ), |
|
| 463 | - 'BC' => esc_html__('British Columbia', 'give' ), |
|
| 464 | - 'MB' => esc_html__('Manitoba', 'give' ), |
|
| 465 | - 'NB' => esc_html__('New Brunswick', 'give' ), |
|
| 466 | - 'NL' => esc_html__('Newfoundland and Labrador', 'give' ), |
|
| 467 | - 'NS' => esc_html__('Nova Scotia', 'give' ), |
|
| 468 | - 'NT' => esc_html__('Northwest Territories', 'give' ), |
|
| 469 | - 'NU' => esc_html__('Nunavut', 'give' ), |
|
| 470 | - 'ON' => esc_html__('Ontario', 'give' ), |
|
| 471 | - 'PE' => esc_html__('Prince Edward Island', 'give' ), |
|
| 472 | - 'QC' => esc_html__('Quebec', 'give' ), |
|
| 473 | - 'SK' => esc_html__('Saskatchewan', 'give' ), |
|
| 474 | - 'YT' => esc_html__('Yukon', 'give' ) |
|
| 462 | + 'AB' => esc_html__('Alberta', 'give'), |
|
| 463 | + 'BC' => esc_html__('British Columbia', 'give'), |
|
| 464 | + 'MB' => esc_html__('Manitoba', 'give'), |
|
| 465 | + 'NB' => esc_html__('New Brunswick', 'give'), |
|
| 466 | + 'NL' => esc_html__('Newfoundland and Labrador', 'give'), |
|
| 467 | + 'NS' => esc_html__('Nova Scotia', 'give'), |
|
| 468 | + 'NT' => esc_html__('Northwest Territories', 'give'), |
|
| 469 | + 'NU' => esc_html__('Nunavut', 'give'), |
|
| 470 | + 'ON' => esc_html__('Ontario', 'give'), |
|
| 471 | + 'PE' => esc_html__('Prince Edward Island', 'give'), |
|
| 472 | + 'QC' => esc_html__('Quebec', 'give'), |
|
| 473 | + 'SK' => esc_html__('Saskatchewan', 'give'), |
|
| 474 | + 'YT' => esc_html__('Yukon', 'give') |
|
| 475 | 475 | ); |
| 476 | 476 | |
| 477 | - return apply_filters( 'give_canada_provinces', $provinces ); |
|
| 477 | + return apply_filters('give_canada_provinces', $provinces); |
|
| 478 | 478 | } |
| 479 | 479 | |
| 480 | 480 | /** |
@@ -496,7 +496,7 @@ discard block |
||
| 496 | 496 | 'WA' => 'Western Australia' |
| 497 | 497 | ); |
| 498 | 498 | |
| 499 | - return apply_filters( 'give_australian_states', $states ); |
|
| 499 | + return apply_filters('give_australian_states', $states); |
|
| 500 | 500 | } |
| 501 | 501 | |
| 502 | 502 | /** |
@@ -537,7 +537,7 @@ discard block |
||
| 537 | 537 | 'TO' => 'Tocantins' |
| 538 | 538 | ); |
| 539 | 539 | |
| 540 | - return apply_filters( 'give_brazil_states', $states ); |
|
| 540 | + return apply_filters('give_brazil_states', $states); |
|
| 541 | 541 | } |
| 542 | 542 | |
| 543 | 543 | /** |
@@ -554,7 +554,7 @@ discard block |
||
| 554 | 554 | 'NEW TERRITORIES' => 'New Territories' |
| 555 | 555 | ); |
| 556 | 556 | |
| 557 | - return apply_filters( 'give_hong_kong_states', $states ); |
|
| 557 | + return apply_filters('give_hong_kong_states', $states); |
|
| 558 | 558 | } |
| 559 | 559 | |
| 560 | 560 | /** |
@@ -588,7 +588,7 @@ discard block |
||
| 588 | 588 | 'ZA' => 'Zala' |
| 589 | 589 | ); |
| 590 | 590 | |
| 591 | - return apply_filters( 'give_hungary_states', $states ); |
|
| 591 | + return apply_filters('give_hungary_states', $states); |
|
| 592 | 592 | } |
| 593 | 593 | |
| 594 | 594 | /** |
@@ -634,7 +634,7 @@ discard block |
||
| 634 | 634 | 'CN32' => 'Xinjiang / 新疆' |
| 635 | 635 | ); |
| 636 | 636 | |
| 637 | - return apply_filters( 'give_chinese_states', $states ); |
|
| 637 | + return apply_filters('give_chinese_states', $states); |
|
| 638 | 638 | } |
| 639 | 639 | |
| 640 | 640 | /** |
@@ -663,7 +663,7 @@ discard block |
||
| 663 | 663 | 'WC' => 'West Coast' |
| 664 | 664 | ); |
| 665 | 665 | |
| 666 | - return apply_filters( 'give_new_zealand_states', $states ); |
|
| 666 | + return apply_filters('give_new_zealand_states', $states); |
|
| 667 | 667 | } |
| 668 | 668 | |
| 669 | 669 | /** |
@@ -711,7 +711,7 @@ discard block |
||
| 711 | 711 | 'PB' => 'Papua Barat' |
| 712 | 712 | ); |
| 713 | 713 | |
| 714 | - return apply_filters( 'give_indonesia_states', $states ); |
|
| 714 | + return apply_filters('give_indonesia_states', $states); |
|
| 715 | 715 | } |
| 716 | 716 | |
| 717 | 717 | /** |
@@ -761,7 +761,7 @@ discard block |
||
| 761 | 761 | 'PY' => 'Pondicherry (Puducherry)' |
| 762 | 762 | ); |
| 763 | 763 | |
| 764 | - return apply_filters( 'give_indian_states', $states ); |
|
| 764 | + return apply_filters('give_indian_states', $states); |
|
| 765 | 765 | } |
| 766 | 766 | |
| 767 | 767 | /** |
@@ -791,7 +791,7 @@ discard block |
||
| 791 | 791 | 'PJY' => 'W.P. Putrajaya' |
| 792 | 792 | ); |
| 793 | 793 | |
| 794 | - return apply_filters( 'give_malaysian_states', $states ); |
|
| 794 | + return apply_filters('give_malaysian_states', $states); |
|
| 795 | 795 | } |
| 796 | 796 | |
| 797 | 797 | /** |
@@ -814,7 +814,7 @@ discard block |
||
| 814 | 814 | 'WC' => 'Western Cape' |
| 815 | 815 | ); |
| 816 | 816 | |
| 817 | - return apply_filters( 'give_south_african_states', $states ); |
|
| 817 | + return apply_filters('give_south_african_states', $states); |
|
| 818 | 818 | } |
| 819 | 819 | |
| 820 | 820 | /** |
@@ -905,7 +905,7 @@ discard block |
||
| 905 | 905 | 'TH-35' => 'Yasothon (ยโสธร)' |
| 906 | 906 | ); |
| 907 | 907 | |
| 908 | - return apply_filters( 'give_thailand_states', $states ); |
|
| 908 | + return apply_filters('give_thailand_states', $states); |
|
| 909 | 909 | } |
| 910 | 910 | |
| 911 | 911 | /** |
@@ -917,59 +917,59 @@ discard block |
||
| 917 | 917 | function give_get_spain_states_list() { |
| 918 | 918 | $states = array( |
| 919 | 919 | '' => '', |
| 920 | - 'C' => esc_html__( 'A Coruña', 'give' ), |
|
| 921 | - 'VI' => esc_html__( 'Álava', 'give' ), |
|
| 922 | - 'AB' => esc_html__( 'Albacete', 'give' ), |
|
| 923 | - 'A' => esc_html__( 'Alicante', 'give' ), |
|
| 924 | - 'AL' => esc_html__( 'Almería', 'give' ), |
|
| 925 | - 'O' => esc_html__( 'Asturias', 'give' ), |
|
| 926 | - 'AV' => esc_html__( 'Ávila', 'give' ), |
|
| 927 | - 'BA' => esc_html__( 'Badajoz', 'give' ), |
|
| 928 | - 'PM' => esc_html__( 'Baleares', 'give' ), |
|
| 929 | - 'B' => esc_html__( 'Barcelona', 'give' ), |
|
| 930 | - 'BU' => esc_html__( 'Burgos', 'give' ), |
|
| 931 | - 'CC' => esc_html__( 'Cáceres', 'give' ), |
|
| 932 | - 'CA' => esc_html__( 'Cádiz', 'give' ), |
|
| 933 | - 'S' => esc_html__( 'Cantabria', 'give' ), |
|
| 934 | - 'CS' => esc_html__( 'Castellón', 'give' ), |
|
| 935 | - 'CE' => esc_html__( 'Ceuta', 'give' ), |
|
| 936 | - 'CR' => esc_html__( 'Ciudad Real', 'give' ), |
|
| 937 | - 'CO' => esc_html__( 'Córdoba', 'give' ), |
|
| 938 | - 'CU' => esc_html__( 'Cuenca', 'give' ), |
|
| 939 | - 'GI' => esc_html__( 'Girona', 'give' ), |
|
| 940 | - 'GR' => esc_html__( 'Granada', 'give' ), |
|
| 941 | - 'GU' => esc_html__( 'Guadalajara', 'give' ), |
|
| 942 | - 'SS' => esc_html__( 'Gipuzkoa', 'give' ), |
|
| 943 | - 'H' => esc_html__( 'Huelva', 'give' ), |
|
| 944 | - 'HU' => esc_html__( 'Huesca', 'give' ), |
|
| 945 | - 'J' => esc_html__( 'Jaén', 'give' ), |
|
| 946 | - 'LO' => esc_html__( 'La Rioja', 'give' ), |
|
| 947 | - 'GC' => esc_html__( 'Las Palmas', 'give' ), |
|
| 948 | - 'LE' => esc_html__( 'León', 'give' ), |
|
| 949 | - 'L' => esc_html__( 'Lleida', 'give' ), |
|
| 950 | - 'LU' => esc_html__( 'Lugo', 'give' ), |
|
| 951 | - 'M' => esc_html__( 'Madrid', 'give' ), |
|
| 952 | - 'MA' => esc_html__( 'Málaga', 'give' ), |
|
| 953 | - 'ML' => esc_html__( 'Melilla', 'give' ), |
|
| 954 | - 'MU' => esc_html__( 'Murcia', 'give' ), |
|
| 955 | - 'NA' => esc_html__( 'Navarra', 'give' ), |
|
| 956 | - 'OR' => esc_html__( 'Ourense', 'give' ), |
|
| 957 | - 'P' => esc_html__( 'Palencia', 'give' ), |
|
| 958 | - 'PO' => esc_html__( 'Pontevedra', 'give' ), |
|
| 959 | - 'SA' => esc_html__( 'Salamanca', 'give' ), |
|
| 960 | - 'TF' => esc_html__( 'Santa Cruz de Tenerife', 'give' ), |
|
| 961 | - 'SG' => esc_html__( 'Segovia', 'give' ), |
|
| 962 | - 'SE' => esc_html__( 'Sevilla', 'give' ), |
|
| 963 | - 'SO' => esc_html__( 'Soria', 'give' ), |
|
| 964 | - 'T' => esc_html__( 'Tarragona', 'give' ), |
|
| 965 | - 'TE' => esc_html__( 'Teruel', 'give' ), |
|
| 966 | - 'TO' => esc_html__( 'Toledo', 'give' ), |
|
| 967 | - 'V' => esc_html__( 'Valencia', 'give' ), |
|
| 968 | - 'VA' => esc_html__( 'Valladolid', 'give' ), |
|
| 969 | - 'BI' => esc_html__( 'Bizkaia', 'give' ), |
|
| 970 | - 'ZA' => esc_html__( 'Zamora', 'give' ), |
|
| 971 | - 'Z' => esc_html__( 'Zaragoza', 'give' ) |
|
| 920 | + 'C' => esc_html__('A Coruña', 'give'), |
|
| 921 | + 'VI' => esc_html__('Álava', 'give'), |
|
| 922 | + 'AB' => esc_html__('Albacete', 'give'), |
|
| 923 | + 'A' => esc_html__('Alicante', 'give'), |
|
| 924 | + 'AL' => esc_html__('Almería', 'give'), |
|
| 925 | + 'O' => esc_html__('Asturias', 'give'), |
|
| 926 | + 'AV' => esc_html__('Ávila', 'give'), |
|
| 927 | + 'BA' => esc_html__('Badajoz', 'give'), |
|
| 928 | + 'PM' => esc_html__('Baleares', 'give'), |
|
| 929 | + 'B' => esc_html__('Barcelona', 'give'), |
|
| 930 | + 'BU' => esc_html__('Burgos', 'give'), |
|
| 931 | + 'CC' => esc_html__('Cáceres', 'give'), |
|
| 932 | + 'CA' => esc_html__('Cádiz', 'give'), |
|
| 933 | + 'S' => esc_html__('Cantabria', 'give'), |
|
| 934 | + 'CS' => esc_html__('Castellón', 'give'), |
|
| 935 | + 'CE' => esc_html__('Ceuta', 'give'), |
|
| 936 | + 'CR' => esc_html__('Ciudad Real', 'give'), |
|
| 937 | + 'CO' => esc_html__('Córdoba', 'give'), |
|
| 938 | + 'CU' => esc_html__('Cuenca', 'give'), |
|
| 939 | + 'GI' => esc_html__('Girona', 'give'), |
|
| 940 | + 'GR' => esc_html__('Granada', 'give'), |
|
| 941 | + 'GU' => esc_html__('Guadalajara', 'give'), |
|
| 942 | + 'SS' => esc_html__('Gipuzkoa', 'give'), |
|
| 943 | + 'H' => esc_html__('Huelva', 'give'), |
|
| 944 | + 'HU' => esc_html__('Huesca', 'give'), |
|
| 945 | + 'J' => esc_html__('Jaén', 'give'), |
|
| 946 | + 'LO' => esc_html__('La Rioja', 'give'), |
|
| 947 | + 'GC' => esc_html__('Las Palmas', 'give'), |
|
| 948 | + 'LE' => esc_html__('León', 'give'), |
|
| 949 | + 'L' => esc_html__('Lleida', 'give'), |
|
| 950 | + 'LU' => esc_html__('Lugo', 'give'), |
|
| 951 | + 'M' => esc_html__('Madrid', 'give'), |
|
| 952 | + 'MA' => esc_html__('Málaga', 'give'), |
|
| 953 | + 'ML' => esc_html__('Melilla', 'give'), |
|
| 954 | + 'MU' => esc_html__('Murcia', 'give'), |
|
| 955 | + 'NA' => esc_html__('Navarra', 'give'), |
|
| 956 | + 'OR' => esc_html__('Ourense', 'give'), |
|
| 957 | + 'P' => esc_html__('Palencia', 'give'), |
|
| 958 | + 'PO' => esc_html__('Pontevedra', 'give'), |
|
| 959 | + 'SA' => esc_html__('Salamanca', 'give'), |
|
| 960 | + 'TF' => esc_html__('Santa Cruz de Tenerife', 'give'), |
|
| 961 | + 'SG' => esc_html__('Segovia', 'give'), |
|
| 962 | + 'SE' => esc_html__('Sevilla', 'give'), |
|
| 963 | + 'SO' => esc_html__('Soria', 'give'), |
|
| 964 | + 'T' => esc_html__('Tarragona', 'give'), |
|
| 965 | + 'TE' => esc_html__('Teruel', 'give'), |
|
| 966 | + 'TO' => esc_html__('Toledo', 'give'), |
|
| 967 | + 'V' => esc_html__('Valencia', 'give'), |
|
| 968 | + 'VA' => esc_html__('Valladolid', 'give'), |
|
| 969 | + 'BI' => esc_html__('Bizkaia', 'give'), |
|
| 970 | + 'ZA' => esc_html__('Zamora', 'give'), |
|
| 971 | + 'Z' => esc_html__('Zaragoza', 'give') |
|
| 972 | 972 | ); |
| 973 | 973 | |
| 974 | - return apply_filters( 'give_spain_states', $states ); |
|
| 974 | + return apply_filters('give_spain_states', $states); |
|
| 975 | 975 | } |
@@ -4,8 +4,8 @@ discard block |
||
| 4 | 4 | */ |
| 5 | 5 | $give_map_deprecated_actions = give_deprecated_actions(); |
| 6 | 6 | |
| 7 | -foreach ( $give_map_deprecated_actions as $new => $old ) { |
|
| 8 | - add_action( $new, 'give_deprecated_action_mapping', 10, 4 ); |
|
| 7 | +foreach ($give_map_deprecated_actions as $new => $old) { |
|
| 8 | + add_action($new, 'give_deprecated_action_mapping', 10, 4); |
|
| 9 | 9 | } |
| 10 | 10 | |
| 11 | 11 | /** |
@@ -59,20 +59,20 @@ discard block |
||
| 59 | 59 | * |
| 60 | 60 | * @return mixed|void |
| 61 | 61 | */ |
| 62 | -function give_deprecated_action_mapping( $data, $arg_1 = '', $arg_2 = '', $arg_3 = '' ) { |
|
| 62 | +function give_deprecated_action_mapping($data, $arg_1 = '', $arg_2 = '', $arg_3 = '') { |
|
| 63 | 63 | $give_map_deprecated_actions = give_deprecated_actions(); |
| 64 | 64 | $action = current_filter(); |
| 65 | 65 | |
| 66 | - if ( isset( $give_map_deprecated_actions[ $action ] ) ) { |
|
| 67 | - if ( has_action( $give_map_deprecated_actions[ $action ] ) ) { |
|
| 68 | - do_action( $give_map_deprecated_actions[ $action ], $data, $arg_1, $arg_2, $arg_3 ); |
|
| 66 | + if (isset($give_map_deprecated_actions[$action])) { |
|
| 67 | + if (has_action($give_map_deprecated_actions[$action])) { |
|
| 68 | + do_action($give_map_deprecated_actions[$action], $data, $arg_1, $arg_2, $arg_3); |
|
| 69 | 69 | |
| 70 | - if ( ! defined( 'DOING_AJAX' ) ) { |
|
| 70 | + if ( ! defined('DOING_AJAX')) { |
|
| 71 | 71 | // translators: %s: action name. |
| 72 | 72 | _give_deprecated_function( |
| 73 | 73 | sprintf( |
| 74 | - __( 'The %s action' ), |
|
| 75 | - $give_map_deprecated_actions[ $action ] |
|
| 74 | + __('The %s action'), |
|
| 75 | + $give_map_deprecated_actions[$action] |
|
| 76 | 76 | ), |
| 77 | 77 | '1.7', |
| 78 | 78 | $action |
@@ -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,17 +23,17 @@ discard block |
||
| 23 | 23 | * |
| 24 | 24 | * @return void |
| 25 | 25 | */ |
| 26 | -function give_trigger_donation_receipt( $payment_id ) { |
|
| 26 | +function give_trigger_donation_receipt($payment_id) { |
|
| 27 | 27 | // Make sure we don't send a receipt while editing a donation. |
| 28 | - if ( isset( $_POST['give-action'] ) && 'edit_payment' == $_POST['give-action'] ) { |
|
| 28 | + if (isset($_POST['give-action']) && 'edit_payment' == $_POST['give-action']) { |
|
| 29 | 29 | return; |
| 30 | 30 | } |
| 31 | 31 | |
| 32 | 32 | // Send email. |
| 33 | - give_email_donation_receipt( $payment_id ); |
|
| 33 | + give_email_donation_receipt($payment_id); |
|
| 34 | 34 | } |
| 35 | 35 | |
| 36 | -add_action( 'give_complete_donation', 'give_trigger_donation_receipt', 999, 1 ); |
|
| 36 | +add_action('give_complete_donation', 'give_trigger_donation_receipt', 999, 1); |
|
| 37 | 37 | |
| 38 | 38 | /** |
| 39 | 39 | * Resend the Email Donation Receipt. (This can be done from the Donation History Page) |
@@ -44,29 +44,29 @@ discard block |
||
| 44 | 44 | * |
| 45 | 45 | * @return void |
| 46 | 46 | */ |
| 47 | -function give_resend_donation_receipt( $data ) { |
|
| 47 | +function give_resend_donation_receipt($data) { |
|
| 48 | 48 | |
| 49 | - $purchase_id = absint( $data['purchase_id'] ); |
|
| 49 | + $purchase_id = absint($data['purchase_id']); |
|
| 50 | 50 | |
| 51 | - if ( empty( $purchase_id ) ) { |
|
| 51 | + if (empty($purchase_id)) { |
|
| 52 | 52 | return; |
| 53 | 53 | } |
| 54 | 54 | |
| 55 | - if ( ! current_user_can( 'edit_give_payments', $purchase_id ) ) { |
|
| 56 | - wp_die( esc_html__( 'You do not have permission to edit payments.', 'give' ), esc_html__( 'Error', 'give' ), array( 'response' => 403 ) ); |
|
| 55 | + if ( ! current_user_can('edit_give_payments', $purchase_id)) { |
|
| 56 | + wp_die(esc_html__('You do not have permission to edit payments.', 'give'), esc_html__('Error', 'give'), array('response' => 403)); |
|
| 57 | 57 | } |
| 58 | 58 | |
| 59 | - give_email_donation_receipt( $purchase_id, false ); |
|
| 59 | + give_email_donation_receipt($purchase_id, false); |
|
| 60 | 60 | |
| 61 | - wp_redirect( add_query_arg( array( |
|
| 61 | + wp_redirect(add_query_arg(array( |
|
| 62 | 62 | 'give-message' => 'email_sent', |
| 63 | 63 | 'give-action' => false, |
| 64 | 64 | 'purchase_id' => false |
| 65 | - ) ) ); |
|
| 65 | + ))); |
|
| 66 | 66 | exit; |
| 67 | 67 | } |
| 68 | 68 | |
| 69 | -add_action( 'give_email_links', 'give_resend_donation_receipt' ); |
|
| 69 | +add_action('give_email_links', 'give_resend_donation_receipt'); |
|
| 70 | 70 | |
| 71 | 71 | /** |
| 72 | 72 | * Trigger the sending of a Test Email |
@@ -77,8 +77,8 @@ discard block |
||
| 77 | 77 | * |
| 78 | 78 | * @return void |
| 79 | 79 | */ |
| 80 | -function give_send_test_email( $data ) { |
|
| 81 | - if ( ! wp_verify_nonce( $data['_wpnonce'], 'give-test-email' ) ) { |
|
| 80 | +function give_send_test_email($data) { |
|
| 81 | + if ( ! wp_verify_nonce($data['_wpnonce'], 'give-test-email')) { |
|
| 82 | 82 | return; |
| 83 | 83 | } |
| 84 | 84 | |
@@ -86,8 +86,8 @@ discard block |
||
| 86 | 86 | give_email_test_donation_receipt(); |
| 87 | 87 | |
| 88 | 88 | // Remove the test email query arg. |
| 89 | - wp_redirect( remove_query_arg( 'give_action' ) ); |
|
| 89 | + wp_redirect(remove_query_arg('give_action')); |
|
| 90 | 90 | exit; |
| 91 | 91 | } |
| 92 | 92 | |
| 93 | -add_action( 'give_send_test_email', 'give_send_test_email' ); |
|
| 93 | +add_action('give_send_test_email', 'give_send_test_email'); |
|
@@ -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,33 +29,33 @@ discard block |
||
| 29 | 29 | * |
| 30 | 30 | * @return void |
| 31 | 31 | */ |
| 32 | -function give_print_errors( $form_id ) { |
|
| 32 | +function give_print_errors($form_id) { |
|
| 33 | 33 | |
| 34 | 34 | $errors = give_get_errors(); |
| 35 | 35 | |
| 36 | - $request_form_id = isset( $_REQUEST['form-id'] ) ? intval( $_REQUEST['form-id'] ) : 0; |
|
| 36 | + $request_form_id = isset($_REQUEST['form-id']) ? intval($_REQUEST['form-id']) : 0; |
|
| 37 | 37 | |
| 38 | 38 | // Sanity checks first: Ensure that gateway returned errors display on the appropriate form. |
| 39 | - if ( ! isset( $_POST['give_ajax'] ) && $request_form_id !== $form_id ) { |
|
| 39 | + if ( ! isset($_POST['give_ajax']) && $request_form_id !== $form_id) { |
|
| 40 | 40 | return; |
| 41 | 41 | } |
| 42 | 42 | |
| 43 | - if ( $errors ) { |
|
| 44 | - $classes = apply_filters( 'give_error_class', array( |
|
| 43 | + if ($errors) { |
|
| 44 | + $classes = apply_filters('give_error_class', array( |
|
| 45 | 45 | 'give_errors', |
| 46 | - ) ); |
|
| 47 | - echo '<div class="' . implode( ' ', $classes ) . '">'; |
|
| 46 | + )); |
|
| 47 | + echo '<div class="'.implode(' ', $classes).'">'; |
|
| 48 | 48 | // Loop error codes and display errors. |
| 49 | - foreach ( $errors as $error_id => $error ) { |
|
| 50 | - echo '<div class="give_error" id="give_error_' . $error_id . '"><p><strong>' . esc_html__( 'Error', 'give' ) . '</strong>: ' . $error . '</p></div>'; |
|
| 49 | + foreach ($errors as $error_id => $error) { |
|
| 50 | + echo '<div class="give_error" id="give_error_'.$error_id.'"><p><strong>'.esc_html__('Error', 'give').'</strong>: '.$error.'</p></div>'; |
|
| 51 | 51 | } |
| 52 | 52 | echo '</div>'; |
| 53 | 53 | give_clear_errors(); |
| 54 | 54 | } |
| 55 | 55 | } |
| 56 | 56 | |
| 57 | -add_action( 'give_donation_form_before_personal_info', 'give_print_errors' ); |
|
| 58 | -add_action( 'give_ajax_donation_errors', 'give_print_errors' ); |
|
| 57 | +add_action('give_donation_form_before_personal_info', 'give_print_errors'); |
|
| 58 | +add_action('give_ajax_donation_errors', 'give_print_errors'); |
|
| 59 | 59 | |
| 60 | 60 | /** |
| 61 | 61 | * Get Errors |
@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | * @return mixed array if errors are present, false if none found |
| 69 | 69 | */ |
| 70 | 70 | function give_get_errors() { |
| 71 | - return Give()->session->get( 'give_errors' ); |
|
| 71 | + return Give()->session->get('give_errors'); |
|
| 72 | 72 | } |
| 73 | 73 | |
| 74 | 74 | /** |
@@ -84,13 +84,13 @@ discard block |
||
| 84 | 84 | * |
| 85 | 85 | * @return void |
| 86 | 86 | */ |
| 87 | -function give_set_error( $error_id, $error_message ) { |
|
| 87 | +function give_set_error($error_id, $error_message) { |
|
| 88 | 88 | $errors = give_get_errors(); |
| 89 | - if ( ! $errors ) { |
|
| 89 | + if ( ! $errors) { |
|
| 90 | 90 | $errors = array(); |
| 91 | 91 | } |
| 92 | - $errors[ $error_id ] = $error_message; |
|
| 93 | - Give()->session->set( 'give_errors', $errors ); |
|
| 92 | + $errors[$error_id] = $error_message; |
|
| 93 | + Give()->session->set('give_errors', $errors); |
|
| 94 | 94 | } |
| 95 | 95 | |
| 96 | 96 | /** |
@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | * @return void |
| 102 | 102 | */ |
| 103 | 103 | function give_clear_errors() { |
| 104 | - Give()->session->set( 'give_errors', null ); |
|
| 104 | + Give()->session->set('give_errors', null); |
|
| 105 | 105 | } |
| 106 | 106 | |
| 107 | 107 | /** |
@@ -114,11 +114,11 @@ discard block |
||
| 114 | 114 | * |
| 115 | 115 | * @return void |
| 116 | 116 | */ |
| 117 | -function give_unset_error( $error_id ) { |
|
| 117 | +function give_unset_error($error_id) { |
|
| 118 | 118 | $errors = give_get_errors(); |
| 119 | - if ( $errors ) { |
|
| 120 | - unset( $errors[ $error_id ] ); |
|
| 121 | - Give()->session->set( 'give_errors', $errors ); |
|
| 119 | + if ($errors) { |
|
| 120 | + unset($errors[$error_id]); |
|
| 121 | + Give()->session->set('give_errors', $errors); |
|
| 122 | 122 | } |
| 123 | 123 | } |
| 124 | 124 | |
@@ -129,7 +129,7 @@ discard block |
||
| 129 | 129 | * @return string|void |
| 130 | 130 | */ |
| 131 | 131 | function _give_die_handler() { |
| 132 | - if ( defined( 'GIVE_UNIT_TESTS' ) ) { |
|
| 132 | + if (defined('GIVE_UNIT_TESTS')) { |
|
| 133 | 133 | return '_give_die_handler'; |
| 134 | 134 | } else { |
| 135 | 135 | die(); |
@@ -149,10 +149,10 @@ discard block |
||
| 149 | 149 | * |
| 150 | 150 | * @return void |
| 151 | 151 | */ |
| 152 | -function give_die( $message = '', $title = '', $status = 400 ) { |
|
| 153 | - add_filter( 'wp_die_ajax_handler', '_give_die_handler', 10, 3 ); |
|
| 154 | - add_filter( 'wp_die_handler', '_give_die_handler', 10, 3 ); |
|
| 155 | - wp_die( $message, $title, array( 'response' => $status ) ); |
|
| 152 | +function give_die($message = '', $title = '', $status = 400) { |
|
| 153 | + add_filter('wp_die_ajax_handler', '_give_die_handler', 10, 3); |
|
| 154 | + add_filter('wp_die_handler', '_give_die_handler', 10, 3); |
|
| 155 | + wp_die($message, $title, array('response' => $status)); |
|
| 156 | 156 | } |
| 157 | 157 | |
| 158 | 158 | /** |
@@ -168,10 +168,10 @@ discard block |
||
| 168 | 168 | * |
| 169 | 169 | * @return string $error |
| 170 | 170 | */ |
| 171 | -function give_output_error( $message, $echo = true, $error_id = 'warning' ) { |
|
| 172 | - $error = '<div class="give_errors" id="give_error_' . $error_id . '"><p class="give_error give_' . $error_id . '">' . $message . '</p></div>'; |
|
| 171 | +function give_output_error($message, $echo = true, $error_id = 'warning') { |
|
| 172 | + $error = '<div class="give_errors" id="give_error_'.$error_id.'"><p class="give_error give_'.$error_id.'">'.$message.'</p></div>'; |
|
| 173 | 173 | |
| 174 | - if ( $echo ) { |
|
| 174 | + if ($echo) { |
|
| 175 | 175 | echo $error; |
| 176 | 176 | } else { |
| 177 | 177 | return $error; |
@@ -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 | |
@@ -36,29 +36,29 @@ discard block |
||
| 36 | 36 | /** |
| 37 | 37 | * Templates |
| 38 | 38 | */ |
| 39 | - add_filter( 'template_include', array( __CLASS__, 'template_loader' ) ); |
|
| 39 | + add_filter('template_include', array(__CLASS__, 'template_loader'));
|
|
| 40 | 40 | |
| 41 | 41 | /** |
| 42 | 42 | * Content Wrappers |
| 43 | 43 | */ |
| 44 | - add_action( 'give_before_main_content', 'give_output_content_wrapper', 10 ); |
|
| 45 | - add_action( 'give_after_main_content', 'give_output_content_wrapper_end', 10 ); |
|
| 44 | + add_action('give_before_main_content', 'give_output_content_wrapper', 10);
|
|
| 45 | + add_action('give_after_main_content', 'give_output_content_wrapper_end', 10);
|
|
| 46 | 46 | |
| 47 | 47 | /** |
| 48 | 48 | * Entry Summary Classes |
| 49 | 49 | */ |
| 50 | - add_filter( 'give_forms_single_summary_classes', array( $this, 'give_set_single_summary_classes' ) ); |
|
| 50 | + add_filter('give_forms_single_summary_classes', array($this, 'give_set_single_summary_classes'));
|
|
| 51 | 51 | |
| 52 | 52 | /** |
| 53 | 53 | * Sidebar |
| 54 | 54 | */ |
| 55 | - add_action( 'give_before_single_form_summary', array( $this, 'give_output_sidebar_option' ), 1 ); |
|
| 55 | + add_action('give_before_single_form_summary', array($this, 'give_output_sidebar_option'), 1);
|
|
| 56 | 56 | |
| 57 | 57 | /** |
| 58 | 58 | * Single Forms Summary Box |
| 59 | 59 | */ |
| 60 | - add_action( 'give_single_form_summary', 'give_template_single_title', 5 ); |
|
| 61 | - add_action( 'give_single_form_summary', 'give_get_donation_form', 10 ); |
|
| 60 | + add_action('give_single_form_summary', 'give_template_single_title', 5);
|
|
| 61 | + add_action('give_single_form_summary', 'give_get_donation_form', 10);
|
|
| 62 | 62 | |
| 63 | 63 | } |
| 64 | 64 | |
@@ -73,10 +73,10 @@ discard block |
||
| 73 | 73 | * |
| 74 | 74 | * @return string $classes List of space separated class names. |
| 75 | 75 | */ |
| 76 | - public function give_set_single_summary_classes( $classes ) {
|
|
| 76 | + public function give_set_single_summary_classes($classes) {
|
|
| 77 | 77 | |
| 78 | 78 | //Add full width class when feature image is disabled AND no widgets are present |
| 79 | - if ( ! give_is_setting_enabled( give_get_option( 'form_sidebar' ) ) ) {
|
|
| 79 | + if ( ! give_is_setting_enabled(give_get_option('form_sidebar'))) {
|
|
| 80 | 80 | $classes .= ' give-full-width'; |
| 81 | 81 | } |
| 82 | 82 | |
@@ -97,11 +97,11 @@ discard block |
||
| 97 | 97 | public function give_output_sidebar_option() {
|
| 98 | 98 | |
| 99 | 99 | //Add full width class when feature image is disabled AND no widgets are present |
| 100 | - if ( give_is_setting_enabled( give_get_option( 'form_sidebar' ) ) ) {
|
|
| 101 | - add_action( 'give_before_single_form_summary', 'give_left_sidebar_pre_wrap', 5 ); |
|
| 102 | - add_action( 'give_before_single_form_summary', 'give_show_form_images', 10 ); |
|
| 103 | - add_action( 'give_before_single_form_summary', 'give_get_forms_sidebar', 20 ); |
|
| 104 | - add_action( 'give_before_single_form_summary', 'give_left_sidebar_post_wrap', 30 ); |
|
| 100 | + if (give_is_setting_enabled(give_get_option('form_sidebar'))) {
|
|
| 101 | + add_action('give_before_single_form_summary', 'give_left_sidebar_pre_wrap', 5);
|
|
| 102 | + add_action('give_before_single_form_summary', 'give_show_form_images', 10);
|
|
| 103 | + add_action('give_before_single_form_summary', 'give_get_forms_sidebar', 20);
|
|
| 104 | + add_action('give_before_single_form_summary', 'give_left_sidebar_post_wrap', 30);
|
|
| 105 | 105 | } |
| 106 | 106 | |
| 107 | 107 | } |
@@ -123,20 +123,20 @@ discard block |
||
| 123 | 123 | * |
| 124 | 124 | * @return string $template |
| 125 | 125 | */ |
| 126 | - public static function template_loader( $template ) {
|
|
| 127 | - $find = array( 'give.php' ); |
|
| 126 | + public static function template_loader($template) {
|
|
| 127 | + $find = array('give.php');
|
|
| 128 | 128 | $file = ''; |
| 129 | 129 | |
| 130 | - if ( is_single() && get_post_type() == 'give_forms' ) {
|
|
| 130 | + if (is_single() && get_post_type() == 'give_forms') {
|
|
| 131 | 131 | $file = 'single-give-form.php'; |
| 132 | 132 | $find[] = $file; |
| 133 | - $find[] = apply_filters( 'give_template_path', 'give/' ) . $file; |
|
| 133 | + $find[] = apply_filters('give_template_path', 'give/').$file;
|
|
| 134 | 134 | } |
| 135 | 135 | |
| 136 | - if ( $file ) {
|
|
| 137 | - $template = locate_template( array_unique( $find ) ); |
|
| 138 | - if ( ! $template ) {
|
|
| 139 | - $template = GIVE_PLUGIN_DIR . '/templates/' . $file; |
|
| 136 | + if ($file) {
|
|
| 137 | + $template = locate_template(array_unique($find)); |
|
| 138 | + if ( ! $template) {
|
|
| 139 | + $template = GIVE_PLUGIN_DIR.'/templates/'.$file; |
|
| 140 | 140 | } |
| 141 | 141 | } |
| 142 | 142 | |
@@ -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 | |
@@ -26,11 +26,11 @@ discard block |
||
| 26 | 26 | * |
| 27 | 27 | * @return void |
| 28 | 28 | */ |
| 29 | -function give_email_donation_receipt( $payment_id, $admin_notice = true ) { |
|
| 29 | +function give_email_donation_receipt($payment_id, $admin_notice = true) { |
|
| 30 | 30 | |
| 31 | - $payment_data = give_get_payment_meta( $payment_id ); |
|
| 31 | + $payment_data = give_get_payment_meta($payment_id); |
|
| 32 | 32 | |
| 33 | - $from_name = give_get_option( 'from_name', wp_specialchars_decode( get_bloginfo( 'name' ), ENT_QUOTES ) ); |
|
| 33 | + $from_name = give_get_option('from_name', wp_specialchars_decode(get_bloginfo('name'), ENT_QUOTES)); |
|
| 34 | 34 | |
| 35 | 35 | /** |
| 36 | 36 | * Filters the from name. |
@@ -40,9 +40,9 @@ discard block |
||
| 40 | 40 | * |
| 41 | 41 | * @since 1.0 |
| 42 | 42 | */ |
| 43 | - $from_name = apply_filters( 'give_donation_from_name', $from_name, $payment_id, $payment_data ); |
|
| 43 | + $from_name = apply_filters('give_donation_from_name', $from_name, $payment_id, $payment_data); |
|
| 44 | 44 | |
| 45 | - $from_email = give_get_option( 'from_email', get_bloginfo( 'admin_email' ) ); |
|
| 45 | + $from_email = give_get_option('from_email', get_bloginfo('admin_email')); |
|
| 46 | 46 | |
| 47 | 47 | /** |
| 48 | 48 | * Filters the from email. |
@@ -52,19 +52,19 @@ discard block |
||
| 52 | 52 | * |
| 53 | 53 | * @since 1.0 |
| 54 | 54 | */ |
| 55 | - $from_email = apply_filters( 'give_donation_from_address', $from_email, $payment_id, $payment_data ); |
|
| 55 | + $from_email = apply_filters('give_donation_from_address', $from_email, $payment_id, $payment_data); |
|
| 56 | 56 | |
| 57 | - $to_email = give_get_payment_user_email( $payment_id ); |
|
| 57 | + $to_email = give_get_payment_user_email($payment_id); |
|
| 58 | 58 | |
| 59 | - $subject = give_get_option( 'donation_subject', esc_html__( 'Donation Receipt', 'give' ) ); |
|
| 59 | + $subject = give_get_option('donation_subject', esc_html__('Donation Receipt', 'give')); |
|
| 60 | 60 | |
| 61 | 61 | /** |
| 62 | 62 | * Filters the donation email receipt subject. |
| 63 | 63 | * |
| 64 | 64 | * @since 1.0 |
| 65 | 65 | */ |
| 66 | - $subject = apply_filters( 'give_donation_subject', wp_strip_all_tags( $subject ), $payment_id ); |
|
| 67 | - $subject = give_do_email_tags( $subject, $payment_id ); |
|
| 66 | + $subject = apply_filters('give_donation_subject', wp_strip_all_tags($subject), $payment_id); |
|
| 67 | + $subject = give_do_email_tags($subject, $payment_id); |
|
| 68 | 68 | |
| 69 | 69 | /** |
| 70 | 70 | * Filters the donation email receipt attachments. By default, there is no attachment but plugins can hook in to provide one more multiple for the donor. Examples would be a printable ticket or PDF receipt. |
@@ -74,14 +74,14 @@ discard block |
||
| 74 | 74 | * |
| 75 | 75 | * @since 1.0 |
| 76 | 76 | */ |
| 77 | - $attachments = apply_filters( 'give_receipt_attachments', array(), $payment_id, $payment_data ); |
|
| 78 | - $message = give_do_email_tags( give_get_email_body_content( $payment_id, $payment_data ), $payment_id ); |
|
| 77 | + $attachments = apply_filters('give_receipt_attachments', array(), $payment_id, $payment_data); |
|
| 78 | + $message = give_do_email_tags(give_get_email_body_content($payment_id, $payment_data), $payment_id); |
|
| 79 | 79 | |
| 80 | 80 | $emails = Give()->emails; |
| 81 | 81 | |
| 82 | - $emails->__set( 'from_name', $from_name ); |
|
| 83 | - $emails->__set( 'from_email', $from_email ); |
|
| 84 | - $emails->__set( 'heading', esc_html__( 'Donation Receipt', 'give' ) ); |
|
| 82 | + $emails->__set('from_name', $from_name); |
|
| 83 | + $emails->__set('from_email', $from_email); |
|
| 84 | + $emails->__set('heading', esc_html__('Donation Receipt', 'give')); |
|
| 85 | 85 | |
| 86 | 86 | /** |
| 87 | 87 | * Filters the donation receipt's email headers. |
@@ -91,14 +91,14 @@ discard block |
||
| 91 | 91 | * |
| 92 | 92 | * @since 1.0 |
| 93 | 93 | */ |
| 94 | - $headers = apply_filters( 'give_receipt_headers', $emails->get_headers(), $payment_id, $payment_data ); |
|
| 95 | - $emails->__set( 'headers', $headers ); |
|
| 94 | + $headers = apply_filters('give_receipt_headers', $emails->get_headers(), $payment_id, $payment_data); |
|
| 95 | + $emails->__set('headers', $headers); |
|
| 96 | 96 | |
| 97 | 97 | //Send the donation receipt. |
| 98 | - $emails->send( $to_email, $subject, $message, $attachments ); |
|
| 98 | + $emails->send($to_email, $subject, $message, $attachments); |
|
| 99 | 99 | |
| 100 | 100 | //If admin notifications are on, send the admin notice. |
| 101 | - if ( $admin_notice && ! give_admin_notices_disabled( $payment_id ) ) { |
|
| 101 | + if ($admin_notice && ! give_admin_notices_disabled($payment_id)) { |
|
| 102 | 102 | /** |
| 103 | 103 | * Fires in the donation email receipt. |
| 104 | 104 | * |
@@ -109,7 +109,7 @@ discard block |
||
| 109 | 109 | * @param int $payment_id Payment id. |
| 110 | 110 | * @param mixed $payment_data Payment meta data. |
| 111 | 111 | */ |
| 112 | - do_action( 'give_admin_donation_email', $payment_id, $payment_data ); |
|
| 112 | + do_action('give_admin_donation_email', $payment_id, $payment_data); |
|
| 113 | 113 | } |
| 114 | 114 | } |
| 115 | 115 | |
@@ -122,41 +122,41 @@ discard block |
||
| 122 | 122 | */ |
| 123 | 123 | function give_email_test_donation_receipt() { |
| 124 | 124 | |
| 125 | - $from_name = give_get_option( 'from_name', wp_specialchars_decode( get_bloginfo( 'name' ), ENT_QUOTES ) ); |
|
| 125 | + $from_name = give_get_option('from_name', wp_specialchars_decode(get_bloginfo('name'), ENT_QUOTES)); |
|
| 126 | 126 | |
| 127 | 127 | /** |
| 128 | 128 | * Filters the from name. |
| 129 | 129 | * |
| 130 | 130 | * @since 1.7 |
| 131 | 131 | */ |
| 132 | - $from_name = apply_filters( 'give_donation_from_name', $from_name, 0, array() ); |
|
| 132 | + $from_name = apply_filters('give_donation_from_name', $from_name, 0, array()); |
|
| 133 | 133 | |
| 134 | - $from_email = give_get_option( 'from_email', get_bloginfo( 'admin_email' ) ); |
|
| 134 | + $from_email = give_get_option('from_email', get_bloginfo('admin_email')); |
|
| 135 | 135 | |
| 136 | 136 | /** |
| 137 | 137 | * Filters the from email. |
| 138 | 138 | * |
| 139 | 139 | * @since 1.7 |
| 140 | 140 | */ |
| 141 | - $from_email = apply_filters( 'give_donation_from_address', $from_email, 0, array() ); |
|
| 141 | + $from_email = apply_filters('give_donation_from_address', $from_email, 0, array()); |
|
| 142 | 142 | |
| 143 | - $subject = give_get_option( 'donation_subject', esc_html__( 'Donation Receipt', 'give' ) ); |
|
| 144 | - $subject = apply_filters( 'give_donation_subject', wp_strip_all_tags( $subject ), 0 ); |
|
| 145 | - $subject = give_do_email_tags( $subject, 0 ); |
|
| 143 | + $subject = give_get_option('donation_subject', esc_html__('Donation Receipt', 'give')); |
|
| 144 | + $subject = apply_filters('give_donation_subject', wp_strip_all_tags($subject), 0); |
|
| 145 | + $subject = give_do_email_tags($subject, 0); |
|
| 146 | 146 | |
| 147 | - $attachments = apply_filters( 'give_receipt_attachments', array(), 0, array() ); |
|
| 147 | + $attachments = apply_filters('give_receipt_attachments', array(), 0, array()); |
|
| 148 | 148 | |
| 149 | - $message = give_email_preview_template_tags( give_get_email_body_content( 0, array() ) ); |
|
| 149 | + $message = give_email_preview_template_tags(give_get_email_body_content(0, array())); |
|
| 150 | 150 | |
| 151 | 151 | $emails = Give()->emails; |
| 152 | - $emails->__set( 'from_name', $from_name ); |
|
| 153 | - $emails->__set( 'from_email', $from_email ); |
|
| 154 | - $emails->__set( 'heading', esc_html__( 'Donation Receipt', 'give' ) ); |
|
| 152 | + $emails->__set('from_name', $from_name); |
|
| 153 | + $emails->__set('from_email', $from_email); |
|
| 154 | + $emails->__set('heading', esc_html__('Donation Receipt', 'give')); |
|
| 155 | 155 | |
| 156 | - $headers = apply_filters( 'give_receipt_headers', $emails->get_headers(), 0, array() ); |
|
| 157 | - $emails->__set( 'headers', $headers ); |
|
| 156 | + $headers = apply_filters('give_receipt_headers', $emails->get_headers(), 0, array()); |
|
| 157 | + $emails->__set('headers', $headers); |
|
| 158 | 158 | |
| 159 | - $emails->send( give_get_admin_notice_emails(), $subject, $message, $attachments ); |
|
| 159 | + $emails->send(give_get_admin_notice_emails(), $subject, $message, $attachments); |
|
| 160 | 160 | |
| 161 | 161 | } |
| 162 | 162 | |
@@ -170,49 +170,49 @@ discard block |
||
| 170 | 170 | * |
| 171 | 171 | * @return void |
| 172 | 172 | */ |
| 173 | -function give_admin_email_notice( $payment_id = 0, $payment_data = array() ) { |
|
| 173 | +function give_admin_email_notice($payment_id = 0, $payment_data = array()) { |
|
| 174 | 174 | |
| 175 | - $payment_id = absint( $payment_id ); |
|
| 175 | + $payment_id = absint($payment_id); |
|
| 176 | 176 | |
| 177 | - if ( empty( $payment_id ) ) { |
|
| 177 | + if (empty($payment_id)) { |
|
| 178 | 178 | return; |
| 179 | 179 | } |
| 180 | 180 | |
| 181 | - if ( ! give_get_payment_by( 'id', $payment_id ) ) { |
|
| 181 | + if ( ! give_get_payment_by('id', $payment_id)) { |
|
| 182 | 182 | return; |
| 183 | 183 | } |
| 184 | 184 | |
| 185 | - $from_name = give_get_option( 'from_name', wp_specialchars_decode( get_bloginfo( 'name' ), ENT_QUOTES ) ); |
|
| 185 | + $from_name = give_get_option('from_name', wp_specialchars_decode(get_bloginfo('name'), ENT_QUOTES)); |
|
| 186 | 186 | |
| 187 | 187 | /** |
| 188 | 188 | * Filters the from name. |
| 189 | 189 | * |
| 190 | 190 | * @since 1.0 |
| 191 | 191 | */ |
| 192 | - $from_name = apply_filters( 'give_donation_from_name', $from_name, $payment_id, $payment_data ); |
|
| 192 | + $from_name = apply_filters('give_donation_from_name', $from_name, $payment_id, $payment_data); |
|
| 193 | 193 | |
| 194 | - $from_email = give_get_option( 'from_email', get_bloginfo( 'admin_email' ) ); |
|
| 194 | + $from_email = give_get_option('from_email', get_bloginfo('admin_email')); |
|
| 195 | 195 | |
| 196 | 196 | /** |
| 197 | 197 | * Filters the from email. |
| 198 | 198 | * |
| 199 | 199 | * @since 1.0 |
| 200 | 200 | */ |
| 201 | - $from_email = apply_filters( 'give_donation_from_address', $from_email, $payment_id, $payment_data ); |
|
| 201 | + $from_email = apply_filters('give_donation_from_address', $from_email, $payment_id, $payment_data); |
|
| 202 | 202 | |
| 203 | 203 | /* translators: %s: payment id */ |
| 204 | - $subject = give_get_option( 'donation_notification_subject', sprintf( esc_html__( 'New Donation - Payment #%s', 'give' ), $payment_id ) ); |
|
| 204 | + $subject = give_get_option('donation_notification_subject', sprintf(esc_html__('New Donation - Payment #%s', 'give'), $payment_id)); |
|
| 205 | 205 | |
| 206 | 206 | /** |
| 207 | 207 | * Filters the donation notification subject. |
| 208 | 208 | * |
| 209 | 209 | * @since 1.0 |
| 210 | 210 | */ |
| 211 | - $subject = apply_filters( 'give_admin_donation_notification_subject', wp_strip_all_tags( $subject ), $payment_id ); |
|
| 212 | - $subject = give_do_email_tags( $subject, $payment_id ); |
|
| 211 | + $subject = apply_filters('give_admin_donation_notification_subject', wp_strip_all_tags($subject), $payment_id); |
|
| 212 | + $subject = give_do_email_tags($subject, $payment_id); |
|
| 213 | 213 | |
| 214 | - $headers = "From: " . stripslashes_deep( html_entity_decode( $from_name, ENT_COMPAT, 'UTF-8' ) ) . " <$from_email>\r\n"; |
|
| 215 | - $headers .= "Reply-To: " . $from_email . "\r\n"; |
|
| 214 | + $headers = "From: ".stripslashes_deep(html_entity_decode($from_name, ENT_COMPAT, 'UTF-8'))." <$from_email>\r\n"; |
|
| 215 | + $headers .= "Reply-To: ".$from_email."\r\n"; |
|
| 216 | 216 | //$headers .= "MIME-Version: 1.0\r\n"; |
| 217 | 217 | $headers .= "Content-Type: text/html; charset=utf-8\r\n"; |
| 218 | 218 | |
@@ -221,28 +221,28 @@ discard block |
||
| 221 | 221 | * |
| 222 | 222 | * @since 1.0 |
| 223 | 223 | */ |
| 224 | - $headers = apply_filters( 'give_admin_donation_notification_headers', $headers, $payment_id, $payment_data ); |
|
| 224 | + $headers = apply_filters('give_admin_donation_notification_headers', $headers, $payment_id, $payment_data); |
|
| 225 | 225 | |
| 226 | 226 | /** |
| 227 | 227 | * Filters the donation notification email attachments. By default, there is no attachment but plugins can hook in to provide one more multiple. |
| 228 | 228 | * |
| 229 | 229 | * @since 1.0 |
| 230 | 230 | */ |
| 231 | - $attachments = apply_filters( 'give_admin_donation_notification_attachments', array(), $payment_id, $payment_data ); |
|
| 231 | + $attachments = apply_filters('give_admin_donation_notification_attachments', array(), $payment_id, $payment_data); |
|
| 232 | 232 | |
| 233 | - $message = give_get_donation_notification_body_content( $payment_id, $payment_data ); |
|
| 233 | + $message = give_get_donation_notification_body_content($payment_id, $payment_data); |
|
| 234 | 234 | |
| 235 | 235 | $emails = Give()->emails; |
| 236 | - $emails->__set( 'from_name', $from_name ); |
|
| 237 | - $emails->__set( 'from_email', $from_email ); |
|
| 238 | - $emails->__set( 'headers', $headers ); |
|
| 239 | - $emails->__set( 'heading', esc_html__( 'New Donation!', 'give' ) ); |
|
| 236 | + $emails->__set('from_name', $from_name); |
|
| 237 | + $emails->__set('from_email', $from_email); |
|
| 238 | + $emails->__set('headers', $headers); |
|
| 239 | + $emails->__set('heading', esc_html__('New Donation!', 'give')); |
|
| 240 | 240 | |
| 241 | - $emails->send( give_get_admin_notice_emails(), $subject, $message, $attachments ); |
|
| 241 | + $emails->send(give_get_admin_notice_emails(), $subject, $message, $attachments); |
|
| 242 | 242 | |
| 243 | 243 | } |
| 244 | 244 | |
| 245 | -add_action( 'give_admin_donation_email', 'give_admin_email_notice', 10, 2 ); |
|
| 245 | +add_action('give_admin_donation_email', 'give_admin_email_notice', 10, 2); |
|
| 246 | 246 | |
| 247 | 247 | /** |
| 248 | 248 | * Retrieves the emails for which admin notifications are sent to (these can be changed in the Give Settings). |
@@ -252,12 +252,12 @@ discard block |
||
| 252 | 252 | */ |
| 253 | 253 | function give_get_admin_notice_emails() { |
| 254 | 254 | |
| 255 | - $email_option = give_get_option( 'admin_notice_emails' ); |
|
| 255 | + $email_option = give_get_option('admin_notice_emails'); |
|
| 256 | 256 | |
| 257 | - $emails = ! empty( $email_option ) && strlen( trim( $email_option ) ) > 0 ? $email_option : get_bloginfo( 'admin_email' ); |
|
| 258 | - $emails = array_map( 'trim', explode( "\n", $emails ) ); |
|
| 257 | + $emails = ! empty($email_option) && strlen(trim($email_option)) > 0 ? $email_option : get_bloginfo('admin_email'); |
|
| 258 | + $emails = array_map('trim', explode("\n", $emails)); |
|
| 259 | 259 | |
| 260 | - return apply_filters( 'give_admin_notice_emails', $emails ); |
|
| 260 | + return apply_filters('give_admin_notice_emails', $emails); |
|
| 261 | 261 | } |
| 262 | 262 | |
| 263 | 263 | /** |
@@ -269,11 +269,11 @@ discard block |
||
| 269 | 269 | * |
| 270 | 270 | * @return mixed |
| 271 | 271 | */ |
| 272 | -function give_admin_notices_disabled( $payment_id = 0 ) { |
|
| 272 | +function give_admin_notices_disabled($payment_id = 0) { |
|
| 273 | 273 | |
| 274 | 274 | return apply_filters( |
| 275 | 275 | 'give_admin_notices_disabled', |
| 276 | - ! give_is_setting_enabled( give_get_option( 'admin_notices' ) ), |
|
| 276 | + ! give_is_setting_enabled(give_get_option('admin_notices')), |
|
| 277 | 277 | $payment_id |
| 278 | 278 | ); |
| 279 | 279 | } |
@@ -288,19 +288,19 @@ discard block |
||
| 288 | 288 | */ |
| 289 | 289 | function give_get_default_donation_notification_email() { |
| 290 | 290 | |
| 291 | - $default_email_body = esc_html__( 'Hi there,', 'give' ) . "\n\n"; |
|
| 292 | - $default_email_body .= esc_html__( 'This email is to inform you that a new donation has been made on your website:', 'give' ) . ' <a href="' . get_bloginfo( 'url' ) . '" target="_blank">' . get_bloginfo( 'url' ) . '</a>' . ".\n\n"; |
|
| 293 | - $default_email_body .= '<strong>' . esc_html__( 'Donor:', 'give' ) . '</strong> {name}' . "\n"; |
|
| 294 | - $default_email_body .= '<strong>' . esc_html__( 'Donation:', 'give' ) . '</strong> {donation}' . "\n"; |
|
| 295 | - $default_email_body .= '<strong>' . esc_html__( 'Amount:', 'give' ) . '</strong> {amount}' . "\n"; |
|
| 296 | - $default_email_body .= '<strong>' . esc_html__( 'Payment Method:', 'give' ) . '</strong> {payment_method}' . "\n\n"; |
|
| 297 | - $default_email_body .= esc_html__( 'Thank you,', 'give' ) . "\n\n"; |
|
| 298 | - $default_email_body .= '{sitename}' . "\n"; |
|
| 291 | + $default_email_body = esc_html__('Hi there,', 'give')."\n\n"; |
|
| 292 | + $default_email_body .= esc_html__('This email is to inform you that a new donation has been made on your website:', 'give').' <a href="'.get_bloginfo('url').'" target="_blank">'.get_bloginfo('url').'</a>'.".\n\n"; |
|
| 293 | + $default_email_body .= '<strong>'.esc_html__('Donor:', 'give').'</strong> {name}'."\n"; |
|
| 294 | + $default_email_body .= '<strong>'.esc_html__('Donation:', 'give').'</strong> {donation}'."\n"; |
|
| 295 | + $default_email_body .= '<strong>'.esc_html__('Amount:', 'give').'</strong> {amount}'."\n"; |
|
| 296 | + $default_email_body .= '<strong>'.esc_html__('Payment Method:', 'give').'</strong> {payment_method}'."\n\n"; |
|
| 297 | + $default_email_body .= esc_html__('Thank you,', 'give')."\n\n"; |
|
| 298 | + $default_email_body .= '{sitename}'."\n"; |
|
| 299 | 299 | |
| 300 | - $custom_message = give_get_option( 'donation_notification' ); |
|
| 301 | - $message = ! empty( $custom_message ) ? $custom_message : $default_email_body; |
|
| 300 | + $custom_message = give_get_option('donation_notification'); |
|
| 301 | + $message = ! empty($custom_message) ? $custom_message : $default_email_body; |
|
| 302 | 302 | |
| 303 | - return apply_filters( 'give_default_donation_notification_email', $message ); |
|
| 303 | + return apply_filters('give_default_donation_notification_email', $message); |
|
| 304 | 304 | } |
| 305 | 305 | |
| 306 | 306 | |
@@ -314,25 +314,25 @@ discard block |
||
| 314 | 314 | */ |
| 315 | 315 | function give_get_default_donation_receipt_email() { |
| 316 | 316 | |
| 317 | - $default_email_body = esc_html__( 'Dear', 'give' ) . " {name},\n\n"; |
|
| 318 | - $default_email_body .= esc_html__( 'Thank you for your donation. Your generosity is appreciated! Here are the details of your donation:', 'give' ) . "\n\n"; |
|
| 319 | - $default_email_body .= '<strong>' . esc_html__( 'Donor:', 'give' ) . '</strong> {fullname}' . "\n"; |
|
| 320 | - $default_email_body .= '<strong>' . esc_html__( 'Donation:', 'give' ) . '</strong> {donation}' . "\n"; |
|
| 321 | - $default_email_body .= '<strong>' . esc_html__( 'Donation Date:', 'give' ) . '</strong> {date}' . "\n"; |
|
| 322 | - $default_email_body .= '<strong>' . esc_html__( 'Amount:', 'give' ) . '</strong> {amount}' . "\n"; |
|
| 323 | - $default_email_body .= '<strong>' . esc_html__( 'Payment Method:', 'give' ) . '</strong> {payment_method}' . "\n"; |
|
| 324 | - $default_email_body .= '<strong>' . esc_html__( 'Payment ID:', 'give' ) . '</strong> {payment_id}' . "\n"; |
|
| 325 | - $default_email_body .= '<strong>' . esc_html__( 'Receipt ID:', 'give' ) . '</strong> {receipt_id}' . "\n\n"; |
|
| 326 | - $default_email_body .= '{receipt_link}' . "\n\n"; |
|
| 317 | + $default_email_body = esc_html__('Dear', 'give')." {name},\n\n"; |
|
| 318 | + $default_email_body .= esc_html__('Thank you for your donation. Your generosity is appreciated! Here are the details of your donation:', 'give')."\n\n"; |
|
| 319 | + $default_email_body .= '<strong>'.esc_html__('Donor:', 'give').'</strong> {fullname}'."\n"; |
|
| 320 | + $default_email_body .= '<strong>'.esc_html__('Donation:', 'give').'</strong> {donation}'."\n"; |
|
| 321 | + $default_email_body .= '<strong>'.esc_html__('Donation Date:', 'give').'</strong> {date}'."\n"; |
|
| 322 | + $default_email_body .= '<strong>'.esc_html__('Amount:', 'give').'</strong> {amount}'."\n"; |
|
| 323 | + $default_email_body .= '<strong>'.esc_html__('Payment Method:', 'give').'</strong> {payment_method}'."\n"; |
|
| 324 | + $default_email_body .= '<strong>'.esc_html__('Payment ID:', 'give').'</strong> {payment_id}'."\n"; |
|
| 325 | + $default_email_body .= '<strong>'.esc_html__('Receipt ID:', 'give').'</strong> {receipt_id}'."\n\n"; |
|
| 326 | + $default_email_body .= '{receipt_link}'."\n\n"; |
|
| 327 | 327 | $default_email_body .= "\n\n"; |
| 328 | - $default_email_body .= esc_html__( 'Sincerely,', 'give' ) . "\n"; |
|
| 329 | - $default_email_body .= '{sitename}' . "\n"; |
|
| 328 | + $default_email_body .= esc_html__('Sincerely,', 'give')."\n"; |
|
| 329 | + $default_email_body .= '{sitename}'."\n"; |
|
| 330 | 330 | |
| 331 | - $custom_message = give_get_option( 'donation_receipt' ); |
|
| 331 | + $custom_message = give_get_option('donation_receipt'); |
|
| 332 | 332 | |
| 333 | - $message = ! empty( $custom_message ) ? $custom_message : $default_email_body; |
|
| 333 | + $message = ! empty($custom_message) ? $custom_message : $default_email_body; |
|
| 334 | 334 | |
| 335 | - return apply_filters( 'give_default_donation_receipt_email', $message ); |
|
| 335 | + return apply_filters('give_default_donation_receipt_email', $message); |
|
| 336 | 336 | } |
| 337 | 337 | |
| 338 | 338 | /** |
@@ -344,19 +344,19 @@ discard block |
||
| 344 | 344 | * |
| 345 | 345 | * @return array $email_names |
| 346 | 346 | */ |
| 347 | -function give_get_email_names( $user_info ) { |
|
| 347 | +function give_get_email_names($user_info) { |
|
| 348 | 348 | $email_names = array(); |
| 349 | - $user_info = maybe_unserialize( $user_info ); |
|
| 349 | + $user_info = maybe_unserialize($user_info); |
|
| 350 | 350 | |
| 351 | 351 | $email_names['fullname'] = ''; |
| 352 | - if ( isset( $user_info['id'] ) && $user_info['id'] > 0 && isset( $user_info['first_name'] ) ) { |
|
| 353 | - $user_data = get_userdata( $user_info['id'] ); |
|
| 352 | + if (isset($user_info['id']) && $user_info['id'] > 0 && isset($user_info['first_name'])) { |
|
| 353 | + $user_data = get_userdata($user_info['id']); |
|
| 354 | 354 | $email_names['name'] = $user_info['first_name']; |
| 355 | - $email_names['fullname'] = $user_info['first_name'] . ' ' . $user_info['last_name']; |
|
| 355 | + $email_names['fullname'] = $user_info['first_name'].' '.$user_info['last_name']; |
|
| 356 | 356 | $email_names['username'] = $user_data->user_login; |
| 357 | - } elseif ( isset( $user_info['first_name'] ) ) { |
|
| 357 | + } elseif (isset($user_info['first_name'])) { |
|
| 358 | 358 | $email_names['name'] = $user_info['first_name']; |
| 359 | - $email_names['fullname'] = $user_info['first_name'] . ' ' . $user_info['last_name']; |
|
| 359 | + $email_names['fullname'] = $user_info['first_name'].' '.$user_info['last_name']; |
|
| 360 | 360 | $email_names['username'] = $user_info['first_name']; |
| 361 | 361 | } else { |
| 362 | 362 | $email_names['name'] = $user_info['email']; |