@@ -178,7 +178,7 @@ |
||
| 178 | 178 | public $email_access; |
| 179 | 179 | |
| 180 | 180 | /** |
| 181 | - * Give notices Object |
|
| 181 | + * Give notices Object |
|
| 182 | 182 | * |
| 183 | 183 | * @since 2.0 |
| 184 | 184 | * @access public |
@@ -45,22 +45,22 @@ discard block |
||
| 45 | 45 | * @param string $default_path Default path. Default is empty. |
| 46 | 46 | */ |
| 47 | 47 | function give_get_template( $template_name, $args = array(), $template_path = '', $default_path = '' ) { |
| 48 | - if ( ! empty( $args ) && is_array( $args ) ) { |
|
| 49 | - extract( $args ); |
|
| 50 | - } |
|
| 48 | + if ( ! empty( $args ) && is_array( $args ) ) { |
|
| 49 | + extract( $args ); |
|
| 50 | + } |
|
| 51 | 51 | |
| 52 | - $template_names = array( $template_name . '.php' ); |
|
| 52 | + $template_names = array( $template_name . '.php' ); |
|
| 53 | 53 | |
| 54 | - $located = give_locate_template( $template_names, $template_path, $default_path ); |
|
| 54 | + $located = give_locate_template( $template_names, $template_path, $default_path ); |
|
| 55 | 55 | |
| 56 | - if ( ! file_exists( $located ) ) { |
|
| 56 | + if ( ! file_exists( $located ) ) { |
|
| 57 | 57 | /* translators: %s: the template */ |
| 58 | - Give()->notices->print_frontend_notice( sprintf( __( 'The %s template was not found.', 'give' ), $located ), true ); |
|
| 59 | - return; |
|
| 60 | - } |
|
| 58 | + Give()->notices->print_frontend_notice( sprintf( __( 'The %s template was not found.', 'give' ), $located ), true ); |
|
| 59 | + return; |
|
| 60 | + } |
|
| 61 | 61 | |
| 62 | - // Allow 3rd party plugin filter template file from their plugin. |
|
| 63 | - $located = apply_filters( 'give_get_template', $located, $template_name, $args, $template_path, $default_path ); |
|
| 62 | + // Allow 3rd party plugin filter template file from their plugin. |
|
| 63 | + $located = apply_filters( 'give_get_template', $located, $template_name, $args, $template_path, $default_path ); |
|
| 64 | 64 | |
| 65 | 65 | /** |
| 66 | 66 | * Fires in give template, before the file is included. |
@@ -74,9 +74,9 @@ discard block |
||
| 74 | 74 | * @param string $located Template file filter by 3rd party plugin. |
| 75 | 75 | * @param array $args Passed arguments. |
| 76 | 76 | */ |
| 77 | - do_action( 'give_before_template_part', $template_name, $template_path, $located, $args ); |
|
| 77 | + do_action( 'give_before_template_part', $template_name, $template_path, $located, $args ); |
|
| 78 | 78 | |
| 79 | - include( $located ); |
|
| 79 | + include( $located ); |
|
| 80 | 80 | |
| 81 | 81 | /** |
| 82 | 82 | * Fires in give template, after the file is included. |
@@ -90,7 +90,7 @@ discard block |
||
| 90 | 90 | * @param string $located Template file filter by 3rd party plugin. |
| 91 | 91 | * @param array $args Passed arguments. |
| 92 | 92 | */ |
| 93 | - do_action( 'give_after_template_part', $template_name, $template_path, $located, $args ); |
|
| 93 | + do_action( 'give_after_template_part', $template_name, $template_path, $located, $args ); |
|
| 94 | 94 | } |
| 95 | 95 | |
| 96 | 96 | /** |
@@ -449,13 +449,13 @@ discard block |
||
| 449 | 449 | * |
| 450 | 450 | * @since 1.0 |
| 451 | 451 | * @access public |
| 452 | - * |
|
| 453 | - * @param array $args |
|
| 454 | - * |
|
| 455 | - * @return array|object|null Customers array or object. Null if not found. |
|
| 452 | + * |
|
| 453 | + * @param array $args |
|
| 454 | + * |
|
| 455 | + * @return array|object|null Customers array or object. Null if not found. |
|
| 456 | 456 | */ |
| 457 | 457 | public function get_donors( $args = array() ) { |
| 458 | - /* @var WPDB $wpdb */ |
|
| 458 | + /* @var WPDB $wpdb */ |
|
| 459 | 459 | global $wpdb; |
| 460 | 460 | |
| 461 | 461 | $defaults = array( |
@@ -580,13 +580,13 @@ discard block |
||
| 580 | 580 | * |
| 581 | 581 | * @since 1.0 |
| 582 | 582 | * @access public |
| 583 | - * |
|
| 584 | - * @param array $args |
|
| 585 | - * |
|
| 586 | - * @return int Total number of donors. |
|
| 583 | + * |
|
| 584 | + * @param array $args |
|
| 585 | + * |
|
| 586 | + * @return int Total number of donors. |
|
| 587 | 587 | */ |
| 588 | 588 | public function count( $args = array() ) { |
| 589 | - /* @var WPDB $wpdb */ |
|
| 589 | + /* @var WPDB $wpdb */ |
|
| 590 | 590 | global $wpdb; |
| 591 | 591 | |
| 592 | 592 | $where = ' WHERE 1=1 '; |
@@ -249,10 +249,10 @@ |
||
| 249 | 249 | $admin_message .= '<strong>' . __( 'Amount:', 'give' ) . '</strong> {amount}' . "\n\n"; |
| 250 | 250 | |
| 251 | 251 | $admin_message .= sprintf( |
| 252 | - '<a href="%1$s">%2$s</a>', |
|
| 253 | - admin_url( 'edit.php?post_type=give_forms&page=give-payment-history&view=view-payment-details&id=' . $payment_id ), |
|
| 254 | - __( 'View Donation Details »', 'give' ) |
|
| 255 | - ) . "\n\n"; |
|
| 252 | + '<a href="%1$s">%2$s</a>', |
|
| 253 | + admin_url( 'edit.php?post_type=give_forms&page=give-payment-history&view=view-payment-details&id=' . $payment_id ), |
|
| 254 | + __( 'View Donation Details »', 'give' ) |
|
| 255 | + ) . "\n\n"; |
|
| 256 | 256 | |
| 257 | 257 | $admin_message = apply_filters( 'give_offline_admin_donation_notification', $admin_message, $payment_id ); |
| 258 | 258 | $admin_message = give_do_email_tags( $admin_message, $payment_id ); |
@@ -44,7 +44,7 @@ |
||
| 44 | 44 | ) { |
| 45 | 45 | // If Yoast SEO or Yoast SEO Premium plugin exists, then update seo sitemap cache. |
| 46 | 46 | if ( (is_plugin_active( 'wordpress-seo/wp-seo.php' ) |
| 47 | - || is_plugin_active( 'wordpress-seo-premium/wp-seo-premium.php' )) |
|
| 47 | + || is_plugin_active( 'wordpress-seo-premium/wp-seo-premium.php' )) |
|
| 48 | 48 | && class_exists( 'WPSEO_Sitemaps_Cache' ) |
| 49 | 49 | ) { |
| 50 | 50 | $yoast_sitemaps_cache = new WPSEO_Sitemaps_Cache(); |
@@ -245,7 +245,7 @@ |
||
| 245 | 245 | |
| 246 | 246 | // Continue if donor already included. |
| 247 | 247 | if ( empty( $payment->customer_id ) || |
| 248 | - in_array( $payment->customer_id, $cached_donor_ids ) |
|
| 248 | + in_array( $payment->customer_id, $cached_donor_ids ) |
|
| 249 | 249 | ) { |
| 250 | 250 | continue; |
| 251 | 251 | } |
@@ -514,16 +514,16 @@ |
||
| 514 | 514 | <p> |
| 515 | 515 | <strong><?php esc_html_e( 'Donor Name:', 'give' ); ?></strong><br> |
| 516 | 516 | <?php |
| 517 | - $donor_billing_name = give_get_donor_name_by( $payment_id, 'donation' ); |
|
| 518 | - $donor_name = give_get_donor_name_by( $donor_id, 'donor' ); |
|
| 519 | - |
|
| 520 | - // Check whether the donor name and WP_User name is same or not. |
|
| 521 | - if( sanitize_title( $donor_billing_name ) != sanitize_title( $donor_name ) ){ |
|
| 522 | - echo $donor_billing_name . ' (<a href="' . esc_url( admin_url( "edit.php?post_type=give_forms&page=give-donors&view=overview&id=$donor_id" ) ) . '">' . $donor_name . '</a>)'; |
|
| 523 | - }else{ |
|
| 524 | - echo $donor_name; |
|
| 525 | - } |
|
| 526 | - ?> |
|
| 517 | + $donor_billing_name = give_get_donor_name_by( $payment_id, 'donation' ); |
|
| 518 | + $donor_name = give_get_donor_name_by( $donor_id, 'donor' ); |
|
| 519 | + |
|
| 520 | + // Check whether the donor name and WP_User name is same or not. |
|
| 521 | + if( sanitize_title( $donor_billing_name ) != sanitize_title( $donor_name ) ){ |
|
| 522 | + echo $donor_billing_name . ' (<a href="' . esc_url( admin_url( "edit.php?post_type=give_forms&page=give-donors&view=overview&id=$donor_id" ) ) . '">' . $donor_name . '</a>)'; |
|
| 523 | + }else{ |
|
| 524 | + echo $donor_name; |
|
| 525 | + } |
|
| 526 | + ?> |
|
| 527 | 527 | </p> |
| 528 | 528 | <p> |
| 529 | 529 | <strong><?php esc_html_e( 'Donor Email:', 'give' ); ?></strong><br> |