Completed
Branch BUG-10316-set-venue-link-schem... (facaaa)
by
unknown
28:55 queued 16:22
created
modules/add_new_state/EED_Add_New_State.module.php 3 patches
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,6 @@
 block discarded – undo
1
-<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) exit('No direct script access allowed');
1
+<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) {
2
+	exit('No direct script access allowed');
3
+}
2 4
 /**
3 5
  *
4 6
  * EED_Add_New_State class
Please login to merge, or discard this patch.
Spacing   +165 added lines, -165 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
 	 * @return EED_Add_New_State
17 17
 	 */
18 18
 	public static function instance() {
19
-		return parent::get_instance( __CLASS__ );
19
+		return parent::get_instance(__CLASS__);
20 20
 	}
21 21
 
22 22
 
@@ -27,16 +27,16 @@  discard block
 block discarded – undo
27 27
 	 *  	@return 		void
28 28
 	 */
29 29
 	public static function set_hooks() {
30
-		add_action( 'wp_loaded', array( 'EED_Add_New_State', 'set_definitions' ), 2 );
31
-		add_action( 'wp_enqueue_scripts', array( 'EED_Add_New_State', 'translate_js_strings' ), 0 );
32
-		add_action( 'wp_enqueue_scripts', array( 'EED_Add_New_State', 'wp_enqueue_scripts' ), 10 );
33
-		add_filter( 'FHEE__EE_SPCO_Reg_Step_Attendee_Information___question_group_reg_form__question_group_reg_form', array( 'EED_Add_New_State', 'display_add_new_state_micro_form' ), 1, 1 );
34
-		add_filter( 'FHEE__EE_SPCO_Reg_Step_Payment_Options___get_billing_form_for_payment_method__billing_form', array( 'EED_Add_New_State', 'display_add_new_state_micro_form' ), 1, 1 );
35
-		add_filter( 'FHEE__EE_Single_Page_Checkout__process_attendee_information__valid_data_line_item', array( 'EED_Add_New_State', 'unset_new_state_request_params' ), 10, 1 );
36
-		add_filter( 'FHEE__EE_SPCO_Reg_Step_Attendee_Information___generate_question_input__state_options', array( 'EED_Add_New_State', 'inject_new_reg_state_into_options' ), 10, 5 );
37
-		add_filter( 'FHEE__EE_SPCO_Reg_Step_Attendee_Information___generate_question_input__country_options', array( 'EED_Add_New_State', 'inject_new_reg_country_into_options' ), 10, 5 );
38
-		add_filter( 'FHEE__EE_State_Select_Input____construct__state_options', array( 'EED_Add_New_State', 'state_options' ), 10, 1 );
39
-		add_filter( 'FHEE__EE_Country_Select_Input____construct__country_options', array( 'EED_Add_New_State', 'country_options' ), 10, 1 );
30
+		add_action('wp_loaded', array('EED_Add_New_State', 'set_definitions'), 2);
31
+		add_action('wp_enqueue_scripts', array('EED_Add_New_State', 'translate_js_strings'), 0);
32
+		add_action('wp_enqueue_scripts', array('EED_Add_New_State', 'wp_enqueue_scripts'), 10);
33
+		add_filter('FHEE__EE_SPCO_Reg_Step_Attendee_Information___question_group_reg_form__question_group_reg_form', array('EED_Add_New_State', 'display_add_new_state_micro_form'), 1, 1);
34
+		add_filter('FHEE__EE_SPCO_Reg_Step_Payment_Options___get_billing_form_for_payment_method__billing_form', array('EED_Add_New_State', 'display_add_new_state_micro_form'), 1, 1);
35
+		add_filter('FHEE__EE_Single_Page_Checkout__process_attendee_information__valid_data_line_item', array('EED_Add_New_State', 'unset_new_state_request_params'), 10, 1);
36
+		add_filter('FHEE__EE_SPCO_Reg_Step_Attendee_Information___generate_question_input__state_options', array('EED_Add_New_State', 'inject_new_reg_state_into_options'), 10, 5);
37
+		add_filter('FHEE__EE_SPCO_Reg_Step_Attendee_Information___generate_question_input__country_options', array('EED_Add_New_State', 'inject_new_reg_country_into_options'), 10, 5);
38
+		add_filter('FHEE__EE_State_Select_Input____construct__state_options', array('EED_Add_New_State', 'state_options'), 10, 1);
39
+		add_filter('FHEE__EE_Country_Select_Input____construct__country_options', array('EED_Add_New_State', 'country_options'), 10, 1);
40 40
 	}
41 41
 
42 42
 	/**
@@ -46,20 +46,20 @@  discard block
 block discarded – undo
46 46
 	 *  	@return 		void
47 47
 	 */
48 48
 	public static function set_hooks_admin() {
49
-		add_action( 'wp_loaded', array( 'EED_Add_New_State', 'set_definitions' ), 2 );
50
-		add_filter( 'FHEE__EE_SPCO_Reg_Step_Attendee_Information___question_group_reg_form__question_group_reg_form', array( 'EED_Add_New_State', 'display_add_new_state_micro_form' ), 1, 1 );
51
-		add_filter( 'FHEE__EE_SPCO_Reg_Step_Payment_Options___get_billing_form_for_payment_method__billing_form', array( 'EED_Add_New_State', 'display_add_new_state_micro_form' ), 1, 1 );
52
-		add_action( 'wp_ajax_espresso_add_new_state', array( 'EED_Add_New_State', 'add_new_state' ));
53
-		add_action( 'wp_ajax_nopriv_espresso_add_new_state', array( 'EED_Add_New_State', 'add_new_state' ));
54
-		add_filter( 'FHEE__EE_Single_Page_Checkout__process_attendee_information__valid_data_line_item', array( 'EED_Add_New_State', 'unset_new_state_request_params' ), 10, 1 );
55
-		add_action( 'AHEE__General_Settings_Admin_Page__update_country_settings__state_saved', array( 'EED_Add_New_State', 'update_country_settings' ), 10, 3 );
56
-		add_action( 'AHEE__General_Settings_Admin_Page__delete_state__state_deleted', array( 'EED_Add_New_State', 'update_country_settings' ), 10, 3 );
57
-		add_filter( 'FHEE__EE_State_Select_Input____construct__state_options', array( 'EED_Add_New_State', 'state_options' ), 10, 1 );
58
-		add_filter( 'FHEE__EE_Country_Select_Input____construct__country_options', array( 'EED_Add_New_State', 'country_options' ), 10, 1 );
49
+		add_action('wp_loaded', array('EED_Add_New_State', 'set_definitions'), 2);
50
+		add_filter('FHEE__EE_SPCO_Reg_Step_Attendee_Information___question_group_reg_form__question_group_reg_form', array('EED_Add_New_State', 'display_add_new_state_micro_form'), 1, 1);
51
+		add_filter('FHEE__EE_SPCO_Reg_Step_Payment_Options___get_billing_form_for_payment_method__billing_form', array('EED_Add_New_State', 'display_add_new_state_micro_form'), 1, 1);
52
+		add_action('wp_ajax_espresso_add_new_state', array('EED_Add_New_State', 'add_new_state'));
53
+		add_action('wp_ajax_nopriv_espresso_add_new_state', array('EED_Add_New_State', 'add_new_state'));
54
+		add_filter('FHEE__EE_Single_Page_Checkout__process_attendee_information__valid_data_line_item', array('EED_Add_New_State', 'unset_new_state_request_params'), 10, 1);
55
+		add_action('AHEE__General_Settings_Admin_Page__update_country_settings__state_saved', array('EED_Add_New_State', 'update_country_settings'), 10, 3);
56
+		add_action('AHEE__General_Settings_Admin_Page__delete_state__state_deleted', array('EED_Add_New_State', 'update_country_settings'), 10, 3);
57
+		add_filter('FHEE__EE_State_Select_Input____construct__state_options', array('EED_Add_New_State', 'state_options'), 10, 1);
58
+		add_filter('FHEE__EE_Country_Select_Input____construct__country_options', array('EED_Add_New_State', 'country_options'), 10, 1);
59 59
 		//add_filter( 'FHEE__Single_Page_Checkout___check_form_submission__request_params', array( 'EED_Add_New_State', 'filter_checkout_request_params' ), 10, 1 );
60
-		add_filter( 'FHEE__EE_Form_Section_Proper__receive_form_submission__request_data', array( 'EED_Add_New_State', 'filter_checkout_request_params' ), 10, 1 );
61
-		add_filter( 'FHEE__EE_SPCO_Reg_Step_Attendee_Information___generate_question_input__state_options', array( 'EED_Add_New_State', 'inject_new_reg_state_into_options' ), 10, 5 );
62
-		add_filter( 'FHEE__EE_SPCO_Reg_Step_Attendee_Information___generate_question_input__country_options', array( 'EED_Add_New_State', 'inject_new_reg_country_into_options' ), 10, 5 );
60
+		add_filter('FHEE__EE_Form_Section_Proper__receive_form_submission__request_data', array('EED_Add_New_State', 'filter_checkout_request_params'), 10, 1);
61
+		add_filter('FHEE__EE_SPCO_Reg_Step_Attendee_Information___generate_question_input__state_options', array('EED_Add_New_State', 'inject_new_reg_state_into_options'), 10, 5);
62
+		add_filter('FHEE__EE_SPCO_Reg_Step_Attendee_Information___generate_question_input__country_options', array('EED_Add_New_State', 'inject_new_reg_country_into_options'), 10, 5);
63 63
 	}
64 64
 
65 65
 
@@ -71,8 +71,8 @@  discard block
 block discarded – undo
71 71
 	 *  	@return 		void
72 72
 	 */
73 73
 	public static function set_definitions() {
74
-		define( 'ANS_ASSETS_URL', plugin_dir_url( __FILE__ ) . 'assets' . DS );
75
-		define( 'ANS_TEMPLATES_PATH', str_replace( '\\', DS, plugin_dir_path( __FILE__ )) . 'templates' . DS );
74
+		define('ANS_ASSETS_URL', plugin_dir_url(__FILE__).'assets'.DS);
75
+		define('ANS_TEMPLATES_PATH', str_replace('\\', DS, plugin_dir_path(__FILE__)).'templates'.DS);
76 76
 	}
77 77
 
78 78
 
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
 	 * @param \WP $WP
85 85
 	 * @return        void
86 86
 	 */
