|  | @@ -10,7 +10,7 @@  discard block | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 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,56 +23,56 @@  discard block | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 23 | 23 |   * | 
                                                                                                            
                                                            | 24 | 24 |   * @return string $purchase_form | 
                                                                                                            
                                                            | 25 | 25 |   */ | 
                                                                                                            
                                                            | 26 |  | -function give_get_donation_form( $args = array() ) { | 
                                                                                                            
                                                            |  | 26 | +function give_get_donation_form($args = array()) { | 
                                                                                                            
                                                            | 27 | 27 |   | 
                                                                                                            
                                                            | 28 | 28 |  	global $post; | 
                                                                                                            
                                                            | 29 | 29 |   | 
                                                                                                            
                                                            | 30 |  | -	$post_id = is_object( $post ) ? $post->ID : 0; | 
                                                                                                            
                                                            |  | 30 | +	$post_id = is_object($post) ? $post->ID : 0; | 
                                                                                                            
                                                            | 31 | 31 |   | 
                                                                                                            
                                                            | 32 |  | -	if ( isset( $args['id'] ) ) { | 
                                                                                                            
                                                            |  | 32 | +	if (isset($args['id'])) { | 
                                                                                                            
                                                            | 33 | 33 |  		$post_id = $args['id']; | 
                                                                                                            
                                                            | 34 | 34 |  	} | 
                                                                                                            
                                                            | 35 | 35 |   | 
                                                                                                            
                                                            | 36 |  | -	$defaults = apply_filters( 'give_form_args_defaults', array( | 
                                                                                                            
                                                            |  | 36 | +	$defaults = apply_filters('give_form_args_defaults', array( | 
                                                                                                            
                                                            | 37 | 37 |  		'form_id' => $post_id | 
                                                                                                            
                                                            | 38 |  | -	) ); | 
                                                                                                            
                                                            |  | 38 | +	)); | 
                                                                                                            
                                                            | 39 | 39 |   | 
                                                                                                            
                                                            | 40 |  | -	$args = wp_parse_args( $args, $defaults ); | 
                                                                                                            
                                                            |  | 40 | +	$args = wp_parse_args($args, $defaults); | 
                                                                                                            
                                                            | 41 | 41 |   | 
                                                                                                            
                                                            | 42 |  | -	$form = new Give_Donate_Form( $args['form_id'] ); | 
                                                                                                            
                                                            |  | 42 | +	$form = new Give_Donate_Form($args['form_id']); | 
                                                                                                            
                                                            | 43 | 43 |   | 
                                                                                                            
                                                            | 44 | 44 |  	//bail if no form ID | 
                                                                                                            
                                                            | 45 |  | -	if ( empty( $form->ID ) ) { | 
                                                                                                            
                                                            |  | 45 | +	if (empty($form->ID)) { | 
                                                                                                            
                                                            | 46 | 46 |  		return false; | 
                                                                                                            
                                                            | 47 | 47 |  	} | 
                                                                                                            
                                                            | 48 | 48 |   | 
                                                                                                            
                                                            | 49 |  | -	$payment_mode = give_get_chosen_gateway( $form->ID ); | 
                                                                                                            
                                                            |  | 49 | +	$payment_mode = give_get_chosen_gateway($form->ID); | 
                                                                                                            
                                                            | 50 | 50 |   | 
                                                                                                            
                                                            | 51 |  | -	$form_action = esc_url( add_query_arg( apply_filters( 'give_form_action_args', array( | 
                                                                                                            
                                                            |  | 51 | +	$form_action = esc_url(add_query_arg(apply_filters('give_form_action_args', array( | 
                                                                                                            
                                                            | 52 | 52 |  		'payment-mode' => $payment_mode, | 
                                                                                                            
                                                            | 53 |  | -	) ), | 
                                                                                                            
                                                            |  | 53 | +	)), | 
                                                                                                            
                                                            | 54 | 54 |  		give_get_current_page_url() | 
                                                                                                            
                                                            | 55 |  | -	) ); | 
                                                                                                            
                                                            |  | 55 | +	)); | 
                                                                                                            
                                                            | 56 | 56 |   | 
                                                                                                            
                                                            | 57 |  | -	if ( 'publish' !== $form->post_status && ! current_user_can( 'edit_product', $form->ID ) ) { | 
                                                                                                            
                                                            |  | 57 | +	if ('publish' !== $form->post_status && ! current_user_can('edit_product', $form->ID)) { | 
                                                                                                            
                                                            | 58 | 58 |  		return false; // Product not published or user doesn't have permission to view drafts | 
                                                                                                            
                                                            | 59 | 59 |  	} | 
                                                                                                            
                                                            | 60 | 60 |   | 
                                                                                                            
                                                            | 61 |  | -	$display_option = ( isset( $args['display_style'] ) && ! empty( $args['display_style'] ) ) | 
                                                                                                            
                                                            |  | 61 | +	$display_option = (isset($args['display_style']) && ! empty($args['display_style'])) | 
                                                                                                            
                                                            | 62 | 62 |  		? $args['display_style'] | 
                                                                                                            
                                                            | 63 |  | -		: get_post_meta( $form->ID, '_give_payment_display', true ); | 
                                                                                                            
                                                            |  | 63 | +		: get_post_meta($form->ID, '_give_payment_display', true); | 
                                                                                                            
                                                            | 64 | 64 |   | 
                                                                                                            
                                                            | 65 |  | -	$float_labels_option = give_is_float_labels_enabled( $args ) | 
                                                                                                            
                                                            |  | 65 | +	$float_labels_option = give_is_float_labels_enabled($args) | 
                                                                                                            
                                                            | 66 | 66 |  		? ' float-labels-enabled' | 
                                                                                                            
                                                            | 67 | 67 |  		: ''; | 
                                                                                                            
                                                            | 68 | 68 |   | 
                                                                                                            
                                                            | 69 | 69 |   | 
                                                                                                            
                                                            | 70 |  | -	$form_classes_array = apply_filters( 'give_form_classes', array( | 
                                                                                                            
                                                            |  | 70 | +	$form_classes_array = apply_filters('give_form_classes', array( | 
                                                                                                            
                                                            | 71 | 71 |  		'give-form-wrap', | 
                                                                                                            
                                                            | 72 |  | -		'give-display-' . $display_option | 
                                                                                                            
                                                            | 73 |  | -	), $form->ID, $args ); | 
                                                                                                            
                                                            |  | 72 | +		'give-display-'.$display_option | 
                                                                                                            
                                                            |  | 73 | +	), $form->ID, $args); | 
                                                                                                            
                                                            | 74 | 74 |   | 
                                                                                                            
                                                            | 75 |  | -	$form_classes = implode( ' ', $form_classes_array ); | 
                                                                                                            
                                                            |  | 75 | +	$form_classes = implode(' ', $form_classes_array); | 
                                                                                                            
                                                            | 76 | 76 |   | 
                                                                                                            
                                                            | 77 | 77 |  	ob_start(); | 
                                                                                                            
                                                            | 78 | 78 |   | 
                                                                                                                                                        
                                                        |  | @@ -84,34 +84,34 @@  discard block | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 84 | 84 |  	 * @param int   $form ->ID The current form ID | 
                                                                                                            
                                                            | 85 | 85 |  	 * @param array $args An array of form args | 
                                                                                                            
                                                            | 86 | 86 |  	 */ | 
                                                                                                            
                                                            | 87 |  | -	do_action( 'give_pre_form_output', $form->ID, $args ); ?> | 
                                                                                                            
                                                            |  | 87 | +	do_action('give_pre_form_output', $form->ID, $args); ?> | 
                                                                                                            
                                                            | 88 | 88 |   | 
                                                                                                            
                                                            | 89 | 89 |  	<div id="give-form-<?php echo $form->ID; ?>-wrap" class="<?php echo $form_classes; ?>"> | 
                                                                                                            
                                                            | 90 | 90 |   | 
                                                                                                            
                                                            | 91 | 91 |  		<?php | 
                                                                                                            
                                                            | 92 |  | -		if ( isset( $args['show_title'] ) && $args['show_title'] == true ) { | 
                                                                                                            
                                                            |  | 92 | +		if (isset($args['show_title']) && $args['show_title'] == true) { | 
                                                                                                            
                                                            | 93 | 93 |   | 
                                                                                                            
                                                            | 94 |  | -			echo apply_filters( 'give_form_title', '<h2  class="give-form-title">' . get_the_title( $post_id ) . '</h2>' ); | 
                                                                                                            
                                                            |  | 94 | +			echo apply_filters('give_form_title', '<h2  class="give-form-title">'.get_the_title($post_id).'</h2>'); | 
                                                                                                            
                                                            | 95 | 95 |   | 
                                                                                                            
                                                            | 96 | 96 |  		} ?> | 
                                                                                                            
                                                            | 97 | 97 |   | 
                                                                                                            
                                                            | 98 |  | -		<?php do_action( 'give_pre_form', $form->ID, $args ); ?> | 
                                                                                                            
                                                            |  | 98 | +		<?php do_action('give_pre_form', $form->ID, $args); ?> | 
                                                                                                            
                                                            | 99 | 99 |   | 
                                                                                                            
                                                            | 100 |  | -		<form id="give-form-<?php echo $post_id; ?>" class="give-form give-form-<?php echo absint( $form->ID ); ?><?php echo $float_labels_option; ?>" action="<?php echo $form_action; ?>" method="post"> | 
                                                                                                            
                                                            |  | 100 | +		<form id="give-form-<?php echo $post_id; ?>" class="give-form give-form-<?php echo absint($form->ID); ?><?php echo $float_labels_option; ?>" action="<?php echo $form_action; ?>" method="post"> | 
                                                                                                            
                                                            | 101 | 101 |  			<input type="hidden" name="give-form-id" value="<?php echo $form->ID; ?>" /> | 
                                                                                                            
                                                            | 102 |  | -			<input type="hidden" name="give-form-title" value="<?php echo htmlentities( $form->post_title ); ?>" /> | 
                                                                                                            
                                                            | 103 |  | -			<input type="hidden" name="give-current-url" value="<?php echo htmlspecialchars( give_get_current_page_url() ); ?>" /> | 
                                                                                                            
                                                            | 104 |  | -			<input type="hidden" name="give-form-url" value="<?php echo htmlspecialchars( give_get_current_page_url() ); ?>" /> | 
                                                                                                            
                                                            | 105 |  | -			<input type="hidden" name="give-form-minimum" value="<?php echo give_get_form_minimum_price( $form->ID ); ?>" /> | 
                                                                                                            
                                                            |  | 102 | +			<input type="hidden" name="give-form-title" value="<?php echo htmlentities($form->post_title); ?>" /> | 
                                                                                                            
                                                            |  | 103 | +			<input type="hidden" name="give-current-url" value="<?php echo htmlspecialchars(give_get_current_page_url()); ?>" /> | 
                                                                                                            
                                                            |  | 104 | +			<input type="hidden" name="give-form-url" value="<?php echo htmlspecialchars(give_get_current_page_url()); ?>" /> | 
                                                                                                            
                                                            |  | 105 | +			<input type="hidden" name="give-form-minimum" value="<?php echo give_get_form_minimum_price($form->ID); ?>" /> | 
                                                                                                            
                                                            | 106 | 106 |  			<?php | 
                                                                                                            
                                                            | 107 | 107 |  			//Price ID hidden field for variable (mult-level) donation forms | 
                                                                                                            
                                                            | 108 |  | -			if ( give_has_variable_prices( $post_id ) ) { | 
                                                                                                            
                                                            |  | 108 | +			if (give_has_variable_prices($post_id)) { | 
                                                                                                            
                                                            | 109 | 109 |  				//get default selected price ID | 
                                                                                                            
                                                            | 110 |  | -				$prices   = apply_filters( 'give_form_variable_prices', give_get_variable_prices( $post_id ), $post_id ); | 
                                                                                                            
                                                            |  | 110 | +				$prices   = apply_filters('give_form_variable_prices', give_get_variable_prices($post_id), $post_id); | 
                                                                                                            
                                                            | 111 | 111 |  				$price_id = 0; | 
                                                                                                            
                                                            | 112 | 112 |  				//loop through prices | 
                                                                                                            
                                                            | 113 |  | -				foreach ( $prices as $price ) { | 
                                                                                                            
                                                            | 114 |  | -					if ( isset( $price['_give_default'] ) && $price['_give_default'] === 'default' ) { | 
                                                                                                            
                                                            |  | 113 | +				foreach ($prices as $price) { | 
                                                                                                            
                                                            |  | 114 | +					if (isset($price['_give_default']) && $price['_give_default'] === 'default') { | 
                                                                                                            
                                                            | 115 | 115 |  						$price_id = $price['_give_id']['level_id']; | 
                                                                                                            
                                                            | 116 | 116 |  					}; | 
                                                                                                            
                                                            | 117 | 117 |  				} | 
                                                                                                                                                        
                                                        |  | @@ -119,19 +119,19 @@  discard block | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 119 | 119 |  				<input type="hidden" name="give-price-id" value="<?php echo $price_id; ?>" /> | 
                                                                                                            
                                                            | 120 | 120 |  			<?php } | 
                                                                                                            
                                                            | 121 | 121 |   | 
                                                                                                            
                                                            | 122 |  | -			do_action( 'give_checkout_form_top', $form->ID, $args ); | 
                                                                                                            
                                                            |  | 122 | +			do_action('give_checkout_form_top', $form->ID, $args); | 
                                                                                                            
                                                            | 123 | 123 |   | 
                                                                                                            
                                                            | 124 |  | -			do_action( 'give_payment_mode_select', $form->ID, $args ); | 
                                                                                                            
                                                            |  | 124 | +			do_action('give_payment_mode_select', $form->ID, $args); | 
                                                                                                            
                                                            | 125 | 125 |   | 
                                                                                                            
                                                            | 126 |  | -			do_action( 'give_checkout_form_bottom', $form->ID, $args ); | 
                                                                                                            
                                                            |  | 126 | +			do_action('give_checkout_form_bottom', $form->ID, $args); | 
                                                                                                            
                                                            | 127 | 127 |   | 
                                                                                                            
                                                            | 128 | 128 |  			?> | 
                                                                                                            
                                                            | 129 | 129 |   | 
                                                                                                            
                                                            | 130 | 130 |  		</form> | 
                                                                                                            
                                                            | 131 | 131 |   | 
                                                                                                            
                                                            | 132 |  | -		<?php do_action( 'give_post_form', $form->ID, $args ); ?> | 
                                                                                                            
                                                            |  | 132 | +		<?php do_action('give_post_form', $form->ID, $args); ?> | 
                                                                                                            
                                                            | 133 | 133 |   | 
                                                                                                            
                                                            | 134 |  | -		<!--end #give-form-<?php echo absint( $form->ID ); ?>--></div> | 
                                                                                                            
                                                            |  | 134 | +		<!--end #give-form-<?php echo absint($form->ID); ?>--></div> | 
                                                                                                            
                                                            | 135 | 135 |  	<?php | 
                                                                                                            
                                                            | 136 | 136 |   | 
                                                                                                            
                                                            | 137 | 137 |  	/** | 
                                                                                                                                                        
                                                        |  | @@ -142,11 +142,11 @@  discard block | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 142 | 142 |  	 * @param int   $form ->ID The current form ID | 
                                                                                                            
                                                            | 143 | 143 |  	 * @param array $args An array of form args | 
                                                                                                            
                                                            | 144 | 144 |  	 */ | 
                                                                                                            
                                                            | 145 |  | -	do_action( 'give_post_form_output', $form->ID, $args ); | 
                                                                                                            
                                                            |  | 145 | +	do_action('give_post_form_output', $form->ID, $args); | 
                                                                                                            
                                                            | 146 | 146 |   | 
                                                                                                            
                                                            | 147 | 147 |  	$final_output = ob_get_clean(); | 
                                                                                                            
                                                            | 148 | 148 |   | 
                                                                                                            
                                                            | 149 |  | -	echo apply_filters( 'give_donate_form', $final_output, $args ); | 
                                                                                                            
                                                            |  | 149 | +	echo apply_filters('give_donate_form', $final_output, $args); | 
                                                                                                            
                                                            | 150 | 150 |  } | 
                                                                                                            
                                                            | 151 | 151 |   | 
                                                                                                            
                                                            | 152 | 152 |   | 
                                                                                                                                                        
                                                        |  | @@ -166,57 +166,57 @@  discard block | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 166 | 166 |   * @global    $give_options Array of all the Give options | 
                                                                                                            
                                                            | 167 | 167 |   * @return string | 
                                                                                                            
                                                            | 168 | 168 |   */ | 
                                                                                                            
                                                            | 169 |  | -function give_show_purchase_form( $form_id ) { | 
                                                                                                            
                                                            |  | 169 | +function give_show_purchase_form($form_id) { | 
                                                                                                            
                                                            | 170 | 170 |   | 
                                                                                                            
                                                            | 171 |  | -	$payment_mode = give_get_chosen_gateway( $form_id ); | 
                                                                                                            
                                                            |  | 171 | +	$payment_mode = give_get_chosen_gateway($form_id); | 
                                                                                                            
                                                            | 172 | 172 |   | 
                                                                                                            
                                                            | 173 |  | -	if ( ! isset( $form_id ) && isset( $_POST['give_form_id'] ) ) { | 
                                                                                                            
                                                            |  | 173 | +	if ( ! isset($form_id) && isset($_POST['give_form_id'])) { | 
                                                                                                            
                                                            | 174 | 174 |  		$form_id = $_POST['give_form_id']; | 
                                                                                                            
                                                            | 175 | 175 |  	} | 
                                                                                                            
                                                            | 176 | 176 |   | 
                                                                                                            
                                                            | 177 |  | -	do_action( 'give_purchase_form_top', $form_id ); | 
                                                                                                            
                                                            |  | 177 | +	do_action('give_purchase_form_top', $form_id); | 
                                                                                                            
                                                            | 178 | 178 |   | 
                                                                                                            
                                                            | 179 |  | -	if ( give_can_checkout() && isset( $form_id ) ) { | 
                                                                                                            
                                                            |  | 179 | +	if (give_can_checkout() && isset($form_id)) { | 
                                                                                                            
                                                            | 180 | 180 |   | 
                                                                                                            
                                                            | 181 |  | -		do_action( 'give_purchase_form_before_register_login', $form_id ); | 
                                                                                                            
                                                            |  | 181 | +		do_action('give_purchase_form_before_register_login', $form_id); | 
                                                                                                            
                                                            | 182 | 182 |   | 
                                                                                                            
                                                            | 183 |  | -		$show_register_form = apply_filters( 'give_show_register_form', get_post_meta( $form_id, '_give_show_register_form', true ) ); | 
                                                                                                            
                                                            |  | 183 | +		$show_register_form = apply_filters('give_show_register_form', get_post_meta($form_id, '_give_show_register_form', true)); | 
                                                                                                            
                                                            | 184 | 184 |   | 
                                                                                                            
                                                            | 185 |  | -		if ( ( $show_register_form === 'registration' || ( $show_register_form === 'both' && ! isset( $_GET['login'] ) ) ) && ! is_user_logged_in() ) : ?> | 
                                                                                                            
                                                            |  | 185 | +		if (($show_register_form === 'registration' || ($show_register_form === 'both' && ! isset($_GET['login']))) && ! is_user_logged_in()) : ?> | 
                                                                                                            
                                                            | 186 | 186 |  			<div id="give-checkout-login-register-<?php echo $form_id; ?>"> | 
                                                                                                            
                                                            | 187 |  | -				<?php do_action( 'give_purchase_form_register_fields', $form_id ); ?> | 
                                                                                                            
                                                            |  | 187 | +				<?php do_action('give_purchase_form_register_fields', $form_id); ?> | 
                                                                                                            
                                                            | 188 | 188 |  			</div> | 
                                                                                                            
                                                            | 189 |  | -		<?php elseif ( ( $show_register_form === 'login' || ( $show_register_form === 'both' && isset( $_GET['login'] ) ) ) && ! is_user_logged_in() ) : ?> | 
                                                                                                            
                                                            |  | 189 | +		<?php elseif (($show_register_form === 'login' || ($show_register_form === 'both' && isset($_GET['login']))) && ! is_user_logged_in()) : ?> | 
                                                                                                            
                                                            | 190 | 190 |  			<div id="give-checkout-login-register-<?php echo $form_id; ?>"> | 
                                                                                                            
                                                            | 191 |  | -				<?php do_action( 'give_purchase_form_login_fields', $form_id ); ?> | 
                                                                                                            
                                                            |  | 191 | +				<?php do_action('give_purchase_form_login_fields', $form_id); ?> | 
                                                                                                            
                                                            | 192 | 192 |  			</div> | 
                                                                                                            
                                                            | 193 | 193 |  		<?php endif; ?> | 
                                                                                                            
                                                            | 194 | 194 |   | 
                                                                                                            
                                                            | 195 |  | -		<?php if ( ( ! isset( $_GET['login'] ) && is_user_logged_in() ) || ! isset( $show_register_form ) || 'none' === $show_register_form || 'login' === $show_register_form ) { | 
                                                                                                            
                                                            | 196 |  | -			do_action( 'give_purchase_form_after_user_info', $form_id ); | 
                                                                                                            
                                                            |  | 195 | +		<?php if (( ! isset($_GET['login']) && is_user_logged_in()) || ! isset($show_register_form) || 'none' === $show_register_form || 'login' === $show_register_form) { | 
                                                                                                            
                                                            |  | 196 | +			do_action('give_purchase_form_after_user_info', $form_id); | 
                                                                                                            
                                                            | 197 | 197 |  		} | 
                                                                                                            
                                                            | 198 | 198 |   | 
                                                                                                            
                                                            | 199 |  | -		do_action( 'give_purchase_form_before_cc_form', $form_id ); | 
                                                                                                            
                                                            |  | 199 | +		do_action('give_purchase_form_before_cc_form', $form_id); | 
                                                                                                            
                                                            | 200 | 200 |   | 
                                                                                                            
                                                            | 201 | 201 |  		// Load the credit card form and allow gateways to load their own if they wish | 
                                                                                                            
                                                            | 202 |  | -		if ( has_action( 'give_' . $payment_mode . '_cc_form' ) ) { | 
                                                                                                            
                                                            | 203 |  | -			do_action( 'give_' . $payment_mode . '_cc_form', $form_id ); | 
                                                                                                            
                                                            |  | 202 | +		if (has_action('give_'.$payment_mode.'_cc_form')) { | 
                                                                                                            
                                                            |  | 203 | +			do_action('give_'.$payment_mode.'_cc_form', $form_id); | 
                                                                                                            
                                                            | 204 | 204 |  		} else { | 
                                                                                                            
                                                            | 205 |  | -			do_action( 'give_cc_form', $form_id ); | 
                                                                                                            
                                                            |  | 205 | +			do_action('give_cc_form', $form_id); | 
                                                                                                            
                                                            | 206 | 206 |  		} | 
                                                                                                            
                                                            | 207 | 207 |   | 
                                                                                                            
                                                            | 208 |  | -		do_action( 'give_purchase_form_after_cc_form', $form_id ); | 
                                                                                                            
                                                            |  | 208 | +		do_action('give_purchase_form_after_cc_form', $form_id); | 
                                                                                                            
                                                            | 209 | 209 |   | 
                                                                                                            
                                                            | 210 | 210 |  	} else { | 
                                                                                                            
                                                            | 211 | 211 |  		// Can't checkout | 
                                                                                                            
                                                            | 212 |  | -		do_action( 'give_purchase_form_no_access', $form_id ); | 
                                                                                                            
                                                            |  | 212 | +		do_action('give_purchase_form_no_access', $form_id); | 
                                                                                                            
                                                            | 213 | 213 |   | 
                                                                                                            
                                                            | 214 | 214 |  	} | 
                                                                                                            
                                                            | 215 | 215 |   | 
                                                                                                            
                                                            | 216 |  | -	do_action( 'give_purchase_form_bottom', $form_id ); | 
                                                                                                            
                                                            |  | 216 | +	do_action('give_purchase_form_bottom', $form_id); | 
                                                                                                            
                                                            | 217 | 217 |  } | 
                                                                                                            
                                                            | 218 | 218 |   | 
                                                                                                            
                                                            | 219 |  | -add_action( 'give_purchase_form', 'give_show_purchase_form' ); | 
                                                                                                            
                                                            |  | 219 | +add_action('give_purchase_form', 'give_show_purchase_form'); | 
                                                                                                            
                                                            | 220 | 220 |   | 
                                                                                                            
                                                            | 221 | 221 |  /** | 
                                                                                                            
                                                            | 222 | 222 |   * Donation Amount Field | 
                                                                                                                                                        
                                                        |  | @@ -230,32 +230,32 @@  discard block | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 230 | 230 |   * | 
                                                                                                            
                                                            | 231 | 231 |   * @return void | 
                                                                                                            
                                                            | 232 | 232 |   */ | 
                                                                                                            
                                                            | 233 |  | -function give_output_donation_amount_top( $form_id = 0, $args = array() ) { | 
                                                                                                            
                                                            |  | 233 | +function give_output_donation_amount_top($form_id = 0, $args = array()) { | 
                                                                                                            
                                                            | 234 | 234 |   | 
                                                                                                            
                                                            | 235 | 235 |  	global $give_options; | 
                                                                                                            
                                                            | 236 | 236 |   | 
                                                                                                            
                                                            | 237 |  | -	$variable_pricing    = give_has_variable_prices( $form_id ); | 
                                                                                                            
                                                            | 238 |  | -	$allow_custom_amount = get_post_meta( $form_id, '_give_custom_amount', true ); | 
                                                                                                            
                                                            | 239 |  | -	$currency_position   = isset( $give_options['currency_position'] ) ? $give_options['currency_position'] : 'before'; | 
                                                                                                            
                                                            | 240 |  | -	$symbol              = give_currency_symbol( $give_options['currency'] ); | 
                                                                                                            
                                                            | 241 |  | -	$currency_output     = '<span class="give-currency-symbol give-currency-position-' . $currency_position . '">' . $symbol . '</span>'; | 
                                                                                                            
                                                            | 242 |  | -	$default_amount      = give_format_amount( give_get_default_form_amount( $form_id ) ); | 
                                                                                                            
                                                            | 243 |  | -	$custom_amount_text  = get_post_meta( $form_id, '_give_custom_amount_text', true ); | 
                                                                                                            
                                                            |  | 237 | +	$variable_pricing    = give_has_variable_prices($form_id); | 
                                                                                                            
                                                            |  | 238 | +	$allow_custom_amount = get_post_meta($form_id, '_give_custom_amount', true); | 
                                                                                                            
                                                            |  | 239 | +	$currency_position   = isset($give_options['currency_position']) ? $give_options['currency_position'] : 'before'; | 
                                                                                                            
                                                            |  | 240 | +	$symbol              = give_currency_symbol($give_options['currency']); | 
                                                                                                            
                                                            |  | 241 | +	$currency_output     = '<span class="give-currency-symbol give-currency-position-'.$currency_position.'">'.$symbol.'</span>'; | 
                                                                                                            
                                                            |  | 242 | +	$default_amount      = give_format_amount(give_get_default_form_amount($form_id)); | 
                                                                                                            
                                                            |  | 243 | +	$custom_amount_text  = get_post_meta($form_id, '_give_custom_amount_text', true); | 
                                                                                                            
                                                            | 244 | 244 |   | 
                                                                                                            
                                                            | 245 |  | -	do_action( 'give_before_donation_levels', $form_id ); | 
                                                                                                            
                                                            |  | 245 | +	do_action('give_before_donation_levels', $form_id); | 
                                                                                                            
                                                            | 246 | 246 |   | 
                                                                                                            
                                                            | 247 | 247 |  	//Set Price, No Custom Amount Allowed means hidden price field | 
                                                                                                            
                                                            | 248 |  | -	if ( $allow_custom_amount == 'no' ) { | 
                                                                                                            
                                                            |  | 248 | +	if ($allow_custom_amount == 'no') { | 
                                                                                                            
                                                            | 249 | 249 |  		?> | 
                                                                                                            
                                                            | 250 | 250 |   | 
                                                                                                            
                                                            | 251 |  | -		<label class="give-hidden" for="give-amount-hidden"><?php echo __( 'Donation Amount:', 'give' ); ?></label> | 
                                                                                                            
                                                            |  | 251 | +		<label class="give-hidden" for="give-amount-hidden"><?php echo __('Donation Amount:', 'give'); ?></label> | 
                                                                                                            
                                                            | 252 | 252 |  		<input id="give-amount" class="give-amount-hidden" type="hidden" name="give-amount" value="<?php echo $default_amount; ?>" required> | 
                                                                                                            
                                                            | 253 | 253 |  		<p class="set-price give-donation-amount form-row-wide"> | 
                                                                                                            
                                                            | 254 |  | -			<?php if ( $currency_position == 'before' ) { | 
                                                                                                            
                                                            |  | 254 | +			<?php if ($currency_position == 'before') { | 
                                                                                                            
                                                            | 255 | 255 |  				echo $currency_output; | 
                                                                                                            
                                                            | 256 | 256 |  			} ?> | 
                                                                                                            
                                                            | 257 | 257 |  			<span id="give-amount-text" class="give-text-input give-amount-top"><?php echo $default_amount; ?></span> | 
                                                                                                            
                                                            | 258 |  | -			<?php if ( $currency_position == 'after' ) { | 
                                                                                                            
                                                            |  | 258 | +			<?php if ($currency_position == 'after') { | 
                                                                                                            
                                                            | 259 | 259 |  				echo $currency_output; | 
                                                                                                            
                                                            | 260 | 260 |  			} ?> | 
                                                                                                            
                                                            | 261 | 261 |  		</p> | 
                                                                                                                                                        
                                                        |  | @@ -265,33 +265,33 @@  discard block | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 265 | 265 |  		?> | 
                                                                                                            
                                                            | 266 | 266 |  		<div class="give-total-wrap"> | 
                                                                                                            
                                                            | 267 | 267 |  			<div class="give-donation-amount form-row-wide"> | 
                                                                                                            
                                                            | 268 |  | -				<?php if ( $currency_position == 'before' ) { | 
                                                                                                            
                                                            |  | 268 | +				<?php if ($currency_position == 'before') { | 
                                                                                                            
                                                            | 269 | 269 |  					echo $currency_output; | 
                                                                                                            
                                                            | 270 | 270 |  				} ?> | 
                                                                                                            
                                                            | 271 |  | -				<label class="give-hidden" for="give-amount"><?php echo __( 'Donation Amount:', 'give' ); ?></label> | 
                                                                                                            
                                                            |  | 271 | +				<label class="give-hidden" for="give-amount"><?php echo __('Donation Amount:', 'give'); ?></label> | 
                                                                                                            
                                                            | 272 | 272 |  				<input class="give-text-input give-amount-top" id="give-amount" name="give-amount" type="tel" placeholder="" value="<?php echo $default_amount; ?>" autocomplete="off"> | 
                                                                                                            
                                                            | 273 |  | -				<?php if ( $currency_position == 'after' ) { | 
                                                                                                            
                                                            |  | 273 | +				<?php if ($currency_position == 'after') { | 
                                                                                                            
                                                            | 274 | 274 |  					echo $currency_output; | 
                                                                                                            
                                                            | 275 | 275 |  				} ?> | 
                                                                                                            
                                                            | 276 | 276 |  				<p class="give-loading-text give-updating-price-loader" style="display: none;"> | 
                                                                                                            
                                                            | 277 |  | -					<span class="give-loading-animation"></span> <?php _e( 'Updating Amount...', 'give' ); ?></p> | 
                                                                                                            
                                                            |  | 277 | +					<span class="give-loading-animation"></span> <?php _e('Updating Amount...', 'give'); ?></p> | 
                                                                                                            
                                                            | 278 | 278 |  			</div> | 
                                                                                                            
                                                            | 279 | 279 |  		</div> | 
                                                                                                            
                                                            | 280 | 280 |  	<?php } | 
                                                                                                            
                                                            | 281 | 281 |   | 
                                                                                                            
                                                            | 282 | 282 |  	//Custom Amount Text | 
                                                                                                            
                                                            | 283 |  | -	if ( ! $variable_pricing && $allow_custom_amount == 'yes' ) { ?> | 
                                                                                                            
                                                            | 284 |  | -		<p class="give-custom-amount-text"><?php echo ! empty( $custom_amount_text ) ? $custom_amount_text : __( 'Give a Custom Amount', 'give' ); ?></p> | 
                                                                                                            
                                                            |  | 283 | +	if ( ! $variable_pricing && $allow_custom_amount == 'yes') { ?> | 
                                                                                                            
                                                            |  | 284 | +		<p class="give-custom-amount-text"><?php echo ! empty($custom_amount_text) ? $custom_amount_text : __('Give a Custom Amount', 'give'); ?></p> | 
                                                                                                            
                                                            | 285 | 285 |  	<?php } | 
                                                                                                            
                                                            | 286 | 286 |   | 
                                                                                                            
                                                            | 287 | 287 |  	//Output Variable Pricing Levels | 
                                                                                                            
                                                            | 288 |  | -	if ( $variable_pricing ) { | 
                                                                                                            
                                                            | 289 |  | -		give_output_levels( $form_id ); | 
                                                                                                            
                                                            |  | 288 | +	if ($variable_pricing) { | 
                                                                                                            
                                                            |  | 289 | +		give_output_levels($form_id); | 
                                                                                                            
                                                            | 290 | 290 |  	} | 
                                                                                                            
                                                            | 291 |  | -	do_action( 'give_after_donation_levels', $form_id, $args ); | 
                                                                                                            
                                                            |  | 291 | +	do_action('give_after_donation_levels', $form_id, $args); | 
                                                                                                            
                                                            | 292 | 292 |  } | 
                                                                                                            
                                                            | 293 | 293 |   | 
                                                                                                            
                                                            | 294 |  | -add_action( 'give_checkout_form_top', 'give_output_donation_amount_top', 10, 2 ); | 
                                                                                                            
                                                            |  | 294 | +add_action('give_checkout_form_top', 'give_output_donation_amount_top', 10, 2); | 
                                                                                                            
                                                            | 295 | 295 |   | 
                                                                                                            
                                                            | 296 | 296 |   | 
                                                                                                            
                                                            | 297 | 297 |  /** | 
                                                                                                                                                        
                                                        |  | @@ -303,32 +303,32 @@  discard block | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 303 | 303 |   * | 
                                                                                                            
                                                            | 304 | 304 |   * @return string | 
                                                                                                            
                                                            | 305 | 305 |   */ | 
                                                                                                            
                                                            | 306 |  | -function give_output_levels( $form_id ) { | 
                                                                                                            
                                                            |  | 306 | +function give_output_levels($form_id) { | 
                                                                                                            
                                                            | 307 | 307 |   | 
                                                                                                            
                                                            | 308 | 308 |  	//Get variable pricing | 
                                                                                                            
                                                            | 309 |  | -	$prices             = apply_filters( 'give_form_variable_prices', give_get_variable_prices( $form_id ), $form_id ); | 
                                                                                                            
                                                            | 310 |  | -	$display_style      = get_post_meta( $form_id, '_give_display_style', true ); | 
                                                                                                            
                                                            | 311 |  | -	$custom_amount      = get_post_meta( $form_id, '_give_custom_amount', true ); | 
                                                                                                            
                                                            | 312 |  | -	$custom_amount_text = get_post_meta( $form_id, '_give_custom_amount_text', true ); | 
                                                                                                            
                                                            | 313 |  | -	if ( empty( $custom_amount_text ) ) { | 
                                                                                                            
                                                            | 314 |  | -		$custom_amount_text = __( 'Give a Custom Amount', 'give' ); | 
                                                                                                            
                                                            |  | 309 | +	$prices             = apply_filters('give_form_variable_prices', give_get_variable_prices($form_id), $form_id); | 
                                                                                                            
                                                            |  | 310 | +	$display_style      = get_post_meta($form_id, '_give_display_style', true); | 
                                                                                                            
                                                            |  | 311 | +	$custom_amount      = get_post_meta($form_id, '_give_custom_amount', true); | 
                                                                                                            
                                                            |  | 312 | +	$custom_amount_text = get_post_meta($form_id, '_give_custom_amount_text', true); | 
                                                                                                            
                                                            |  | 313 | +	if (empty($custom_amount_text)) { | 
                                                                                                            
                                                            |  | 314 | +		$custom_amount_text = __('Give a Custom Amount', 'give'); | 
                                                                                                            
                                                            | 315 | 315 |  	} | 
                                                                                                            
                                                            | 316 | 316 |   | 
                                                                                                            
                                                            | 317 | 317 |  	$output  = ''; | 
                                                                                                            
                                                            | 318 | 318 |  	$counter = 0; | 
                                                                                                            
                                                            | 319 | 319 |   | 
                                                                                                            
                                                            | 320 |  | -	switch ( $display_style ) { | 
                                                                                                            
                                                            |  | 320 | +	switch ($display_style) { | 
                                                                                                            
                                                            | 321 | 321 |  		case 'buttons': | 
                                                                                                            
                                                            | 322 | 322 |   | 
                                                                                                            
                                                            | 323 | 323 |  			$output .= '<ul id="give-donation-level-button-wrap" class="give-donation-levels-wrap give-list-inline">'; | 
                                                                                                            
                                                            | 324 | 324 |   | 
                                                                                                            
                                                            | 325 |  | -			foreach ( $prices as $price ) { | 
                                                                                                            
                                                            | 326 |  | -				$counter ++; | 
                                                                                                            
                                                            | 327 |  | -				$level_text    = apply_filters( 'give_form_level_text', ! empty( $price['_give_text'] ) ? $price['_give_text'] : give_currency_filter( give_format_amount( $price['_give_amount'] ) ), $form_id, $price ); | 
                                                                                                            
                                                            | 328 |  | -				$level_classes = apply_filters( 'give_form_level_classes', 'give-donation-level-btn give-btn give-btn-level-' . $counter . ' ' . ( ( isset( $price['_give_default'] ) && $price['_give_default'] === 'default' ) ? 'give-default-level' : '' ), $form_id, $price ); | 
                                                                                                            
                                                            |  | 325 | +			foreach ($prices as $price) { | 
                                                                                                            
                                                            |  | 326 | +				$counter++; | 
                                                                                                            
                                                            |  | 327 | +				$level_text    = apply_filters('give_form_level_text', ! empty($price['_give_text']) ? $price['_give_text'] : give_currency_filter(give_format_amount($price['_give_amount'])), $form_id, $price); | 
                                                                                                            
                                                            |  | 328 | +				$level_classes = apply_filters('give_form_level_classes', 'give-donation-level-btn give-btn give-btn-level-'.$counter.' '.((isset($price['_give_default']) && $price['_give_default'] === 'default') ? 'give-default-level' : ''), $form_id, $price); | 
                                                                                                            
                                                            | 329 | 329 |   | 
                                                                                                            
                                                            | 330 | 330 |  				$output .= '<li>'; | 
                                                                                                            
                                                            | 331 |  | -				$output .= '<button type="button" data-price-id="' . $price['_give_id']['level_id'] . '" class=" ' . $level_classes . '" value="' . give_format_amount( $price['_give_amount'] ) . '">'; | 
                                                                                                            
                                                            |  | 331 | +				$output .= '<button type="button" data-price-id="'.$price['_give_id']['level_id'].'" class=" '.$level_classes.'" value="'.give_format_amount($price['_give_amount']).'">'; | 
                                                                                                            
                                                            | 332 | 332 |  				$output .= $level_text; | 
                                                                                                            
                                                            | 333 | 333 |  				$output .= '</button>'; | 
                                                                                                            
                                                            | 334 | 334 |  				$output .= '</li>'; | 
                                                                                                                                                        
                                                        |  | @@ -336,7 +336,7 @@  discard block | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 336 | 336 |  			} | 
                                                                                                            
                                                            | 337 | 337 |   | 
                                                                                                            
                                                            | 338 | 338 |  			//Custom Amount | 
                                                                                                            
                                                            | 339 |  | -			if ( $custom_amount === 'yes' && ! empty( $custom_amount_text ) ) { | 
                                                                                                            
                                                            |  | 339 | +			if ($custom_amount === 'yes' && ! empty($custom_amount_text)) { | 
                                                                                                            
                                                            | 340 | 340 |  				$output .= '<li>'; | 
                                                                                                            
                                                            | 341 | 341 |  				$output .= '<button type="button" data-price-id="custom" class="give-donation-level-btn give-btn give-btn-level-custom" value="custom">'; | 
                                                                                                            
                                                            | 342 | 342 |  				$output .= $custom_amount_text; | 
                                                                                                                                                        
                                                        |  | @@ -352,23 +352,23 @@  discard block | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 352 | 352 |   | 
                                                                                                            
                                                            | 353 | 353 |  			$output .= '<ul id="give-donation-level-radio-list" class="give-donation-levels-wrap">'; | 
                                                                                                            
                                                            | 354 | 354 |   | 
                                                                                                            
                                                            | 355 |  | -			foreach ( $prices as $price ) { | 
                                                                                                            
                                                            | 356 |  | -				$counter ++; | 
                                                                                                            
                                                            | 357 |  | -				$level_text    = apply_filters( 'give_form_level_text', ! empty( $price['_give_text'] ) ? $price['_give_text'] : give_currency_filter( give_format_amount( $price['_give_amount'] ) ), $form_id, $price ); | 
                                                                                                            
                                                            | 358 |  | -				$level_classes = apply_filters( 'give_form_level_classes', 'give-radio-input give-radio-input-level give-radio-level-' . $counter . ( ( isset( $price['_give_default'] ) && $price['_give_default'] === 'default' ) ? ' give-default-level' : '' ), $form_id, $price ); | 
                                                                                                            
                                                            |  | 355 | +			foreach ($prices as $price) { | 
                                                                                                            
                                                            |  | 356 | +				$counter++; | 
                                                                                                            
                                                            |  | 357 | +				$level_text    = apply_filters('give_form_level_text', ! empty($price['_give_text']) ? $price['_give_text'] : give_currency_filter(give_format_amount($price['_give_amount'])), $form_id, $price); | 
                                                                                                            
                                                            |  | 358 | +				$level_classes = apply_filters('give_form_level_classes', 'give-radio-input give-radio-input-level give-radio-level-'.$counter.((isset($price['_give_default']) && $price['_give_default'] === 'default') ? ' give-default-level' : ''), $form_id, $price); | 
                                                                                                            
                                                            | 359 | 359 |   | 
                                                                                                            
                                                            | 360 | 360 |  				$output .= '<li>'; | 
                                                                                                            
                                                            | 361 |  | -				$output .= '<input type="radio" data-price-id="' . $price['_give_id']['level_id'] . '" class="' . $level_classes . '" name="give-radio-donation-level" id="give-radio-level-' . $counter . '" ' . ( ( isset( $price['_give_default'] ) && $price['_give_default'] === 'default' ) ? 'checked="checked"' : '' ) . ' value="' . give_format_amount( $price['_give_amount'] ) . '">'; | 
                                                                                                            
                                                            | 362 |  | -				$output .= '<label for="give-radio-level-' . $counter . '">' . $level_text . '</label>'; | 
                                                                                                            
                                                            |  | 361 | +				$output .= '<input type="radio" data-price-id="'.$price['_give_id']['level_id'].'" class="'.$level_classes.'" name="give-radio-donation-level" id="give-radio-level-'.$counter.'" '.((isset($price['_give_default']) && $price['_give_default'] === 'default') ? 'checked="checked"' : '').' value="'.give_format_amount($price['_give_amount']).'">'; | 
                                                                                                            
                                                            |  | 362 | +				$output .= '<label for="give-radio-level-'.$counter.'">'.$level_text.'</label>'; | 
                                                                                                            
                                                            | 363 | 363 |  				$output .= '</li>'; | 
                                                                                                            
                                                            | 364 | 364 |   | 
                                                                                                            
                                                            | 365 | 365 |  			} | 
                                                                                                            
                                                            | 366 | 366 |   | 
                                                                                                            
                                                            | 367 | 367 |  			//Custom Amount | 
                                                                                                            
                                                            | 368 |  | -			if ( $custom_amount === 'yes' && ! empty( $custom_amount_text ) ) { | 
                                                                                                            
                                                            |  | 368 | +			if ($custom_amount === 'yes' && ! empty($custom_amount_text)) { | 
                                                                                                            
                                                            | 369 | 369 |  				$output .= '<li>'; | 
                                                                                                            
                                                            | 370 | 370 |  				$output .= '<input type="radio" data-price-id="custom" class="give-radio-input give-radio-input-level give-radio-level-custom" name="give-radio-donation-level" id="give-radio-level-custom" value="custom">'; | 
                                                                                                            
                                                            | 371 |  | -				$output .= '<label for="give-radio-level-custom">' . $custom_amount_text . '</label>'; | 
                                                                                                            
                                                            |  | 371 | +				$output .= '<label for="give-radio-level-custom">'.$custom_amount_text.'</label>'; | 
                                                                                                            
                                                            | 372 | 372 |  				$output .= '</li>'; | 
                                                                                                            
                                                            | 373 | 373 |  			} | 
                                                                                                            
                                                            | 374 | 374 |   | 
                                                                                                                                                        
                                                        |  | @@ -378,23 +378,23 @@  discard block | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 378 | 378 |   | 
                                                                                                            
                                                            | 379 | 379 |  		case 'dropdown': | 
                                                                                                            
                                                            | 380 | 380 |   | 
                                                                                                            
                                                            | 381 |  | -			$output .= '<label for="give-donation-level" class="give-hidden">' . __( 'Choose your Donation Amount', 'give' ) . ':</label>'; | 
                                                                                                            
                                                            | 382 |  | -			$output .= '<select id="give-donation-level-' . $form_id . '" class="give-select give-select-level">'; | 
                                                                                                            
                                                            |  | 381 | +			$output .= '<label for="give-donation-level" class="give-hidden">'.__('Choose your Donation Amount', 'give').':</label>'; | 
                                                                                                            
                                                            |  | 382 | +			$output .= '<select id="give-donation-level-'.$form_id.'" class="give-select give-select-level">'; | 
                                                                                                            
                                                            | 383 | 383 |   | 
                                                                                                            
                                                            | 384 | 384 |  			//first loop through prices | 
                                                                                                            
                                                            | 385 |  | -			foreach ( $prices as $price ) { | 
                                                                                                            
                                                            | 386 |  | -				$level_text    = apply_filters( 'give_form_level_text', ! empty( $price['_give_text'] ) ? $price['_give_text'] : give_currency_filter( give_format_amount( $price['_give_amount'] ) ), $form_id, $price ); | 
                                                                                                            
                                                            | 387 |  | -				$level_classes = apply_filters( 'give_form_level_classes', 'give-donation-level-' . $form_id, $form_id, $price ); | 
                                                                                                            
                                                            |  | 385 | +			foreach ($prices as $price) { | 
                                                                                                            
                                                            |  | 386 | +				$level_text    = apply_filters('give_form_level_text', ! empty($price['_give_text']) ? $price['_give_text'] : give_currency_filter(give_format_amount($price['_give_amount'])), $form_id, $price); | 
                                                                                                            
                                                            |  | 387 | +				$level_classes = apply_filters('give_form_level_classes', 'give-donation-level-'.$form_id, $form_id, $price); | 
                                                                                                            
                                                            | 388 | 388 |   | 
                                                                                                            
                                                            | 389 |  | -				$output .= '<option data-price-id="' . $price['_give_id']['level_id'] . '" class="' . $level_classes . '" ' . ( ( isset( $price['_give_default'] ) && $price['_give_default'] === 'default' ) ? 'selected="selected"' : '' ) . ' value="' . give_format_amount( $price['_give_amount'] ) . '">'; | 
                                                                                                            
                                                            |  | 389 | +				$output .= '<option data-price-id="'.$price['_give_id']['level_id'].'" class="'.$level_classes.'" '.((isset($price['_give_default']) && $price['_give_default'] === 'default') ? 'selected="selected"' : '').' value="'.give_format_amount($price['_give_amount']).'">'; | 
                                                                                                            
                                                            | 390 | 390 |  				$output .= $level_text; | 
                                                                                                            
                                                            | 391 | 391 |  				$output .= '</option>'; | 
                                                                                                            
                                                            | 392 | 392 |   | 
                                                                                                            
                                                            | 393 | 393 |  			} | 
                                                                                                            
                                                            | 394 | 394 |   | 
                                                                                                            
                                                            | 395 | 395 |  			//Custom Amount | 
                                                                                                            
                                                            | 396 |  | -			if ( $custom_amount === 'yes' && ! empty( $custom_amount_text ) ) { | 
                                                                                                            
                                                            | 397 |  | -				$output .= '<option data-price-id="custom" class="give-donation-level-custom" value="custom">' . $custom_amount_text . '</option>'; | 
                                                                                                            
                                                            |  | 396 | +			if ($custom_amount === 'yes' && ! empty($custom_amount_text)) { | 
                                                                                                            
                                                            |  | 397 | +				$output .= '<option data-price-id="custom" class="give-donation-level-custom" value="custom">'.$custom_amount_text.'</option>'; | 
                                                                                                            
                                                            | 398 | 398 |  			} | 
                                                                                                            
                                                            | 399 | 399 |   | 
                                                                                                            
                                                            | 400 | 400 |  			$output .= '</select>'; | 
                                                                                                                                                        
                                                        |  | @@ -402,7 +402,7 @@  discard block | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 402 | 402 |  			break; | 
                                                                                                            
                                                            | 403 | 403 |  	} | 
                                                                                                            
                                                            | 404 | 404 |   | 
                                                                                                            
                                                            | 405 |  | -	echo apply_filters( 'give_form_level_output', $output, $form_id ); | 
                                                                                                            
                                                            |  | 405 | +	echo apply_filters('give_form_level_output', $output, $form_id); | 
                                                                                                            
                                                            | 406 | 406 |  } | 
                                                                                                            
                                                            | 407 | 407 |   | 
                                                                                                            
                                                            | 408 | 408 |  /** | 
                                                                                                                                                        
                                                        |  | @@ -414,26 +414,26 @@  discard block | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 414 | 414 |   * @param array $args | 
                                                                                                            
                                                            | 415 | 415 |   * | 
                                                                                                            
                                                            | 416 | 416 |   */ | 
                                                                                                            
                                                            | 417 |  | -function give_display_checkout_button( $form_id, $args ) { | 
                                                                                                            
                                                            |  | 417 | +function give_display_checkout_button($form_id, $args) { | 
                                                                                                            
                                                            | 418 | 418 |   | 
                                                                                                            
                                                            | 419 |  | -	$display_option = ( isset( $args['display_style'] ) && ! empty( $args['display_style'] ) ) | 
                                                                                                            
                                                            |  | 419 | +	$display_option = (isset($args['display_style']) && ! empty($args['display_style'])) | 
                                                                                                            
                                                            | 420 | 420 |  		? $args['display_style'] | 
                                                                                                            
                                                            | 421 |  | -		: get_post_meta( $form_id, '_give_payment_display', true ); | 
                                                                                                            
                                                            |  | 421 | +		: get_post_meta($form_id, '_give_payment_display', true); | 
                                                                                                            
                                                            | 422 | 422 |   | 
                                                                                                            
                                                            | 423 | 423 |  	//no btn for onpage | 
                                                                                                            
                                                            | 424 |  | -	if ( $display_option === 'onpage' ) { | 
                                                                                                            
                                                            |  | 424 | +	if ($display_option === 'onpage') { | 
                                                                                                            
                                                            | 425 | 425 |  		return; | 
                                                                                                            
                                                            | 426 | 426 |  	} | 
                                                                                                            
                                                            | 427 | 427 |   | 
                                                                                                            
                                                            | 428 |  | -	$display_label_field = get_post_meta( $form_id, '_give_reveal_label', true ); | 
                                                                                                            
                                                            | 429 |  | -	$display_label       = ( ! empty( $display_label_field ) ? $display_label_field : __( 'Donate Now', 'give' ) ); | 
                                                                                                            
                                                            |  | 428 | +	$display_label_field = get_post_meta($form_id, '_give_reveal_label', true); | 
                                                                                                            
                                                            |  | 429 | +	$display_label       = ( ! empty($display_label_field) ? $display_label_field : __('Donate Now', 'give')); | 
                                                                                                            
                                                            | 430 | 430 |   | 
                                                                                                            
                                                            | 431 |  | -	$output = '<button type="button" class="give-btn give-btn-' . $display_option . '">' . $display_label . '</button>'; | 
                                                                                                            
                                                            |  | 431 | +	$output = '<button type="button" class="give-btn give-btn-'.$display_option.'">'.$display_label.'</button>'; | 
                                                                                                            
                                                            | 432 | 432 |   | 
                                                                                                            
                                                            | 433 |  | -	echo apply_filters( 'give_display_checkout_button', $output ); | 
                                                                                                            
                                                            |  | 433 | +	echo apply_filters('give_display_checkout_button', $output); | 
                                                                                                            
                                                            | 434 | 434 |  } | 
                                                                                                            
                                                            | 435 | 435 |   | 
                                                                                                            
                                                            | 436 |  | -add_action( 'give_after_donation_levels', 'give_display_checkout_button', 10, 2 ); | 
                                                                                                            
                                                            |  | 436 | +add_action('give_after_donation_levels', 'give_display_checkout_button', 10, 2); | 
                                                                                                            
                                                            | 437 | 437 |   | 
                                                                                                            
                                                            | 438 | 438 |  /** | 
                                                                                                            
                                                            | 439 | 439 |   * Shows the User Info fields in the Personal Info box, more fields can be added via the hooks provided. | 
                                                                                                                                                        
                                                        |  | @@ -444,71 +444,71 @@  discard block | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 444 | 444 |   * | 
                                                                                                            
                                                            | 445 | 445 |   * @return void | 
                                                                                                            
                                                            | 446 | 446 |   */ | 
                                                                                                            
                                                            | 447 |  | -function give_user_info_fields( $form_id ) { | 
                                                                                                            
                                                            |  | 447 | +function give_user_info_fields($form_id) { | 
                                                                                                            
                                                            | 448 | 448 |   | 
                                                                                                            
                                                            | 449 |  | -	if ( is_user_logged_in() ) : | 
                                                                                                            
                                                            | 450 |  | -		$user_data = get_userdata( get_current_user_id() ); | 
                                                                                                            
                                                            |  | 449 | +	if (is_user_logged_in()) : | 
                                                                                                            
                                                            |  | 450 | +		$user_data = get_userdata(get_current_user_id()); | 
                                                                                                            
                                                            | 451 | 451 |  	endif; | 
                                                                                                            
                                                            | 452 | 452 |   | 
                                                                                                            
                                                            | 453 |  | -	do_action( 'give_purchase_form_before_personal_info', $form_id ); | 
                                                                                                            
                                                            |  | 453 | +	do_action('give_purchase_form_before_personal_info', $form_id); | 
                                                                                                            
                                                            | 454 | 454 |  	?> | 
                                                                                                            
                                                            | 455 | 455 |  	<fieldset id="give_checkout_user_info"> | 
                                                                                                            
                                                            | 456 |  | -		<legend><?php echo apply_filters( 'give_checkout_personal_info_text', __( 'Personal Info', 'give' ) ); ?></legend> | 
                                                                                                            
                                                            |  | 456 | +		<legend><?php echo apply_filters('give_checkout_personal_info_text', __('Personal Info', 'give')); ?></legend> | 
                                                                                                            
                                                            | 457 | 457 |  		<p id="give-first-name-wrap" class="form-row form-row-first"> | 
                                                                                                            
                                                            | 458 | 458 |  			<label class="give-label" for="give-first"> | 
                                                                                                            
                                                            | 459 |  | -				<?php _e( 'First Name', 'give' ); ?> | 
                                                                                                            
                                                            | 460 |  | -				<?php if ( give_field_is_required( 'give_first', $form_id ) ) { ?> | 
                                                                                                            
                                                            |  | 459 | +				<?php _e('First Name', 'give'); ?> | 
                                                                                                            
                                                            |  | 460 | +				<?php if (give_field_is_required('give_first', $form_id)) { ?> | 
                                                                                                            
                                                            | 461 | 461 |  					<span class="give-required-indicator">*</span> | 
                                                                                                            
                                                            | 462 | 462 |  				<?php } ?> | 
                                                                                                            
                                                            | 463 |  | -				<span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php _e( 'We will use this to personalize your account experience.', 'give' ); ?>"></span> | 
                                                                                                            
                                                            |  | 463 | +				<span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php _e('We will use this to personalize your account experience.', 'give'); ?>"></span> | 
                                                                                                            
                                                            | 464 | 464 |  			</label> | 
                                                                                                            
                                                            | 465 |  | -			<input class="give-input required" type="text" name="give_first" placeholder="<?php _e( 'First name', 'give' ); ?>" id="give-first" value="<?php echo is_user_logged_in() ? $user_data->first_name : ''; ?>"<?php if ( give_field_is_required( 'give_first', $form_id ) ) { | 
                                                                                                            
                                                            |  | 465 | +			<input class="give-input required" type="text" name="give_first" placeholder="<?php _e('First name', 'give'); ?>" id="give-first" value="<?php echo is_user_logged_in() ? $user_data->first_name : ''; ?>"<?php if (give_field_is_required('give_first', $form_id)) { | 
                                                                                                            
                                                            | 466 | 466 |  				echo ' required '; | 
                                                                                                            
                                                            | 467 | 467 |  			} ?>/> | 
                                                                                                            
                                                            | 468 | 468 |  		</p> | 
                                                                                                            
                                                            | 469 | 469 |   | 
                                                                                                            
                                                            | 470 | 470 |  		<p id="give-last-name-wrap" class="form-row form-row-last"> | 
                                                                                                            
                                                            | 471 | 471 |  			<label class="give-label" for="give-last"> | 
                                                                                                            
                                                            | 472 |  | -				<?php _e( 'Last Name', 'give' ); ?> | 
                                                                                                            
                                                            | 473 |  | -				<?php if ( give_field_is_required( 'give_last', $form_id ) ) { ?> | 
                                                                                                            
                                                            |  | 472 | +				<?php _e('Last Name', 'give'); ?> | 
                                                                                                            
                                                            |  | 473 | +				<?php if (give_field_is_required('give_last', $form_id)) { ?> | 
                                                                                                            
                                                            | 474 | 474 |  					<span class="give-required-indicator">*</span> | 
                                                                                                            
                                                            | 475 | 475 |  				<?php } ?> | 
                                                                                                            
                                                            | 476 |  | -				<span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php _e( 'We will use this as well to personalize your account experience.', 'give' ); ?>"></span> | 
                                                                                                            
                                                            |  | 476 | +				<span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php _e('We will use this as well to personalize your account experience.', 'give'); ?>"></span> | 
                                                                                                            
                                                            | 477 | 477 |  			</label> | 
                                                                                                            
                                                            | 478 | 478 |   | 
                                                                                                            
                                                            | 479 |  | -			<input class="give-input<?php if ( give_field_is_required( 'give_last', $form_id ) ) { | 
                                                                                                            
                                                            |  | 479 | +			<input class="give-input<?php if (give_field_is_required('give_last', $form_id)) { | 
                                                                                                            
                                                            | 480 | 480 |  				echo ' required'; | 
                                                                                                            
                                                            | 481 |  | -			} ?>" type="text" name="give_last" id="give-last" placeholder="<?php _e( 'Last name', 'give' ); ?>" value="<?php echo is_user_logged_in() ? $user_data->last_name : ''; ?>"<?php if ( give_field_is_required( 'give_last', $form_id ) ) { | 
                                                                                                            
                                                            |  | 481 | +			} ?>" type="text" name="give_last" id="give-last" placeholder="<?php _e('Last name', 'give'); ?>" value="<?php echo is_user_logged_in() ? $user_data->last_name : ''; ?>"<?php if (give_field_is_required('give_last', $form_id)) { | 
                                                                                                            
                                                            | 482 | 482 |  				echo ' required '; | 
                                                                                                            
                                                            | 483 | 483 |  			} ?> /> | 
                                                                                                            
                                                            | 484 | 484 |  		</p> | 
                                                                                                            
                                                            | 485 | 485 |   | 
                                                                                                            
                                                            | 486 |  | -		<?php do_action( 'give_purchase_form_before_email', $form_id ); ?> | 
                                                                                                            
                                                            |  | 486 | +		<?php do_action('give_purchase_form_before_email', $form_id); ?> | 
                                                                                                            
                                                            | 487 | 487 |  		<p id="give-email-wrap" class="form-row form-row-wide"> | 
                                                                                                            
                                                            | 488 | 488 |  			<label class="give-label" for="give-email"> | 
                                                                                                            
                                                            | 489 |  | -				<?php _e( 'Email Address', 'give' ); ?> | 
                                                                                                            
                                                            | 490 |  | -				<?php if ( give_field_is_required( 'give_email', $form_id ) ) { ?> | 
                                                                                                            
                                                            |  | 489 | +				<?php _e('Email Address', 'give'); ?> | 
                                                                                                            
                                                            |  | 490 | +				<?php if (give_field_is_required('give_email', $form_id)) { ?> | 
                                                                                                            
                                                            | 491 | 491 |  					<span class="give-required-indicator">*</span> | 
                                                                                                            
                                                            | 492 | 492 |  				<?php } ?> | 
                                                                                                            
                                                            | 493 |  | -				<span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php _e( 'We will send the purchase receipt to this address.', 'give' ); ?>"></span> | 
                                                                                                            
                                                            |  | 493 | +				<span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php _e('We will send the purchase receipt to this address.', 'give'); ?>"></span> | 
                                                                                                            
                                                            | 494 | 494 |  			</label> | 
                                                                                                            
                                                            | 495 | 495 |   | 
                                                                                                            
                                                            | 496 |  | -			<input class="give-input required" type="email" name="give_email" placeholder="<?php _e( 'Email address', 'give' ); ?>" id="give-email" value="<?php echo is_user_logged_in() ? $user_data->user_email : ''; ?>"<?php if ( give_field_is_required( 'give_email', $form_id ) ) { | 
                                                                                                            
                                                            |  | 496 | +			<input class="give-input required" type="email" name="give_email" placeholder="<?php _e('Email address', 'give'); ?>" id="give-email" value="<?php echo is_user_logged_in() ? $user_data->user_email : ''; ?>"<?php if (give_field_is_required('give_email', $form_id)) { | 
                                                                                                            
                                                            | 497 | 497 |  				echo ' required '; | 
                                                                                                            
                                                            | 498 | 498 |  			} ?>/> | 
                                                                                                            
                                                            | 499 | 499 |   | 
                                                                                                            
                                                            | 500 | 500 |  		</p> | 
                                                                                                            
                                                            | 501 |  | -		<?php do_action( 'give_purchase_form_after_email', $form_id ); ?> | 
                                                                                                            
                                                            |  | 501 | +		<?php do_action('give_purchase_form_after_email', $form_id); ?> | 
                                                                                                            
                                                            | 502 | 502 |   | 
                                                                                                            
                                                            | 503 |  | -		<?php do_action( 'give_purchase_form_user_info', $form_id ); ?> | 
                                                                                                            
                                                            |  | 503 | +		<?php do_action('give_purchase_form_user_info', $form_id); ?> | 
                                                                                                            
                                                            | 504 | 504 |  	</fieldset> | 
                                                                                                            
                                                            | 505 | 505 |  	<?php | 
                                                                                                            
                                                            | 506 |  | -	do_action( 'give_purchase_form_after_personal_info', $form_id ); | 
                                                                                                            
                                                            |  | 506 | +	do_action('give_purchase_form_after_personal_info', $form_id); | 
                                                                                                            
                                                            | 507 | 507 |   | 
                                                                                                            
                                                            | 508 | 508 |  } | 
                                                                                                            
                                                            | 509 | 509 |   | 
                                                                                                            
                                                            | 510 |  | -add_action( 'give_purchase_form_after_user_info', 'give_user_info_fields' ); | 
                                                                                                            
                                                            | 511 |  | -add_action( 'give_register_fields_before', 'give_user_info_fields' ); | 
                                                                                                            
                                                            |  | 510 | +add_action('give_purchase_form_after_user_info', 'give_user_info_fields'); | 
                                                                                                            
                                                            |  | 511 | +add_action('give_register_fields_before', 'give_user_info_fields'); | 
                                                                                                            
                                                            | 512 | 512 |   | 
                                                                                                            
                                                            | 513 | 513 |  /** | 
                                                                                                            
                                                            | 514 | 514 |   * Renders the credit card info form. | 
                                                                                                                                                        
                                                        |  | @@ -519,73 +519,73 @@  discard block | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 519 | 519 |   * | 
                                                                                                            
                                                            | 520 | 520 |   * @return void | 
                                                                                                            
                                                            | 521 | 521 |   */ | 
                                                                                                            
                                                            | 522 |  | -function give_get_cc_form( $form_id ) { | 
                                                                                                            
                                                            |  | 522 | +function give_get_cc_form($form_id) { | 
                                                                                                            
                                                            | 523 | 523 |   | 
                                                                                                            
                                                            | 524 | 524 |  	ob_start(); | 
                                                                                                            
                                                            | 525 | 525 |   | 
                                                                                                            
                                                            | 526 |  | -	do_action( 'give_before_cc_fields', $form_id ); ?> | 
                                                                                                            
                                                            |  | 526 | +	do_action('give_before_cc_fields', $form_id); ?> | 
                                                                                                            
                                                            | 527 | 527 |   | 
                                                                                                            
                                                            | 528 | 528 |  	<fieldset id="give_cc_fields-<?php echo $form_id ?>" class="give-do-validate"> | 
                                                                                                            
                                                            | 529 |  | -		<legend><?php echo apply_filters( 'give_credit_card_fieldset_heading', __( 'Credit Card Info', 'give' )); ?></legend> | 
                                                                                                            
                                                            | 530 |  | -		<?php if ( is_ssl() ) : ?> | 
                                                                                                            
                                                            |  | 529 | +		<legend><?php echo apply_filters('give_credit_card_fieldset_heading', __('Credit Card Info', 'give')); ?></legend> | 
                                                                                                            
                                                            |  | 530 | +		<?php if (is_ssl()) : ?> | 
                                                                                                            
                                                            | 531 | 531 |  			<div id="give_secure_site_wrapper-<?php echo $form_id ?>"> | 
                                                                                                            
                                                            | 532 | 532 |  				<span class="give-icon padlock"></span> | 
                                                                                                            
                                                            | 533 |  | -				<span><?php _e( 'This is a secure SSL encrypted payment.', 'give' ); ?></span> | 
                                                                                                            
                                                            |  | 533 | +				<span><?php _e('This is a secure SSL encrypted payment.', 'give'); ?></span> | 
                                                                                                            
                                                            | 534 | 534 |  			</div> | 
                                                                                                            
                                                            | 535 | 535 |  		<?php endif; ?> | 
                                                                                                            
                                                            | 536 | 536 |  		<p id="give-card-number-wrap-<?php echo $form_id ?>" class="form-row form-row-two-thirds"> | 
                                                                                                            
                                                            | 537 | 537 |  			<label for="card_number-<?php echo $form_id ?>" class="give-label"> | 
                                                                                                            
                                                            | 538 |  | -				<?php _e( 'Card Number', 'give' ); ?> | 
                                                                                                            
                                                            |  | 538 | +				<?php _e('Card Number', 'give'); ?> | 
                                                                                                            
                                                            | 539 | 539 |  				<span class="give-required-indicator">*</span> | 
                                                                                                            
                                                            | 540 |  | -				<span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php _e( 'The (typically) 16 digits on the front of your credit card.', 'give' ); ?>"></span> | 
                                                                                                            
                                                            |  | 540 | +				<span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php _e('The (typically) 16 digits on the front of your credit card.', 'give'); ?>"></span> | 
                                                                                                            
                                                            | 541 | 541 |  				<span class="card-type"></span> | 
                                                                                                            
                                                            | 542 | 542 |  			</label> | 
                                                                                                            
                                                            | 543 | 543 |   | 
                                                                                                            
                                                            | 544 |  | -			<input type="tel" autocomplete="off" name="card_number" id="card_number-<?php echo $form_id ?>" class="card-number give-input required" placeholder="<?php _e( 'Card number', 'give' ); ?>" required /> | 
                                                                                                            
                                                            |  | 544 | +			<input type="tel" autocomplete="off" name="card_number" id="card_number-<?php echo $form_id ?>" class="card-number give-input required" placeholder="<?php _e('Card number', 'give'); ?>" required /> | 
                                                                                                            
                                                            | 545 | 545 |  		</p> | 
                                                                                                            
                                                            | 546 | 546 |   | 
                                                                                                            
                                                            | 547 | 547 |  		<p id="give-card-cvc-wrap-<?php echo $form_id ?>" class="form-row form-row-one-third"> | 
                                                                                                            
                                                            | 548 | 548 |  			<label for="card_cvc-<?php echo $form_id ?>" class="give-label"> | 
                                                                                                            
                                                            | 549 |  | -				<?php _e( 'CVC', 'give' ); ?> | 
                                                                                                            
                                                            |  | 549 | +				<?php _e('CVC', 'give'); ?> | 
                                                                                                            
                                                            | 550 | 550 |  				<span class="give-required-indicator">*</span> | 
                                                                                                            
                                                            | 551 |  | -				<span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php _e( 'The 3 digit (back) or 4 digit (front) value on your card.', 'give' ); ?>"></span> | 
                                                                                                            
                                                            |  | 551 | +				<span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php _e('The 3 digit (back) or 4 digit (front) value on your card.', 'give'); ?>"></span> | 
                                                                                                            
                                                            | 552 | 552 |  			</label> | 
                                                                                                            
                                                            | 553 | 553 |   | 
                                                                                                            
                                                            | 554 |  | -			<input type="tel" size="4" autocomplete="off" name="card_cvc" id="card_cvc-<?php echo $form_id ?>" class="card-cvc give-input required" placeholder="<?php _e( 'Security code', 'give' ); ?>" required /> | 
                                                                                                            
                                                            |  | 554 | +			<input type="tel" size="4" autocomplete="off" name="card_cvc" id="card_cvc-<?php echo $form_id ?>" class="card-cvc give-input required" placeholder="<?php _e('Security code', 'give'); ?>" required /> | 
                                                                                                            
                                                            | 555 | 555 |  		</p> | 
                                                                                                            
                                                            | 556 | 556 |   | 
                                                                                                            
                                                            | 557 | 557 |  		<p id="give-card-name-wrap-<?php echo $form_id ?>" class="form-row form-row-two-thirds"> | 
                                                                                                            
                                                            | 558 | 558 |  			<label for="card_name-<?php echo $form_id ?>" class="give-label"> | 
                                                                                                            
                                                            | 559 |  | -				<?php _e( 'Name on the Card', 'give' ); ?> | 
                                                                                                            
                                                            |  | 559 | +				<?php _e('Name on the Card', 'give'); ?> | 
                                                                                                            
                                                            | 560 | 560 |  				<span class="give-required-indicator">*</span> | 
                                                                                                            
                                                            | 561 |  | -				<span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php _e( 'The name printed on the front of your credit card.', 'give' ); ?>"></span> | 
                                                                                                            
                                                            |  | 561 | +				<span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php _e('The name printed on the front of your credit card.', 'give'); ?>"></span> | 
                                                                                                            
                                                            | 562 | 562 |  			</label> | 
                                                                                                            
                                                            | 563 | 563 |   | 
                                                                                                            
                                                            | 564 |  | -			<input type="text" autocomplete="off" name="card_name" id="card_name-<?php echo $form_id ?>" class="card-name give-input required" placeholder="<?php _e( 'Card name', 'give' ); ?>" required /> | 
                                                                                                            
                                                            |  | 564 | +			<input type="text" autocomplete="off" name="card_name" id="card_name-<?php echo $form_id ?>" class="card-name give-input required" placeholder="<?php _e('Card name', 'give'); ?>" required /> | 
                                                                                                            
                                                            | 565 | 565 |  		</p> | 
                                                                                                            
                                                            | 566 |  | -		<?php do_action( 'give_before_cc_expiration' ); ?> | 
                                                                                                            
                                                            |  | 566 | +		<?php do_action('give_before_cc_expiration'); ?> | 
                                                                                                            
                                                            | 567 | 567 |  		<p class="card-expiration form-row form-row-one-third"> | 
                                                                                                            
                                                            | 568 | 568 |  			<label for="card_expiry-<?php echo $form_id ?>" class="give-label"> | 
                                                                                                            
                                                            | 569 |  | -				<?php _e( 'Expiration', 'give' ); ?> | 
                                                                                                            
                                                            |  | 569 | +				<?php _e('Expiration', 'give'); ?> | 
                                                                                                            
                                                            | 570 | 570 |  				<span class="give-required-indicator">*</span> | 
                                                                                                            
                                                            | 571 |  | -				<span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php _e( 'The date your credit card expires, typically on the front of the card.', 'give' ); ?>"></span> | 
                                                                                                            
                                                            |  | 571 | +				<span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php _e('The date your credit card expires, typically on the front of the card.', 'give'); ?>"></span> | 
                                                                                                            
                                                            | 572 | 572 |  			</label> | 
                                                                                                            
                                                            | 573 | 573 |   | 
                                                                                                            
                                                            | 574 | 574 |  			<input type="hidden" id="card_exp_month-<?php echo $form_id ?>" name="card_exp_month" class="card-expiry-month" /> | 
                                                                                                            
                                                            | 575 | 575 |  			<input type="hidden" id="card_exp_year-<?php echo $form_id ?>" name="card_exp_year" class="card-expiry-year" /> | 
                                                                                                            
                                                            | 576 | 576 |   | 
                                                                                                            
                                                            | 577 |  | -			<input type="tel" autocomplete="off" name="card_expiry" id="card_expiry-<?php echo $form_id ?>" class="card-expiry give-input required" placeholder="<?php _e( 'MM / YY', 'give' ); ?>" required /> | 
                                                                                                            
                                                            |  | 577 | +			<input type="tel" autocomplete="off" name="card_expiry" id="card_expiry-<?php echo $form_id ?>" class="card-expiry give-input required" placeholder="<?php _e('MM / YY', 'give'); ?>" required /> | 
                                                                                                            
                                                            | 578 | 578 |  		</p> | 
                                                                                                            
                                                            | 579 |  | -		<?php do_action( 'give_after_cc_expiration', $form_id ); ?> | 
                                                                                                            
                                                            |  | 579 | +		<?php do_action('give_after_cc_expiration', $form_id); ?> | 
                                                                                                            
                                                            | 580 | 580 |   | 
                                                                                                            
                                                            | 581 | 581 |  	</fieldset> | 
                                                                                                            
                                                            | 582 | 582 |  	<?php | 
                                                                                                            
                                                            | 583 |  | -	do_action( 'give_after_cc_fields', $form_id ); | 
                                                                                                            
                                                            |  | 583 | +	do_action('give_after_cc_fields', $form_id); | 
                                                                                                            
                                                            | 584 | 584 |   | 
                                                                                                            
                                                            | 585 | 585 |  	echo ob_get_clean(); | 
                                                                                                            
                                                            | 586 | 586 |  } | 
                                                                                                            
                                                            | 587 | 587 |   | 
                                                                                                            
                                                            | 588 |  | -add_action( 'give_cc_form', 'give_get_cc_form' ); | 
                                                                                                            
                                                            |  | 588 | +add_action('give_cc_form', 'give_get_cc_form'); | 
                                                                                                            
                                                            | 589 | 589 |   | 
                                                                                                            
                                                            | 590 | 590 |  /** | 
                                                                                                            
                                                            | 591 | 591 |   * Outputs the default credit card address fields | 
                                                                                                                                                        
                                                        |  | @@ -596,110 +596,110 @@  discard block | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 596 | 596 |   * | 
                                                                                                            
                                                            | 597 | 597 |   * @return void | 
                                                                                                            
                                                            | 598 | 598 |   */ | 
                                                                                                            
                                                            | 599 |  | -function give_default_cc_address_fields( $form_id ) { | 
                                                                                                            
                                                            |  | 599 | +function give_default_cc_address_fields($form_id) { | 
                                                                                                            
                                                            | 600 | 600 |   | 
                                                                                                            
                                                            | 601 | 601 |  	$logged_in = is_user_logged_in(); | 
                                                                                                            
                                                            | 602 | 602 |   | 
                                                                                                            
                                                            | 603 |  | -	if ( $logged_in ) { | 
                                                                                                            
                                                            | 604 |  | -		$user_address = get_user_meta( get_current_user_id(), '_give_user_address', true ); | 
                                                                                                            
                                                            |  | 603 | +	if ($logged_in) { | 
                                                                                                            
                                                            |  | 604 | +		$user_address = get_user_meta(get_current_user_id(), '_give_user_address', true); | 
                                                                                                            
                                                            | 605 | 605 |  	} | 
                                                                                                            
                                                            | 606 |  | -	$line1 = $logged_in && ! empty( $user_address['line1'] ) ? $user_address['line1'] : ''; | 
                                                                                                            
                                                            | 607 |  | -	$line2 = $logged_in && ! empty( $user_address['line2'] ) ? $user_address['line2'] : ''; | 
                                                                                                            
                                                            | 608 |  | -	$city  = $logged_in && ! empty( $user_address['city'] ) ? $user_address['city'] : ''; | 
                                                                                                            
                                                            | 609 |  | -	$zip   = $logged_in && ! empty( $user_address['zip'] ) ? $user_address['zip'] : ''; | 
                                                                                                            
                                                            |  | 606 | +	$line1 = $logged_in && ! empty($user_address['line1']) ? $user_address['line1'] : ''; | 
                                                                                                            
                                                            |  | 607 | +	$line2 = $logged_in && ! empty($user_address['line2']) ? $user_address['line2'] : ''; | 
                                                                                                            
                                                            |  | 608 | +	$city  = $logged_in && ! empty($user_address['city']) ? $user_address['city'] : ''; | 
                                                                                                            
                                                            |  | 609 | +	$zip   = $logged_in && ! empty($user_address['zip']) ? $user_address['zip'] : ''; | 
                                                                                                            
                                                            | 610 | 610 |  	ob_start(); ?> | 
                                                                                                            
                                                            | 611 | 611 |  	<fieldset id="give_cc_address" class="cc-address"> | 
                                                                                                            
                                                            | 612 |  | -		<legend><?php echo apply_filters( 'give_billing_details_fieldset_heading', __( 'Billing Details', 'give' )); ?></legend> | 
                                                                                                            
                                                            | 613 |  | -		<?php do_action( 'give_cc_billing_top' ); ?> | 
                                                                                                            
                                                            |  | 612 | +		<legend><?php echo apply_filters('give_billing_details_fieldset_heading', __('Billing Details', 'give')); ?></legend> | 
                                                                                                            
                                                            |  | 613 | +		<?php do_action('give_cc_billing_top'); ?> | 
                                                                                                            
                                                            | 614 | 614 |  		<p id="give-card-address-wrap" class="form-row form-row-two-thirds"> | 
                                                                                                            
                                                            | 615 | 615 |  			<label for="card_address" class="give-label"> | 
                                                                                                            
                                                            | 616 |  | -				<?php _e( 'Address', 'give' ); ?> | 
                                                                                                            
                                                            |  | 616 | +				<?php _e('Address', 'give'); ?> | 
                                                                                                            
                                                            | 617 | 617 |  				<?php | 
                                                                                                            
                                                            | 618 |  | -				if ( give_field_is_required( 'card_address', $form_id ) ) { ?> | 
                                                                                                            
                                                            |  | 618 | +				if (give_field_is_required('card_address', $form_id)) { ?> | 
                                                                                                            
                                                            | 619 | 619 |  					<span class="give-required-indicator">*</span> | 
                                                                                                            
                                                            | 620 | 620 |  				<?php } ?> | 
                                                                                                            
                                                            | 621 |  | -				<span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php _e( 'The primary billing address for your credit card.', 'give' ); ?>"></span> | 
                                                                                                            
                                                            |  | 621 | +				<span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php _e('The primary billing address for your credit card.', 'give'); ?>"></span> | 
                                                                                                            
                                                            | 622 | 622 |  			</label> | 
                                                                                                            
                                                            | 623 | 623 |   | 
                                                                                                            
                                                            | 624 |  | -			<input type="text" id="card_address" name="card_address" class="card-address give-input<?php if ( give_field_is_required( 'card_address', $form_id ) ) { | 
                                                                                                            
                                                            |  | 624 | +			<input type="text" id="card_address" name="card_address" class="card-address give-input<?php if (give_field_is_required('card_address', $form_id)) { | 
                                                                                                            
                                                            | 625 | 625 |  				echo ' required'; | 
                                                                                                            
                                                            | 626 |  | -			} ?>" placeholder="<?php _e( 'Address line 1', 'give' ); ?>" value="<?php echo $line1; ?>"<?php if ( give_field_is_required( 'card_address', $form_id ) ) { | 
                                                                                                            
                                                            |  | 626 | +			} ?>" placeholder="<?php _e('Address line 1', 'give'); ?>" value="<?php echo $line1; ?>"<?php if (give_field_is_required('card_address', $form_id)) { | 
                                                                                                            
                                                            | 627 | 627 |  				echo '  required '; | 
                                                                                                            
                                                            | 628 | 628 |  			} ?>/> | 
                                                                                                            
                                                            | 629 | 629 |  		</p> | 
                                                                                                            
                                                            | 630 | 630 |   | 
                                                                                                            
                                                            | 631 | 631 |  		<p id="give-card-address-2-wrap" class="form-row form-row-one-third"> | 
                                                                                                            
                                                            | 632 | 632 |  			<label for="card_address_2" class="give-label"> | 
                                                                                                            
                                                            | 633 |  | -				<?php _e( 'Address Line 2', 'give' ); ?> | 
                                                                                                            
                                                            | 634 |  | -				<?php if ( give_field_is_required( 'card_address_2', $form_id ) ) { ?> | 
                                                                                                            
                                                            |  | 633 | +				<?php _e('Address Line 2', 'give'); ?> | 
                                                                                                            
                                                            |  | 634 | +				<?php if (give_field_is_required('card_address_2', $form_id)) { ?> | 
                                                                                                            
                                                            | 635 | 635 |  					<span class="give-required-indicator">*</span> | 
                                                                                                            
                                                            | 636 | 636 |  				<?php } ?> | 
                                                                                                            
                                                            | 637 |  | -				<span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php _e( '(optional) The suite, apt no, PO box, etc, associated with your billing address.', 'give' ); ?>"></span> | 
                                                                                                            
                                                            |  | 637 | +				<span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php _e('(optional) The suite, apt no, PO box, etc, associated with your billing address.', 'give'); ?>"></span> | 
                                                                                                            
                                                            | 638 | 638 |  			</label> | 
                                                                                                            
                                                            | 639 | 639 |   | 
                                                                                                            
                                                            | 640 |  | -			<input type="text" id="card_address_2" name="card_address_2" class="card-address-2 give-input<?php if ( give_field_is_required( 'card_address_2', $form_id ) ) { | 
                                                                                                            
                                                            |  | 640 | +			<input type="text" id="card_address_2" name="card_address_2" class="card-address-2 give-input<?php if (give_field_is_required('card_address_2', $form_id)) { | 
                                                                                                            
                                                            | 641 | 641 |  				echo ' required'; | 
                                                                                                            
                                                            | 642 |  | -			} ?>" placeholder="<?php _e( 'Address line 2', 'give' ); ?>" value="<?php echo $line2; ?>"<?php if ( give_field_is_required( 'card_address_2', $form_id ) ) { | 
                                                                                                            
                                                            |  | 642 | +			} ?>" placeholder="<?php _e('Address line 2', 'give'); ?>" value="<?php echo $line2; ?>"<?php if (give_field_is_required('card_address_2', $form_id)) { | 
                                                                                                            
                                                            | 643 | 643 |  				echo ' required '; | 
                                                                                                            
                                                            | 644 | 644 |  			} ?>/> | 
                                                                                                            
                                                            | 645 | 645 |  		</p> | 
                                                                                                            
                                                            | 646 | 646 |   | 
                                                                                                            
                                                            | 647 | 647 |  		<p id="give-card-city-wrap" class="form-row form-row-two-thirds"> | 
                                                                                                            
                                                            | 648 | 648 |  			<label for="card_city" class="give-label"> | 
                                                                                                            
                                                            | 649 |  | -				<?php _e( 'City', 'give' ); ?> | 
                                                                                                            
                                                            | 650 |  | -				<?php if ( give_field_is_required( 'card_city', $form_id ) ) { ?> | 
                                                                                                            
                                                            |  | 649 | +				<?php _e('City', 'give'); ?> | 
                                                                                                            
                                                            |  | 650 | +				<?php if (give_field_is_required('card_city', $form_id)) { ?> | 
                                                                                                            
                                                            | 651 | 651 |  					<span class="give-required-indicator">*</span> | 
                                                                                                            
                                                            | 652 | 652 |  				<?php } ?> | 
                                                                                                            
                                                            | 653 |  | -				<span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php _e( 'The city for your billing address.', 'give' ); ?>"></span> | 
                                                                                                            
                                                            |  | 653 | +				<span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php _e('The city for your billing address.', 'give'); ?>"></span> | 
                                                                                                            
                                                            | 654 | 654 |  			</label> | 
                                                                                                            
                                                            | 655 |  | -			<input type="text" id="card_city" name="card_city" class="card-city give-input<?php if ( give_field_is_required( 'card_city', $form_id ) ) { | 
                                                                                                            
                                                            |  | 655 | +			<input type="text" id="card_city" name="card_city" class="card-city give-input<?php if (give_field_is_required('card_city', $form_id)) { | 
                                                                                                            
                                                            | 656 | 656 |  				echo ' required'; | 
                                                                                                            
                                                            | 657 |  | -			} ?>" placeholder="<?php _e( 'City', 'give' ); ?>" value="<?php echo $city; ?>"<?php if ( give_field_is_required( 'card_city', $form_id ) ) { | 
                                                                                                            
                                                            |  | 657 | +			} ?>" placeholder="<?php _e('City', 'give'); ?>" value="<?php echo $city; ?>"<?php if (give_field_is_required('card_city', $form_id)) { | 
                                                                                                            
                                                            | 658 | 658 |  				echo ' required '; | 
                                                                                                            
                                                            | 659 | 659 |  			} ?>/> | 
                                                                                                            
                                                            | 660 | 660 |  		</p> | 
                                                                                                            
                                                            | 661 | 661 |   | 
                                                                                                            
                                                            | 662 | 662 |  		<p id="give-card-zip-wrap" class="form-row form-row-one-third"> | 
                                                                                                            
                                                            | 663 | 663 |  			<label for="card_zip" class="give-label"> | 
                                                                                                            
                                                            | 664 |  | -				<?php _e( 'Zip / Postal Code', 'give' ); ?> | 
                                                                                                            
                                                            | 665 |  | -				<?php if ( give_field_is_required( 'card_zip', $form_id ) ) { ?> | 
                                                                                                            
                                                            |  | 664 | +				<?php _e('Zip / Postal Code', 'give'); ?> | 
                                                                                                            
                                                            |  | 665 | +				<?php if (give_field_is_required('card_zip', $form_id)) { ?> | 
                                                                                                            
                                                            | 666 | 666 |  					<span class="give-required-indicator">*</span> | 
                                                                                                            
                                                            | 667 | 667 |  				<?php } ?> | 
                                                                                                            
                                                            | 668 |  | -				<span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php _e( 'The zip or postal code for your billing address.', 'give' ); ?>"></span> | 
                                                                                                            
                                                            |  | 668 | +				<span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php _e('The zip or postal code for your billing address.', 'give'); ?>"></span> | 
                                                                                                            
                                                            | 669 | 669 |  			</label> | 
                                                                                                            
                                                            | 670 | 670 |   | 
                                                                                                            
                                                            | 671 |  | -			<input type="text" size="4" id="card_zip" name="card_zip" class="card-zip give-input<?php if ( give_field_is_required( 'card_zip', $form_id ) ) { | 
                                                                                                            
                                                            |  | 671 | +			<input type="text" size="4" id="card_zip" name="card_zip" class="card-zip give-input<?php if (give_field_is_required('card_zip', $form_id)) { | 
                                                                                                            
                                                            | 672 | 672 |  				echo ' required'; | 
                                                                                                            
                                                            | 673 |  | -			} ?>" placeholder="<?php _e( 'Zip / Postal code', 'give' ); ?>" value="<?php echo $zip; ?>" <?php if ( give_field_is_required( 'card_zip', $form_id ) ) { | 
                                                                                                            
                                                            |  | 673 | +			} ?>" placeholder="<?php _e('Zip / Postal code', 'give'); ?>" value="<?php echo $zip; ?>" <?php if (give_field_is_required('card_zip', $form_id)) { | 
                                                                                                            
                                                            | 674 | 674 |  				echo ' required '; | 
                                                                                                            
                                                            | 675 | 675 |  			} ?>/> | 
                                                                                                            
                                                            | 676 | 676 |  		</p> | 
                                                                                                            
                                                            | 677 | 677 |   | 
                                                                                                            
                                                            | 678 | 678 |  		<p id="give-card-country-wrap" class="form-row form-row-first"> | 
                                                                                                            
                                                            | 679 | 679 |  			<label for="billing_country" class="give-label"> | 
                                                                                                            
                                                            | 680 |  | -				<?php _e( 'Country', 'give' ); ?> | 
                                                                                                            
                                                            | 681 |  | -				<?php if ( give_field_is_required( 'billing_country', $form_id ) ) { ?> | 
                                                                                                            
                                                            |  | 680 | +				<?php _e('Country', 'give'); ?> | 
                                                                                                            
                                                            |  | 681 | +				<?php if (give_field_is_required('billing_country', $form_id)) { ?> | 
                                                                                                            
                                                            | 682 | 682 |  					<span class="give-required-indicator">*</span> | 
                                                                                                            
                                                            | 683 | 683 |  				<?php } ?> | 
                                                                                                            
                                                            | 684 |  | -				<span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php _e( 'The country for your billing address.', 'give' ); ?>"></span> | 
                                                                                                            
                                                            |  | 684 | +				<span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php _e('The country for your billing address.', 'give'); ?>"></span> | 
                                                                                                            
                                                            | 685 | 685 |  			</label> | 
                                                                                                            
                                                            | 686 | 686 |   | 
                                                                                                            
                                                            | 687 |  | -			<select name="billing_country" id="billing_country" class="billing-country billing_country give-select<?php if ( give_field_is_required( 'billing_country', $form_id ) ) { | 
                                                                                                            
                                                            |  | 687 | +			<select name="billing_country" id="billing_country" class="billing-country billing_country give-select<?php if (give_field_is_required('billing_country', $form_id)) { | 
                                                                                                            
                                                            | 688 | 688 |  				echo ' required'; | 
                                                                                                            
                                                            | 689 |  | -			} ?>"<?php if ( give_field_is_required( 'billing_country', $form_id ) ) { | 
                                                                                                            
                                                            |  | 689 | +			} ?>"<?php if (give_field_is_required('billing_country', $form_id)) { | 
                                                                                                            
                                                            | 690 | 690 |  				echo ' required '; | 
                                                                                                            
                                                            | 691 | 691 |  			} ?>> | 
                                                                                                            
                                                            | 692 | 692 |  				<?php | 
                                                                                                            
                                                            | 693 | 693 |   | 
                                                                                                            
                                                            | 694 | 694 |  				$selected_country = give_get_country(); | 
                                                                                                            
                                                            | 695 | 695 |   | 
                                                                                                            
                                                            | 696 |  | -				if ( $logged_in && ! empty( $user_address['country'] ) && '*' !== $user_address['country'] ) { | 
                                                                                                            
                                                            |  | 696 | +				if ($logged_in && ! empty($user_address['country']) && '*' !== $user_address['country']) { | 
                                                                                                            
                                                            | 697 | 697 |  					$selected_country = $user_address['country']; | 
                                                                                                            
                                                            | 698 | 698 |  				} | 
                                                                                                            
                                                            | 699 | 699 |   | 
                                                                                                            
                                                            | 700 | 700 |  				$countries = give_get_country_list(); | 
                                                                                                            
                                                            | 701 |  | -				foreach ( $countries as $country_code => $country ) { | 
                                                                                                            
                                                            | 702 |  | -					echo '<option value="' . esc_attr( $country_code ) . '"' . selected( $country_code, $selected_country, false ) . '>' . $country . '</option>'; | 
                                                                                                            
                                                            |  | 701 | +				foreach ($countries as $country_code => $country) { | 
                                                                                                            
                                                            |  | 702 | +					echo '<option value="'.esc_attr($country_code).'"'.selected($country_code, $selected_country, false).'>'.$country.'</option>'; | 
                                                                                                            
                                                            | 703 | 703 |  				} | 
                                                                                                            
                                                            | 704 | 704 |  				?> | 
                                                                                                            
                                                            | 705 | 705 |  			</select> | 
                                                                                                                                                        
                                                        |  | @@ -707,44 +707,44 @@  discard block | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 707 | 707 |   | 
                                                                                                            
                                                            | 708 | 708 |  		<p id="give-card-state-wrap" class="form-row form-row-last"> | 
                                                                                                            
                                                            | 709 | 709 |  			<label for="card_state" class="give-label"> | 
                                                                                                            
                                                            | 710 |  | -				<?php _e( 'State / Province', 'give' ); ?> | 
                                                                                                            
                                                            | 711 |  | -				<?php if ( give_field_is_required( 'card_state', $form_id ) ) { ?> | 
                                                                                                            
                                                            |  | 710 | +				<?php _e('State / Province', 'give'); ?> | 
                                                                                                            
                                                            |  | 711 | +				<?php if (give_field_is_required('card_state', $form_id)) { ?> | 
                                                                                                            
                                                            | 712 | 712 |  					<span class="give-required-indicator">*</span> | 
                                                                                                            
                                                            | 713 | 713 |  				<?php } ?> | 
                                                                                                            
                                                            | 714 |  | -				<span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php _e( 'The state or province for your billing address.', 'give' ); ?>"></span> | 
                                                                                                            
                                                            |  | 714 | +				<span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php _e('The state or province for your billing address.', 'give'); ?>"></span> | 
                                                                                                            
                                                            | 715 | 715 |  			</label> | 
                                                                                                            
                                                            | 716 | 716 |   | 
                                                                                                            
                                                            | 717 | 717 |  			<?php | 
                                                                                                            
                                                            | 718 | 718 |  			$selected_state = give_get_state(); | 
                                                                                                            
                                                            | 719 |  | -			$states         = give_get_states( $selected_country ); | 
                                                                                                            
                                                            |  | 719 | +			$states         = give_get_states($selected_country); | 
                                                                                                            
                                                            | 720 | 720 |   | 
                                                                                                            
                                                            | 721 |  | -			if ( $logged_in && ! empty( $user_address['state'] ) ) { | 
                                                                                                            
                                                            |  | 721 | +			if ($logged_in && ! empty($user_address['state'])) { | 
                                                                                                            
                                                            | 722 | 722 |  				$selected_state = $user_address['state']; | 
                                                                                                            
                                                            | 723 | 723 |  			} | 
                                                                                                            
                                                            | 724 | 724 |   | 
                                                                                                            
                                                            | 725 |  | -			if ( ! empty( $states ) ) : ?> | 
                                                                                                            
                                                            | 726 |  | -				<select name="card_state" id="card_state" class="card_state give-select<?php if ( give_field_is_required( 'card_state', $form_id ) ) { | 
                                                                                                            
                                                            |  | 725 | +			if ( ! empty($states)) : ?> | 
                                                                                                            
                                                            |  | 726 | +				<select name="card_state" id="card_state" class="card_state give-select<?php if (give_field_is_required('card_state', $form_id)) { | 
                                                                                                            
                                                            | 727 | 727 |  					echo ' required'; | 
                                                                                                            
                                                            | 728 |  | -				} ?>"<?php if ( give_field_is_required( 'card_state', $form_id ) ) { | 
                                                                                                            
                                                            |  | 728 | +				} ?>"<?php if (give_field_is_required('card_state', $form_id)) { | 
                                                                                                            
                                                            | 729 | 729 |  					echo ' required '; | 
                                                                                                            
                                                            | 730 | 730 |  				} ?>> | 
                                                                                                            
                                                            | 731 | 731 |  					<?php | 
                                                                                                            
                                                            | 732 |  | -					foreach ( $states as $state_code => $state ) { | 
                                                                                                            
                                                            | 733 |  | -						echo '<option value="' . $state_code . '"' . selected( $state_code, $selected_state, false ) . '>' . $state . '</option>'; | 
                                                                                                            
                                                            |  | 732 | +					foreach ($states as $state_code => $state) { | 
                                                                                                            
                                                            |  | 733 | +						echo '<option value="'.$state_code.'"'.selected($state_code, $selected_state, false).'>'.$state.'</option>'; | 
                                                                                                            
                                                            | 734 | 734 |  					} | 
                                                                                                            
                                                            | 735 | 735 |  					?> | 
                                                                                                            
                                                            | 736 | 736 |  				</select> | 
                                                                                                            
                                                            | 737 | 737 |  			<?php else : ?> | 
                                                                                                            
                                                            | 738 |  | -				<input type="text" size="6" name="card_state" id="card_state" class="card_state give-input" placeholder="<?php _e( 'State / Province', 'give' ); ?>" /> | 
                                                                                                            
                                                            |  | 738 | +				<input type="text" size="6" name="card_state" id="card_state" class="card_state give-input" placeholder="<?php _e('State / Province', 'give'); ?>" /> | 
                                                                                                            
                                                            | 739 | 739 |  			<?php endif; ?> | 
                                                                                                            
                                                            | 740 | 740 |  		</p> | 
                                                                                                            
                                                            | 741 |  | -		<?php do_action( 'give_cc_billing_bottom' ); ?> | 
                                                                                                            
                                                            |  | 741 | +		<?php do_action('give_cc_billing_bottom'); ?> | 
                                                                                                            
                                                            | 742 | 742 |  	</fieldset> | 
                                                                                                            
                                                            | 743 | 743 |  	<?php | 
                                                                                                            
                                                            | 744 | 744 |  	echo ob_get_clean(); | 
                                                                                                            
                                                            | 745 | 745 |  } | 
                                                                                                            
                                                            | 746 | 746 |   | 
                                                                                                            
                                                            | 747 |  | -add_action( 'give_after_cc_fields', 'give_default_cc_address_fields' ); | 
                                                                                                            
                                                            |  | 747 | +add_action('give_after_cc_fields', 'give_default_cc_address_fields'); | 
                                                                                                            
                                                            | 748 | 748 |   | 
                                                                                                            
                                                            | 749 | 749 |   | 
                                                                                                            
                                                            | 750 | 750 |  /** | 
                                                                                                                                                        
                                                        |  | @@ -756,94 +756,94 @@  discard block | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 756 | 756 |   * | 
                                                                                                            
                                                            | 757 | 757 |   * @return string | 
                                                                                                            
                                                            | 758 | 758 |   */ | 
                                                                                                            
                                                            | 759 |  | -function give_get_register_fields( $form_id ) { | 
                                                                                                            
                                                            |  | 759 | +function give_get_register_fields($form_id) { | 
                                                                                                            
                                                            | 760 | 760 |   | 
                                                                                                            
                                                            | 761 | 761 |  	global $give_options; | 
                                                                                                            
                                                            | 762 | 762 |  	global $user_ID; | 
                                                                                                            
                                                            | 763 | 763 |   | 
                                                                                                            
                                                            | 764 |  | -	if ( is_user_logged_in() ) { | 
                                                                                                            
                                                            | 765 |  | -		$user_data = get_userdata( $user_ID ); | 
                                                                                                            
                                                            |  | 764 | +	if (is_user_logged_in()) { | 
                                                                                                            
                                                            |  | 765 | +		$user_data = get_userdata($user_ID); | 
                                                                                                            
                                                            | 766 | 766 |  	} | 
                                                                                                            
                                                            | 767 | 767 |   | 
                                                                                                            
                                                            | 768 |  | -	$show_register_form = apply_filters( 'give_show_register_form', get_post_meta( $form_id, '_give_show_register_form', true ) ); | 
                                                                                                            
                                                            |  | 768 | +	$show_register_form = apply_filters('give_show_register_form', get_post_meta($form_id, '_give_show_register_form', true)); | 
                                                                                                            
                                                            | 769 | 769 |   | 
                                                                                                            
                                                            | 770 | 770 |  	ob_start(); ?> | 
                                                                                                            
                                                            | 771 | 771 |  	<fieldset id="give-register-fields-<?php echo $form_id; ?>"> | 
                                                                                                            
                                                            | 772 | 772 |   | 
                                                                                                            
                                                            | 773 |  | -		<?php if ( $show_register_form == 'both' ) { ?> | 
                                                                                                            
                                                            |  | 773 | +		<?php if ($show_register_form == 'both') { ?> | 
                                                                                                            
                                                            | 774 | 774 |  			<div class="give-login-account-wrap"> | 
                                                                                                            
                                                            | 775 |  | -				<p class="give-login-message"><?php _e( 'Already have an account?', 'give' ); ?>  | 
                                                                                                            
                                                            | 776 |  | -					<a href="<?php echo esc_url( add_query_arg( 'login', 1 ) ); ?>" class="give-checkout-register-login" data-action="give_checkout_login"><?php _e( 'Login', 'give' ); ?></a> | 
                                                                                                            
                                                            |  | 775 | +				<p class="give-login-message"><?php _e('Already have an account?', 'give'); ?>  | 
                                                                                                            
                                                            |  | 776 | +					<a href="<?php echo esc_url(add_query_arg('login', 1)); ?>" class="give-checkout-register-login" data-action="give_checkout_login"><?php _e('Login', 'give'); ?></a> | 
                                                                                                            
                                                            | 777 | 777 |  				</p> | 
                                                                                                            
                                                            | 778 | 778 |  				<p class="give-loading-text"> | 
                                                                                                            
                                                            | 779 |  | -					<span class="give-loading-animation"></span> <?php _e( 'Loading...', 'give' ); ?></p> | 
                                                                                                            
                                                            |  | 779 | +					<span class="give-loading-animation"></span> <?php _e('Loading...', 'give'); ?></p> | 
                                                                                                            
                                                            | 780 | 780 |  			</div> | 
                                                                                                            
                                                            | 781 | 781 |  		<?php } ?> | 
                                                                                                            
                                                            | 782 | 782 |   | 
                                                                                                            
                                                            | 783 |  | -		<?php do_action( 'give_register_fields_before' ); ?> | 
                                                                                                            
                                                            |  | 783 | +		<?php do_action('give_register_fields_before'); ?> | 
                                                                                                            
                                                            | 784 | 784 |   | 
                                                                                                            
                                                            | 785 | 785 |  		<fieldset id="give-register-account-fields-<?php echo $form_id; ?>"> | 
                                                                                                            
                                                            | 786 |  | -			<legend><?php echo apply_filters( 'give_create_account_fieldset_heading', __('Create an account', 'give' )); | 
                                                                                                            
                                                            | 787 |  | -				if ( ! give_no_guest_checkout( $form_id ) ) { | 
                                                                                                            
                                                            | 788 |  | -					echo ' <span class="sub-text">' . __( '(optional)', 'give' ) . '</span>'; | 
                                                                                                            
                                                            |  | 786 | +			<legend><?php echo apply_filters('give_create_account_fieldset_heading', __('Create an account', 'give')); | 
                                                                                                            
                                                            |  | 787 | +				if ( ! give_no_guest_checkout($form_id)) { | 
                                                                                                            
                                                            |  | 788 | +					echo ' <span class="sub-text">'.__('(optional)', 'give').'</span>'; | 
                                                                                                            
                                                            | 789 | 789 |  				} ?></legend> | 
                                                                                                            
                                                            | 790 |  | -			<?php do_action( 'give_register_account_fields_before' ); ?> | 
                                                                                                            
                                                            |  | 790 | +			<?php do_action('give_register_account_fields_before'); ?> | 
                                                                                                            
                                                            | 791 | 791 |  			<p id="give-user-login-wrap-<?php echo $form_id; ?>" class="form-row form-row-one-third form-row-first"> | 
                                                                                                            
                                                            | 792 | 792 |  				<label for="give-user-login-<?php echo $form_id; ?>"> | 
                                                                                                            
                                                            | 793 |  | -					<?php _e( 'Username', 'give' ); ?> | 
                                                                                                            
                                                            | 794 |  | -					<?php if ( give_no_guest_checkout( $form_id ) ) { ?> | 
                                                                                                            
                                                            |  | 793 | +					<?php _e('Username', 'give'); ?> | 
                                                                                                            
                                                            |  | 794 | +					<?php if (give_no_guest_checkout($form_id)) { ?> | 
                                                                                                            
                                                            | 795 | 795 |  						<span class="give-required-indicator">*</span> | 
                                                                                                            
                                                            | 796 | 796 |  					<?php } ?> | 
                                                                                                            
                                                            | 797 |  | -					<span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php _e( 'The username you will use to log into your account.', 'give' ); ?>"></span> | 
                                                                                                            
                                                            |  | 797 | +					<span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php _e('The username you will use to log into your account.', 'give'); ?>"></span> | 
                                                                                                            
                                                            | 798 | 798 |  				</label> | 
                                                                                                            
                                                            | 799 | 799 |   | 
                                                                                                            
                                                            | 800 |  | -				<input name="give_user_login" id="give-user-login-<?php echo $form_id; ?>" class="<?php if ( give_no_guest_checkout( $form_id ) ) { | 
                                                                                                            
                                                            |  | 800 | +				<input name="give_user_login" id="give-user-login-<?php echo $form_id; ?>" class="<?php if (give_no_guest_checkout($form_id)) { | 
                                                                                                            
                                                            | 801 | 801 |  					echo 'required '; | 
                                                                                                            
                                                            | 802 |  | -				} ?>give-input" type="text" placeholder="<?php _e( 'Username', 'give' ); ?>" title="<?php _e( 'Username', 'give' ); ?>" /> | 
                                                                                                            
                                                            |  | 802 | +				} ?>give-input" type="text" placeholder="<?php _e('Username', 'give'); ?>" title="<?php _e('Username', 'give'); ?>" /> | 
                                                                                                            
                                                            | 803 | 803 |  			</p> | 
                                                                                                            
                                                            | 804 | 804 |   | 
                                                                                                            
                                                            | 805 | 805 |  			<p id="give-user-pass-wrap-<?php echo $form_id; ?>" class="form-row form-row-one-third"> | 
                                                                                                            
                                                            | 806 | 806 |  				<label for="give-user-pass-<?php echo $form_id; ?>"> | 
                                                                                                            
                                                            | 807 |  | -					<?php _e( 'Password', 'give' ); ?> | 
                                                                                                            
                                                            | 808 |  | -					<?php if ( give_no_guest_checkout( $form_id ) ) { ?> | 
                                                                                                            
                                                            |  | 807 | +					<?php _e('Password', 'give'); ?> | 
                                                                                                            
                                                            |  | 808 | +					<?php if (give_no_guest_checkout($form_id)) { ?> | 
                                                                                                            
                                                            | 809 | 809 |  						<span class="give-required-indicator">*</span> | 
                                                                                                            
                                                            | 810 | 810 |  					<?php } ?> | 
                                                                                                            
                                                            | 811 |  | -					<span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php _e( 'The password used to access your account.', 'give' ); ?>"></span> | 
                                                                                                            
                                                            |  | 811 | +					<span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php _e('The password used to access your account.', 'give'); ?>"></span> | 
                                                                                                            
                                                            | 812 | 812 |  				</label> | 
                                                                                                            
                                                            | 813 | 813 |   | 
                                                                                                            
                                                            | 814 |  | -				<input name="give_user_pass" id="give-user-pass-<?php echo $form_id; ?>" class="<?php if ( give_no_guest_checkout( $form_id ) ) { | 
                                                                                                            
                                                            |  | 814 | +				<input name="give_user_pass" id="give-user-pass-<?php echo $form_id; ?>" class="<?php if (give_no_guest_checkout($form_id)) { | 
                                                                                                            
                                                            | 815 | 815 |  					echo 'required '; | 
                                                                                                            
                                                            | 816 |  | -				} ?>give-input" placeholder="<?php _e( 'Password', 'give' ); ?>" type="password" /> | 
                                                                                                            
                                                            |  | 816 | +				} ?>give-input" placeholder="<?php _e('Password', 'give'); ?>" type="password" /> | 
                                                                                                            
                                                            | 817 | 817 |  			</p> | 
                                                                                                            
                                                            | 818 | 818 |   | 
                                                                                                            
                                                            | 819 | 819 |  			<p id="give-user-pass-confirm-wrap-<?php echo $form_id; ?>" class="give-register-password form-row form-row-one-third"> | 
                                                                                                            
                                                            | 820 | 820 |  				<label for="give-user-pass-confirm-<?php echo $form_id; ?>"> | 
                                                                                                            
                                                            | 821 |  | -					<?php _e( 'Confirm Password', 'give' ); ?> | 
                                                                                                            
                                                            | 822 |  | -					<?php if ( give_no_guest_checkout( $form_id ) ) { ?> | 
                                                                                                            
                                                            |  | 821 | +					<?php _e('Confirm Password', 'give'); ?> | 
                                                                                                            
                                                            |  | 822 | +					<?php if (give_no_guest_checkout($form_id)) { ?> | 
                                                                                                            
                                                            | 823 | 823 |  						<span class="give-required-indicator">*</span> | 
                                                                                                            
                                                            | 824 | 824 |  					<?php } ?> | 
                                                                                                            
                                                            | 825 |  | -					<span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php _e( 'Please retype your password to confirm.', 'give' ); ?>"></span> | 
                                                                                                            
                                                            |  | 825 | +					<span class="give-tooltip give-icon give-icon-question" data-tooltip="<?php _e('Please retype your password to confirm.', 'give'); ?>"></span> | 
                                                                                                            
                                                            | 826 | 826 |  				</label> | 
                                                                                                            
                                                            | 827 | 827 |   | 
                                                                                                            
                                                            | 828 |  | -				<input name="give_user_pass_confirm" id="give-user-pass-confirm-<?php echo $form_id; ?>" class="<?php if ( give_no_guest_checkout( $form_id ) ) { | 
                                                                                                            
                                                            |  | 828 | +				<input name="give_user_pass_confirm" id="give-user-pass-confirm-<?php echo $form_id; ?>" class="<?php if (give_no_guest_checkout($form_id)) { | 
                                                                                                            
                                                            | 829 | 829 |  					echo 'required '; | 
                                                                                                            
                                                            | 830 |  | -				} ?>give-input" placeholder="<?php _e( 'Confirm password', 'give' ); ?>" type="password" /> | 
                                                                                                            
                                                            |  | 830 | +				} ?>give-input" placeholder="<?php _e('Confirm password', 'give'); ?>" type="password" /> | 
                                                                                                            
                                                            | 831 | 831 |  			</p> | 
                                                                                                            
                                                            | 832 |  | -			<?php do_action( 'give_register_account_fields_after', $form_id ); ?> | 
                                                                                                            
                                                            |  | 832 | +			<?php do_action('give_register_account_fields_after', $form_id); ?> | 
                                                                                                            
                                                            | 833 | 833 |  		</fieldset> | 
                                                                                                            
                                                            | 834 | 834 |   | 
                                                                                                            
                                                            | 835 |  | -		<?php do_action( 'give_register_fields_after', $form_id ); ?> | 
                                                                                                            
                                                            |  | 835 | +		<?php do_action('give_register_fields_after', $form_id); ?> | 
                                                                                                            
                                                            | 836 | 836 |   | 
                                                                                                            
                                                            | 837 | 837 |  		<input type="hidden" name="give-purchase-var" value="needs-to-register" /> | 
                                                                                                            
                                                            | 838 | 838 |   | 
                                                                                                            
                                                            | 839 |  | -		<?php do_action( 'give_purchase_form_user_info', $form_id ); ?> | 
                                                                                                            
                                                            |  | 839 | +		<?php do_action('give_purchase_form_user_info', $form_id); ?> | 
                                                                                                            
                                                            | 840 | 840 |   | 
                                                                                                            
                                                            | 841 | 841 |  	</fieldset> | 
                                                                                                            
                                                            | 842 | 842 |  	<?php | 
                                                                                                            
                                                            | 843 | 843 |  	echo ob_get_clean(); | 
                                                                                                            
                                                            | 844 | 844 |  } | 
                                                                                                            
                                                            | 845 | 845 |   | 
                                                                                                            
                                                            | 846 |  | -add_action( 'give_purchase_form_register_fields', 'give_get_register_fields' ); | 
                                                                                                            
                                                            |  | 846 | +add_action('give_purchase_form_register_fields', 'give_get_register_fields'); | 
                                                                                                            
                                                            | 847 | 847 |   | 
                                                                                                            
                                                            | 848 | 848 |  /** | 
                                                                                                            
                                                            | 849 | 849 |   * Gets the login fields for the login form on the checkout. This function hooks | 
                                                                                                                                                        
                                                        |  | @@ -856,75 +856,75 @@  discard block | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 856 | 856 |   * | 
                                                                                                            
                                                            | 857 | 857 |   * @return string | 
                                                                                                            
                                                            | 858 | 858 |   */ | 
                                                                                                            
                                                            | 859 |  | -function give_get_login_fields( $form_id ) { | 
                                                                                                            
                                                            |  | 859 | +function give_get_login_fields($form_id) { | 
                                                                                                            
                                                            | 860 | 860 |   | 
                                                                                                            
                                                            | 861 | 861 |  	global $give_options; | 
                                                                                                            
                                                            | 862 | 862 |   | 
                                                                                                            
                                                            | 863 |  | -	$form_id = isset($_POST['form_id'])  ? $_POST['form_id'] : $form_id; | 
                                                                                                            
                                                            | 864 |  | -	$show_register_form = apply_filters( 'give_show_register_form', get_post_meta( $form_id, '_give_show_register_form', true ) ); | 
                                                                                                            
                                                            |  | 863 | +	$form_id = isset($_POST['form_id']) ? $_POST['form_id'] : $form_id; | 
                                                                                                            
                                                            |  | 864 | +	$show_register_form = apply_filters('give_show_register_form', get_post_meta($form_id, '_give_show_register_form', true)); | 
                                                                                                            
                                                            | 865 | 865 |   | 
                                                                                                            
                                                            | 866 | 866 |  	ob_start(); | 
                                                                                                            
                                                            | 867 | 867 |  	?> | 
                                                                                                            
                                                            | 868 | 868 |  	<fieldset id="give-login-fields-<?php echo $form_id; ?>"> | 
                                                                                                            
                                                            | 869 |  | -		<legend><?php echo apply_filters( 'give_account_login_fieldset_heading', __( 'Login to Your Account', 'give' )); | 
                                                                                                            
                                                            | 870 |  | -			if ( ! give_no_guest_checkout( $form_id ) ) { | 
                                                                                                            
                                                            | 871 |  | -				echo ' <span class="sub-text">' . __( '(optional)', 'give' ) . '</span>'; | 
                                                                                                            
                                                            |  | 869 | +		<legend><?php echo apply_filters('give_account_login_fieldset_heading', __('Login to Your Account', 'give')); | 
                                                                                                            
                                                            |  | 870 | +			if ( ! give_no_guest_checkout($form_id)) { | 
                                                                                                            
                                                            |  | 871 | +				echo ' <span class="sub-text">'.__('(optional)', 'give').'</span>'; | 
                                                                                                            
                                                            | 872 | 872 |  			} ?> | 
                                                                                                            
                                                            | 873 | 873 |  		</legend> | 
                                                                                                            
                                                            | 874 |  | -        <?php if ( $show_register_form == 'both' ) { ?> | 
                                                                                                            
                                                            |  | 874 | +        <?php if ($show_register_form == 'both') { ?> | 
                                                                                                            
                                                            | 875 | 875 |  			<p class="give-new-account-link"> | 
                                                                                                            
                                                            | 876 |  | -				<?php _e( 'Need to create an account?', 'give' ); ?>  | 
                                                                                                            
                                                            | 877 |  | -				<a href="<?php echo remove_query_arg( 'login' ); ?>" class="give-checkout-register-login" data-action="give_checkout_register"> | 
                                                                                                            
                                                            | 878 |  | -					<?php _e( 'Register', 'give' ); | 
                                                                                                            
                                                            | 879 |  | -					if ( ! give_no_guest_checkout( $form_id ) ) { | 
                                                                                                            
                                                            | 880 |  | -						echo ' ' . __( 'or checkout as a guest.', 'give' ); | 
                                                                                                            
                                                            |  | 876 | +				<?php _e('Need to create an account?', 'give'); ?>  | 
                                                                                                            
                                                            |  | 877 | +				<a href="<?php echo remove_query_arg('login'); ?>" class="give-checkout-register-login" data-action="give_checkout_register"> | 
                                                                                                            
                                                            |  | 878 | +					<?php _e('Register', 'give'); | 
                                                                                                            
                                                            |  | 879 | +					if ( ! give_no_guest_checkout($form_id)) { | 
                                                                                                            
                                                            |  | 880 | +						echo ' '.__('or checkout as a guest.', 'give'); | 
                                                                                                            
                                                            | 881 | 881 |  					} ?> | 
                                                                                                            
                                                            | 882 | 882 |  				</a> | 
                                                                                                            
                                                            | 883 | 883 |  			</p> | 
                                                                                                            
                                                            | 884 | 884 |              <p class="give-loading-text"> | 
                                                                                                            
                                                            | 885 |  | -                <span class="give-loading-animation"></span> <?php _e( 'Loading...', 'give' ); ?></p> | 
                                                                                                            
                                                            |  | 885 | +                <span class="give-loading-animation"></span> <?php _e('Loading...', 'give'); ?></p> | 
                                                                                                            
                                                            | 886 | 886 |  		<?php } ?> | 
                                                                                                            
                                                            | 887 |  | -		<?php do_action( 'give_checkout_login_fields_before', $form_id ); ?> | 
                                                                                                            
                                                            |  | 887 | +		<?php do_action('give_checkout_login_fields_before', $form_id); ?> | 
                                                                                                            
                                                            | 888 | 888 |  		<p id="give-user-login-wrap-<?php echo $form_id; ?>" class="form-row form-row-first"> | 
                                                                                                            
                                                            | 889 | 889 |  			<label class="give-label" for="give-user-login-<?php echo $form_id; ?>"> | 
                                                                                                            
                                                            | 890 |  | -				<?php _e( 'Username', 'give' ); ?> | 
                                                                                                            
                                                            | 891 |  | -				<?php if( give_no_guest_checkout($form_id) ) { ?> | 
                                                                                                            
                                                            |  | 890 | +				<?php _e('Username', 'give'); ?> | 
                                                                                                            
                                                            |  | 891 | +				<?php if (give_no_guest_checkout($form_id)) { ?> | 
                                                                                                            
                                                            | 892 | 892 |  					<span class="give-required-indicator">*</span> | 
                                                                                                            
                                                            | 893 | 893 |  				<?php } ?> | 
                                                                                                            
                                                            | 894 | 894 |  			</label> | 
                                                                                                            
                                                            | 895 | 895 |   | 
                                                                                                            
                                                            | 896 |  | -			<input class="<?php if ( give_no_guest_checkout( $form_id ) ) { | 
                                                                                                            
                                                            |  | 896 | +			<input class="<?php if (give_no_guest_checkout($form_id)) { | 
                                                                                                            
                                                            | 897 | 897 |  				echo 'required '; | 
                                                                                                            
                                                            | 898 |  | -			} ?>give-input" type="text" name="give_user_login" id="give-user-login-<?php echo $form_id; ?>" value="" placeholder="<?php _e( 'Your username', 'give' ); ?>" /> | 
                                                                                                            
                                                            |  | 898 | +			} ?>give-input" type="text" name="give_user_login" id="give-user-login-<?php echo $form_id; ?>" value="" placeholder="<?php _e('Your username', 'give'); ?>" /> | 
                                                                                                            
                                                            | 899 | 899 |  		</p> | 
                                                                                                            
                                                            | 900 | 900 |   | 
                                                                                                            
                                                            | 901 | 901 |  		<p id="give-user-pass-wrap-<?php echo $form_id; ?>" class="give_login_password form-row form-row-last"> | 
                                                                                                            
                                                            | 902 | 902 |  			<label class="give-label" for="give-user-pass-<?php echo $form_id; ?>"> | 
                                                                                                            
                                                            | 903 |  | -				<?php _e( 'Password', 'give' ); ?> | 
                                                                                                            
                                                            | 904 |  | -				<?php if( give_no_guest_checkout($form_id) ) { ?> | 
                                                                                                            
                                                            |  | 903 | +				<?php _e('Password', 'give'); ?> | 
                                                                                                            
                                                            |  | 904 | +				<?php if (give_no_guest_checkout($form_id)) { ?> | 
                                                                                                            
                                                            | 905 | 905 |  					<span class="give-required-indicator">*</span> | 
                                                                                                            
                                                            | 906 | 906 |  				<?php } ?> | 
                                                                                                            
                                                            | 907 | 907 |  			</label> | 
                                                                                                            
                                                            | 908 |  | -			<input class="<?php if ( give_no_guest_checkout( $form_id ) ) { | 
                                                                                                            
                                                            |  | 908 | +			<input class="<?php if (give_no_guest_checkout($form_id)) { | 
                                                                                                            
                                                            | 909 | 909 |  				echo 'required '; | 
                                                                                                            
                                                            | 910 |  | -			} ?>give-input" type="password" name="give_user_pass" id="give-user-pass-<?php echo $form_id; ?>" placeholder="<?php _e( 'Your password', 'give' ); ?>" /> | 
                                                                                                            
                                                            |  | 910 | +			} ?>give-input" type="password" name="give_user_pass" id="give-user-pass-<?php echo $form_id; ?>" placeholder="<?php _e('Your password', 'give'); ?>" /> | 
                                                                                                            
                                                            | 911 | 911 |  			<input type="hidden" name="give-purchase-var" value="needs-to-login" /> | 
                                                                                                            
                                                            | 912 | 912 |  		</p> | 
                                                                                                            
                                                            | 913 | 913 |   | 
                                                                                                            
                                                            | 914 | 914 |  		<p id="give-user-login-submit-<?php echo $form_id; ?>" class="give-clearfix"> | 
                                                                                                            
                                                            | 915 |  | -			<input type="submit" class="give-submit give-btn button" name="give_login_submit" value="<?php _e( 'Login', 'give' ); ?>" /> | 
                                                                                                            
                                                            | 916 |  | -			<?php if($show_register_form !== 'login') { ?> | 
                                                                                                            
                                                            | 917 |  | -			<input type="button" data-action="give_cancel_login" class="give-cancel-login give-btn button" name="give_login_cancel" value="<?php _e( 'Cancel', 'give' ); ?>" /> | 
                                                                                                            
                                                            |  | 915 | +			<input type="submit" class="give-submit give-btn button" name="give_login_submit" value="<?php _e('Login', 'give'); ?>" /> | 
                                                                                                            
                                                            |  | 916 | +			<?php if ($show_register_form !== 'login') { ?> | 
                                                                                                            
                                                            |  | 917 | +			<input type="button" data-action="give_cancel_login" class="give-cancel-login give-btn button" name="give_login_cancel" value="<?php _e('Cancel', 'give'); ?>" /> | 
                                                                                                            
                                                            | 918 | 918 |  			<?php } ?> | 
                                                                                                            
                                                            | 919 | 919 |  			<span class="give-loading-animation"></span> | 
                                                                                                            
                                                            | 920 | 920 |  		</p> | 
                                                                                                            
                                                            | 921 |  | -		<?php do_action( 'give_checkout_login_fields_after' ); ?> | 
                                                                                                            
                                                            |  | 921 | +		<?php do_action('give_checkout_login_fields_after'); ?> | 
                                                                                                            
                                                            | 922 | 922 |  	</fieldset><!--end #give-login-fields--> | 
                                                                                                            
                                                            | 923 | 923 |  	<?php | 
                                                                                                            
                                                            | 924 | 924 |  	echo ob_get_clean(); | 
                                                                                                            
                                                            | 925 | 925 |  } | 
                                                                                                            
                                                            | 926 | 926 |   | 
                                                                                                            
                                                            | 927 |  | -add_action( 'give_purchase_form_login_fields', 'give_get_login_fields', 10, 1 ); | 
                                                                                                            
                                                            |  | 927 | +add_action('give_purchase_form_login_fields', 'give_get_login_fields', 10, 1); | 
                                                                                                            
                                                            | 928 | 928 |   | 
                                                                                                            
                                                            | 929 | 929 |  /** | 
                                                                                                            
                                                            | 930 | 930 |   * Payment Mode Select | 
                                                                                                                                                        
                                                        |  | @@ -940,47 +940,47 @@  discard block | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 940 | 940 |   * | 
                                                                                                            
                                                            | 941 | 941 |   * @return void | 
                                                                                                            
                                                            | 942 | 942 |   */ | 
                                                                                                            
                                                            | 943 |  | -function give_payment_mode_select( $form_id ) { | 
                                                                                                            
                                                            |  | 943 | +function give_payment_mode_select($form_id) { | 
                                                                                                            
                                                            | 944 | 944 |   | 
                                                                                                            
                                                            | 945 | 945 |  	$gateways = give_get_enabled_payment_gateways(); | 
                                                                                                            
                                                            | 946 | 946 |   | 
                                                                                                            
                                                            | 947 |  | -	do_action( 'give_payment_mode_top', $form_id ); ?> | 
                                                                                                            
                                                            |  | 947 | +	do_action('give_payment_mode_top', $form_id); ?> | 
                                                                                                            
                                                            | 948 | 948 |   | 
                                                                                                            
                                                            | 949 | 949 |  	<fieldset id="give-payment-mode-select"> | 
                                                                                                            
                                                            | 950 |  | -		<?php do_action( 'give_payment_mode_before_gateways_wrap' ); ?> | 
                                                                                                            
                                                            |  | 950 | +		<?php do_action('give_payment_mode_before_gateways_wrap'); ?> | 
                                                                                                            
                                                            | 951 | 951 |  		<div id="give-payment-mode-wrap"> | 
                                                                                                            
                                                            | 952 |  | -			<legend class="give-payment-mode-label"><?php echo apply_filters( 'give_checkout_payment_method_text', __( 'Select Payment Method', 'give' ) ); ?> <span class="give-loading-text"><span class="give-loading-animation"></span> <?php _e( 'Loading...', 'give' ); ?></span></legend> | 
                                                                                                            
                                                            |  | 952 | +			<legend class="give-payment-mode-label"><?php echo apply_filters('give_checkout_payment_method_text', __('Select Payment Method', 'give')); ?> <span class="give-loading-text"><span class="give-loading-animation"></span> <?php _e('Loading...', 'give'); ?></span></legend> | 
                                                                                                            
                                                            | 953 | 953 |  			<?php | 
                                                                                                            
                                                            | 954 | 954 |   | 
                                                                                                            
                                                            | 955 |  | -			do_action( 'give_payment_mode_before_gateways' ) ?> | 
                                                                                                            
                                                            |  | 955 | +			do_action('give_payment_mode_before_gateways') ?> | 
                                                                                                            
                                                            | 956 | 956 |   | 
                                                                                                            
                                                            | 957 | 957 |  			<ul id="give-gateway-radio-list"> | 
                                                                                                            
                                                            | 958 |  | -				<?php foreach ( $gateways as $gateway_id => $gateway ) : | 
                                                                                                            
                                                            | 959 |  | -					$checked       = checked( $gateway_id, give_get_default_gateway( $form_id ), false ); | 
                                                                                                            
                                                            |  | 958 | +				<?php foreach ($gateways as $gateway_id => $gateway) : | 
                                                                                                            
                                                            |  | 959 | +					$checked       = checked($gateway_id, give_get_default_gateway($form_id), false); | 
                                                                                                            
                                                            | 960 | 960 |  					$checked_class = $checked ? ' give-gateway-option-selected' : ''; | 
                                                                                                            
                                                            | 961 |  | -					echo '<li><label for="give-gateway-' . esc_attr( $gateway_id ) . '-' . $form_id . '" class="give-gateway-option' . $checked_class . '" id="give-gateway-option-' . esc_attr( $gateway_id ) . '">'; | 
                                                                                                            
                                                            | 962 |  | -					echo '<input type="radio" name="payment-mode" class="give-gateway" id="give-gateway-' . esc_attr( $gateway_id ) . '-' . $form_id . '" value="' . esc_attr( $gateway_id ) . '"' . $checked . '>' . esc_html( $gateway['checkout_label'] ); | 
                                                                                                            
                                                            |  | 961 | +					echo '<li><label for="give-gateway-'.esc_attr($gateway_id).'-'.$form_id.'" class="give-gateway-option'.$checked_class.'" id="give-gateway-option-'.esc_attr($gateway_id).'">'; | 
                                                                                                            
                                                            |  | 962 | +					echo '<input type="radio" name="payment-mode" class="give-gateway" id="give-gateway-'.esc_attr($gateway_id).'-'.$form_id.'" value="'.esc_attr($gateway_id).'"'.$checked.'>'.esc_html($gateway['checkout_label']); | 
                                                                                                            
                                                            | 963 | 963 |  					echo '</label></li>'; | 
                                                                                                            
                                                            | 964 | 964 |  				endforeach; ?> | 
                                                                                                            
                                                            | 965 | 965 |  			</ul> | 
                                                                                                            
                                                            | 966 |  | -			<?php do_action( 'give_payment_mode_after_gateways' ); ?> | 
                                                                                                            
                                                            |  | 966 | +			<?php do_action('give_payment_mode_after_gateways'); ?> | 
                                                                                                            
                                                            | 967 | 967 |  		</div> | 
                                                                                                            
                                                            | 968 |  | -		<?php do_action( 'give_payment_mode_after_gateways_wrap' ); ?> | 
                                                                                                            
                                                            |  | 968 | +		<?php do_action('give_payment_mode_after_gateways_wrap'); ?> | 
                                                                                                            
                                                            | 969 | 969 |  	</fieldset> | 
                                                                                                            
                                                            | 970 | 970 |   | 
                                                                                                            
                                                            | 971 |  | -	<?php do_action( 'give_payment_mode_bottom', $form_id ); ?> | 
                                                                                                            
                                                            |  | 971 | +	<?php do_action('give_payment_mode_bottom', $form_id); ?> | 
                                                                                                            
                                                            | 972 | 972 |   | 
                                                                                                            
                                                            | 973 | 973 |  	<div id="give_purchase_form_wrap"> | 
                                                                                                            
                                                            | 974 | 974 |   | 
                                                                                                            
                                                            | 975 |  | -		<?php do_action( 'give_purchase_form', $form_id ); ?> | 
                                                                                                            
                                                            |  | 975 | +		<?php do_action('give_purchase_form', $form_id); ?> | 
                                                                                                            
                                                            | 976 | 976 |   | 
                                                                                                            
                                                            | 977 | 977 |  	</div><!-- the checkout fields are loaded into this--> | 
                                                                                                            
                                                            | 978 | 978 |   | 
                                                                                                            
                                                            | 979 |  | -	<?php do_action( 'give_purchase_form_wrap_bottom', $form_id ); | 
                                                                                                            
                                                            |  | 979 | +	<?php do_action('give_purchase_form_wrap_bottom', $form_id); | 
                                                                                                            
                                                            | 980 | 980 |   | 
                                                                                                            
                                                            | 981 | 981 |  } | 
                                                                                                            
                                                            | 982 | 982 |   | 
                                                                                                            
                                                            | 983 |  | -add_action( 'give_payment_mode_select', 'give_payment_mode_select' ); | 
                                                                                                            
                                                            |  | 983 | +add_action('give_payment_mode_select', 'give_payment_mode_select'); | 
                                                                                                            
                                                            | 984 | 984 |   | 
                                                                                                            
                                                            | 985 | 985 |   | 
                                                                                                            
                                                            | 986 | 986 |  /** | 
                                                                                                                                                        
                                                        |  | @@ -995,34 +995,34 @@  discard block | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 995 | 995 |   * | 
                                                                                                            
                                                            | 996 | 996 |   * @return void | 
                                                                                                            
                                                            | 997 | 997 |   */ | 
                                                                                                            
                                                            | 998 |  | -function give_terms_agreement( $form_id ) { | 
                                                                                                            
                                                            |  | 998 | +function give_terms_agreement($form_id) { | 
                                                                                                            
                                                            | 999 | 999 |   | 
                                                                                                            
                                                            | 1000 |  | -	$form_option = get_post_meta( $form_id, '_give_terms_option', true ); | 
                                                                                                            
                                                            | 1001 |  | -	$label       = get_post_meta( $form_id, '_give_agree_label', true ); | 
                                                                                                            
                                                            | 1002 |  | -	$terms       = get_post_meta( $form_id, '_give_agree_text', true ); | 
                                                                                                            
                                                            |  | 1000 | +	$form_option = get_post_meta($form_id, '_give_terms_option', true); | 
                                                                                                            
                                                            |  | 1001 | +	$label       = get_post_meta($form_id, '_give_agree_label', true); | 
                                                                                                            
                                                            |  | 1002 | +	$terms       = get_post_meta($form_id, '_give_agree_text', true); | 
                                                                                                            
                                                            | 1003 | 1003 |   | 
                                                                                                            
                                                            | 1004 |  | -	if ( $form_option === 'yes' && ! empty( $terms ) ) { ?> | 
                                                                                                            
                                                            |  | 1004 | +	if ($form_option === 'yes' && ! empty($terms)) { ?> | 
                                                                                                            
                                                            | 1005 | 1005 |  		<fieldset id="give_terms_agreement"> | 
                                                                                                            
                                                            | 1006 | 1006 |  			<div id="give_terms" style="display:none;"> | 
                                                                                                            
                                                            | 1007 | 1007 |  				<?php | 
                                                                                                            
                                                            | 1008 |  | -				do_action( 'give_before_terms' ); | 
                                                                                                            
                                                            | 1009 |  | -				echo wpautop( stripslashes( $terms ) ); | 
                                                                                                            
                                                            | 1010 |  | -				do_action( 'give_after_terms' ); | 
                                                                                                            
                                                            |  | 1008 | +				do_action('give_before_terms'); | 
                                                                                                            
                                                            |  | 1009 | +				echo wpautop(stripslashes($terms)); | 
                                                                                                            
                                                            |  | 1010 | +				do_action('give_after_terms'); | 
                                                                                                            
                                                            | 1011 | 1011 |  				?> | 
                                                                                                            
                                                            | 1012 | 1012 |  			</div> | 
                                                                                                            
                                                            | 1013 | 1013 |  			<div id="give_show_terms"> | 
                                                                                                            
                                                            | 1014 |  | -				<a href="#" class="give_terms_links"><?php _e( 'Show Terms', 'give' ); ?></a> | 
                                                                                                            
                                                            | 1015 |  | -				<a href="#" class="give_terms_links" style="display:none;"><?php _e( 'Hide Terms', 'give' ); ?></a> | 
                                                                                                            
                                                            |  | 1014 | +				<a href="#" class="give_terms_links"><?php _e('Show Terms', 'give'); ?></a> | 
                                                                                                            
                                                            |  | 1015 | +				<a href="#" class="give_terms_links" style="display:none;"><?php _e('Hide Terms', 'give'); ?></a> | 
                                                                                                            
                                                            | 1016 | 1016 |  			</div> | 
                                                                                                            
                                                            | 1017 | 1017 |   | 
                                                                                                            
                                                            | 1018 |  | -			<label for="give_agree_to_terms"><?php echo ! empty( $label ) ? stripslashes( $label ) : __( 'Agree to Terms?', 'give' ); ?></label> | 
                                                                                                            
                                                            |  | 1018 | +			<label for="give_agree_to_terms"><?php echo ! empty($label) ? stripslashes($label) : __('Agree to Terms?', 'give'); ?></label> | 
                                                                                                            
                                                            | 1019 | 1019 |  			<input name="give_agree_to_terms" class="required" type="checkbox" id="give_agree_to_terms" value="1" /> | 
                                                                                                            
                                                            | 1020 | 1020 |  		</fieldset> | 
                                                                                                            
                                                            | 1021 | 1021 |  		<?php | 
                                                                                                            
                                                            | 1022 | 1022 |  	} | 
                                                                                                            
                                                            | 1023 | 1023 |  } | 
                                                                                                            
                                                            | 1024 | 1024 |   | 
                                                                                                            
                                                            | 1025 |  | -add_action( 'give_purchase_form_before_submit', 'give_terms_agreement', 10, 1 ); | 
                                                                                                            
                                                            |  | 1025 | +add_action('give_purchase_form_before_submit', 'give_terms_agreement', 10, 1); | 
                                                                                                            
                                                            | 1026 | 1026 |   | 
                                                                                                            
                                                            | 1027 | 1027 |  /** | 
                                                                                                            
                                                            | 1028 | 1028 |   * Checkout Final Total | 
                                                                                                                                                        
                                                        |  | @@ -1034,27 +1034,27 @@  discard block | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 1034 | 1034 |   * @since      1.0 | 
                                                                                                            
                                                            | 1035 | 1035 |   * @return void | 
                                                                                                            
                                                            | 1036 | 1036 |   */ | 
                                                                                                            
                                                            | 1037 |  | -function give_checkout_final_total( $form_id ) { | 
                                                                                                            
                                                            |  | 1037 | +function give_checkout_final_total($form_id) { | 
                                                                                                            
                                                            | 1038 | 1038 |   | 
                                                                                                            
                                                            | 1039 |  | -	if ( isset( $_POST['give_total'] ) ) { | 
                                                                                                            
                                                            | 1040 |  | -		$total = apply_filters( 'give_donation_total', $_POST['give_total'] ); | 
                                                                                                            
                                                            |  | 1039 | +	if (isset($_POST['give_total'])) { | 
                                                                                                            
                                                            |  | 1040 | +		$total = apply_filters('give_donation_total', $_POST['give_total']); | 
                                                                                                            
                                                            | 1041 | 1041 |  	} else { | 
                                                                                                            
                                                            | 1042 | 1042 |  		//default total | 
                                                                                                            
                                                            | 1043 |  | -		$total = give_get_default_form_amount( $form_id ); | 
                                                                                                            
                                                            |  | 1043 | +		$total = give_get_default_form_amount($form_id); | 
                                                                                                            
                                                            | 1044 | 1044 |  	} | 
                                                                                                            
                                                            | 1045 | 1045 |  	//Only proceed if give_total available | 
                                                                                                            
                                                            | 1046 |  | -	if ( empty( $total ) ) { | 
                                                                                                            
                                                            |  | 1046 | +	if (empty($total)) { | 
                                                                                                            
                                                            | 1047 | 1047 |  		return; | 
                                                                                                            
                                                            | 1048 | 1048 |  	} | 
                                                                                                            
                                                            | 1049 | 1049 |  	?> | 
                                                                                                            
                                                            | 1050 | 1050 |  	<p id="give-final-total-wrap" class="form-wrap "> | 
                                                                                                            
                                                            | 1051 |  | -		<span class="give-donation-total-label"><?php echo apply_filters( 'give_donation_total_label', esc_attr__( 'Donation Total:', 'give' ) ); ?></span> | 
                                                                                                            
                                                            | 1052 |  | -		<span class="give-final-total-amount" data-total="<?php echo give_format_amount( $total ); ?>"><?php echo give_currency_filter( give_format_amount( $total ) ); ?></span> | 
                                                                                                            
                                                            |  | 1051 | +		<span class="give-donation-total-label"><?php echo apply_filters('give_donation_total_label', esc_attr__('Donation Total:', 'give')); ?></span> | 
                                                                                                            
                                                            |  | 1052 | +		<span class="give-final-total-amount" data-total="<?php echo give_format_amount($total); ?>"><?php echo give_currency_filter(give_format_amount($total)); ?></span> | 
                                                                                                            
                                                            | 1053 | 1053 |  	</p> | 
                                                                                                            
                                                            | 1054 | 1054 |  	<?php | 
                                                                                                            
                                                            | 1055 | 1055 |  } | 
                                                                                                            
                                                            | 1056 | 1056 |   | 
                                                                                                            
                                                            | 1057 |  | -add_action( 'give_purchase_form_before_submit', 'give_checkout_final_total', 999 ); | 
                                                                                                            
                                                            |  | 1057 | +add_action('give_purchase_form_before_submit', 'give_checkout_final_total', 999); | 
                                                                                                            
                                                            | 1058 | 1058 |   | 
                                                                                                            
                                                            | 1059 | 1059 |   | 
                                                                                                            
                                                            | 1060 | 1060 |  /** | 
                                                                                                                                                        
                                                        |  | @@ -1066,22 +1066,22 @@  discard block | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 1066 | 1066 |   * | 
                                                                                                            
                                                            | 1067 | 1067 |   * @return void | 
                                                                                                            
                                                            | 1068 | 1068 |   */ | 
                                                                                                            
                                                            | 1069 |  | -function give_checkout_submit( $form_id ) { | 
                                                                                                            
                                                            |  | 1069 | +function give_checkout_submit($form_id) { | 
                                                                                                            
                                                            | 1070 | 1070 |  	?> | 
                                                                                                            
                                                            | 1071 | 1071 |  	<fieldset id="give_purchase_submit"> | 
                                                                                                            
                                                            | 1072 |  | -		<?php do_action( 'give_purchase_form_before_submit', $form_id ); ?> | 
                                                                                                            
                                                            |  | 1072 | +		<?php do_action('give_purchase_form_before_submit', $form_id); ?> | 
                                                                                                            
                                                            | 1073 | 1073 |   | 
                                                                                                            
                                                            | 1074 |  | -		<?php give_checkout_hidden_fields( $form_id ); ?> | 
                                                                                                            
                                                            |  | 1074 | +		<?php give_checkout_hidden_fields($form_id); ?> | 
                                                                                                            
                                                            | 1075 | 1075 |   | 
                                                                                                            
                                                            | 1076 |  | -		<?php echo give_checkout_button_purchase( $form_id ); ?> | 
                                                                                                            
                                                            |  | 1076 | +		<?php echo give_checkout_button_purchase($form_id); ?> | 
                                                                                                            
                                                            | 1077 | 1077 |   | 
                                                                                                            
                                                            | 1078 |  | -		<?php do_action( 'give_purchase_form_after_submit', $form_id ); ?> | 
                                                                                                            
                                                            |  | 1078 | +		<?php do_action('give_purchase_form_after_submit', $form_id); ?> | 
                                                                                                            
                                                            | 1079 | 1079 |   | 
                                                                                                            
                                                            | 1080 | 1080 |  	</fieldset> | 
                                                                                                            
                                                            | 1081 | 1081 |  	<?php | 
                                                                                                            
                                                            | 1082 | 1082 |  } | 
                                                                                                            
                                                            | 1083 | 1083 |   | 
                                                                                                            
                                                            | 1084 |  | -add_action( 'give_purchase_form_after_cc_form', 'give_checkout_submit', 9999 ); | 
                                                                                                            
                                                            |  | 1084 | +add_action('give_purchase_form_after_cc_form', 'give_checkout_submit', 9999); | 
                                                                                                            
                                                            | 1085 | 1085 |   | 
                                                                                                            
                                                            | 1086 | 1086 |   | 
                                                                                                            
                                                            | 1087 | 1087 |  /** | 
                                                                                                                                                        
                                                        |  | @@ -1094,10 +1094,10 @@  discard block | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 1094 | 1094 |   * | 
                                                                                                            
                                                            | 1095 | 1095 |   * @return string | 
                                                                                                            
                                                            | 1096 | 1096 |   */ | 
                                                                                                            
                                                            | 1097 |  | -function give_checkout_button_purchase( $form_id ) { | 
                                                                                                            
                                                            |  | 1097 | +function give_checkout_button_purchase($form_id) { | 
                                                                                                            
                                                            | 1098 | 1098 |   | 
                                                                                                            
                                                            | 1099 |  | -	$display_label_field = get_post_meta( $form_id, '_give_checkout_label', true ); | 
                                                                                                            
                                                            | 1100 |  | -	$display_label       = ( ! empty( $display_label_field ) ? $display_label_field : __( 'Donate Now', 'give' ) ); | 
                                                                                                            
                                                            |  | 1099 | +	$display_label_field = get_post_meta($form_id, '_give_checkout_label', true); | 
                                                                                                            
                                                            |  | 1100 | +	$display_label       = ( ! empty($display_label_field) ? $display_label_field : __('Donate Now', 'give')); | 
                                                                                                            
                                                            | 1101 | 1101 |   | 
                                                                                                            
                                                            | 1102 | 1102 |  	ob_start(); | 
                                                                                                            
                                                            | 1103 | 1103 |   | 
                                                                                                                                                        
                                                        |  | @@ -1108,7 +1108,7 @@  discard block | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 1108 | 1108 |  		<span class="give-loading-animation"></span> | 
                                                                                                            
                                                            | 1109 | 1109 |  	</div> | 
                                                                                                            
                                                            | 1110 | 1110 |  	<?php | 
                                                                                                            
                                                            | 1111 |  | -	return apply_filters( 'give_checkout_button_purchase', ob_get_clean(), $form_id ); | 
                                                                                                            
                                                            |  | 1111 | +	return apply_filters('give_checkout_button_purchase', ob_get_clean(), $form_id); | 
                                                                                                            
                                                            | 1112 | 1112 |  } | 
                                                                                                            
                                                            | 1113 | 1113 |   | 
                                                                                                            
                                                            | 1114 | 1114 |  /** | 
                                                                                                                                                        
                                                        |  | @@ -1122,11 +1122,11 @@  discard block | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 1122 | 1122 |   * | 
                                                                                                            
                                                            | 1123 | 1123 |   * @return void | 
                                                                                                            
                                                            | 1124 | 1124 |   */ | 
                                                                                                            
                                                            | 1125 |  | -function give_agree_to_terms_js( $form_id ) { | 
                                                                                                            
                                                            |  | 1125 | +function give_agree_to_terms_js($form_id) { | 
                                                                                                            
                                                            | 1126 | 1126 |   | 
                                                                                                            
                                                            | 1127 |  | -	$form_option = get_post_meta( $form_id, '_give_terms_option', true ); | 
                                                                                                            
                                                            |  | 1127 | +	$form_option = get_post_meta($form_id, '_give_terms_option', true); | 
                                                                                                            
                                                            | 1128 | 1128 |   | 
                                                                                                            
                                                            | 1129 |  | -	if ( $form_option === 'yes' ) { | 
                                                                                                            
                                                            |  | 1129 | +	if ($form_option === 'yes') { | 
                                                                                                            
                                                            | 1130 | 1130 |  		?> | 
                                                                                                            
                                                            | 1131 | 1131 |  		<script type="text/javascript"> | 
                                                                                                            
                                                            | 1132 | 1132 |  			jQuery( document ).ready( function ( $ ) { | 
                                                                                                                                                        
                                                        |  | @@ -1142,7 +1142,7 @@  discard block | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 1142 | 1142 |  	} | 
                                                                                                            
                                                            | 1143 | 1143 |  } | 
                                                                                                            
                                                            | 1144 | 1144 |   | 
                                                                                                            
                                                            | 1145 |  | -add_action( 'give_checkout_form_top', 'give_agree_to_terms_js', 10, 2 ); | 
                                                                                                            
                                                            |  | 1145 | +add_action('give_checkout_form_top', 'give_agree_to_terms_js', 10, 2); | 
                                                                                                            
                                                            | 1146 | 1146 |   | 
                                                                                                            
                                                            | 1147 | 1147 |   | 
                                                                                                            
                                                            | 1148 | 1148 |  /** | 
                                                                                                                                                        
                                                        |  | @@ -1155,19 +1155,19 @@  discard block | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 1155 | 1155 |   * | 
                                                                                                            
                                                            | 1156 | 1156 |   * @return void | 
                                                                                                            
                                                            | 1157 | 1157 |   */ | 
                                                                                                            
                                                            | 1158 |  | -function give_form_content( $form_id, $args ) { | 
                                                                                                            
                                                            |  | 1158 | +function give_form_content($form_id, $args) { | 
                                                                                                            
                                                            | 1159 | 1159 |   | 
                                                                                                            
                                                            | 1160 |  | -	$show_content = ( isset( $args['show_content'] ) && ! empty( $args['show_content'] ) ) | 
                                                                                                            
                                                            |  | 1160 | +	$show_content = (isset($args['show_content']) && ! empty($args['show_content'])) | 
                                                                                                            
                                                            | 1161 | 1161 |  		? $args['show_content'] | 
                                                                                                            
                                                            | 1162 |  | -		: get_post_meta( $form_id, '_give_content_option', true ); | 
                                                                                                            
                                                            |  | 1162 | +		: get_post_meta($form_id, '_give_content_option', true); | 
                                                                                                            
                                                            | 1163 | 1163 |   | 
                                                                                                            
                                                            | 1164 |  | -	if ( $show_content !== 'none' ) { | 
                                                                                                            
                                                            |  | 1164 | +	if ($show_content !== 'none') { | 
                                                                                                            
                                                            | 1165 | 1165 |  		//add action according to value | 
                                                                                                            
                                                            | 1166 |  | -		add_action( $show_content, 'give_form_display_content' ); | 
                                                                                                            
                                                            |  | 1166 | +		add_action($show_content, 'give_form_display_content'); | 
                                                                                                            
                                                            | 1167 | 1167 |  	} | 
                                                                                                            
                                                            | 1168 | 1168 |  } | 
                                                                                                            
                                                            | 1169 | 1169 |   | 
                                                                                                            
                                                            | 1170 |  | -add_action( 'give_pre_form_output', 'give_form_content', 10, 2 ); | 
                                                                                                            
                                                            |  | 1170 | +add_action('give_pre_form_output', 'give_form_content', 10, 2); | 
                                                                                                            
                                                            | 1171 | 1171 |   | 
                                                                                                            
                                                            | 1172 | 1172 |  /** | 
                                                                                                            
                                                            | 1173 | 1173 |   * Show Give Goals | 
                                                                                                                                                        
                                                        |  | @@ -1179,24 +1179,24 @@  discard block | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 1179 | 1179 |   * @return mixed | 
                                                                                                            
                                                            | 1180 | 1180 |   */ | 
                                                                                                            
                                                            | 1181 | 1181 |   | 
                                                                                                            
                                                            | 1182 |  | -function give_show_goal_progress( $form_id, $args ) { | 
                                                                                                            
                                                            |  | 1182 | +function give_show_goal_progress($form_id, $args) { | 
                                                                                                            
                                                            | 1183 | 1183 |   | 
                                                                                                            
                                                            | 1184 |  | -	$goal_option = get_post_meta( $form_id, '_give_goal_option', true ); | 
                                                                                                            
                                                            | 1185 |  | -	$form        = new Give_Donate_Form( $form_id ); | 
                                                                                                            
                                                            |  | 1184 | +	$goal_option = get_post_meta($form_id, '_give_goal_option', true); | 
                                                                                                            
                                                            |  | 1185 | +	$form        = new Give_Donate_Form($form_id); | 
                                                                                                            
                                                            | 1186 | 1186 |  	$goal        = $form->goal; | 
                                                                                                            
                                                            | 1187 | 1187 |  	$income      = $form->get_earnings(); | 
                                                                                                            
                                                            | 1188 |  | -	$color       = get_post_meta( $form_id, '_give_goal_color', true ); | 
                                                                                                            
                                                            | 1189 |  | -	$show_text   = (bool) isset( $args['show_text'] ) ? filter_var( $args['show_text'], FILTER_VALIDATE_BOOLEAN ) : true; | 
                                                                                                            
                                                            | 1190 |  | -	$show_bar    = (bool) isset( $args['show_bar'] ) ? filter_var( $args['show_bar'], FILTER_VALIDATE_BOOLEAN ) : true; | 
                                                                                                            
                                                            |  | 1188 | +	$color       = get_post_meta($form_id, '_give_goal_color', true); | 
                                                                                                            
                                                            |  | 1189 | +	$show_text   = (bool) isset($args['show_text']) ? filter_var($args['show_text'], FILTER_VALIDATE_BOOLEAN) : true; | 
                                                                                                            
                                                            |  | 1190 | +	$show_bar    = (bool) isset($args['show_bar']) ? filter_var($args['show_bar'], FILTER_VALIDATE_BOOLEAN) : true; | 
                                                                                                            
                                                            | 1191 | 1191 |   | 
                                                                                                            
                                                            | 1192 | 1192 |  	//Sanity check - respect shortcode args | 
                                                                                                            
                                                            | 1193 |  | -	if ( isset( $args['show_goal'] ) && $args['show_goal'] === false ) { | 
                                                                                                            
                                                            |  | 1193 | +	if (isset($args['show_goal']) && $args['show_goal'] === false) { | 
                                                                                                            
                                                            | 1194 | 1194 |  		return false; | 
                                                                                                            
                                                            | 1195 | 1195 |  	} | 
                                                                                                            
                                                            | 1196 | 1196 |   | 
                                                                                                            
                                                            | 1197 | 1197 |  	//Sanity check - ensure form has goal set to output | 
                                                                                                            
                                                            | 1198 |  | -	if ( empty( $form->ID ) | 
                                                                                                            
                                                            | 1199 |  | -	     || ( is_singular( 'give_forms' ) && $goal_option !== 'yes' ) | 
                                                                                                            
                                                            |  | 1198 | +	if (empty($form->ID) | 
                                                                                                            
                                                            |  | 1199 | +	     || (is_singular('give_forms') && $goal_option !== 'yes') | 
                                                                                                            
                                                            | 1200 | 1200 |  	     || $goal_option !== 'yes' | 
                                                                                                            
                                                            | 1201 | 1201 |  	     || $goal == 0 | 
                                                                                                            
                                                            | 1202 | 1202 |  	) { | 
                                                                                                                                                        
                                                        |  | @@ -1204,26 +1204,26 @@  discard block | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 1204 | 1204 |  		return false; | 
                                                                                                            
                                                            | 1205 | 1205 |  	} | 
                                                                                                            
                                                            | 1206 | 1206 |   | 
                                                                                                            
                                                            | 1207 |  | -	$progress = round( ( $income / $goal ) * 100, 2 ); | 
                                                                                                            
                                                            |  | 1207 | +	$progress = round(($income / $goal) * 100, 2); | 
                                                                                                            
                                                            | 1208 | 1208 |   | 
                                                                                                            
                                                            | 1209 |  | -	if ( $income > $goal ) { | 
                                                                                                            
                                                            |  | 1209 | +	if ($income > $goal) { | 
                                                                                                            
                                                            | 1210 | 1210 |  		$progress = 100; | 
                                                                                                            
                                                            | 1211 | 1211 |  	} | 
                                                                                                            
                                                            | 1212 | 1212 |   | 
                                                                                                            
                                                            | 1213 | 1213 |  	$output = '<div class="give-goal-progress">'; | 
                                                                                                            
                                                            | 1214 | 1214 |   | 
                                                                                                            
                                                            | 1215 | 1215 |  	//Goal Progress Text | 
                                                                                                            
                                                            | 1216 |  | -	if ( ! empty( $show_text ) ) { | 
                                                                                                            
                                                            |  | 1216 | +	if ( ! empty($show_text)) { | 
                                                                                                            
                                                            | 1217 | 1217 |  		$output .= '<div class="raised">'; | 
                                                                                                            
                                                            | 1218 |  | -		$output .= sprintf( _x( '%s of %s raised', 'This text displays the amount of income raised compared to the goal.', 'give' ), '<span class="income">' . give_currency_filter( give_format_amount( $income ) ) . '</span>', '<span class="goal-text">' . give_currency_filter( give_format_amount( $goal ) ) ) . '</span>'; | 
                                                                                                            
                                                            |  | 1218 | +		$output .= sprintf(_x('%s of %s raised', 'This text displays the amount of income raised compared to the goal.', 'give'), '<span class="income">'.give_currency_filter(give_format_amount($income)).'</span>', '<span class="goal-text">'.give_currency_filter(give_format_amount($goal))).'</span>'; | 
                                                                                                            
                                                            | 1219 | 1219 |  		$output .= '</div>'; | 
                                                                                                            
                                                            | 1220 | 1220 |  	} | 
                                                                                                            
                                                            | 1221 | 1221 |  	//Goal Progress Bar | 
                                                                                                            
                                                            | 1222 |  | -	if ( ! empty( $show_bar ) ) { | 
                                                                                                            
                                                            |  | 1222 | +	if ( ! empty($show_bar)) { | 
                                                                                                            
                                                            | 1223 | 1223 |  		$output .= '<div class="give-progress-bar">'; | 
                                                                                                            
                                                            | 1224 |  | -		$output .= '<span style="width: ' . esc_attr( $progress ) . '%;'; | 
                                                                                                            
                                                            | 1225 |  | -		if ( ! empty( $color ) ) { | 
                                                                                                            
                                                            | 1226 |  | -			$output .= 'background-color:' . $color; | 
                                                                                                            
                                                            |  | 1224 | +		$output .= '<span style="width: '.esc_attr($progress).'%;'; | 
                                                                                                            
                                                            |  | 1225 | +		if ( ! empty($color)) { | 
                                                                                                            
                                                            |  | 1226 | +			$output .= 'background-color:'.$color; | 
                                                                                                            
                                                            | 1227 | 1227 |  		} | 
                                                                                                            
                                                            | 1228 | 1228 |  		$output .= '"></span>'; | 
                                                                                                            
                                                            | 1229 | 1229 |  		$output .= '</div><!-- /.give-progress-bar -->'; | 
                                                                                                                                                        
                                                        |  | @@ -1231,13 +1231,13 @@  discard block | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 1231 | 1231 |   | 
                                                                                                            
                                                            | 1232 | 1232 |  	$output .= '</div><!-- /.goal-progress -->'; | 
                                                                                                            
                                                            | 1233 | 1233 |   | 
                                                                                                            
                                                            | 1234 |  | -	echo apply_filters( 'give_goal_output', $output ); | 
                                                                                                            
                                                            |  | 1234 | +	echo apply_filters('give_goal_output', $output); | 
                                                                                                            
                                                            | 1235 | 1235 |   | 
                                                                                                            
                                                            | 1236 | 1236 |  	return false; | 
                                                                                                            
                                                            | 1237 | 1237 |   | 
                                                                                                            
                                                            | 1238 | 1238 |  } | 
                                                                                                            
                                                            | 1239 | 1239 |   | 
                                                                                                            
                                                            | 1240 |  | -add_action( 'give_pre_form', 'give_show_goal_progress', 10, 2 ); | 
                                                                                                            
                                                            |  | 1240 | +add_action('give_pre_form', 'give_show_goal_progress', 10, 2); | 
                                                                                                            
                                                            | 1241 | 1241 |   | 
                                                                                                            
                                                            | 1242 | 1242 |  /** | 
                                                                                                            
                                                            | 1243 | 1243 |   * Renders Post Form Content | 
                                                                                                                                                        
                                                        |  | @@ -1249,17 +1249,17 @@  discard block | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 1249 | 1249 |   * @return void | 
                                                                                                            
                                                            | 1250 | 1250 |   * @since      1.0 | 
                                                                                                            
                                                            | 1251 | 1251 |   */ | 
                                                                                                            
                                                            | 1252 |  | -function give_form_display_content( $form_id ) { | 
                                                                                                            
                                                            |  | 1252 | +function give_form_display_content($form_id) { | 
                                                                                                            
                                                            | 1253 | 1253 |   | 
                                                                                                            
                                                            | 1254 |  | -	$content = wpautop( get_post_meta( $form_id, '_give_form_content', true ) ); | 
                                                                                                            
                                                            |  | 1254 | +	$content = wpautop(get_post_meta($form_id, '_give_form_content', true)); | 
                                                                                                            
                                                            | 1255 | 1255 |   | 
                                                                                                            
                                                            | 1256 |  | -	if ( give_get_option( 'disable_the_content_filter' ) !== 'on' ) { | 
                                                                                                            
                                                            | 1257 |  | -		$content = apply_filters( 'the_content', $content ); | 
                                                                                                            
                                                            |  | 1256 | +	if (give_get_option('disable_the_content_filter') !== 'on') { | 
                                                                                                            
                                                            |  | 1257 | +		$content = apply_filters('the_content', $content); | 
                                                                                                            
                                                            | 1258 | 1258 |  	} | 
                                                                                                            
                                                            | 1259 | 1259 |   | 
                                                                                                            
                                                            | 1260 |  | -	$output = '<div id="give-form-content-' . $form_id . '" class="give-form-content-wrap" >' . $content . '</div>'; | 
                                                                                                            
                                                            |  | 1260 | +	$output = '<div id="give-form-content-'.$form_id.'" class="give-form-content-wrap" >'.$content.'</div>'; | 
                                                                                                            
                                                            | 1261 | 1261 |   | 
                                                                                                            
                                                            | 1262 |  | -	echo apply_filters( 'give_form_content_output', $output ); | 
                                                                                                            
                                                            |  | 1262 | +	echo apply_filters('give_form_content_output', $output); | 
                                                                                                            
                                                            | 1263 | 1263 |  } | 
                                                                                                            
                                                            | 1264 | 1264 |   | 
                                                                                                            
                                                            | 1265 | 1265 |   | 
                                                                                                                                                        
                                                        |  | @@ -1272,16 +1272,16 @@  discard block | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 1272 | 1272 |   * | 
                                                                                                            
                                                            | 1273 | 1273 |   * @return void | 
                                                                                                            
                                                            | 1274 | 1274 |   */ | 
                                                                                                            
                                                            | 1275 |  | -function give_checkout_hidden_fields( $form_id ) { | 
                                                                                                            
                                                            |  | 1275 | +function give_checkout_hidden_fields($form_id) { | 
                                                                                                            
                                                            | 1276 | 1276 |   | 
                                                                                                            
                                                            | 1277 |  | -	do_action( 'give_hidden_fields_before', $form_id ); | 
                                                                                                            
                                                            | 1278 |  | -	if ( is_user_logged_in() ) { ?> | 
                                                                                                            
                                                            |  | 1277 | +	do_action('give_hidden_fields_before', $form_id); | 
                                                                                                            
                                                            |  | 1278 | +	if (is_user_logged_in()) { ?> | 
                                                                                                            
                                                            | 1279 | 1279 |  		<input type="hidden" name="give-user-id" value="<?php echo get_current_user_id(); ?>" /> | 
                                                                                                            
                                                            | 1280 | 1280 |  	<?php } ?> | 
                                                                                                            
                                                            | 1281 | 1281 |  	<input type="hidden" name="give_action" value="purchase" /> | 
                                                                                                            
                                                            | 1282 |  | -	<input type="hidden" name="give-gateway" value="<?php echo give_get_chosen_gateway( $form_id ); ?>" /> | 
                                                                                                            
                                                            |  | 1282 | +	<input type="hidden" name="give-gateway" value="<?php echo give_get_chosen_gateway($form_id); ?>" /> | 
                                                                                                            
                                                            | 1283 | 1283 |  	<?php | 
                                                                                                            
                                                            | 1284 |  | -	do_action( 'give_hidden_fields_after', $form_id ); | 
                                                                                                            
                                                            |  | 1284 | +	do_action('give_hidden_fields_after', $form_id); | 
                                                                                                            
                                                            | 1285 | 1285 |   | 
                                                                                                            
                                                            | 1286 | 1286 |  } | 
                                                                                                            
                                                            | 1287 | 1287 |   | 
                                                                                                                                                        
                                                        |  | @@ -1296,20 +1296,20 @@  discard block | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 1296 | 1296 |   * | 
                                                                                                            
                                                            | 1297 | 1297 |   * @return string $content Filtered content | 
                                                                                                            
                                                            | 1298 | 1298 |   */ | 
                                                                                                            
                                                            | 1299 |  | -function give_filter_success_page_content( $content ) { | 
                                                                                                            
                                                            |  | 1299 | +function give_filter_success_page_content($content) { | 
                                                                                                            
                                                            | 1300 | 1300 |   | 
                                                                                                            
                                                            | 1301 | 1301 |  	global $give_options; | 
                                                                                                            
                                                            | 1302 | 1302 |   | 
                                                                                                            
                                                            | 1303 |  | -	if ( isset( $give_options['success_page'] ) && isset( $_GET['payment-confirmation'] ) && is_page( $give_options['success_page'] ) ) { | 
                                                                                                            
                                                            | 1304 |  | -		if ( has_filter( 'give_payment_confirm_' . $_GET['payment-confirmation'] ) ) { | 
                                                                                                            
                                                            | 1305 |  | -			$content = apply_filters( 'give_payment_confirm_' . $_GET['payment-confirmation'], $content ); | 
                                                                                                            
                                                            |  | 1303 | +	if (isset($give_options['success_page']) && isset($_GET['payment-confirmation']) && is_page($give_options['success_page'])) { | 
                                                                                                            
                                                            |  | 1304 | +		if (has_filter('give_payment_confirm_'.$_GET['payment-confirmation'])) { | 
                                                                                                            
                                                            |  | 1305 | +			$content = apply_filters('give_payment_confirm_'.$_GET['payment-confirmation'], $content); | 
                                                                                                            
                                                            | 1306 | 1306 |  		} | 
                                                                                                            
                                                            | 1307 | 1307 |  	} | 
                                                                                                            
                                                            | 1308 | 1308 |   | 
                                                                                                            
                                                            | 1309 | 1309 |  	return $content; | 
                                                                                                            
                                                            | 1310 | 1310 |  } | 
                                                                                                            
                                                            | 1311 | 1311 |   | 
                                                                                                            
                                                            | 1312 |  | -add_filter( 'the_content', 'give_filter_success_page_content' ); | 
                                                                                                            
                                                            |  | 1312 | +add_filter('the_content', 'give_filter_success_page_content'); | 
                                                                                                            
                                                            | 1313 | 1313 |   | 
                                                                                                            
                                                            | 1314 | 1314 |   | 
                                                                                                            
                                                            | 1315 | 1315 |  /** | 
                                                                                                                                                        
                                                        |  | @@ -1321,11 +1321,11 @@  discard block | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 1321 | 1321 |   | 
                                                                                                            
                                                            | 1322 | 1322 |  function give_test_mode_frontend_warning() { | 
                                                                                                            
                                                            | 1323 | 1323 |   | 
                                                                                                            
                                                            | 1324 |  | -	$test_mode = give_get_option( 'test_mode' ); | 
                                                                                                            
                                                            |  | 1324 | +	$test_mode = give_get_option('test_mode'); | 
                                                                                                            
                                                            | 1325 | 1325 |   | 
                                                                                                            
                                                            | 1326 |  | -	if ( $test_mode == 'on' ) { | 
                                                                                                            
                                                            | 1327 |  | -		echo '<div class="give_error give_warning" id="give_error_test_mode"><p><strong>' . __( 'Notice', 'give' ) . '</strong>: ' . esc_attr__( 'Test mode is enabled. While in test mode no live transactions are processed.', 'give' ) . '</p></div>'; | 
                                                                                                            
                                                            |  | 1326 | +	if ($test_mode == 'on') { | 
                                                                                                            
                                                            |  | 1327 | +		echo '<div class="give_error give_warning" id="give_error_test_mode"><p><strong>'.__('Notice', 'give').'</strong>: '.esc_attr__('Test mode is enabled. While in test mode no live transactions are processed.', 'give').'</p></div>'; | 
                                                                                                            
                                                            | 1328 | 1328 |  	} | 
                                                                                                            
                                                            | 1329 | 1329 |  } | 
                                                                                                            
                                                            | 1330 | 1330 |   | 
                                                                                                            
                                                            | 1331 |  | -add_action( 'give_pre_form', 'give_test_mode_frontend_warning', 10 ); | 
                                                                                                            
                                                            |  | 1331 | +add_action('give_pre_form', 'give_test_mode_frontend_warning', 10); |