87
-	public function run( $WP ) {
87
+	public function run($WP) {
88 88
 	}
89 89
 
90 90
 
@@ -112,9 +112,9 @@  discard block
 block discarded – undo
112 112
 	 * 	@return 		void
113 113
 	 */
114 114
 	public static function wp_enqueue_scripts() {
115
-		if ( apply_filters( 'EED_Single_Page_Checkout__SPCO_active', false ) ) {
116
-			wp_register_script( 'add_new_state', ANS_ASSETS_URL . 'add_new_state.js', array( 'espresso_core', 'single_page_checkout' ), EVENT_ESPRESSO_VERSION, true );
117
-			wp_enqueue_script( 'add_new_state' );
115
+		if (apply_filters('EED_Single_Page_Checkout__SPCO_active', false)) {
116
+			wp_register_script('add_new_state', ANS_ASSETS_URL.'add_new_state.js', array('espresso_core', 'single_page_checkout'), EVENT_ESPRESSO_VERSION, true);
117
+			wp_enqueue_script('add_new_state');
118 118
 		}
119 119
 	}
120 120
 
@@ -128,34 +128,34 @@  discard block
 block discarded – undo
128 128
 	 * @return 	string
129 129
 	 */
130 130
 //	public static function display_add_new_state_micro_form( $html, EE_Form_Input_With_Options_Base $input ){
131
-	public static function display_add_new_state_micro_form( EE_Form_Section_Proper $question_group_reg_form ){
131
+	public static function display_add_new_state_micro_form(EE_Form_Section_Proper $question_group_reg_form) {
132 132
 		// only add the 'new_state_micro_form' when displaying reg forms,
133 133
 		// not during processing since we process the 'new_state_micro_form' in it's own AJAX request
134
-		$action = EE_Registry::instance()->REQ->get( 'action', '' );
134
+		$action = EE_Registry::instance()->REQ->get('action', '');
135 135
 		// is the "state" question in this form section?
136
-		$input = $question_group_reg_form->get_subsection( 'state' );
137
-		if ( $action === 'process_reg_step' || $action === 'update_reg_step' ) {
136
+		$input = $question_group_reg_form->get_subsection('state');
137
+		if ($action === 'process_reg_step' || $action === 'update_reg_step') {
138 138
 			//ok then all we need to do is make sure the input's HTML name is consistent
139 139
 			//by forcing it to set it now, like it did while getting the form for display
140
-			if( $input instanceof EE_State_Select_Input ) {
140
+			if ($input instanceof EE_State_Select_Input) {
141 141
 				$input->html_name();
142 142
 			}
143 143
 			return $question_group_reg_form;
144 144
 		}
145 145
 		
146 146
 		// we're only doing this for state select inputs
147
-		if ( $input instanceof EE_State_Select_Input ) {
147
+		if ($input instanceof EE_State_Select_Input) {
148 148
 			// grab any set values from the request
149
-			$country_name = str_replace( 'state', 'nsmf_new_state_country', $input->html_name() );
150
-			$state_name = str_replace( 'state', 'nsmf_new_state_name', $input->html_name() );
151
-			$abbrv_name = str_replace( 'state', 'nsmf_new_state_abbrv', $input->html_name() );
152
-			$new_state_submit_id = str_replace( 'state', 'new_state', $input->html_id() );
149
+			$country_name = str_replace('state', 'nsmf_new_state_country', $input->html_name());
150
+			$state_name = str_replace('state', 'nsmf_new_state_name', $input->html_name());
151
+			$abbrv_name = str_replace('state', 'nsmf_new_state_abbrv', $input->html_name());
152
+			$new_state_submit_id = str_replace('state', 'new_state', $input->html_id());
153 153
 			$country_options = array();
154 154
 			$countries = EEM_Country::instance()->get_all_countries();
155
-			if ( ! empty( $countries )) {
156
-				foreach( $countries as $country ){
157
-					if ( $country instanceof EE_Country ) {
158
-						$country_options[ $country->ID() ] = $country->name();
155
+			if ( ! empty($countries)) {
156
+				foreach ($countries as $country) {
157
+					if ($country instanceof EE_Country) {
158
+						$country_options[$country->ID()] = $country->name();
159 159
 					}
160 160
 				}
161 161
 			}
@@ -168,8 +168,8 @@  discard block
 block discarded – undo
168 168
 						// add hidden input to indicate that a new state is being added
169 169
 						'add_new_state' 	=> new EE_Hidden_Input(
170 170
 							array(
171
-								'html_name' 	=> str_replace( 'state', 'nsmf_add_new_state', $input->html_name() ),
172
-								'html_id' 			=> str_replace( 'state', 'nsmf_add_new_state', $input->html_id() ),
171
+								'html_name' 	=> str_replace('state', 'nsmf_add_new_state', $input->html_name()),
172
+								'html_id' 			=> str_replace('state', 'nsmf_add_new_state', $input->html_id()),
173 173
 								'default'			=> 0
174 174
 							)
175 175
 						),
@@ -181,10 +181,10 @@  discard block
 block discarded – undo
181 181
 									'',
182 182
 									__('click here to add a new state/province', 'event_espresso'),
183 183
 									'',
184
-									'display-' . $input->html_id(),
184
+									'display-'.$input->html_id(),
185 185
 									'ee-form-add-new-state-lnk display-the-hidden smaller-text hide-if-no-js',
186 186
 									'',
187
-									'data-target="' . $input->html_id() . '"'
187
+									'data-target="'.$input->html_id().'"'
188 188
 								)
189 189
 							)
190 190
 						),
@@ -192,13 +192,13 @@  discard block
 block discarded – undo
192 192
 						'add_new_state_micro_form' =>new EE_Form_Section_HTML(
193 193
 							apply_filters(
194 194
 								'FHEE__EED_Add_New_State__display_add_new_state_micro_form__add_new_state_micro_form',
195
-								EEH_HTML::div( '', $input->html_id() . '-dv', 'ee-form-add-new-state-dv', 'display: none;' ) .
196
-								EEH_HTML::h6( __('If your State/Province does not appear in the list above, you can easily add it by doing the following:', 'event_espresso')) .
197
-								EEH_HTML::ul() .
198
-								EEH_HTML::li( __('first select the Country that your State/Province belongs to', 'event_espresso') ) .
199
-								EEH_HTML::li( __('enter the name of your State/Province', 'event_espresso') ) .
200
-								EEH_HTML::li( __('enter a two to six letter abbreviation for the name of your State/Province', 'event_espresso') ) .
201
-								EEH_HTML::li( __('click the ADD button', 'event_espresso') ) .
195
+								EEH_HTML::div('', $input->html_id().'-dv', 'ee-form-add-new-state-dv', 'display: none;').
196
+								EEH_HTML::h6(__('If your State/Province does not appear in the list above, you can easily add it by doing the following:', 'event_espresso')).
197
+								EEH_HTML::ul().
198
+								EEH_HTML::li(__('first select the Country that your State/Province belongs to', 'event_espresso')).
199
+								EEH_HTML::li(__('enter the name of your State/Province', 'event_espresso')).
200
+								EEH_HTML::li(__('enter a two to six letter abbreviation for the name of your State/Province', 'event_espresso')).
201
+								EEH_HTML::li(__('click the ADD button', 'event_espresso')).
202 202
 								EEH_HTML::ulx()
203 203
 							)
204 204
 						),
@@ -207,10 +207,10 @@  discard block
 block discarded – undo
207 207
 							$country_options,
208 208
 							array(
209 209
 								'html_name' 			=> $country_name,
210
-								'html_id' 					=> str_replace( 'state', 'nsmf_new_state_country', $input->html_id() ),
211
-								'html_class' 			=> $input->html_class() . ' new-state-country',
210
+								'html_id' 					=> str_replace('state', 'nsmf_new_state_country', $input->html_id()),
211
+								'html_class' 			=> $input->html_class().' new-state-country',
212 212
 								'html_label_text'		=> __('New State/Province Country', 'event_espresso'),
213
-								'default'					=> EE_Registry::instance()->REQ->get( $country_name, '' ),
213
+								'default'					=> EE_Registry::instance()->REQ->get($country_name, ''),
214 214
 								'required' 				=> false
215 215
 							)
216 216
 						),
@@ -218,23 +218,23 @@  discard block
 block discarded – undo
218 218
 						'new_state_name' => new EE_Text_Input(
219 219
 							array(
220 220
 								'html_name' 			=> $state_name,
221
-								'html_id' 					=> str_replace( 'state', 'nsmf_new_state_name', $input->html_id() ),
222
-								'html_class' 			=> $input->html_class() . ' new-state-state',
221
+								'html_id' 					=> str_replace('state', 'nsmf_new_state_name', $input->html_id()),
222
+								'html_class' 			=> $input->html_class().' new-state-state',
223 223
 								'html_label_text'		=> __('New State/Province Name', 'event_espresso'),
224
-								'default'					=> EE_Registry::instance()->REQ->get( $state_name, '' ),
224
+								'default'					=> EE_Registry::instance()->REQ->get($state_name, ''),
225 225
 								'required' 				=> false
226 226
 							)
227 227
 						),
228
-						'spacer' => new EE_Form_Section_HTML( EEH_HTML::br() ),
228
+						'spacer' => new EE_Form_Section_HTML(EEH_HTML::br()),
229 229
 						// NEW STATE NAME
230 230
 						'new_state_abbrv' => new EE_Text_Input(
231 231
 							array(
232 232
 								'html_name' 					=> $abbrv_name,
233
-								'html_id' 							=> str_replace( 'state', 'nsmf_new_state_abbrv', $input->html_id() ),
234
-								'html_class' 					=> $input->html_class() . ' new-state-abbrv',
233
+								'html_id' 							=> str_replace('state', 'nsmf_new_state_abbrv', $input->html_id()),
234
+								'html_class' 					=> $input->html_class().' new-state-abbrv',
235 235
 								'html_label_text'				=> __('New State/Province Abbreviation', 'event_espresso'),
236 236
 								'html_other_attributes'	=> 'size="24"',
237
-								'default'							=> EE_Registry::instance()->REQ->get( $abbrv_name, '' ),
237
+								'default'							=> EE_Registry::instance()->REQ->get($abbrv_name, ''),
238 238
 								'required' 						=> false
239 239
 							)
240 240
 						),
@@ -242,15 +242,15 @@  discard block
 block discarded – undo
242 242
 						'add_new_state_submit_button' => new EE_Form_Section_HTML(
243 243
 							apply_filters(
244 244
 								'FHEE__EED_Add_New_State__display_add_new_state_micro_form__add_new_state_submit_button',
245
-								EEH_HTML::nbsp(3) .
245
+								EEH_HTML::nbsp(3).
246 246
 								EEH_HTML::link(
247 247
 									'',
248 248
 									__('ADD', 'event_espresso'),
249 249
 									'',
250
-									'submit-' . $new_state_submit_id,
250
+									'submit-'.$new_state_submit_id,
251 251
 									'ee-form-add-new-state-submit button button-secondary',
252 252
 									'',
253
-									'data-target="' . $new_state_submit_id . '"'
253
+									'data-target="'.$new_state_submit_id.'"'
254 254
 								)
255 255
 							)
256 256
 						),
@@ -258,18 +258,18 @@  discard block
 block discarded – undo
258 258
 						'add_new_state_extra' => new EE_Form_Section_HTML(
259 259
 							apply_filters(
260 260
 								'FHEE__EED_Add_New_State__display_add_new_state_micro_form__add_new_state_extra',
261
-								EEH_HTML::br(2) .
262
-								EEH_HTML::div( '', '', 'small-text' ) .
263
-								EEH_HTML::strong( __('Don\'t know your State/Province Abbreviation?', 'event_espresso') ) .
264
-								EEH_HTML::br() .
261
+								EEH_HTML::br(2).
262
+								EEH_HTML::div('', '', 'small-text').
263
+								EEH_HTML::strong(__('Don\'t know your State/Province Abbreviation?', 'event_espresso')).
264
+								EEH_HTML::br().
265 265
 								sprintf(
266 266
 									__('You can look here: %s, for a list of Countries and links to their State/Province Abbreviations ("Subdivisions assigned codes" column).', 'event_espresso'),
267
-									EEH_HTML::link( 'http://en.wikipedia.org/wiki/ISO_3166-2', 'http://en.wikipedia.org/wiki/ISO_3166-2', '', '', 'ee-form-add-new-state-wiki-lnk' )
268
-								) .
269
-								EEH_HTML::divx() .
270
-								EEH_HTML::br() .
271
-								EEH_HTML::link( '', __('cancel new state/province', 'event_espresso'), '', 'hide-' . $input->html_id(), 'ee-form-cancel-new-state-lnk smaller-text', '', 'data-target="' . $input->html_id() . '"' ) .
272
-								EEH_HTML::divx() .
267
+									EEH_HTML::link('http://en.wikipedia.org/wiki/ISO_3166-2', 'http://en.wikipedia.org/wiki/ISO_3166-2', '', '', 'ee-form-add-new-state-wiki-lnk')
268
+								).
269
+								EEH_HTML::divx().
270
+								EEH_HTML::br().
271
+								EEH_HTML::link('', __('cancel new state/province', 'event_espresso'), '', 'hide-'.$input->html_id(), 'ee-form-cancel-new-state-lnk smaller-text', '', 'data-target="'.$input->html_id().'"').
272
+								EEH_HTML::divx().
273 273
 								EEH_HTML::br()
274 274
 							)
275 275
 						)
@@ -277,7 +277,7 @@  discard block
 block discarded – undo
277 277
 					)
278 278
 				)
279 279
 			);
280
-			$question_group_reg_form->add_subsections( array( 'new_state_micro_form' => $new_state_micro_form ), 'state', false );
280
+			$question_group_reg_form->add_subsections(array('new_state_micro_form' => $new_state_micro_form), 'state', false);
281 281
 		}
282 282
 		return $question_group_reg_form;
283 283
 	}
@@ -295,50 +295,50 @@  discard block
 block discarded – undo
295 295
 	public static function add_new_state() {
296 296
 		$REQ = EE_Registry::instance()->load_core('Request_Handler');
297 297
 		if (
298
-			$REQ->is_set( 'nsmf_add_new_state' )
299
-			&& $REQ->get( 'nsmf_add_new_state' ) == 1
298
+			$REQ->is_set('nsmf_add_new_state')
299
+			&& $REQ->get('nsmf_add_new_state') == 1
300 300
 		) {
301 301
 			EE_Registry::instance()->load_model('State');
302 302
 			// grab country ISO code, new state name, and new state abbreviation
303
-			$state_country = $REQ->is_set( 'nsmf_new_state_country' )
304
-				? sanitize_text_field( $REQ->get( 'nsmf_new_state_country' ) )
303
+			$state_country = $REQ->is_set('nsmf_new_state_country')
304
+				? sanitize_text_field($REQ->get('nsmf_new_state_country'))
305 305
 				: false;
306
-			$state_name = $REQ->is_set( 'nsmf_new_state_name' )
307
-				? sanitize_text_field( $REQ->get( 'nsmf_new_state_name' ) )
306
+			$state_name = $REQ->is_set('nsmf_new_state_name')
307
+				? sanitize_text_field($REQ->get('nsmf_new_state_name'))
308 308
 				: false;
309
-			$state_abbr = $REQ->is_set( 'nsmf_new_state_abbrv' )
310
-				? sanitize_text_field( $REQ->get( 'nsmf_new_state_abbrv' ) )
309
+			$state_abbr = $REQ->is_set('nsmf_new_state_abbrv')
310
+				? sanitize_text_field($REQ->get('nsmf_new_state_abbrv'))
311 311
 				: false;
312 312
 //echo '<h4>$state_country : ' . $state_country . '  <br /><span style="font-size:10px;font-weight:normal;">' . __FILE__ . '<br />line no: ' . __LINE__ . '</span></h4>';
313 313
 //echo '<h4>$state_name : ' . $state_name . '  <br /><span style="font-size:10px;font-weight:normal;">' . __FILE__ . '<br />line no: ' . __LINE__ . '</span></h4>';
314 314
 //echo '<h4>$state_abbr : ' . $state_abbr . '  <br /><span style="font-size:10px;font-weight:normal;">' . __FILE__ . '<br />line no: ' . __LINE__ . '</span></h4>';
315 315
 
316
-			if ( $state_country && $state_name && $state_abbr ) {
317
-				$new_state = EED_Add_New_State::save_new_state_to_db( array(
318
-					'CNT_ISO'=> strtoupper( $state_country ),
319
-					'STA_abbrev' => strtoupper( $state_abbr ),
320
-					'STA_name' => ucwords( $state_name ),
316
+			if ($state_country && $state_name && $state_abbr) {
317
+				$new_state = EED_Add_New_State::save_new_state_to_db(array(
318
+					'CNT_ISO'=> strtoupper($state_country),
319
+					'STA_abbrev' => strtoupper($state_abbr),
320
+					'STA_name' => ucwords($state_name),
321 321
 					'STA_active' => FALSE
322 322
 				));
323 323
 
324
-				if ( $new_state instanceof EE_State ) {
324
+				if ($new_state instanceof EE_State) {
325 325
 					// clean house
326
-					EE_Registry::instance()->REQ->un_set( 'nsmf_add_new_state' );
327
-					EE_Registry::instance()->REQ->un_set( 'nsmf_new_state_country' );
328
-					EE_Registry::instance()->REQ->un_set( 'nsmf_new_state_name' );
329
-					EE_Registry::instance()->REQ->un_set( 'nsmf_new_state_abbrv' );
326
+					EE_Registry::instance()->REQ->un_set('nsmf_add_new_state');
327
+					EE_Registry::instance()->REQ->un_set('nsmf_new_state_country');
328
+					EE_Registry::instance()->REQ->un_set('nsmf_new_state_name');
329
+					EE_Registry::instance()->REQ->un_set('nsmf_new_state_abbrv');
330 330
 
331 331
 					// get any existing new states
332 332
 					$new_states = EE_Registry::instance()->SSN->get_session_data(
333 333
 						'nsmf_new_states'
334 334
 					);
335
-					$new_states[ $new_state->ID() ] = $new_state;
335
+					$new_states[$new_state->ID()] = $new_state;
336 336
 					EE_Registry::instance()->SSN->set_session_data(
337
-						array( 'nsmf_new_states' => $new_states )
337
+						array('nsmf_new_states' => $new_states)
338 338
 					);
339 339
 
340
-					if ( EE_Registry::instance()->REQ->ajax ) {
341
-						echo wp_json_encode( array(
340
+					if (EE_Registry::instance()->REQ->ajax) {
341
+						echo wp_json_encode(array(
342 342
 							'success' => TRUE,
343 343
 							'id' => $new_state->ID(),
344 344
 							'name' => $new_state->name(),
@@ -353,12 +353,12 @@  discard block
 block discarded – undo
353 353
 				}
354 354
 
355 355
 			} else {
356
-				$error = __( 'A new State/Province could not be added because invalid or missing data was received.', 'event_espresso' );
357
-				if ( EE_Registry::instance()->REQ->ajax ) {
358
-					echo wp_json_encode( array( 'error' => $error ));
356
+				$error = __('A new State/Province could not be added because invalid or missing data was received.', 'event_espresso');
357
+				if (EE_Registry::instance()->REQ->ajax) {
358
+					echo wp_json_encode(array('error' => $error));
359 359
 					exit();
360 360
 				} else {
361
-					EE_Error::add_error( $error, __FILE__, __FUNCTION__, __LINE__ );
361
+					EE_Error::add_error($error, __FILE__, __FUNCTION__, __LINE__);
362 362
 				}
363 363
 			}
364 364
 		}
@@ -376,11 +376,11 @@  discard block
 block discarded – undo
376 376
 	 * @param array $request_params
377 377
 	 * @return array
378 378
 	 */
379
-	public static function filter_checkout_request_params ( $request_params ) {
380
-		foreach ( $request_params as $form_section ) {
381
-			if ( is_array( $form_section )) {
382
-				EED_Add_New_State::unset_new_state_request_params( $form_section );
383
-				EED_Add_New_State::filter_checkout_request_params( $form_section );
379
+	public static function filter_checkout_request_params($request_params) {
380
+		foreach ($request_params as $form_section) {
381
+			if (is_array($form_section)) {
382
+				EED_Add_New_State::unset_new_state_request_params($form_section);
383
+				EED_Add_New_State::filter_checkout_request_params($form_section);
384 384
 			}
385 385
 		}
386 386
 		return $request_params;
@@ -395,12 +395,12 @@  discard block
 block discarded – undo
395 395
 	 * @param array $request_params
396 396
 	 * @return        boolean
397 397
 	 */
398
-	public static function unset_new_state_request_params ( $request_params ) {
399
-		unset( $request_params[ 'new_state_micro_form' ] );
400
-		unset( $request_params[ 'new_state_micro_add_new_state' ] );
401
-		unset( $request_params[ 'new_state_micro_new_state_country' ] );
402
-		unset( $request_params[ 'new_state_micro_new_state_name' ] );
403
-		unset( $request_params[ 'new_state_micro_new_state_abbrv' ] );
398
+	public static function unset_new_state_request_params($request_params) {
399
+		unset($request_params['new_state_micro_form']);
400
+		unset($request_params['new_state_micro_add_new_state']);
401
+		unset($request_params['new_state_micro_new_state_country']);
402
+		unset($request_params['new_state_micro_new_state_name']);
403
+		unset($request_params['new_state_micro_new_state_abbrv']);
404 404
 		return $request_params;
405 405
 	}
406 406
 
@@ -413,25 +413,25 @@  discard block
 block discarded – undo
413 413
 	 * @param array $props_n_values
414 414
 	 * @return        boolean
415 415
 	 */
416
-	public static function save_new_state_to_db ( $props_n_values = array() ) {
416
+	public static function save_new_state_to_db($props_n_values = array()) {
417 417
 //		EEH_Debug_Tools::printr( $props_n_values, '$props_n_values  <br /><span style="font-size:10px;font-weight:normal;">' . __FILE__ . '<br />line no: ' . __LINE__ . '</span>', 'auto' );
418
-		$existing_state = EEM_State::instance()->get_all( array( $props_n_values, 'limit' => 1 ));
419
-		if ( ! empty( $existing_state )) {
420
-			return array_pop( $existing_state );
418
+		$existing_state = EEM_State::instance()->get_all(array($props_n_values, 'limit' => 1));
419
+		if ( ! empty($existing_state)) {
420
+			return array_pop($existing_state);
421 421
 		}
422
-		$new_state = EE_State::new_instance( $props_n_values );
423
-		if ( $new_state instanceof EE_State ) {
422
+		$new_state = EE_State::new_instance($props_n_values);
423
+		if ($new_state instanceof EE_State) {
424 424
 			// if not non-ajax admin
425
-			$new_state_key = 'new-state-added-' . $new_state->country_iso() . '-' . $new_state->abbrev();
425
+			$new_state_key = 'new-state-added-'.$new_state->country_iso().'-'.$new_state->abbrev();
426 426
 			$new_state_notice = sprintf(
427
-					__( 'A new State named "%1$s (%2$s)" was dynamically added from an Event Espresso form for the Country of "%3$s".%5$sTo verify, edit, and/or delete this new State, please go to the %4$s and update the States / Provinces section.%5$sCheck "Yes" to have this new State added to dropdown select lists in forms.', 'event_espresso' ),
428
-					'<b>' . $new_state->name() . '</b>',
429
-					'<b>' . $new_state->abbrev() . '</b>',
430
-					'<b>' . $new_state->country()->name() . '</b>',
431
-					'<a href="' . add_query_arg( array( 'page' => 'espresso_general_settings', 'action' => 'country_settings', 'country' => $new_state->country_iso() ), admin_url( 'admin.php' )) . '">' . __( 'Event Espresso - General Settings > Countries Tab', 'event_espresso' ) . '</a>',
427
+					__('A new State named "%1$s (%2$s)" was dynamically added from an Event Espresso form for the Country of "%3$s".%5$sTo verify, edit, and/or delete this new State, please go to the %4$s and update the States / Provinces section.%5$sCheck "Yes" to have this new State added to dropdown select lists in forms.', 'event_espresso'),
428
+					'<b>'.$new_state->name().'</b>',
429
+					'<b>'.$new_state->abbrev().'</b>',
430
+					'<b>'.$new_state->country()->name().'</b>',
431
+					'<a href="'.add_query_arg(array('page' => 'espresso_general_settings', 'action' => 'country_settings', 'country' => $new_state->country_iso()), admin_url('admin.php')).'">'.__('Event Espresso - General Settings > Countries Tab', 'event_espresso').'</a>',
432 432
 					'<br />'
433 433
 			);
434
-			EE_Error::add_persistent_admin_notice( $new_state_key, $new_state_notice );
434
+			EE_Error::add_persistent_admin_notice($new_state_key, $new_state_notice);
435 435
 			$new_state->save();
436 436
 			EEM_State::instance()->reset_cached_states();
437 437
 			return $new_state;
@@ -450,22 +450,22 @@  discard block
 block discarded – undo
450 450
 	 * @param array  $cols_n_values
451 451
 	 * @return        boolean
452 452
 	 */
453
-	public static function update_country_settings( $CNT_ISO = '', $STA_ID = '', $cols_n_values = array() ) {
454
-		$CNT_ISO = ! empty( $CNT_ISO ) ? $CNT_ISO : FALSE;
455
-		if ( ! $CNT_ISO ) {
456
-			EE_Error::add_error( __( 'An invalid or missing Country ISO Code was received.', 'event_espresso' ), __FILE__, __FUNCTION__, __LINE__ );
453
+	public static function update_country_settings($CNT_ISO = '', $STA_ID = '', $cols_n_values = array()) {
454
+		$CNT_ISO = ! empty($CNT_ISO) ? $CNT_ISO : FALSE;
455
+		if ( ! $CNT_ISO) {
456
+			EE_Error::add_error(__('An invalid or missing Country ISO Code was received.', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__);
457 457
 		}
458
-		$STA_abbrev = is_array( $cols_n_values ) && isset( $cols_n_values['STA_abbrev'] ) ? $cols_n_values['STA_abbrev'] : FALSE;
459
-		if (  ! $STA_abbrev && ! empty( $STA_ID )) {
460
-			$state = EEM_State::instance()->get_one_by_ID( $STA_ID );
461
-			if ( $state instanceof EE_State ) {
458
+		$STA_abbrev = is_array($cols_n_values) && isset($cols_n_values['STA_abbrev']) ? $cols_n_values['STA_abbrev'] : FALSE;
459
+		if ( ! $STA_abbrev && ! empty($STA_ID)) {
460
+			$state = EEM_State::instance()->get_one_by_ID($STA_ID);
461
+			if ($state instanceof EE_State) {
462 462
 				$STA_abbrev = $state->abbrev();
463 463
 			}
464 464
 		}
465
-		if ( ! $STA_abbrev ) {
466
-			EE_Error::add_error( __( 'An invalid or missing State Abbreviation was received.', 'event_espresso' ), __FILE__, __FUNCTION__, __LINE__ );
465
+		if ( ! $STA_abbrev) {
466
+			EE_Error::add_error(__('An invalid or missing State Abbreviation was received.', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__);
467 467
 		}
468
-		EE_Error::dismiss_persistent_admin_notice( $CNT_ISO . '-' . $STA_abbrev, TRUE, TRUE );
468
+		EE_Error::dismiss_persistent_admin_notice($CNT_ISO.'-'.$STA_abbrev, TRUE, TRUE);
469 469
 	}
470 470
 
471 471
 
@@ -481,19 +481,19 @@  discard block
 block discarded – undo
481 481
 	 * @param $answer
482 482
 	 * @return bool
483 483
 	 */
484
-	public static function inject_new_reg_state_into_options( $state_options = array(), EE_SPCO_Reg_Step_Attendee_Information $reg_step, EE_Registration $registration, EE_Question $question, $answer ) {
485
-		if ( $answer instanceof EE_Answer  && $question instanceof EE_Question && $question->type() === EEM_Question::QST_type_state ) {
484
+	public static function inject_new_reg_state_into_options($state_options = array(), EE_SPCO_Reg_Step_Attendee_Information $reg_step, EE_Registration $registration, EE_Question $question, $answer) {
485
+		if ($answer instanceof EE_Answer && $question instanceof EE_Question && $question->type() === EEM_Question::QST_type_state) {
486 486
 			$STA_ID = $answer->value();
487
-			if ( ! empty( $STA_ID ) ) {
488
-				$state = EEM_State::instance()->get_one_by_ID( $STA_ID );
489
-				if ( $state instanceof EE_State ) {
487
+			if ( ! empty($STA_ID)) {
488
+				$state = EEM_State::instance()->get_one_by_ID($STA_ID);
489
+				if ($state instanceof EE_State) {
490 490
 					$country = $state->country();
491
-					if ( $country instanceof EE_Country ) {
492
-						if ( ! isset( $state_options[ $country->name() ] )) {
493
-							$state_options[ $country->name() ] = array();
491
+					if ($country instanceof EE_Country) {
492
+						if ( ! isset($state_options[$country->name()])) {
493
+							$state_options[$country->name()] = array();
494 494
 						}
495
-						if ( ! isset( $state_options[ $country->name() ][ $STA_ID ] )) {
496
-							$state_options[ $country->name() ][ $STA_ID ] = $state->name();
495
+						if ( ! isset($state_options[$country->name()][$STA_ID])) {
496
+							$state_options[$country->name()][$STA_ID] = $state->name();
497 497
 						}
498 498
 					}
499 499
 				}
@@ -515,14 +515,14 @@  discard block
 block discarded – undo
515 515
 	 * @param $answer
516 516
 	 * @return bool
517 517
 	 */
518
-	public static function inject_new_reg_country_into_options( $country_options = array(), EE_SPCO_Reg_Step_Attendee_Information $reg_step, EE_Registration $registration, EE_Question $question, $answer ) {
519
-		if ( $answer instanceof EE_Answer && $question instanceof EE_Question && $question->type() === EEM_Question::QST_type_country ) {
518
+	public static function inject_new_reg_country_into_options($country_options = array(), EE_SPCO_Reg_Step_Attendee_Information $reg_step, EE_Registration $registration, EE_Question $question, $answer) {
519
+		if ($answer instanceof EE_Answer && $question instanceof EE_Question && $question->type() === EEM_Question::QST_type_country) {
520 520
 			$CNT_ISO = $answer->value();
521
-			if ( ! empty( $CNT_ISO ) ) {
522
-				$country = EEM_Country::instance()->get_one_by_ID( $CNT_ISO );
523
-				if ( $country instanceof EE_Country ) {
524
-					if ( ! isset( $country_options[ $CNT_ISO ] ) ) {
525
-						$country_options[ $CNT_ISO ] = $country->name();
521
+			if ( ! empty($CNT_ISO)) {
522
+				$country = EEM_Country::instance()->get_one_by_ID($CNT_ISO);
523
+				if ($country instanceof EE_Country) {
524
+					if ( ! isset($country_options[$CNT_ISO])) {
525
+						$country_options[$CNT_ISO] = $country->name();
526 526
 					}
527 527
 				}
528 528
 			}
@@ -539,14 +539,14 @@  discard block
 block discarded – undo
539 539
 	 * @param EE_State[]  $state_options
540 540
 	 * @return        boolean
541 541
 	 */
542
-	public static function state_options( $state_options = array() ) {
542
+	public static function state_options($state_options = array()) {
543 543
 		$new_states = EED_Add_New_State::_get_new_states();
544
-		foreach ( $new_states as $new_state ) {
544
+		foreach ($new_states as $new_state) {
545 545
 			if (
546 546
 				$new_state instanceof EE_State
547 547
 				&& $new_state->country() instanceof EE_Country
548 548
 			) {
549
-				$state_options[ $new_state->country()->name() ][ $new_state->ID() ] = $new_state->name();
549
+				$state_options[$new_state->country()->name()][$new_state->ID()] = $new_state->name();
550 550
 			}
551 551
 		}
552 552
 		return $state_options;
@@ -562,12 +562,12 @@  discard block
 block discarded – undo
562 562
 	 */
563 563
 	protected static function _get_new_states() {
564 564
 		$new_states = array();
565
-		if ( EE_Registry::instance()->SSN instanceof EE_Session ) {
565
+		if (EE_Registry::instance()->SSN instanceof EE_Session) {
566 566
 			$new_states = EE_Registry::instance()->SSN->get_session_data(
567 567
 				'nsmf_new_states'
568 568
 			);
569 569
 		}
570
-		return is_array( $new_states ) ? $new_states : array();
570
+		return is_array($new_states) ? $new_states : array();
571 571
 	}
572 572
 
573 573
 
@@ -579,14 +579,14 @@  discard block
 block discarded – undo
579 579
 	 * @param EE_Country[]  $country_options
580 580
 	 * @return        boolean
581 581
 	 */
582
-	public static function country_options( $country_options = array() ) {
582
+	public static function country_options($country_options = array()) {
583 583
 		$new_states = EED_Add_New_State::_get_new_states();
584
-		foreach ( $new_states as $new_state ) {
584
+		foreach ($new_states as $new_state) {
585 585
 			if (
586 586
 				$new_state instanceof EE_State
587 587
 				&& $new_state->country() instanceof EE_Country
588 588
 			) {
589
-				$country_options[ $new_state->country()->ID() ] = $new_state->country()->name();
589
+				$country_options[$new_state->country()->ID()] = $new_state->country()->name();
590 590
 			}
591 591
 		}
592 592
 		return $country_options;
Please login to merge, or discard this patch.
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -448,7 +448,7 @@  discard block
 block discarded – undo
448 448
 	 * @param string $CNT_ISO
449 449
 	 * @param string $STA_ID
450 450
 	 * @param array  $cols_n_values
451
-	 * @return        boolean
451
+	 * @return        boolean|null
452 452
 	 */
453 453
 	public static function update_country_settings( $CNT_ISO = '', $STA_ID = '', $cols_n_values = array() ) {
454 454
 		$CNT_ISO = ! empty( $CNT_ISO ) ? $CNT_ISO : FALSE;
@@ -537,7 +537,7 @@  discard block
 block discarded – undo
537 537
 	 *
538 538
 	 * @access        public
539 539
 	 * @param EE_State[]  $state_options
540
-	 * @return        boolean
540
+	 * @return        EE_State[]
541 541
 	 */
542 542
 	public static function state_options( $state_options = array() ) {
543 543
 		$new_states = EED_Add_New_State::_get_new_states();
Please login to merge, or discard this patch.
modules/csv/EED_Csv.module.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 	 * @return EED_Csv
30 30
 	 */
31 31
 	public static function instance() {
32
-		return parent::get_instance( __CLASS__ );
32
+		return parent::get_instance(__CLASS__);
33 33
 	}
34 34
 
35 35
 
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
 	 *  @access 	public
61 61
 	 *  @return 	void
62 62
 	 */
63
-	public function run( $WP ) {
63
+	public function run($WP) {
64 64
 //		add_filter( 'FHEE_load_ee_config', '__return_true' );
65 65
 //		add_filter( 'FHEE_run_EE_wp', '__return_true' );
66 66
 //		add_filter( 'FHEE_load_EE_Session', '__return_true' );
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
 	 *  @return 	void
80 80
 	 */
81 81
 	public function export() {
82
-		$Export = EE_Registry::instance()->load_class( 'Export' );
82
+		$Export = EE_Registry::instance()->load_class('Export');
83 83
 		$Export->export();
84 84
 	}
85 85
 
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
 	 *  @return 	void
94 94
 	 */
95 95
 	public function import() {
96
-		$Import = EE_Registry::instance()->load_class( 'Import' );
96
+		$Import = EE_Registry::instance()->load_class('Import');
97 97
 		$Import->import();
98 98
 	}
99 99
 
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,6 @@
 block discarded – undo
1
-<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) exit('No direct script access allowed');
1
+<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) {
2
+	exit('No direct script access allowed');
3
+}
2 4
 /**
3 5
  * Event Espresso
4 6
  *
Please login to merge, or discard this patch.
modules/feeds/templates/espresso_events_feed.template.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -10,13 +10,13 @@
 block discarded – undo
10 10
  * @ version		4+
11 11
  */
12 12
  ?>
13
-<p><?php  _e( 'Event Organizer: ', 'event_espresso' ) . espresso_organization_name( $EVT_ID ); ?><br/>
14
-<?php  _e( 'Organizer Email: ', 'event_espresso' ) . espresso_organization_email( $EVT_ID ); ?><br/>
15
-<?php  _e( 'Event Phone: ', 'event_espresso' ) . espresso_event_phone( $EVT_ID ); ?></p>
16
-<p><?php  _e( 'Event Status: ', 'event_espresso' ) . espresso_event_status( $EVT_ID );?></p>
17
-<p><?php  _e( 'Categories: ', 'event_espresso' ) . espresso_event_categories( $EVT_ID );?></p>
18
-<?php  _e( 'Dates and Times: ', 'event_espresso' ) . espresso_list_of_event_dates( $EVT_ID );?>
19
-<?php  _e( 'Available Tickets: ', 'event_espresso' ) . espresso_event_tickets_available( $EVT_ID );?>
20
-<p><?php  _e( 'Event Venue: ', 'event_espresso' ) . espresso_venue_name( NULL, FALSE ); ?></p>
21
-<p><?php  echo __( 'Description: ', 'event_espresso' ) . $event_description; ?></p><br/>
13
+<p><?php  _e('Event Organizer: ', 'event_espresso').espresso_organization_name($EVT_ID); ?><br/>
14
+<?php  _e('Organizer Email: ', 'event_espresso').espresso_organization_email($EVT_ID); ?><br/>
15
+<?php  _e('Event Phone: ', 'event_espresso').espresso_event_phone($EVT_ID); ?></p>
16
+<p><?php  _e('Event Status: ', 'event_espresso').espresso_event_status($EVT_ID); ?></p>
17
+<p><?php  _e('Categories: ', 'event_espresso').espresso_event_categories($EVT_ID); ?></p>
18
+<?php  _e('Dates and Times: ', 'event_espresso').espresso_list_of_event_dates($EVT_ID); ?>
19
+<?php  _e('Available Tickets: ', 'event_espresso').espresso_event_tickets_available($EVT_ID); ?>
20
+<p><?php  _e('Event Venue: ', 'event_espresso').espresso_venue_name(NULL, FALSE); ?></p>
21
+<p><?php  echo __('Description: ', 'event_espresso').$event_description; ?></p><br/>
22 22
  
23 23
\ No newline at end of file
Please login to merge, or discard this patch.
modules/feeds/templates/espresso_venues_feed.template.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -10,11 +10,11 @@
 block discarded – undo
10 10
  * @ version		4+
11 11
  */
12 12
  ?>
13
-<p><?php  _e( 'Organizer Name: ', 'event_espresso' ) . espresso_organization_name( $VNU_ID ); ?><br/>
14
-<?php  _e( 'Organizer Email: ', 'event_espresso' ) . espresso_organization_email( $VNU_ID ); ?><br/>
15
-<?php  _e( 'Venue Phone: ', 'event_espresso' ) . espresso_venue_phone( $VNU_ID ); ?></p>
16
-<p><?php  _e( 'Categories: ', 'event_espresso' ) . espresso_venue_categories( $VNU_ID );?></p>
17
-<p><?php  _e( 'Address: ', 'event_espresso' ) . espresso_venue_address( $VNU_ID );?></p>
18
-<p><?php  _e( 'Website: ', 'event_espresso' ) . espresso_venue_website( $VNU_ID );?></p>
19
-<p><?php  echo __( 'Description: ', 'event_espresso' )  . $venue_description; ?></p><br/>
13
+<p><?php  _e('Organizer Name: ', 'event_espresso').espresso_organization_name($VNU_ID); ?><br/>
14
+<?php  _e('Organizer Email: ', 'event_espresso').espresso_organization_email($VNU_ID); ?><br/>
15
+<?php  _e('Venue Phone: ', 'event_espresso').espresso_venue_phone($VNU_ID); ?></p>
16
+<p><?php  _e('Categories: ', 'event_espresso').espresso_venue_categories($VNU_ID); ?></p>
17
+<p><?php  _e('Address: ', 'event_espresso').espresso_venue_address($VNU_ID); ?></p>
18
+<p><?php  _e('Website: ', 'event_espresso').espresso_venue_website($VNU_ID); ?></p>
19
+<p><?php  echo __('Description: ', 'event_espresso').$venue_description; ?></p><br/>
20 20
  
21 21
\ No newline at end of file
Please login to merge, or discard this patch.
modules/gateways/Invoice/lib/templates/invoice_body.template.php 3 patches
Switch Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -154,12 +154,12 @@
 block discarded – undo
154 154
 							<td class="item_r"><?php echo $line_item->total_no_code();?></td>
155 155
 						</tr>
156 156
 						<?php break;
157
-					case EEM_Line_Item::type_tax:
158
-							?>
157
+						case EEM_Line_Item::type_tax:
158
+								?>
159 159
 						<tr class="item sub-item tax-total">
160 160
 							<td class="item_l"><?php echo $line_item->name(); ?></td>
161 161
 							<?php if ($show_line_item_description){?><td class="item_l"><?php echo $line_item->desc() ?></td><?php }?>
162
-							<td colspan="2" class="item_c"><?php echo $line_item->percent(); ?>%</td>
162
+								<td colspan="2" class="item_c"><?php echo $line_item->percent(); ?>%</td>
163 163
 
164 164
 							<td class="item_r"><?php echo $line_item->total_no_code();?></td>
165 165
 						</tr><?php break;
Please login to merge, or discard this patch.
Spacing   +43 added lines, -43 removed lines patch added patch discarded remove patch
@@ -45,13 +45,13 @@  discard block
 block discarded – undo
45 45
 					</div>
46 46
 					 <!--#client-details vcard-->
47 47
 
48
-		<h2><?php _e("Purchases",'event_espresso')?></h2>
48
+		<h2><?php _e("Purchases", 'event_espresso')?></h2>
49 49
 		<table class="invoice-amount">
50 50
 
51 51
 			<thead>
52 52
 				<tr class="header_row">
53 53
 					<th class="left ticket_th"><?php _e('Item', 'event_espresso'); ?></th>
54
-					<?php if ($show_line_item_description){?><th class="left event_th"><?php _e('Description', 'event_espresso'); ?></th><?php }?>
54
+					<?php if ($show_line_item_description) {?><th class="left event_th"><?php _e('Description', 'event_espresso'); ?></th><?php }?>
55 55
 					<th class="quantity_th"><?php _e('Qty', 'event_espresso'); ?></th>
56 56
 					<th class="left event_th"><?php _e('Price', 'event_espresso'); ?></th>
57 57
 					<th class="subtotal_th item_r"><?php _e('Total', 'event_espresso'); ?></th>
@@ -65,56 +65,56 @@  discard block
 block discarded – undo
65 65
 				 * @param EE_Line_Item $line_item
66 66
 				 * @param boolean $odd for indicating whether to style this line item as an 'odd' or 'even'
67 67
 				 */
68
-				function ee_invoice_display_line_item(EE_Line_Item $line_item, $show_line_item_description, $odd = false){
69
-					switch($line_item->type()){
68
+				function ee_invoice_display_line_item(EE_Line_Item $line_item, $show_line_item_description, $odd = false) {
69
+					switch ($line_item->type()) {
70 70
 						case EEM_Line_Item::type_total:
71
-							foreach($line_item->children() as $child_line_item){
72
-								ee_invoice_display_line_item($child_line_item,$show_line_item_description);
71
+							foreach ($line_item->children() as $child_line_item) {
72
+								ee_invoice_display_line_item($child_line_item, $show_line_item_description);
73 73
 								}?>
74 74
 							<tr><td colspan="<?php echo $show_line_item_description ? 5 : 4 ?>"><hr></td></tr>
75 75
 							<tr class="total_tr odd">
76 76
 								<td colspan="<?php echo $show_line_item_description ? 2 : 1 ?>">&nbsp;</td>
77 77
 								<td colspan="2" class="total" id="total_currency"><?php _e('Total', 'event_espresso'); ?></td>
78
-								<td class="total"><?php echo $line_item->total_no_code();?></td>
78
+								<td class="total"><?php echo $line_item->total_no_code(); ?></td>
79 79
 							</tr>
80 80
 						<?php break;
81 81
 
82 82
 
83 83
 						case EEM_Line_Item::type_sub_total:
84
-							foreach($line_item->children() as $child_line_item){
84
+							foreach ($line_item->children() as $child_line_item) {
85 85
 							//$odd = !$odd;
86
-								ee_invoice_display_line_item($child_line_item,$show_line_item_description,$odd);
86
+								ee_invoice_display_line_item($child_line_item, $show_line_item_description, $odd);
87 87
 							}?>
88 88
 							<tr class="total_tr odd">
89 89
 								<td colspan="<?php echo $show_line_item_description ? 2 : 1 ?>">&nbsp;</td>
90 90
 								<td colspan="2" class="total" id="total_currency"><?php _e('Sub-Total', 'event_espresso'); ?></td>
91
-								<td class="total"><?php echo $line_item->total_no_code();?></td>
91
+								<td class="total"><?php echo $line_item->total_no_code(); ?></td>
92 92
 							</tr>
93 93
 						<?php break;
94 94
 
95 95
 
96 96
 						case EEM_Line_Item::type_tax_sub_total:
97
-							foreach($line_item->children() as $child_line_item){
98
-								$odd = !$odd;
97
+							foreach ($line_item->children() as $child_line_item) {
98
+								$odd = ! $odd;
99 99
 								ee_invoice_display_line_item($child_line_item, $show_line_item_description, $odd);
100 100
 							}?>
101 101
 							<tr class="total_tr odd">
102 102
 								<td colspan="<?php echo $show_line_item_description ? 2 : 1 ?>">&nbsp;</td>
103 103
 								<td colspan="2" class="total" id="total_currency"><?php _e('Tax Total', 'event_espresso'); ?></td>
104
-								<td class="total"><?php echo $line_item->total_no_code();?></td>
104
+								<td class="total"><?php echo $line_item->total_no_code(); ?></td>
105 105
 							</tr>
106 106
 						<?php break;
107 107
 
108 108
 
109 109
 						case EEM_Line_Item::type_line_item:
110 110
 							$subitems = $line_item->children();
111
-							$has_subitems  = count($subitems) > 1 ;
112
-							if($has_subitems){
111
+							$has_subitems = count($subitems) > 1;
112
+							if ($has_subitems) {
113 113
 							?>
114
-							<tr class="item <?php echo $odd ?   'odd' : ''; ?>">
114
+							<tr class="item <?php echo $odd ? 'odd' : ''; ?>">
115 115
 								<td class="item_l"><?php echo $line_item->name() ?></td>
116
-								<?php if ($show_line_item_description){?><td class="item_l"><?php echo $line_item->desc() ?></td><?php }?>
117
-								<td class="item_l"><?php echo $line_item->quantity();?></td>
116
+								<?php if ($show_line_item_description) {?><td class="item_l"><?php echo $line_item->desc() ?></td><?php }?>
117
+								<td class="item_l"><?php echo $line_item->quantity(); ?></td>
118 118
 
119 119
 								<td class="item_c"><?php echo $line_item->unit_price_no_code()?></td>
120 120
 
@@ -122,15 +122,15 @@  discard block
 block discarded – undo
122 122
 								<?php //<td class="item_l"><?php  $datetimes_strings = array(); foreach($datetimes as $datetime){ $datetimes_strings[]= $datetime->start_date_and_time();} echo implode(", ",$datetimes_strings); ?>
123 123
 							</tr>
124 124
 							<?php
125
-								if( $has_subitems ){
126
-									foreach($line_item->children() as $child_line_item){
127
-										ee_invoice_display_line_item($child_line_item,$show_line_item_description, $odd);
125
+								if ($has_subitems) {
126
+									foreach ($line_item->children() as $child_line_item) {
127
+										ee_invoice_display_line_item($child_line_item, $show_line_item_description, $odd);
128 128
 									}
129 129
 								}
130
-							}else{//no subitems - just show this line item ?>
131
-								<tr class="item <?php echo $odd ?   'odd' : ''; ?>">
130
+							} else {//no subitems - just show this line item ?>
131
+								<tr class="item <?php echo $odd ? 'odd' : ''; ?>">
132 132
 									<td class="item_l"><?php echo $line_item->name()?></td>
133
-									<?php if ($show_line_item_description){?><td class="item_l"><?php echo $line_item->desc() ?></td><?php }?>
133
+									<?php if ($show_line_item_description) {?><td class="item_l"><?php echo $line_item->desc() ?></td><?php }?>
134 134
 									<td class="item_l"><?php echo $line_item->quantity()?></td>
135 135
 									<td class="item_c"><?php echo $line_item->unit_price_no_code()?></td>
136 136
 									<td class="item_r"> <?php echo $line_item->total_no_code(); echo $line_item->is_taxable() ? '*' : ''?> </td>
@@ -143,32 +143,32 @@  discard block
 block discarded – undo
143 143
 							?>
144 144
 						<tr class="item subitem-row">
145 145
 							<td class="item_l subitem"><?php echo $line_item->name(); ?></td>
146
-							<?php if ($show_line_item_description){?><td class="item_l"><?php echo $line_item->desc() ?></td><?php }?>
146
+							<?php if ($show_line_item_description) {?><td class="item_l"><?php echo $line_item->desc() ?></td><?php }?>
147 147
 							<?php if ($line_item->is_percent()) { ?>
148 148
 									<td></td>
149
-									<td class="item_c"><?php echo $line_item->percent();?>%</td>
150
-							<?php }else{//flat discount/surcharge ?>
149
+									<td class="item_c"><?php echo $line_item->percent(); ?>%</td>
150
+							<?php } else {//flat discount/surcharge ?>
151 151
 									<td></td>
152
-									<td class="item_c"><?php echo $line_item->unit_price_no_code();?></td>
152
+									<td class="item_c"><?php echo $line_item->unit_price_no_code(); ?></td>
153 153
 							<?php } ?>
154
-							<td class="item_r"><?php echo $line_item->total_no_code();?></td>
154
+							<td class="item_r"><?php echo $line_item->total_no_code(); ?></td>
155 155
 						</tr>
156 156
 						<?php break;
157 157
 					case EEM_Line_Item::type_tax:
158 158
 							?>
159 159
 						<tr class="item sub-item tax-total">
160 160
 							<td class="item_l"><?php echo $line_item->name(); ?></td>
161
-							<?php if ($show_line_item_description){?><td class="item_l"><?php echo $line_item->desc() ?></td><?php }?>
161
+							<?php if ($show_line_item_description) {?><td class="item_l"><?php echo $line_item->desc() ?></td><?php }?>
162 162
 							<td colspan="2" class="item_c"><?php echo $line_item->percent(); ?>%</td>
163 163
 
164
-							<td class="item_r"><?php echo $line_item->total_no_code();?></td>
164
+							<td class="item_r"><?php echo $line_item->total_no_code(); ?></td>
165 165
 						</tr><?php break;
166 166
 					}
167 167
 				}
168
-				$c=false;
168
+				$c = false;
169 169
 				/* @var $transaction EE_Transaction */
170 170
 				$total_line_item = $transaction->total_line_item();
171
-				ee_invoice_display_line_item($total_line_item,$show_line_item_description);
171
+				ee_invoice_display_line_item($total_line_item, $show_line_item_description);
172 172
 				/* foreach($transaction->registrations() as $registration){
173 173
 					 ?>
174 174
 					<tr class="item <?php echo ($c = !$c) ? ' odd' : ''; ?>">
@@ -183,13 +183,13 @@  discard block
 block discarded – undo
183 183
 			</tbody>
184 184
 
185 185
 		</table>
186
-		<p><?php _e("* taxable items", "event_espresso");?></p>
187
-		<h2><?php _e("Payments",'event_espresso')?></h2>
186
+		<p><?php _e("* taxable items", "event_espresso"); ?></p>
187
+		<h2><?php _e("Payments", 'event_espresso')?></h2>
188 188
 		<table class="invoice-amount">
189 189
 			<thead>
190 190
 				<tr class="header_row">
191 191
 					<th ><span class=""><?php _e('Payment Method', 'event_espresso'); ?></span></th>
192
-					<th class='left datetime_th'><?php _e("Date",'event_espresso')?></th>
192
+					<th class='left datetime_th'><?php _e("Date", 'event_espresso')?></th>
193 193
 					<th ><span class=""><?php _e('Transaction Id / Cheque #', 'event_espresso'); ?></span></th>
194 194
 					<th ><span class=""><?php _e('P.O. / S.O.#', 'event_espresso'); ?></span></th>
195 195
 					<th ><span class=""><?php _e('Status', 'event_espresso'); ?></span></th>
@@ -199,29 +199,29 @@  discard block
 block discarded – undo
199 199
 			<tbody>
200 200
 				<?php
201 201
 				$c = false;
202
-				if(!empty($payments)){
202
+				if ( ! empty($payments)) {
203 203
 
204
-					foreach($payments as $payment){
204
+					foreach ($payments as $payment) {
205 205
 						/* @var $payment EE_Payment */?>
206
-					<tr class='item <?php echo (($c = !$c) ? ' odd' : '')?>'>
206
+					<tr class='item <?php echo (($c = ! $c) ? ' odd' : '')?>'>
207 207
 						<td><?php $payment->e('PAY_gateway')?></td>
208 208
 						<td><?php echo $payment->timestamp('D M j, Y')?></td>
209 209
 						<td><?php $payment->e('PAY_txn_id_chq_nmbr')?></td>
210 210
 						<td><?php $payment->e('PAY_po_number')?></td>
211 211
 						<td><?php $payment->e_pretty_status()?></td>
212
-						<td class='item_r'><?php echo EEH_Template::format_currency($payment->amount());?></td>
212
+						<td class='item_r'><?php echo EEH_Template::format_currency($payment->amount()); ?></td>
213 213
 					</tr>
214 214
 					<?php }
215
-				}else{?>
215
+				} else {?>
216 216
 					<tr class='item'>
217
-						<td class='aln-cntr' colspan=6><?php _e("No approved payments have been received",'event_espresso')?></td>
217
+						<td class='aln-cntr' colspan=6><?php _e("No approved payments have been received", 'event_espresso')?></td>
218 218
 					</tr>
219 219
 				<?php }
220 220
 ?>
221 221
 			</tbody>
222 222
 			<tfoot>
223 223
 				<tr class='total_tr'><td colspan="4"></td>
224
-					<td class="item_r"><?php _e('Total Paid','event_espresso')?></td>
224
+					<td class="item_r"><?php _e('Total Paid', 'event_espresso')?></td>
225 225
 					<td class="item_r"><?php echo EEH_Template::format_currency($amount_pd)?> </td>
226 226
 				</tr>
227 227
 				<?php //echo $discount; ?>
Please login to merge, or discard this patch.
Braces   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
 										ee_invoice_display_line_item($child_line_item,$show_line_item_description, $odd);
128 128
 									}
129 129
 								}
130
-							}else{//no subitems - just show this line item ?>
130
+							} else{//no subitems - just show this line item ?>
131 131
 								<tr class="item <?php echo $odd ?   'odd' : ''; ?>">
132 132
 									<td class="item_l"><?php echo $line_item->name()?></td>
133 133
 									<?php if ($show_line_item_description){?><td class="item_l"><?php echo $line_item->desc() ?></td><?php }?>
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
 							<?php if ($line_item->is_percent()) { ?>
148 148
 									<td></td>
149 149
 									<td class="item_c"><?php echo $line_item->percent();?>%</td>
150
-							<?php }else{//flat discount/surcharge ?>
150
+							<?php } else{//flat discount/surcharge ?>
151 151
 									<td></td>
152 152
 									<td class="item_c"><?php echo $line_item->unit_price_no_code();?></td>
153 153
 							<?php } ?>
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
 						<td class='item_r'><?php echo EEH_Template::format_currency($payment->amount());?></td>
213 213
 					</tr>
214 214
 					<?php }
215
-				}else{?>
215
+				} else{?>
216 216
 					<tr class='item'>
217 217
 						<td class='aln-cntr' colspan=6><?php _e("No approved payments have been received",'event_espresso')?></td>
218 218
 					</tr>
Please login to merge, or discard this patch.
modules/gateways/Invoice/lib/templates/invoice_header.template.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@
 block discarded – undo
6 6
 <!-- Base Stylesheet do not change or remove -->
7 7
 <link rel="stylesheet" type="text/css" href="[base_url]base.css" media="screen" />
8 8
 <!-- Print Style Sheet -->
9
-<link rel="stylesheet" type="text/css" href="[base_url]css/print/<?php echo str_replace('.css', '',$invoice_css); ?>_print.css" media="print" />
9
+<link rel="stylesheet" type="text/css" href="[base_url]css/print/<?php echo str_replace('.css', '', $invoice_css); ?>_print.css" media="print" />
10 10
 <!-- Primary Style Sheet -->
11 11
 <link rel="stylesheet" type="text/css" href="[base_url]css/<?php echo $invoice_css; ?>" />
12 12
 <!-- Make sure the buttons don't print -->
Please login to merge, or discard this patch.
modules/gateways/Invoice/lib/templates/receipt_body.template.php 2 patches
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
 									<td class="item_c"><?php echo $line_item->unit_price_no_code()?></td>
74 74
 									<td class="item_r"><?php echo $line_item->total_no_code()?></td>
75 75
 								</tr>
76
-								<?php }else{?>
76
+								<?php } else{?>
77 77
 									<tr class="item">
78 78
 										<td class="aln-left"><?php echo $line_item->name().$taxable_html?></td>
79 79
 										<td colspan="2"><?php echo $line_item->desc();?><p class="ticket-note"><?php echo sprintf(__('This ticket can be used once at %s of the dates/times below.', 'event_espresso'), $ticket_uses); ?></p></td>
@@ -237,7 +237,7 @@  discard block
 block discarded – undo
237 237
 							<td class='item_r'><?php echo $payment->amount_no_code()?></td>
238 238
 						</tr>
239 239
 						<?php }
240
-					}else{?>
240
+					} else{?>
241 241
 						<tr class='item'>
242 242
 							<td class='aln-cntr' colspan="6"><?php _e("No approved payments have been received.",'event_espresso')?> </td>
243 243
 						</tr>
Please login to merge, or discard this patch.
Spacing   +62 added lines, -62 removed lines patch added patch discarded remove patch
@@ -36,53 +36,53 @@  discard block
 block discarded – undo
36 36
 						<h2 id="invoice-hdr"><?php _e('Order Confirmation', 'event_espresso')?></h2>
37 37
 						<h3 id="invoice-date"><?php _e('Date:', 'event_espresso')?> <span class="plain-text">[registration_date]</span></h3>
38 38
 						<h3 id="invoice-txn-id"><?php _e('Transaction ID:', 'event_espresso')?> <span class="plain-text">[transaction_id]</span></h3>
39
-						<h3 id="invoice-txn-status"><?php _e('Status:', 'event_espresso')?> <span class="<?php echo $transaction->status_ID()?> plain-text"><?php echo $transaction->pretty_status();?></span></h3>
39
+						<h3 id="invoice-txn-status"><?php _e('Status:', 'event_espresso')?> <span class="<?php echo $transaction->status_ID()?> plain-text"><?php echo $transaction->pretty_status(); ?></span></h3>
40 40
 					</div>
41 41
 				</td>
42 42
 			</tr>
43 43
 		</table>
44 44
 		<div class="events">
45
-		<?php foreach($events_for_txn as $event_id => $event){
46
-			?><h3 class="section-title event-name"><img class="icon" src="<?php echo EE_IMAGES_URL.'calendar_year-24x24.png';?>"><?php _e("Event Name:","event_espresso")?> <span class="plain-text"><?php echo $event->name();?></span> <span class="small-text link">[ <a href='<?php echo $event->get_permalink()?>'><?php _e('view', 'event_espresso'); ?></a> ]</span></h3>
47
-			<?php if (strlen($event->description()>1)){?><p class="event-description"><?php $event->description()?></p><?php }?>
45
+		<?php foreach ($events_for_txn as $event_id => $event) {
46
+			?><h3 class="section-title event-name"><img class="icon" src="<?php echo EE_IMAGES_URL.'calendar_year-24x24.png'; ?>"><?php _e("Event Name:", "event_espresso")?> <span class="plain-text"><?php echo $event->name(); ?></span> <span class="small-text link">[ <a href='<?php echo $event->get_permalink()?>'><?php _e('view', 'event_espresso'); ?></a> ]</span></h3>
47
+			<?php if (strlen($event->description() > 1)) {?><p class="event-description"><?php $event->description()?></p><?php }?>
48 48
 			<ul class="tickets-per-event">
49
-			<?php foreach($ticket_line_items_per_event[$event_id] as $line_item_id => $line_item){
49
+			<?php foreach ($ticket_line_items_per_event[$event_id] as $line_item_id => $line_item) {
50 50
 				$ticket = $line_item->ticket();
51
-				$taxable_html = $ticket->taxable() ? '*': '';
51
+				$taxable_html = $ticket->taxable() ? '*' : '';
52 52
 				$subitems = $line_item->children();
53
-				$ticket_uses = $ticket->get_pretty('TKT_uses',  __("any", "event_espresso"));
53
+				$ticket_uses = $ticket->get_pretty('TKT_uses', __("any", "event_espresso"));
54 54
 			?>
55 55
 				<li class="event-ticket">
56 56
 					<div class="ticket-details">
57 57
 						<table class="invoice-amount">
58 58
 							<thead>
59 59
 								<tr class="header_row">
60
-									<th class="name-column"><?php _e("Ticket", "event_espresso");?></th>
61
-									<th colspan="2" class="desc-column"><?php _e("Description", "event_espresso");?></th>
62
-									<th class="number-column item_c"><?php _e("Quantity", "event_espresso");?></th>
63
-									<th class="number-column item_c"><?php _e("Price", "event_espresso");?></th>
64
-									<th class="number-column item_r"><?php _e("Total", "event_espresso");?></th>
60
+									<th class="name-column"><?php _e("Ticket", "event_espresso"); ?></th>
61
+									<th colspan="2" class="desc-column"><?php _e("Description", "event_espresso"); ?></th>
62
+									<th class="number-column item_c"><?php _e("Quantity", "event_espresso"); ?></th>
63
+									<th class="number-column item_c"><?php _e("Price", "event_espresso"); ?></th>
64
+									<th class="number-column item_r"><?php _e("Total", "event_espresso"); ?></th>
65 65
 								</tr>
66 66
 							</thead>
67 67
 							<tbody>
68
-								<?php if( count($subitems) < 2){?>
68
+								<?php if (count($subitems) < 2) {?>
69 69
 								<tr class="item">
70 70
 									<td><?php echo $line_item->name().$taxable_html?></td>
71
-									<td colspan="2"><?php echo $line_item->desc();?><p class="ticket-note"><?php echo sprintf(__('This ticket can be used once at %s of the dates/times below.', 'event_espresso'), $ticket_uses); ?></p></td>
71
+									<td colspan="2"><?php echo $line_item->desc(); ?><p class="ticket-note"><?php echo sprintf(__('This ticket can be used once at %s of the dates/times below.', 'event_espresso'), $ticket_uses); ?></p></td>
72 72
 									<td class="item_c"><?php echo $line_item->quantity()?></td>
73 73
 									<td class="item_c"><?php echo $line_item->unit_price_no_code()?></td>
74 74
 									<td class="item_r"><?php echo $line_item->total_no_code()?></td>
75 75
 								</tr>
76
-								<?php }else{?>
76
+								<?php } else {?>
77 77
 									<tr class="item">
78 78
 										<td class="aln-left"><?php echo $line_item->name().$taxable_html?></td>
79
-										<td colspan="2"><?php echo $line_item->desc();?><p class="ticket-note"><?php echo sprintf(__('This ticket can be used once at %s of the dates/times below.', 'event_espresso'), $ticket_uses); ?></p></td>
79
+										<td colspan="2"><?php echo $line_item->desc(); ?><p class="ticket-note"><?php echo sprintf(__('This ticket can be used once at %s of the dates/times below.', 'event_espresso'), $ticket_uses); ?></p></td>
80 80
 										<td class="item_c"><?php echo $line_item->quantity()?></td>
81 81
 										<td class="item_c"><?php echo $line_item->unit_price_no_code()?></td>
82 82
 										<td class="item_r"><?php echo $line_item->total_no_code()?></td>
83 83
 									</tr>
84
-									<?php foreach($subitems as $sub_line_item){
85
-										$is_percent = $sub_line_item->is_percent();?>
84
+									<?php foreach ($subitems as $sub_line_item) {
85
+										$is_percent = $sub_line_item->is_percent(); ?>
86 86
 										<tr class="subitem-row">
87 87
 											<td class="subitem"><?php echo $sub_line_item->name()?></td>
88 88
 											<td colspan="2"><?php echo $sub_line_item->desc()?></td>
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
 									<?php } ?>
94 94
 									<tr class="total_tr odd">
95 95
 										<td colspan="4"></td>
96
-										<td class="total" nowrap="nowrap"><?php _e("Ticket Total:", "event_espresso");?></td>
96
+										<td class="total" nowrap="nowrap"><?php _e("Ticket Total:", "event_espresso"); ?></td>
97 97
 										<td class="item_r"><?php echo $line_item->total_no_code()?></td>
98 98
 									</tr>
99 99
 								<?php }?>
@@ -104,22 +104,22 @@  discard block
 block discarded – undo
104 104
 					<div class="reg-details-for-ticket">
105 105
 						<div class="ticket-time-and-place-details">
106 106
 							<div class="ticket-time-details">
107
-								<h4 class="sub-section-title no-bottom-margin"><img class="icon" src="<?php echo EE_IMAGES_URL.'clock-16x16.png';?>"><?php echo _n("Date/Time:","Dates/Times:",count($ticket->datetimes()), "event_espresso");?></h4>
107
+								<h4 class="sub-section-title no-bottom-margin"><img class="icon" src="<?php echo EE_IMAGES_URL.'clock-16x16.png'; ?>"><?php echo _n("Date/Time:", "Dates/Times:", count($ticket->datetimes()), "event_espresso"); ?></h4>
108 108
 								<ul class="event-dates">
109
-									<?php foreach($ticket->datetimes_ordered() as $datetime){
109
+									<?php foreach ($ticket->datetimes_ordered() as $datetime) {
110 110
 										/* @var $datetime EE_Datetime */ ?>
111 111
 									<li><?php
112
-										echo $datetime->name() ? '<b>'.$datetime->name().' </b>' : '' ;
113
-										echo sprintf(__("%s - %s (%s)", "event_espresso"),$datetime->start_date_and_time(),$datetime->end_date_and_time(),$datetime->get_timezone());
112
+										echo $datetime->name() ? '<b>'.$datetime->name().' </b>' : '';
113
+										echo sprintf(__("%s - %s (%s)", "event_espresso"), $datetime->start_date_and_time(), $datetime->end_date_and_time(), $datetime->get_timezone());
114 114
 										echo $datetime->description() ? '<p class="ticket-note">'.$datetime->description().'</p>' : '' ?></li>
115 115
 									<?php }?>
116 116
 								</ul>
117 117
 							</div>
118
-							<?php if ($event->venues()){?>
118
+							<?php if ($event->venues()) {?>
119 119
 							<div class="ticket-place-details">
120
-								<h4 class="sub-section-title no-bottom-margin"><img class="icon" src="<?php echo EE_IMAGES_URL.'location-pin-16x16.png';?>"><?php echo _n("Venue:","Venues:",count($event->venues()), "event_espresso");?></h4>
120
+								<h4 class="sub-section-title no-bottom-margin"><img class="icon" src="<?php echo EE_IMAGES_URL.'location-pin-16x16.png'; ?>"><?php echo _n("Venue:", "Venues:", count($event->venues()), "event_espresso"); ?></h4>
121 121
 								<ul class="event-venues">
122
-									<?php foreach($event->venues() as $venue){?>
122
+									<?php foreach ($event->venues() as $venue) {?>
123 123
 									<li><?php echo $venue->name()?> <span class="small-text">[ <a href='<?php echo $venue->get_permalink()?>'><?php _e('view', 'event_espresso'); ?></a> ]</span></li>
124 124
 									<?php } ?>
125 125
 								</ul>
@@ -127,34 +127,34 @@  discard block
 block discarded – undo
127 127
 							<?php }?>
128 128
 						</div>
129 129
 						<div class="ticket-registrations-area">
130
-							<h4 class="sub-section-title"><img class="icon" src="<?php echo EE_IMAGES_URL.'users-16x16.png';?>"><?php echo __("Registration Details", "event_espresso");?> <span class="small-text link">[ <a class="print_button noPrint" href="<?php echo $edit_reg_info_url; ?>"><?php _e('edit', 'event_espresso'); ?></a> ]</span></h4>
130
+							<h4 class="sub-section-title"><img class="icon" src="<?php echo EE_IMAGES_URL.'users-16x16.png'; ?>"><?php echo __("Registration Details", "event_espresso"); ?> <span class="small-text link">[ <a class="print_button noPrint" href="<?php echo $edit_reg_info_url; ?>"><?php _e('edit', 'event_espresso'); ?></a> ]</span></h4>
131 131
 							<ul class="ticket-registrations-list">
132
-								<?php foreach($registrations_per_line_item[$line_item_id] as $registration){
132
+								<?php foreach ($registrations_per_line_item[$line_item_id] as $registration) {
133 133
 									/* @var $registration EE_Registration */
134 134
 									$attendee = $registration->attendee();
135
-									$answers = $registration->answers(array('order_by'=>array('Question.Question_Group_Question.QGQ_order'=>'ASC')));?>
135
+									$answers = $registration->answers(array('order_by'=>array('Question.Question_Group_Question.QGQ_order'=>'ASC'))); ?>
136 136
 								<li class="ticket-registration">
137 137
 									<table class="registration-details">
138 138
 										<tr class="odd">
139
-											<th><?php echo 	_e("Registration Code:", "event_espresso");?></th>
140
-											<td><?php echo $registration->reg_code();?> - <span class="<?php echo $registration->status_ID()?>"><?php echo $registration->pretty_status()?></span></td>
139
+											<th><?php echo 	_e("Registration Code:", "event_espresso"); ?></th>
140
+											<td><?php echo $registration->reg_code(); ?> - <span class="<?php echo $registration->status_ID()?>"><?php echo $registration->pretty_status()?></span></td>
141 141
 										</tr>
142 142
 										<?php
143
-										foreach($event->question_groups() as $question_group){
144
-											?><tr><th><?php $question_group->e('QSG_name');?></th><td></td></tr><?php
143
+										foreach ($event->question_groups() as $question_group) {
144
+											?><tr><th><?php $question_group->e('QSG_name'); ?></th><td></td></tr><?php
145 145
 											$has_personal_info = false;
146
-											foreach($question_group->questions() as $question){
147
-												if( in_array($question->system_ID(),$questions_to_skip)){
146
+											foreach ($question_group->questions() as $question) {
147
+												if (in_array($question->system_ID(), $questions_to_skip)) {
148 148
 													$has_personal_info = true;
149 149
 													continue;
150 150
 												}
151 151
 												?><tr>
152 152
 														<th><?php echo $question->display_text()?></th>
153
-														<td><?php echo $registration->answer_value_to_question($question);?></td>
153
+														<td><?php echo $registration->answer_value_to_question($question); ?></td>
154 154
 												</tr><?php
155 155
 											}
156
-											if($has_personal_info){
157
-												?><tr><th><?php	_e('Attendee', 'event_espresso');?></th><td><?php echo sprintf(__('%s (%s)', "event_espresso"),$attendee->full_name(),$attendee->email())?></td></tr><?php
156
+											if ($has_personal_info) {
157
+												?><tr><th><?php	_e('Attendee', 'event_espresso'); ?></th><td><?php echo sprintf(__('%s (%s)', "event_espresso"), $attendee->full_name(), $attendee->email())?></td></tr><?php
158 158
 											}
159 159
 										}
160 160
 										?>
@@ -171,21 +171,21 @@  discard block
 block discarded – undo
171 171
 		<?php }?>
172 172
 		</div>
173 173
 		<div class="taxes">
174
-			<?php if ($tax_total_line_item && $tax_total_line_item->children()){?>
175
-				<h3 class="section-title"><?php _e("Taxes",'event_espresso')?></h3>
174
+			<?php if ($tax_total_line_item && $tax_total_line_item->children()) {?>
175
+				<h3 class="section-title"><?php _e("Taxes", 'event_espresso')?></h3>
176 176
 				<table class="invoice-amount">
177 177
 
178 178
 					<thead>
179 179
 						<tr class="header_row">
180
-							<th class="left ticket_th"><?php _e("Tax Name", "event_espresso");?></th>
181
-							<th class="left"><?php _e('Description', 'event_espresso');?></th>
180
+							<th class="left ticket_th"><?php _e("Tax Name", "event_espresso"); ?></th>
181
+							<th class="left"><?php _e('Description', 'event_espresso'); ?></th>
182 182
 							<th class="event_th item_c"><?php _e('Rate', 'event_espresso'); ?></th>
183 183
 							<th class="subtotal_th"><?php _e('Tax Amount', 'event_espresso'); ?></th>
184 184
 						</tr>
185 185
 					</thead>
186 186
 					<tbody>
187 187
 						<?php
188
-						foreach($tax_total_line_item->children() as $child_tax){?>
188
+						foreach ($tax_total_line_item->children() as $child_tax) {?>
189 189
 						<tr>
190 190
 							<td><?php echo $child_tax->name()?></td>
191 191
 							<td><?php echo $child_tax->desc()?></td>
@@ -195,26 +195,26 @@  discard block
 block discarded – undo
195 195
 						<?php } ?>
196 196
 						<tr class="total_tr odd">
197 197
 							<td class="total_tr" colspan="2"></td>
198
-							<td class="total"><?php	_e("Tax Total:", "event_espresso");?></td>
198
+							<td class="total"><?php	_e("Tax Total:", "event_espresso"); ?></td>
199 199
 							<td class="item_r"><?php echo $tax_total_line_item->total_no_code()?></td>
200 200
 						</tr>
201 201
 					</tbody>
202 202
 
203 203
 				</table>
204 204
 			<?php }?>
205
-			<p><?php _e("* taxable items", "event_espresso");?></p>
205
+			<p><?php _e("* taxable items", "event_espresso"); ?></p>
206 206
 		</div>
207 207
 		<div class="grand-total-dv">
208
-		<h2 class="grand-total"><?php printf(__("Grand Total: %s", "event_espresso"),EEH_Template::format_currency($total_cost));?></h2>
208
+		<h2 class="grand-total"><?php printf(__("Grand Total: %s", "event_espresso"), EEH_Template::format_currency($total_cost)); ?></h2>
209 209
 		</div>
210 210
 		<div class="payment-dv">
211
-			<h3 class="section-title"><?php _e("Payments",'event_espresso')?></h3>
211
+			<h3 class="section-title"><?php _e("Payments", 'event_espresso')?></h3>
212 212
 			<p>[instructions]</p>
213 213
 			<table class="invoice-amount">
214 214
 				<thead>
215 215
 					<tr class="header_row">
216 216
 						<th><span class=""><?php _e('Payment Method', 'event_espresso'); ?></span></th>
217
-						<th class='left datetime_th'><?php _e("Date",'event_espresso')?></th>
217
+						<th class='left datetime_th'><?php _e("Date", 'event_espresso')?></th>
218 218
 						<th><span class=""><?php _e('Transaction Id / Cheque #', 'event_espresso'); ?></span></th>
219 219
 						<th><span class=""><?php _e('P.O. / S.O.#', 'event_espresso'); ?></span></th>
220 220
 						<th><span class=""><?php _e('Status', 'event_espresso'); ?></span></th>
@@ -224,11 +224,11 @@  discard block
 block discarded – undo
224 224
 				<tbody>
225 225
 					<?php
226 226
 					$c = false;
227
-					if(!empty($payments)){
227
+					if ( ! empty($payments)) {
228 228
 
229
-						foreach($payments as $payment){
229
+						foreach ($payments as $payment) {
230 230
 							/* @var $payment EE_Payment */?>
231
-						<tr class='item <?php echo (($c = !$c) ? ' odd' : '')?>'>
231
+						<tr class='item <?php echo (($c = ! $c) ? ' odd' : '')?>'>
232 232
 							<td><?php $payment->e('PAY_gateway')?></td>
233 233
 							<td><?php echo $payment->timestamp()?></td>
234 234
 							<td><?php $payment->e('PAY_txn_id_chq_nmbr')?></td>
@@ -237,17 +237,17 @@  discard block
 block discarded – undo
237 237
 							<td class='item_r'><?php echo $payment->amount_no_code()?></td>
238 238
 						</tr>
239 239
 						<?php }
240
-					}else{?>
240
+					} else {?>
241 241
 						<tr class='item'>
242
-							<td class='aln-cntr' colspan="6"><?php _e("No approved payments have been received.",'event_espresso')?> </td>
242
+							<td class='aln-cntr' colspan="6"><?php _e("No approved payments have been received.", 'event_espresso')?> </td>
243 243
 						</tr>
244 244
 					<?php }
245
-					?><tr class="item" ><td class='aln-cntr' colspan="6"><?php if($amount_owed){?><a class="noPrint" href='<?php echo $retry_payment_url?>'><?php _e("Please make a payment.", "event_espresso");}?></a></td></tr>
245
+					?><tr class="item" ><td class='aln-cntr' colspan="6"><?php if ($amount_owed) {?><a class="noPrint" href='<?php echo $retry_payment_url?>'><?php _e("Please make a payment.", "event_espresso"); }?></a></td></tr>
246 246
 				</tbody>
247 247
 				<tfoot>
248 248
 					<tr class='total_tr'><td colspan="4">&nbsp;</td>
249
-						<td class="item_r"><?php _e('Total Paid','event_espresso')?></td>
250
-						<td class="item_r"><?php echo EEH_Template::format_currency($amount_pd,false,false)?> </td>
249
+						<td class="item_r"><?php _e('Total Paid', 'event_espresso')?></td>
250
+						<td class="item_r"><?php echo EEH_Template::format_currency($amount_pd, false, false)?> </td>
251 251
 					</tr>
252 252
 					<?php //echo $discount; ?>
253 253
 					<tr class="total_tr odd">
@@ -259,20 +259,20 @@  discard block
 block discarded – undo
259 259
 			</table>
260 260
 		</div>
261 261
 		<div class="additional-info-dv">
262
-			<h3 class="section-title"><?php _e("Additional Information:", "event_espresso");?></h3>
262
+			<h3 class="section-title"><?php _e("Additional Information:", "event_espresso"); ?></h3>
263 263
 			<div class="additional-info">
264
-				<?php if($venues_for_events){?>
265
-				<h2><?php echo _n("Venue Details:", "Venues Details:", "event_espresso",count($venues_for_events));?></h2>
264
+				<?php if ($venues_for_events) {?>
265
+				<h2><?php echo _n("Venue Details:", "Venues Details:", "event_espresso", count($venues_for_events)); ?></h2>
266 266
 				<table class="venue-list">
267
-					<?php foreach($venues_for_events as $venue){?>
267
+					<?php foreach ($venues_for_events as $venue) {?>
268 268
 						<tr class="venue-details">
269 269
 							<td class="venue-details-part venue-address-dv">
270 270
 								<h3><a href='<?php echo $venue->get_permalink()?>'><?php
271 271
 									echo $venue->name()
272 272
 								?></a></h3>
273 273
 								<p><?php echo $venue->description()?></p>
274
-								<?php echo  EEH_Address::format($venue);?></td>
275
-							<?php if($venue->enable_for_gmap()){?>
274
+								<?php echo  EEH_Address::format($venue); ?></td>
275
+							<?php if ($venue->enable_for_gmap()) {?>
276 276
 								<td class="venue-details-part venue-image-dv"><?php echo EEH_Venue_View::espresso_google_static_map($venue)?></td>
277 277
 							<?php } ?>
278 278
 						</tr>
Please login to merge, or discard this patch.
modules/invoice/EED_Invoice.module.php 2 patches
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 	 * @return EED_Invoice
30 30
 	 */
31 31
 	public static function instance() {
32
-		return parent::get_instance( __CLASS__ );
32
+		return parent::get_instance(__CLASS__);
33 33
 	}
34 34
 
35 35
 
@@ -41,8 +41,8 @@  discard block
 block discarded – undo
41 41
 	 *  @return 	void
42 42
 	 */
43 43
 	public static function set_hooks() {
44
-		EE_Config::register_route( 'download_invoice', 'EED_Invoice', 'download_invoice' );
45
-		EE_Config::register_route( 'launch_invoice', 'EED_Invoice', 'launch_invoice' );
44
+		EE_Config::register_route('download_invoice', 'EED_Invoice', 'download_invoice');
45
+		EE_Config::register_route('launch_invoice', 'EED_Invoice', 'launch_invoice');
46 46
 	}
47 47
 
48 48
 
@@ -63,12 +63,12 @@  discard block
 block discarded – undo
63 63
 	 *  @access 	public
64 64
 	 *  @return 	void
65 65
 	 */
66
-	public function run( $WP ) {
67
-		if ( is_readable( EE_MODULES . 'gateways/Invoice/lib/Invoice.class.php' )) {
68
-			require_once( EE_MODULES . 'gateways/Invoice/lib/Invoice.class.php' );
66
+	public function run($WP) {
67
+		if (is_readable(EE_MODULES.'gateways/Invoice/lib/Invoice.class.php')) {
68
+			require_once(EE_MODULES.'gateways/Invoice/lib/Invoice.class.php');
69 69
 		} else {
70
-			$msg = __( 'The Invoice.class.php file could not be loaded.', 'event_espresso' );
71
-			EE_Error::add_error( $msg, __FILE__, __FUNCTION__, __LINE__ );
70
+			$msg = __('The Invoice.class.php file could not be loaded.', 'event_espresso');
71
+			EE_Error::add_error($msg, __FILE__, __FUNCTION__, __LINE__);
72 72
 		}
73 73
 //		add_filter( 'FHEE_load_ee_config', '__return_true' );
74 74
 //		add_filter( 'FHEE_run_EE_wp', '__return_true' );
@@ -89,9 +89,9 @@  discard block
 block discarded – undo
89 89
 	 */
90 90
 	public function launch_invoice() {
91 91
 		$this->run(null);
92
-		if ( EE_Registry::instance()->REQ->is_set( 'id' )) {
93
-			$id = sanitize_key( EE_Registry::instance()->REQ->get( 'id' ));
94
-			$invoice = new Invoice( $id );
92
+		if (EE_Registry::instance()->REQ->is_set('id')) {
93
+			$id = sanitize_key(EE_Registry::instance()->REQ->get('id'));
94
+			$invoice = new Invoice($id);
95 95
 			$invoice->send_invoice();
96 96
 		}
97 97
 	}
@@ -106,11 +106,11 @@  discard block
 block discarded – undo
106 106
 	 */
107 107
 	public function download_invoice() {
108 108
 		$this->run(null);
109
-		if ( EE_Registry::instance()->REQ->is_set( 'id' )) {
110
-			$id = sanitize_key( EE_Registry::instance()->REQ->get( 'id' ));
109
+		if (EE_Registry::instance()->REQ->is_set('id')) {
110
+			$id = sanitize_key(EE_Registry::instance()->REQ->get('id'));
111 111
 			$invoice = new Invoice($_REQUEST['id']);
112 112
 			// send invoice but force download
113
-			$invoice->send_invoice( TRUE );
113
+			$invoice->send_invoice(TRUE);
114 114
 		}
115 115
 	}
116 116
 
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,6 @@
 block discarded – undo
1
-<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) exit('No direct script access allowed');
1
+<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) {
2
+	exit('No direct script access allowed');
3
+}
2 4
 /**
3 5
  * Event Espresso
4 6
  *
Please login to merge, or discard this patch.
modules/single_page_checkout/inc/EE_SPCO_JSON_Response.php 2 patches
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -1,16 +1,16 @@
 block discarded – undo
1 1
 <?php if ( ! defined('EVENT_ESPRESSO_VERSION')) { exit('No direct script access allowed'); }
2 2
  /**
3
- *
4
- * Class EE_SPCO_JSON_Response
5
- *
6
- * Description
7
- *
8
- * @package         Event Espresso
9
- * @subpackage    core
10
- * @author				Brent Christensen
11
- * @since		 	   $VID:$
12
- *
13
- */
3
+  *
4
+  * Class EE_SPCO_JSON_Response
5
+  *
6
+  * Description
7
+  *
8
+  * @package         Event Espresso
9
+  * @subpackage    core
10
+  * @author				Brent Christensen
11
+  * @since		 	   $VID:$
12
+  *
13
+  */
14 14
 class EE_SPCO_JSON_Response {
15 15
 
16 16
 	/**
Please login to merge, or discard this patch.
Spacing   +40 added lines, -40 removed lines patch added patch discarded remove patch
@@ -107,71 +107,71 @@  discard block
 block discarded – undo
107 107
 	public function __toString() {
108 108
 		$JSON_response = array();
109 109
 		// grab notices
110
-		$notices = EE_Error::get_notices( FALSE );
111
-		$this->set_attention( isset( $notices['attention'] ) ? $notices['attention'] : '' );
112
-		$this->set_errors( isset( $notices['errors'] ) ? $notices['errors'] : '' );
113
-		$this->set_success( isset( $notices['success'] ) ? $notices['success'] : '' );
110
+		$notices = EE_Error::get_notices(FALSE);
111
+		$this->set_attention(isset($notices['attention']) ? $notices['attention'] : '');
112
+		$this->set_errors(isset($notices['errors']) ? $notices['errors'] : '');
113
+		$this->set_success(isset($notices['success']) ? $notices['success'] : '');
114 114
 		// add notices to JSON response, but only if they exist
115
-		if ( $this->attention() ) {
115
+		if ($this->attention()) {
116 116
 			$JSON_response['attention'] = $this->attention();
117 117
 		}
118
-		if ( $this->errors() ) {
118
+		if ($this->errors()) {
119 119
 			$JSON_response['errors'] = $this->errors();
120 120
 		}
121
-		if ( $this->unexpected_errors() ) {
121
+		if ($this->unexpected_errors()) {
122 122
 			$JSON_response['unexpected_errors'] = $this->unexpected_errors();
123 123
 		}
124
-		if ( $this->success() ) {
124
+		if ($this->success()) {
125 125
 			$JSON_response['success'] = $this->success();
126 126
 		}
127 127
 		// but if NO notices are set... at least set the "success" as a key so that the JS knows everything worked
128
-		if ( ! isset( $JSON_response[ 'attention' ] ) && ! isset( $JSON_response[ 'errors' ] ) && ! isset( $JSON_response[ 'success' ] ) ) {
128
+		if ( ! isset($JSON_response['attention']) && ! isset($JSON_response['errors']) && ! isset($JSON_response['success'])) {
129 129
 			$JSON_response['success'] = null;
130 130
 		}
131 131
 		// set redirect_url, IF it exists
132
-		if ( $this->redirect_url() ) {
132
+		if ($this->redirect_url()) {
133 133
 			$JSON_response['redirect_url'] = $this->redirect_url();
134 134
 		}
135 135
 		// set registration_time_limit, IF it exists
136
-		if ( $this->registration_time_limit() ) {
136
+		if ($this->registration_time_limit()) {
137 137
 			$JSON_response['registration_time_limit'] = $this->registration_time_limit();
138 138
 		}
139 139
 		// set payment_amount, IF it exists
140
-		if ( $this->payment_amount() !== null ) {
141
-			$JSON_response[ 'payment_amount' ] = $this->payment_amount();
140
+		if ($this->payment_amount() !== null) {
141
+			$JSON_response['payment_amount'] = $this->payment_amount();
142 142
 		}
143 143
 		// grab generic return data
144 144
 		$return_data = $this->return_data();
145 145
 		// add billing form validation rules
146
-		if ( $this->validation_rules() ) {
146
+		if ($this->validation_rules()) {
147 147
 			$return_data['validation_rules'] = $this->validation_rules();
148 148
 		}
149 149
 		// set reg_step_html, IF it exists
150
-		if ( $this->reg_step_html() ) {
150
+		if ($this->reg_step_html()) {
151 151
 			$return_data['reg_step_html'] = $this->reg_step_html();
152 152
 		}
153 153
 		// set method of payment, IF it exists
154
-		if ( $this->method_of_payment() ) {
154
+		if ($this->method_of_payment()) {
155 155
 			$return_data['method_of_payment'] = $this->method_of_payment();
156 156
 		}
157 157
 		// set "plz_select_method_of_payment" message, IF it exists
158
-		if ( $this->plz_select_method_of_payment() ) {
158
+		if ($this->plz_select_method_of_payment()) {
159 159
 			$return_data['plz_select_method_of_payment'] = $this->plz_select_method_of_payment();
160 160
 		}
161 161
 		// set redirect_form, IF it exists
162
-		if ( $this->redirect_form() ) {
162
+		if ($this->redirect_form()) {
163 163
 			$return_data['redirect_form'] = $this->redirect_form();
164 164
 		}
165 165
 		// and finally, add return_data array to main JSON response array, IF it contains anything
166 166
 		// why did we add some of the above properties to the return data array?
167 167
 		// because it is easier and cleaner in the Javascript to deal with this way
168
-		if ( ! empty( $return_data )) {
168
+		if ( ! empty($return_data)) {
169 169
 			$JSON_response['return_data'] = $return_data;
170 170
 		}
171 171
 		// filter final array
172
-		$JSON_response = apply_filters( 'FHEE__EE_SPCO_JSON_Response___toString__JSON_response', $JSON_response );
172
+		$JSON_response = apply_filters('FHEE__EE_SPCO_JSON_Response___toString__JSON_response', $JSON_response);
173 173
 		// return encoded array
174
-		return wp_json_encode( $JSON_response );
174
+		return wp_json_encode($JSON_response);
175 175
 	}
176 176
 
177 177
 
@@ -179,7 +179,7 @@  discard block
 block discarded – undo
179 179
 	/**
180 180
 	 * @param string $attention
181 181
 	 */
182
-	public function set_attention( $attention ) {
182
+	public function set_attention($attention) {
183 183
 		$this->_attention = $attention;
184 184
 	}
185 185
 
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
 	/**
198 198
 	 * @param string $errors
199 199
 	 */
200
-	public function set_errors( $errors ) {
200
+	public function set_errors($errors) {
201 201
 		$this->_errors = $errors;
202 202
 	}
203 203
 
@@ -224,7 +224,7 @@  discard block
 block discarded – undo
224 224
 	/**
225 225
 	 * @param string $unexpected_errors
226 226
 	 */
227
-	public function set_unexpected_errors( $unexpected_errors ) {
227
+	public function set_unexpected_errors($unexpected_errors) {
228 228
 		$this->_unexpected_errors = $unexpected_errors;
229 229
 	}
230 230
 
@@ -233,7 +233,7 @@  discard block
 block discarded – undo
233 233
 	/**
234 234
 	 * @param string $success
235 235
 	 */
236
-	public function set_success( $success ) {
236
+	public function set_success($success) {
237 237
 		$this->_success = $success;
238 238
 	}
239 239
 
@@ -251,7 +251,7 @@  discard block
 block discarded – undo
251 251
 	/**
252 252
 	 * @param string $method_of_payment
253 253
 	 */
254
-	public function set_method_of_payment( $method_of_payment ) {
254
+	public function set_method_of_payment($method_of_payment) {
255 255
 		$this->_method_of_payment = $method_of_payment;
256 256
 	}
257 257
 
@@ -278,8 +278,8 @@  discard block
 block discarded – undo
278 278
 	/**
279 279
 	 * @param float $payment_amount
280 280
 	 */
281
-	public function set_payment_amount( $payment_amount ) {
282
-		$this->_payment_amount = EEH_Money::convert_to_float_from_localized_money( $payment_amount );
281
+	public function set_payment_amount($payment_amount) {
282
+		$this->_payment_amount = EEH_Money::convert_to_float_from_localized_money($payment_amount);
283 283
 	}
284 284
 
285 285
 
@@ -287,7 +287,7 @@  discard block
 block discarded – undo
287 287
 	/**
288 288
 	 * @param string $next_step_html
289 289
 	 */
290
-	public function set_reg_step_html( $next_step_html ) {
290
+	public function set_reg_step_html($next_step_html) {
291 291
 		$this->_reg_step_html = $next_step_html;
292 292
 	}
293 293
 
@@ -305,7 +305,7 @@  discard block
 block discarded – undo
305 305
 	/**
306 306
 	 * @param string $redirect_form
307 307
 	 */
308
-	public function set_redirect_form( $redirect_form ) {
308
+	public function set_redirect_form($redirect_form) {
309 309
 		$this->_redirect_form = $redirect_form;
310 310
 	}
311 311
 
@@ -315,7 +315,7 @@  discard block
 block discarded – undo
315 315
 	 * @return string
316 316
 	 */
317 317
 	public function redirect_form() {
318
-		return ! empty( $this->_redirect_form ) ? $this->_redirect_form : FALSE;
318
+		return ! empty($this->_redirect_form) ? $this->_redirect_form : FALSE;
319 319
 	}
320 320
 
321 321
 
@@ -323,7 +323,7 @@  discard block
 block discarded – undo
323 323
 	/**
324 324
 	 * @param string $plz_select_method_of_payment
325 325
 	 */
326
-	public function set_plz_select_method_of_payment( $plz_select_method_of_payment ) {
326
+	public function set_plz_select_method_of_payment($plz_select_method_of_payment) {
327 327
 		$this->_plz_select_method_of_payment = $plz_select_method_of_payment;
328 328
 	}
329 329
 
@@ -341,7 +341,7 @@  discard block
 block discarded – undo
341 341
 	/**
342 342
 	 * @param string $redirect_url
343 343
 	 */
344
-	public function set_redirect_url( $redirect_url ) {
344
+	public function set_redirect_url($redirect_url) {
345 345
 		$this->_redirect_url = $redirect_url;
346 346
 	}
347 347
 
@@ -368,7 +368,7 @@  discard block
 block discarded – undo
368 368
 	/**
369 369
 	 * @param string $registration_time_limit
370 370
 	 */
371
-	public function set_registration_time_limit( $registration_time_limit ) {
371
+	public function set_registration_time_limit($registration_time_limit) {
372 372
 		$this->_registration_time_limit = $registration_time_limit;
373 373
 	}
374 374
 
@@ -377,8 +377,8 @@  discard block
 block discarded – undo
377 377
 	/**
378 378
 	 * @param array $return_data
379 379
 	 */
380
-	public function set_return_data( $return_data ) {
381
-		$this->_return_data = array_merge( $this->_return_data, $return_data );
380
+	public function set_return_data($return_data) {
381
+		$this->_return_data = array_merge($this->_return_data, $return_data);
382 382
 	}
383 383
 
384 384
 
@@ -395,9 +395,9 @@  discard block
 block discarded – undo
395 395
 	/**
396 396
 	 * @param array $validation_rules
397 397
 	 */
398
-	public function add_validation_rules( $validation_rules = array() ) {
399
-		if ( is_array( $validation_rules ) && ! empty( $validation_rules )) {
400
-			$this->_validation_rules = array_merge( $this->_validation_rules, $validation_rules );
398
+	public function add_validation_rules($validation_rules = array()) {
399
+		if (is_array($validation_rules) && ! empty($validation_rules)) {
400
+			$this->_validation_rules = array_merge($this->_validation_rules, $validation_rules);
401 401
 		}
402 402
 	}
403 403
 
@@ -407,7 +407,7 @@  discard block
 block discarded – undo
407 407
 	 * @return array | bool
408 408
 	 */
409 409
 	public function validation_rules() {
410
-		return ! empty( $this->_validation_rules ) ? $this->_validation_rules : FALSE;
410
+		return ! empty($this->_validation_rules) ? $this->_validation_rules : FALSE;
411 411
 	}
412 412
 
413 413
 
Please login to merge, or discard this patch.