Completed
Pull Request — master (#974)
by
unknown
47:15
created
core/domain/services/validation/email/EmailValidatorInterface.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -18,14 +18,14 @@
 block discarded – undo
18 18
 interface EmailValidatorInterface
19 19
 {
20 20
 
21
-    /**
22
-     * Validates the supplied email address. If it is invalid, throws EmailValidationException
23
-     *
24
-     * @param string $email_address
25
-     * @return boolean
26
-     * @throws EmailValidationException
27
-     */
28
-    public function validate($email_address);
21
+	/**
22
+	 * Validates the supplied email address. If it is invalid, throws EmailValidationException
23
+	 *
24
+	 * @param string $email_address
25
+	 * @return boolean
26
+	 * @throws EmailValidationException
27
+	 */
28
+	public function validate($email_address);
29 29
 
30 30
 
31 31
 }
Please login to merge, or discard this patch.
strategies/validation/EE_Email_Validation_Strategy.strategy.php 2 patches
Indentation   +59 added lines, -59 removed lines patch added patch discarded remove patch
@@ -18,72 +18,72 @@
 block discarded – undo
18 18
 {
19 19
 
20 20
 
21
-    /**
22
-     * @param string               $validation_error_message
23
-     */
24
-    public function __construct($validation_error_message = '')
25
-    {
26
-        if (! $validation_error_message) {
27
-            $validation_error_message = esc_html__('Please enter a valid email address.', 'event_espresso');
28
-        }
29
-        parent::__construct($validation_error_message);
30
-    }
21
+	/**
22
+	 * @param string               $validation_error_message
23
+	 */
24
+	public function __construct($validation_error_message = '')
25
+	{
26
+		if (! $validation_error_message) {
27
+			$validation_error_message = esc_html__('Please enter a valid email address.', 'event_espresso');
28
+		}
29
+		parent::__construct($validation_error_message);
30
+	}
31 31
 
32 32
 
33 33
 
34
-    /**
35
-     * just checks the field isn't blank
36
-     *
37
-     * @param $normalized_value
38
-     * @return bool
39
-     * @throws InvalidArgumentException
40
-     * @throws InvalidInterfaceException
41
-     * @throws InvalidDataTypeException
42
-     * @throws EE_Validation_Error
43
-     */
44
-    public function validate($normalized_value)
45
-    {
46
-        if ($normalized_value && ! $this->_validate_email($normalized_value)) {
47
-            throw new EE_Validation_Error($this->get_validation_error_message(), 'required');
48
-        }
49
-        return true;
50
-    }
34
+	/**
35
+	 * just checks the field isn't blank
36
+	 *
37
+	 * @param $normalized_value
38
+	 * @return bool
39
+	 * @throws InvalidArgumentException
40
+	 * @throws InvalidInterfaceException
41
+	 * @throws InvalidDataTypeException
42
+	 * @throws EE_Validation_Error
43
+	 */
44
+	public function validate($normalized_value)
45
+	{
46
+		if ($normalized_value && ! $this->_validate_email($normalized_value)) {
47
+			throw new EE_Validation_Error($this->get_validation_error_message(), 'required');
48
+		}
49
+		return true;
50
+	}
51 51
 
52 52
 
53 53
 
54
-    /**
55
-     * @return array
56
-     */
57
-    public function get_jquery_validation_rule_array()
58
-    {
59
-        return array('email' => true, 'messages' => array('email' => $this->get_validation_error_message()));
60
-    }
54
+	/**
55
+	 * @return array
56
+	 */
57
+	public function get_jquery_validation_rule_array()
58
+	{
59
+		return array('email' => true, 'messages' => array('email' => $this->get_validation_error_message()));
60
+	}
61 61
 
62 62
 
63 63
 
64
-    /**
65
-     * Validate an email address.
66
-     * Provide email address (raw input)
67
-     *
68
-     * @param $email
69
-     * @return bool of whether the email is valid or not
70
-     * @throws InvalidArgumentException
71
-     * @throws InvalidInterfaceException
72
-     * @throws InvalidDataTypeException
73
-     * @throws EE_Validation_Error
74
-     */
75
-    private function _validate_email($email)
76
-    {
77
-        try {
78
-            EmailAddressFactory::create($email);
79
-        } catch (EmailValidationException $e) {
80
-            throw new EE_Validation_Error(
81
-                $e->getMessage(),
82
-                'invalid_email',
83
-                $this->_input,
84
-                $e
85
-            );
86
-        }
87
-        return true;
88
-    }
64
+	/**
65
+	 * Validate an email address.
66
+	 * Provide email address (raw input)
67
+	 *
68
+	 * @param $email
69
+	 * @return bool of whether the email is valid or not
70
+	 * @throws InvalidArgumentException
71
+	 * @throws InvalidInterfaceException
72
+	 * @throws InvalidDataTypeException
73
+	 * @throws EE_Validation_Error
74
+	 */
75
+	private function _validate_email($email)
76
+	{
77
+		try {
78
+			EmailAddressFactory::create($email);
79
+		} catch (EmailValidationException $e) {
80
+			throw new EE_Validation_Error(
81
+				$e->getMessage(),
82
+				'invalid_email',
83
+				$this->_input,
84
+				$e
85
+			);
86
+		}
87
+		return true;
88
+	}
89 89
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
      */
24 24
     public function __construct($validation_error_message = '')
25 25
     {
26
-        if (! $validation_error_message) {
26
+        if ( ! $validation_error_message) {
27 27
             $validation_error_message = esc_html__('Please enter a valid email address.', 'event_espresso');
28 28
         }
29 29
         parent::__construct($validation_error_message);
Please login to merge, or discard this patch.
public/template_tags.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -206,7 +206,7 @@
 block discarded – undo
206 206
 	function espresso_ticket_selector( $event = NULL ) {
207 207
 		if (  ! apply_filters( 'FHEE_disable_espresso_ticket_selector', FALSE ) ) {
208 208
 			espresso_load_ticket_selector();
209
-            \EED_Ticket_Selector::set_definitions();
209
+			\EED_Ticket_Selector::set_definitions();
210 210
 			echo EED_Ticket_Selector::display_ticket_selector( $event );
211 211
 		}
212 212
 	}
Please login to merge, or discard this patch.
Spacing   +289 added lines, -289 removed lines patch added patch discarded remove patch
@@ -14,12 +14,12 @@  discard block
 block discarded – undo
14 14
  * @param int | \EE_Event $event
15 15
  * @return bool
16 16
  */
17
-function is_espresso_event( $event = NULL ) {
18
-	if ( can_use_espresso_conditionals( __FUNCTION__ )) {
17
+function is_espresso_event($event = NULL) {
18
+	if (can_use_espresso_conditionals(__FUNCTION__)) {
19 19
 		// extract EE_Event object from passed param regardless of what it is (within reason of course)
20
-		$event = EEH_Event_View::get_event( $event );
20
+		$event = EEH_Event_View::get_event($event);
21 21
 		// do we have a valid event ?
22
-		return $event instanceof EE_Event  ? TRUE : FALSE;
22
+		return $event instanceof EE_Event ? TRUE : FALSE;
23 23
 	}
24 24
 	return FALSE;
25 25
 }
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
  * @return bool
32 32
  */
33 33
 function is_espresso_event_single() {
34
-	if ( can_use_espresso_conditionals( __FUNCTION__ )) {
34
+	if (can_use_espresso_conditionals(__FUNCTION__)) {
35 35
 		global $wp_query;
36 36
 		// return conditionals set by CPTs
37 37
 		return $wp_query instanceof WP_Query ? $wp_query->is_espresso_event_single : FALSE;
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
  * @return bool
47 47
  */
48 48
 function is_espresso_event_archive() {
49
-	if ( can_use_espresso_conditionals( __FUNCTION__ )) {
49
+	if (can_use_espresso_conditionals(__FUNCTION__)) {
50 50
 		global $wp_query;
51 51
 		return $wp_query instanceof WP_Query ? $wp_query->is_espresso_event_archive : FALSE;
52 52
 	}
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
  * @return bool
61 61
  */
62 62
 function is_espresso_event_taxonomy() {
63
-	if ( can_use_espresso_conditionals( __FUNCTION__ )) {
63
+	if (can_use_espresso_conditionals(__FUNCTION__)) {
64 64
 		global $wp_query;
65 65
 		return $wp_query instanceof WP_Query ? $wp_query->is_espresso_event_taxonomy : FALSE;
66 66
 	}
@@ -74,10 +74,10 @@  discard block
 block discarded – undo
74 74
  * @param int | \EE_Venue $venue
75 75
  * @return bool
76 76
  */
77
-function is_espresso_venue( $venue = NULL ) {
78
-	if ( can_use_espresso_conditionals( __FUNCTION__ )) {
77
+function is_espresso_venue($venue = NULL) {
78
+	if (can_use_espresso_conditionals(__FUNCTION__)) {
79 79
 		// extract EE_Venue object from passed param regardless of what it is (within reason of course)
80
-		$venue = EEH_Venue_View::get_venue( $venue, FALSE );
80
+		$venue = EEH_Venue_View::get_venue($venue, FALSE);
81 81
 		// do we have a valid event ?
82 82
 		return $venue instanceof EE_Venue ? TRUE : FALSE;
83 83
 	}
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
  * @return bool
92 92
  */
93 93
 function is_espresso_venue_single() {
94
-	if ( can_use_espresso_conditionals( __FUNCTION__ )) {
94
+	if (can_use_espresso_conditionals(__FUNCTION__)) {
95 95
 		global $wp_query;
96 96
 		return $wp_query instanceof WP_Query ? $wp_query->is_espresso_venue_single : FALSE;
97 97
 	}
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
  * @return bool
106 106
  */
107 107
 function is_espresso_venue_archive() {
108
-	if ( can_use_espresso_conditionals( __FUNCTION__ )) {
108
+	if (can_use_espresso_conditionals(__FUNCTION__)) {
109 109
 		global $wp_query;
110 110
 		return $wp_query instanceof WP_Query ? $wp_query->is_espresso_venue_archive : FALSE;
111 111
 	}
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
  * @return bool
120 120
  */
121 121
 function is_espresso_venue_taxonomy() {
122
-	if ( can_use_espresso_conditionals( __FUNCTION__ )) {
122
+	if (can_use_espresso_conditionals(__FUNCTION__)) {
123 123
 		global $wp_query;
124 124
 		return $wp_query instanceof WP_Query ? $wp_query->is_espresso_venue_taxonomy : FALSE;
125 125
 	}
@@ -133,12 +133,12 @@  discard block
 block discarded – undo
133 133
  * @param $conditional_tag
134 134
  * @return bool
135 135
  */
136
-function can_use_espresso_conditionals( $conditional_tag ) {
137
-	if ( ! did_action( 'AHEE__EE_System__initialize' )) {
136
+function can_use_espresso_conditionals($conditional_tag) {
137
+	if ( ! did_action('AHEE__EE_System__initialize')) {
138 138
 		EE_Error::doing_it_wrong(
139 139
 			__FUNCTION__,
140 140
 			sprintf(
141
-				__( 'The "%s" conditional tag can not be used until after the "init" hook has run, but works best when used within a theme\'s template files.','event_espresso'),
141
+				__('The "%s" conditional tag can not be used until after the "init" hook has run, but works best when used within a theme\'s template files.', 'event_espresso'),
142 142
 				$conditional_tag
143 143
 			),
144 144
 			'4.4.0'
@@ -153,13 +153,13 @@  discard block
 block discarded – undo
153 153
 
154 154
 /*************************** Event Queries ***************************/
155 155
 
156
-if ( ! function_exists( 'espresso_get_events' )) {
156
+if ( ! function_exists('espresso_get_events')) {
157 157
 	/**
158 158
 	 * 	espresso_get_events
159 159
 	 * @param array $params
160 160
 	 * @return array
161 161
 	 */
162
-	function espresso_get_events( $params = array() ) {
162
+	function espresso_get_events($params = array()) {
163 163
 		//set default params
164 164
 		$default_espresso_events_params = array(
165 165
 			'limit' => 10,
@@ -170,18 +170,18 @@  discard block
 block discarded – undo
170 170
 			'sort' => 'ASC'
171 171
 		);
172 172
 		// allow the defaults to be filtered
173
-		$default_espresso_events_params = apply_filters( 'espresso_get_events__default_espresso_events_params', $default_espresso_events_params );
173
+		$default_espresso_events_params = apply_filters('espresso_get_events__default_espresso_events_params', $default_espresso_events_params);
174 174
 		// grab params and merge with defaults, then extract
175
-		$params = array_merge( $default_espresso_events_params, $params );
175
+		$params = array_merge($default_espresso_events_params, $params);
176 176
 		// run the query
177
-		$events_query = new EventEspresso\core\domain\services\wp_queries\EventListQuery( $params );
177
+		$events_query = new EventEspresso\core\domain\services\wp_queries\EventListQuery($params);
178 178
 		// assign results to a variable so we can return it
179 179
 		$events = $events_query->have_posts() ? $events_query->posts : array();
180 180
 		// but first reset the query and postdata
181 181
 		wp_reset_query();
182 182
 		wp_reset_postdata();
183 183
 		EED_Events_Archive::remove_all_events_archive_filters();
184
-		unset( $events_query );
184
+		unset($events_query);
185 185
 		return $events;
186 186
 	}
187 187
 }
@@ -195,33 +195,33 @@  discard block
 block discarded – undo
195 195
  * espresso_load_ticket_selector
196 196
  */
197 197
 function espresso_load_ticket_selector() {
198
-	EE_Registry::instance()->load_file( EE_MODULES . 'ticket_selector', 'EED_Ticket_Selector', 'module' );
198
+	EE_Registry::instance()->load_file(EE_MODULES.'ticket_selector', 'EED_Ticket_Selector', 'module');
199 199
 }
200 200
 
201
-if ( ! function_exists( 'espresso_ticket_selector' )) {
201
+if ( ! function_exists('espresso_ticket_selector')) {
202 202
 	/**
203 203
 	 * espresso_ticket_selector
204 204
 	 * @param null $event
205 205
 	 */
206
-	function espresso_ticket_selector( $event = NULL ) {
207
-		if (  ! apply_filters( 'FHEE_disable_espresso_ticket_selector', FALSE ) ) {
206
+	function espresso_ticket_selector($event = NULL) {
207
+		if ( ! apply_filters('FHEE_disable_espresso_ticket_selector', FALSE)) {
208 208
 			espresso_load_ticket_selector();
209 209
             \EED_Ticket_Selector::set_definitions();
210
-			echo EED_Ticket_Selector::display_ticket_selector( $event );
210
+			echo EED_Ticket_Selector::display_ticket_selector($event);
211 211
 		}
212 212
 	}
213 213
 }
214 214
 
215 215
 
216
-	if ( ! function_exists( 'espresso_view_details_btn' )) {
216
+	if ( ! function_exists('espresso_view_details_btn')) {
217 217
 	/**
218 218
 	 * espresso_view_details_btn
219 219
 	 * @param null $event
220 220
 	 */
221
-	function espresso_view_details_btn( $event = NULL ) {
222
-		if (  ! apply_filters( 'FHEE_disable_espresso_view_details_btn', FALSE ) ) {
221
+	function espresso_view_details_btn($event = NULL) {
222
+		if ( ! apply_filters('FHEE_disable_espresso_view_details_btn', FALSE)) {
223 223
 			espresso_load_ticket_selector();
224
-			echo EED_Ticket_Selector::display_ticket_selector( $event, TRUE );
224
+			echo EED_Ticket_Selector::display_ticket_selector($event, TRUE);
225 225
 		}
226 226
 	}
227 227
 }
@@ -231,7 +231,7 @@  discard block
 block discarded – undo
231 231
 
232 232
 /*************************** EEH_Event_View ***************************/
233 233
 
234
-if ( ! function_exists( 'espresso_load_event_list_assets' )) {
234
+if ( ! function_exists('espresso_load_event_list_assets')) {
235 235
 	/**
236 236
 	 * espresso_load_event_list_assets
237 237
 	 * ensures that event list styles and scripts are loaded
@@ -240,13 +240,13 @@  discard block
 block discarded – undo
240 240
 	 */
241 241
 	function espresso_load_event_list_assets() {
242 242
 		$event_list = EED_Events_Archive::instance();
243
-		add_action( 'AHEE__EE_System__initialize_last', array( $event_list, 'load_event_list_assets' ), 10 );
244
-		add_filter( 'FHEE_enable_default_espresso_css', '__return_true' );
243
+		add_action('AHEE__EE_System__initialize_last', array($event_list, 'load_event_list_assets'), 10);
244
+		add_filter('FHEE_enable_default_espresso_css', '__return_true');
245 245
 	}
246 246
 }
247 247
 
248 248
 
249
-if ( ! function_exists( 'espresso_event_reg_button' )) {
249
+if ( ! function_exists('espresso_event_reg_button')) {
250 250
 	/**
251 251
 	 * espresso_event_reg_button
252 252
 	 * returns the "Register Now" button if event is active,
@@ -258,9 +258,9 @@  discard block
 block discarded – undo
258 258
 	 * @param bool $EVT_ID
259 259
 	 * @return string
260 260
 	 */
261
-	function espresso_event_reg_button( $btn_text_if_active = NULL, $btn_text_if_inactive = FALSE, $EVT_ID = FALSE ) {
262
-		$event_status = EEH_Event_View::event_active_status( $EVT_ID );
263
-		switch ( $event_status ) {
261
+	function espresso_event_reg_button($btn_text_if_active = NULL, $btn_text_if_inactive = FALSE, $EVT_ID = FALSE) {
262
+		$event_status = EEH_Event_View::event_active_status($EVT_ID);
263
+		switch ($event_status) {
264 264
 			case EE_Datetime::sold_out :
265 265
 				$btn_text = __('Sold Out', 'event_espresso');
266 266
 				$class = 'ee-pink';
@@ -276,10 +276,10 @@  discard block
 block discarded – undo
276 276
 			case EE_Datetime::upcoming :
277 277
 			case EE_Datetime::active :
278 278
 			default :
279
-				$btn_text =! empty( $btn_text_if_active ) ? $btn_text_if_active : __( 'Register Now', 'event_espresso' );
279
+				$btn_text = ! empty($btn_text_if_active) ? $btn_text_if_active : __('Register Now', 'event_espresso');
280 280
 				$class = 'ee-green';
281 281
 		}
282
-		if ( $event_status < 1 && ! empty( $btn_text_if_inactive )) {
282
+		if ($event_status < 1 && ! empty($btn_text_if_inactive)) {
283 283
 			$btn_text = $btn_text_if_inactive;
284 284
 			$class = 'ee-grey';
285 285
 		}
@@ -293,7 +293,7 @@  discard block
 block discarded – undo
293 293
 
294 294
 
295 295
 
296
-if ( ! function_exists( 'espresso_display_ticket_selector' )) {
296
+if ( ! function_exists('espresso_display_ticket_selector')) {
297 297
 	/**
298 298
 	 * espresso_display_ticket_selector
299 299
 	 * whether or not to display the Ticket Selector for an event
@@ -301,14 +301,14 @@  discard block
 block discarded – undo
301 301
 	 * @param bool $EVT_ID
302 302
 	 * @return boolean
303 303
 	 */
304
-	function espresso_display_ticket_selector( $EVT_ID = FALSE ) {
305
-		return EEH_Event_View::display_ticket_selector( $EVT_ID );
304
+	function espresso_display_ticket_selector($EVT_ID = FALSE) {
305
+		return EEH_Event_View::display_ticket_selector($EVT_ID);
306 306
 	}
307 307
 }
308 308
 
309 309
 
310 310
 
311
-if ( ! function_exists( 'espresso_event_status_banner' )) {
311
+if ( ! function_exists('espresso_event_status_banner')) {
312 312
 	/**
313 313
 	 * espresso_event_status
314 314
 	 * returns a banner showing the event status if it is sold out, expired, or inactive
@@ -316,13 +316,13 @@  discard block
 block discarded – undo
316 316
 	 * @param bool $EVT_ID
317 317
 	 * @return string
318 318
 	 */
319
-	function espresso_event_status_banner( $EVT_ID = FALSE ) {
320
-		return EEH_Event_View::event_status( $EVT_ID );
319
+	function espresso_event_status_banner($EVT_ID = FALSE) {
320
+		return EEH_Event_View::event_status($EVT_ID);
321 321
 	}
322 322
 }
323 323
 
324 324
 
325
-if ( ! function_exists( 'espresso_event_status' )) {
325
+if ( ! function_exists('espresso_event_status')) {
326 326
 	/**
327 327
 	 * espresso_event_status
328 328
 	 * returns the event status if it is sold out, expired, or inactive
@@ -331,13 +331,13 @@  discard block
 block discarded – undo
331 331
 	 * @param bool $echo
332 332
 	 * @return string
333 333
 	 */
334
-	function espresso_event_status( $EVT_ID = 0, $echo = TRUE ) {
335
-		return EEH_Event_View::event_active_status( $EVT_ID, $echo );
334
+	function espresso_event_status($EVT_ID = 0, $echo = TRUE) {
335
+		return EEH_Event_View::event_active_status($EVT_ID, $echo);
336 336
 	}
337 337
 }
338 338
 
339 339
 
340
-if ( ! function_exists( 'espresso_event_categories' )) {
340
+if ( ! function_exists('espresso_event_categories')) {
341 341
 	/**
342 342
 	 * espresso_event_categories
343 343
 	 * returns the terms associated with an event
@@ -347,17 +347,17 @@  discard block
 block discarded – undo
347 347
 	 * @param bool $echo
348 348
 	 * @return string
349 349
 	 */
350
-	function espresso_event_categories( $EVT_ID = 0, $hide_uncategorized = TRUE, $echo = TRUE ) {
351
-		if ( $echo ) {
352
-			echo EEH_Event_View::event_categories( $EVT_ID, $hide_uncategorized );
350
+	function espresso_event_categories($EVT_ID = 0, $hide_uncategorized = TRUE, $echo = TRUE) {
351
+		if ($echo) {
352
+			echo EEH_Event_View::event_categories($EVT_ID, $hide_uncategorized);
353 353
 			return '';
354 354
 		}
355
-		return EEH_Event_View::event_categories( $EVT_ID, $hide_uncategorized );
355
+		return EEH_Event_View::event_categories($EVT_ID, $hide_uncategorized);
356 356
 	}
357 357
 }
358 358
 
359 359
 
360
-if ( ! function_exists( 'espresso_event_tickets_available' )) {
360
+if ( ! function_exists('espresso_event_tickets_available')) {
361 361
 	/**
362 362
 	 * espresso_event_tickets_available
363 363
 	 * returns the ticket types available for purchase for an event
@@ -367,26 +367,26 @@  discard block
 block discarded – undo
367 367
 	 * @param bool $format
368 368
 	 * @return string
369 369
 	 */
370
-	function espresso_event_tickets_available( $EVT_ID = 0, $echo = TRUE, $format = TRUE ) {
371
-		$tickets = EEH_Event_View::event_tickets_available( $EVT_ID );
372
-		if ( is_array( $tickets ) && ! empty( $tickets )) {
370
+	function espresso_event_tickets_available($EVT_ID = 0, $echo = TRUE, $format = TRUE) {
371
+		$tickets = EEH_Event_View::event_tickets_available($EVT_ID);
372
+		if (is_array($tickets) && ! empty($tickets)) {
373 373
 			// if formatting then $html will be a string, else it will be an array of ticket objects
374
-			$html = $format ? '<ul id="ee-event-tickets-ul-' . $EVT_ID . '" class="ee-event-tickets-ul">' : array();
375
-			foreach ( $tickets as $ticket ) {
376
-				if ( $ticket instanceof EE_Ticket ) {
377
-					if ( $format ) {
378
-						$html .= '<li id="ee-event-tickets-li-' . $ticket->ID() . '" class="ee-event-tickets-li">';
379
-						$html .= $ticket->name() . ' ' . EEH_Template::format_currency( $ticket->get_ticket_total_with_taxes() );
374
+			$html = $format ? '<ul id="ee-event-tickets-ul-'.$EVT_ID.'" class="ee-event-tickets-ul">' : array();
375
+			foreach ($tickets as $ticket) {
376
+				if ($ticket instanceof EE_Ticket) {
377
+					if ($format) {
378
+						$html .= '<li id="ee-event-tickets-li-'.$ticket->ID().'" class="ee-event-tickets-li">';
379
+						$html .= $ticket->name().' '.EEH_Template::format_currency($ticket->get_ticket_total_with_taxes());
380 380
 						$html .= '</li>';
381 381
 					} else {
382 382
 						$html[] = $ticket;
383 383
 					}
384 384
 				}
385 385
 			}
386
-			if ( $format ) {
386
+			if ($format) {
387 387
 				$html .= '</ul>';
388 388
 			}
389
-			if ( $echo && $format ) {
389
+			if ($echo && $format) {
390 390
 				echo $html;
391 391
 				return '';
392 392
 			}
@@ -396,7 +396,7 @@  discard block
 block discarded – undo
396 396
 	}
397 397
 }
398 398
 
399
-if ( ! function_exists( 'espresso_event_date_obj' )) {
399
+if ( ! function_exists('espresso_event_date_obj')) {
400 400
 	/**
401 401
 	 * espresso_event_date_obj
402 402
 	 * returns the primary date object for an event
@@ -404,13 +404,13 @@  discard block
 block discarded – undo
404 404
 	 * @param bool $EVT_ID
405 405
 	 * @return object
406 406
 	 */
407
-	function espresso_event_date_obj( $EVT_ID = FALSE ) {
408
-		return EEH_Event_View::get_primary_date_obj( $EVT_ID );
407
+	function espresso_event_date_obj($EVT_ID = FALSE) {
408
+		return EEH_Event_View::get_primary_date_obj($EVT_ID);
409 409
 	}
410 410
 }
411 411
 
412 412
 
413
-if ( ! function_exists( 'espresso_event_date' )) {
413
+if ( ! function_exists('espresso_event_date')) {
414 414
 	/**
415 415
 	 * espresso_event_date
416 416
 	 * returns the primary date for an event
@@ -421,22 +421,22 @@  discard block
 block discarded – undo
421 421
 	 * @param bool $echo
422 422
 	 * @return string
423 423
 	 */
424
-	function espresso_event_date( $date_format = '', $time_format = '', $EVT_ID = FALSE, $echo = TRUE ) {
425
-		$date_format = ! empty( $date_format ) ? $date_format : get_option( 'date_format' );
426
-		$time_format = ! empty( $time_format ) ? $time_format : get_option( 'time_format' );
427
-		$date_format = apply_filters( 'FHEE__espresso_event_date__date_format', $date_format );
428
-		$time_format = apply_filters( 'FHEE__espresso_event_date__time_format', $time_format );
429
-		if($echo){
430
-			echo EEH_Event_View::the_event_date( $date_format, $time_format, $EVT_ID );
424
+	function espresso_event_date($date_format = '', $time_format = '', $EVT_ID = FALSE, $echo = TRUE) {
425
+		$date_format = ! empty($date_format) ? $date_format : get_option('date_format');
426
+		$time_format = ! empty($time_format) ? $time_format : get_option('time_format');
427
+		$date_format = apply_filters('FHEE__espresso_event_date__date_format', $date_format);
428
+		$time_format = apply_filters('FHEE__espresso_event_date__time_format', $time_format);
429
+		if ($echo) {
430
+			echo EEH_Event_View::the_event_date($date_format, $time_format, $EVT_ID);
431 431
 			return '';
432 432
 		}
433
-		return EEH_Event_View::the_event_date( $date_format, $time_format, $EVT_ID );
433
+		return EEH_Event_View::the_event_date($date_format, $time_format, $EVT_ID);
434 434
 
435 435
 	}
436 436
 }
437 437
 
438 438
 
439
-if ( ! function_exists( 'espresso_list_of_event_dates' )) {
439
+if ( ! function_exists('espresso_list_of_event_dates')) {
440 440
 	/**
441 441
 	 * espresso_list_of_event_dates
442 442
 	 * returns a unordered list of dates for an event
@@ -451,40 +451,40 @@  discard block
 block discarded – undo
451 451
 	 * @param null   $limit
452 452
 	 * @return string
453 453
 	 */
454
-	function espresso_list_of_event_dates( $EVT_ID = 0, $date_format = '', $time_format = '', $echo = TRUE, $show_expired = NULL, $format = TRUE, $add_breaks = TRUE, $limit = NULL ) {
455
-		$date_format = ! empty( $date_format ) ? $date_format : get_option( 'date_format' );
456
-		$time_format = ! empty( $time_format ) ? $time_format : get_option( 'time_format' );
457
-		$date_format = apply_filters( 'FHEE__espresso_list_of_event_dates__date_format', $date_format );
458
-		$time_format = apply_filters( 'FHEE__espresso_list_of_event_dates__time_format', $time_format );
459
-		$datetimes = EEH_Event_View::get_all_date_obj( $EVT_ID, $show_expired, FALSE, $limit );
460
-		if ( ! $format ) {
461
-			return apply_filters( 'FHEE__espresso_list_of_event_dates__datetimes', $datetimes );
454
+	function espresso_list_of_event_dates($EVT_ID = 0, $date_format = '', $time_format = '', $echo = TRUE, $show_expired = NULL, $format = TRUE, $add_breaks = TRUE, $limit = NULL) {
455
+		$date_format = ! empty($date_format) ? $date_format : get_option('date_format');
456
+		$time_format = ! empty($time_format) ? $time_format : get_option('time_format');
457
+		$date_format = apply_filters('FHEE__espresso_list_of_event_dates__date_format', $date_format);
458
+		$time_format = apply_filters('FHEE__espresso_list_of_event_dates__time_format', $time_format);
459
+		$datetimes = EEH_Event_View::get_all_date_obj($EVT_ID, $show_expired, FALSE, $limit);
460
+		if ( ! $format) {
461
+			return apply_filters('FHEE__espresso_list_of_event_dates__datetimes', $datetimes);
462 462
 		}
463 463
 		//d( $datetimes );
464
-		if ( is_array( $datetimes ) && ! empty( $datetimes )) {
464
+		if (is_array($datetimes) && ! empty($datetimes)) {
465 465
 			global $post;
466
-			$html = $format ? '<ul id="ee-event-datetimes-ul-' . $post->ID . '" class="ee-event-datetimes-ul ee-clearfix">' : '';
467
-			foreach ( $datetimes as $datetime ) {
468
-				if ( $datetime instanceof EE_Datetime ) {
469
-					$html .= '<li id="ee-event-datetimes-li-' . $datetime->ID();
470
-					$html .= '" class="ee-event-datetimes-li ee-event-datetimes-li-' . $datetime->get_active_status() . '">';
466
+			$html = $format ? '<ul id="ee-event-datetimes-ul-'.$post->ID.'" class="ee-event-datetimes-ul ee-clearfix">' : '';
467
+			foreach ($datetimes as $datetime) {
468
+				if ($datetime instanceof EE_Datetime) {
469
+					$html .= '<li id="ee-event-datetimes-li-'.$datetime->ID();
470
+					$html .= '" class="ee-event-datetimes-li ee-event-datetimes-li-'.$datetime->get_active_status().'">';
471 471
 					$datetime_name = $datetime->name();
472
-					$html .= ! empty( $datetime_name ) ? '<strong>' . $datetime_name . '</strong>' : '';
473
-					$html .= ! empty( $datetime_name )  && $add_breaks ? '<br />' : '';
474
-					$html .= '<span class="dashicons dashicons-calendar"></span><span class="ee-event-datetimes-li-daterange">' . $datetime->date_range( $date_format ) . '</span><br/>';
475
-					$html .= '<span class="dashicons dashicons-clock"></span><span class="ee-event-datetimes-li-timerange">' . $datetime->time_range( $time_format ) . '</span>';
472
+					$html .= ! empty($datetime_name) ? '<strong>'.$datetime_name.'</strong>' : '';
473
+					$html .= ! empty($datetime_name) && $add_breaks ? '<br />' : '';
474
+					$html .= '<span class="dashicons dashicons-calendar"></span><span class="ee-event-datetimes-li-daterange">'.$datetime->date_range($date_format).'</span><br/>';
475
+					$html .= '<span class="dashicons dashicons-clock"></span><span class="ee-event-datetimes-li-timerange">'.$datetime->time_range($time_format).'</span>';
476 476
 					$datetime_description = $datetime->description();
477
-					$html .= ! empty( $datetime_description )  && $add_breaks ? '<br />' : '';
478
-					$html .= ! empty( $datetime_description ) ? ' - ' . $datetime_description : '';
479
-					$html = apply_filters( 'FHEE__espresso_list_of_event_dates__datetime_html', $html, $datetime );
477
+					$html .= ! empty($datetime_description) && $add_breaks ? '<br />' : '';
478
+					$html .= ! empty($datetime_description) ? ' - '.$datetime_description : '';
479
+					$html = apply_filters('FHEE__espresso_list_of_event_dates__datetime_html', $html, $datetime);
480 480
 					$html .= '</li>';
481 481
 				}
482 482
 			}
483 483
 			$html .= $format ? '</ul>' : '';
484 484
 		} else {
485
-			$html = $format ?  '<p><span class="dashicons dashicons-marker pink-text"></span>' . __( 'There are no upcoming dates for this event.', 'event_espresso' ) . '</p><br/>' : '';
485
+			$html = $format ? '<p><span class="dashicons dashicons-marker pink-text"></span>'.__('There are no upcoming dates for this event.', 'event_espresso').'</p><br/>' : '';
486 486
 		}
487
-		if ( $echo ) {
487
+		if ($echo) {
488 488
 			echo $html;
489 489
 			return '';
490 490
 		}
@@ -493,7 +493,7 @@  discard block
 block discarded – undo
493 493
 }
494 494
 
495 495
 
496
-if ( ! function_exists( 'espresso_event_end_date' )) {
496
+if ( ! function_exists('espresso_event_end_date')) {
497 497
 	/**
498 498
 	 * espresso_event_end_date
499 499
 	 * returns the last date for an event
@@ -504,20 +504,20 @@  discard block
 block discarded – undo
504 504
 	 * @param bool   $echo
505 505
 	 * @return string
506 506
 	 */
507
-	function espresso_event_end_date( $date_format = '', $time_format = '', $EVT_ID = FALSE, $echo = TRUE ) {
508
-		$date_format = ! empty( $date_format ) ? $date_format : get_option( 'date_format' );
509
-		$time_format = ! empty( $time_format ) ? $time_format : get_option( 'time_format' );
510
-		$date_format = apply_filters( 'FHEE__espresso_event_end_date__date_format', $date_format );
511
-		$time_format = apply_filters( 'FHEE__espresso_event_end_date__time_format', $time_format );
512
-		if($echo){
513
-			echo EEH_Event_View::the_event_end_date( $date_format, $time_format, $EVT_ID );
507
+	function espresso_event_end_date($date_format = '', $time_format = '', $EVT_ID = FALSE, $echo = TRUE) {
508
+		$date_format = ! empty($date_format) ? $date_format : get_option('date_format');
509
+		$time_format = ! empty($time_format) ? $time_format : get_option('time_format');
510
+		$date_format = apply_filters('FHEE__espresso_event_end_date__date_format', $date_format);
511
+		$time_format = apply_filters('FHEE__espresso_event_end_date__time_format', $time_format);
512
+		if ($echo) {
513
+			echo EEH_Event_View::the_event_end_date($date_format, $time_format, $EVT_ID);
514 514
 			return '';
515 515
 		}
516
-		return EEH_Event_View::the_event_end_date( $date_format, $time_format, $EVT_ID );
516
+		return EEH_Event_View::the_event_end_date($date_format, $time_format, $EVT_ID);
517 517
 	}
518 518
 }
519 519
 
520
-if ( ! function_exists( 'espresso_event_date_range' )) {
520
+if ( ! function_exists('espresso_event_date_range')) {
521 521
 	/**
522 522
 	 * espresso_event_date_range
523 523
 	 * returns the first and last chronologically ordered dates for an event (if different)
@@ -530,31 +530,31 @@  discard block
 block discarded – undo
530 530
 	 * @param bool   $echo
531 531
 	 * @return string
532 532
 	 */
533
-	function espresso_event_date_range( $date_format = '', $time_format = '', $single_date_format = '', $single_time_format = '', $EVT_ID = FALSE, $echo = TRUE ) {
533
+	function espresso_event_date_range($date_format = '', $time_format = '', $single_date_format = '', $single_time_format = '', $EVT_ID = FALSE, $echo = TRUE) {
534 534
 		// set and filter date and time formats when a range is returned
535
-		$date_format = ! empty( $date_format ) ? $date_format : get_option( 'date_format' );
536
-		$date_format = apply_filters( 'FHEE__espresso_event_date_range__date_format', $date_format );
535
+		$date_format = ! empty($date_format) ? $date_format : get_option('date_format');
536
+		$date_format = apply_filters('FHEE__espresso_event_date_range__date_format', $date_format);
537 537
 		// get the start and end date with NO time portion
538
-		$the_event_date = EEH_Event_View::the_earliest_event_date( $date_format, '', $EVT_ID );
539
-		$the_event_end_date = EEH_Event_View::the_latest_event_date( $date_format, '', $EVT_ID );
538
+		$the_event_date = EEH_Event_View::the_earliest_event_date($date_format, '', $EVT_ID);
539
+		$the_event_end_date = EEH_Event_View::the_latest_event_date($date_format, '', $EVT_ID);
540 540
 		// now we can determine if date range spans more than one day
541
-		if ( $the_event_date != $the_event_end_date ) {
542
-			$time_format = ! empty( $time_format ) ? $time_format : get_option( 'time_format' );
543
-			$time_format = apply_filters( 'FHEE__espresso_event_date_range__time_format', $time_format );
541
+		if ($the_event_date != $the_event_end_date) {
542
+			$time_format = ! empty($time_format) ? $time_format : get_option('time_format');
543
+			$time_format = apply_filters('FHEE__espresso_event_date_range__time_format', $time_format);
544 544
 			$html = sprintf(
545
-				__( '%1$s - %2$s', 'event_espresso' ),
546
-				EEH_Event_View::the_earliest_event_date( $date_format, $time_format, $EVT_ID ),
547
-				EEH_Event_View::the_latest_event_date( $date_format, $time_format, $EVT_ID )
545
+				__('%1$s - %2$s', 'event_espresso'),
546
+				EEH_Event_View::the_earliest_event_date($date_format, $time_format, $EVT_ID),
547
+				EEH_Event_View::the_latest_event_date($date_format, $time_format, $EVT_ID)
548 548
 			);
549 549
 		} else {
550 550
 			// set and filter date and time formats when only a single datetime is returned
551
-			$single_date_format = ! empty( $single_date_format ) ? $single_date_format : get_option( 'date_format' );
552
-			$single_time_format = ! empty( $single_time_format ) ? $single_time_format : get_option( 'time_format' );
553
-			$single_date_format = apply_filters( 'FHEE__espresso_event_date_range__single_date_format', $single_date_format );
554
-			$single_time_format = apply_filters( 'FHEE__espresso_event_date_range__single_time_format', $single_time_format );
555
-			$html = EEH_Event_View::the_earliest_event_date( $single_date_format, $single_time_format, $EVT_ID );
551
+			$single_date_format = ! empty($single_date_format) ? $single_date_format : get_option('date_format');
552
+			$single_time_format = ! empty($single_time_format) ? $single_time_format : get_option('time_format');
553
+			$single_date_format = apply_filters('FHEE__espresso_event_date_range__single_date_format', $single_date_format);
554
+			$single_time_format = apply_filters('FHEE__espresso_event_date_range__single_time_format', $single_time_format);
555
+			$html = EEH_Event_View::the_earliest_event_date($single_date_format, $single_time_format, $EVT_ID);
556 556
 		}
557
-		if ( $echo ) {
557
+		if ($echo) {
558 558
 			echo $html;
559 559
 			return '';
560 560
 		}
@@ -562,7 +562,7 @@  discard block
 block discarded – undo
562 562
 	}
563 563
 }
564 564
 
565
-if ( ! function_exists( 'espresso_next_upcoming_datetime_obj' )) {
565
+if ( ! function_exists('espresso_next_upcoming_datetime_obj')) {
566 566
 	/**
567 567
 	 * espresso_next_upcoming_datetime_obj
568 568
 	 * returns the next upcoming datetime object for an event
@@ -570,12 +570,12 @@  discard block
 block discarded – undo
570 570
 	 * @param int $EVT_ID
571 571
 	 * @return EE_Datetime|null
572 572
 	 */
573
-	function espresso_next_upcoming_datetime_obj( $EVT_ID = 0 ) {
574
-		return EEH_Event_View::get_next_upcoming_date_obj( $EVT_ID );
573
+	function espresso_next_upcoming_datetime_obj($EVT_ID = 0) {
574
+		return EEH_Event_View::get_next_upcoming_date_obj($EVT_ID);
575 575
 	}
576 576
 }
577 577
 
578
-if ( ! function_exists( 'espresso_next_upcoming_datetime' ) ) {
578
+if ( ! function_exists('espresso_next_upcoming_datetime')) {
579 579
 	/**
580 580
 	 * espresso_next_upcoming_datetime
581 581
 	 * returns the start date and time for the next upcoming event.
@@ -586,30 +586,30 @@  discard block
 block discarded – undo
586 586
 	 * @param bool $echo
587 587
 	 * @return string
588 588
 	 */
589
-	function espresso_next_upcoming_datetime( $date_format = '', $time_format = '', $EVT_ID = 0, $echo = true ) {
589
+	function espresso_next_upcoming_datetime($date_format = '', $time_format = '', $EVT_ID = 0, $echo = true) {
590 590
 
591
-		$date_format = ! empty( $date_format ) ? $date_format : get_option( 'date_format' );
592
-		$date_format = apply_filters( 'FHEE__espresso_next_upcoming_datetime__date_format', $date_format );
591
+		$date_format = ! empty($date_format) ? $date_format : get_option('date_format');
592
+		$date_format = apply_filters('FHEE__espresso_next_upcoming_datetime__date_format', $date_format);
593 593
 
594
-		$time_format = ! empty( $time_format ) ? $time_format : get_option( 'time_format' );
595
-		$time_format = apply_filters( 'FHEE__espresso_next_upcoming_datetime__time_format', $time_format );
594
+		$time_format = ! empty($time_format) ? $time_format : get_option('time_format');
595
+		$time_format = apply_filters('FHEE__espresso_next_upcoming_datetime__time_format', $time_format);
596 596
 
597
-		$datetime_format = trim( $date_format . ' ' . $time_format);
597
+		$datetime_format = trim($date_format.' '.$time_format);
598 598
 
599
-		$datetime = espresso_next_upcoming_datetime_obj( $EVT_ID );
599
+		$datetime = espresso_next_upcoming_datetime_obj($EVT_ID);
600 600
 
601
-		if( ! $datetime instanceof EE_Datetime ) {
601
+		if ( ! $datetime instanceof EE_Datetime) {
602 602
 			return '';
603 603
 		}
604
-		if ( $echo ){
605
-			echo $datetime->get_i18n_datetime( 'DTT_EVT_start', $datetime_format );
604
+		if ($echo) {
605
+			echo $datetime->get_i18n_datetime('DTT_EVT_start', $datetime_format);
606 606
 			return '';
607 607
 		}
608
-		return $datetime->get_i18n_datetime( 'DTT_EVT_start', $datetime_format );
608
+		return $datetime->get_i18n_datetime('DTT_EVT_start', $datetime_format);
609 609
 	}
610 610
 }
611 611
 
612
-if ( ! function_exists( 'espresso_event_date_as_calendar_page' )) {
612
+if ( ! function_exists('espresso_event_date_as_calendar_page')) {
613 613
 	/**
614 614
 	 * espresso_event_date_as_calendar_page
615 615
 	 * returns the primary date for an event, stylized to appear as the page of a calendar
@@ -617,15 +617,15 @@  discard block
 block discarded – undo
617 617
 	 * @param bool $EVT_ID
618 618
 	 * @return string
619 619
 	 */
620
-	function espresso_event_date_as_calendar_page( $EVT_ID = FALSE ) {
621
-		EEH_Event_View::event_date_as_calendar_page( $EVT_ID );
620
+	function espresso_event_date_as_calendar_page($EVT_ID = FALSE) {
621
+		EEH_Event_View::event_date_as_calendar_page($EVT_ID);
622 622
 	}
623 623
 }
624 624
 
625 625
 
626 626
 
627 627
 
628
-if ( ! function_exists( 'espresso_event_link_url' )) {
628
+if ( ! function_exists('espresso_event_link_url')) {
629 629
 	/**
630 630
 	 * espresso_event_link_url
631 631
 	 *
@@ -633,18 +633,18 @@  discard block
 block discarded – undo
633 633
 	 * @param bool $echo
634 634
 	 * @return string
635 635
 	 */
636
-	function espresso_event_link_url( $EVT_ID = 0, $echo = TRUE ) {
637
-		if ( $echo ) {
638
-			echo EEH_Event_View::event_link_url( $EVT_ID );
636
+	function espresso_event_link_url($EVT_ID = 0, $echo = TRUE) {
637
+		if ($echo) {
638
+			echo EEH_Event_View::event_link_url($EVT_ID);
639 639
 			return '';
640 640
 		}
641
-		return EEH_Event_View::event_link_url( $EVT_ID );
641
+		return EEH_Event_View::event_link_url($EVT_ID);
642 642
 	}
643 643
 }
644 644
 
645 645
 
646 646
 
647
-if ( ! function_exists( 'espresso_event_has_content_or_excerpt' )) {
647
+if ( ! function_exists('espresso_event_has_content_or_excerpt')) {
648 648
 	/**
649 649
 	 *    espresso_event_has_content_or_excerpt
650 650
 	 *
@@ -652,15 +652,15 @@  discard block
 block discarded – undo
652 652
 	 * @param bool $EVT_ID
653 653
 	 * @return    boolean
654 654
 	 */
655
-	function espresso_event_has_content_or_excerpt( $EVT_ID = FALSE ) {
656
-		return EEH_Event_View::event_has_content_or_excerpt( $EVT_ID );
655
+	function espresso_event_has_content_or_excerpt($EVT_ID = FALSE) {
656
+		return EEH_Event_View::event_has_content_or_excerpt($EVT_ID);
657 657
 	}
658 658
 }
659 659
 
660 660
 
661 661
 
662 662
 
663
-if ( ! function_exists( 'espresso_event_content_or_excerpt' )) {
663
+if ( ! function_exists('espresso_event_content_or_excerpt')) {
664 664
 	/**
665 665
 	 * espresso_event_content_or_excerpt
666 666
 	 *
@@ -669,18 +669,18 @@  discard block
 block discarded – undo
669 669
 	 * @param bool $echo
670 670
 	 * @return string
671 671
 	 */
672
-	function espresso_event_content_or_excerpt( $num_words = 55, $more = NULL, $echo = TRUE ) {
673
-		if ( $echo ) {
674
-			echo EEH_Event_View::event_content_or_excerpt( $num_words, $more );
672
+	function espresso_event_content_or_excerpt($num_words = 55, $more = NULL, $echo = TRUE) {
673
+		if ($echo) {
674
+			echo EEH_Event_View::event_content_or_excerpt($num_words, $more);
675 675
 			return '';
676 676
 		}
677
-		return EEH_Event_View::event_content_or_excerpt( $num_words, $more );
677
+		return EEH_Event_View::event_content_or_excerpt($num_words, $more);
678 678
 	}
679 679
 }
680 680
 
681 681
 
682 682
 
683
-if ( ! function_exists( 'espresso_event_phone' )) {
683
+if ( ! function_exists('espresso_event_phone')) {
684 684
 	/**
685 685
 	 * espresso_event_phone
686 686
 	 *
@@ -688,18 +688,18 @@  discard block
 block discarded – undo
688 688
 	 * @param bool $echo
689 689
 	 * @return string
690 690
 	 */
691
-	function espresso_event_phone( $EVT_ID = 0, $echo = TRUE ) {
692
-		if ( $echo ) {
693
-			echo EEH_Event_View::event_phone( $EVT_ID );
691
+	function espresso_event_phone($EVT_ID = 0, $echo = TRUE) {
692
+		if ($echo) {
693
+			echo EEH_Event_View::event_phone($EVT_ID);
694 694
 			return '';
695 695
 		}
696
-		return EEH_Event_View::event_phone( $EVT_ID );
696
+		return EEH_Event_View::event_phone($EVT_ID);
697 697
 	}
698 698
 }
699 699
 
700 700
 
701 701
 
702
-if ( ! function_exists( 'espresso_edit_event_link' )) {
702
+if ( ! function_exists('espresso_edit_event_link')) {
703 703
 	/**
704 704
 	 * espresso_edit_event_link
705 705
 	 * returns a link to edit an event
@@ -708,39 +708,39 @@  discard block
 block discarded – undo
708 708
 	 * @param bool $echo
709 709
 	 * @return string
710 710
 	 */
711
-	function espresso_edit_event_link( $EVT_ID = 0, $echo = TRUE ) {
712
-		if ( $echo ) {
713
-			echo EEH_Event_View::edit_event_link( $EVT_ID );
711
+	function espresso_edit_event_link($EVT_ID = 0, $echo = TRUE) {
712
+		if ($echo) {
713
+			echo EEH_Event_View::edit_event_link($EVT_ID);
714 714
 			return '';
715 715
 		}
716
-		return EEH_Event_View::edit_event_link( $EVT_ID );
716
+		return EEH_Event_View::edit_event_link($EVT_ID);
717 717
 	}
718 718
 }
719 719
 
720 720
 
721
-if ( ! function_exists( 'espresso_organization_name' )) {
721
+if ( ! function_exists('espresso_organization_name')) {
722 722
 	/**
723 723
 	 * espresso_organization_name
724 724
 	 * @param bool $echo
725 725
 	 * @return string
726 726
 	 */
727 727
 	function espresso_organization_name($echo = TRUE) {
728
-		if($echo){
729
-			echo EE_Registry::instance()->CFG->organization->get_pretty( 'name' );
728
+		if ($echo) {
729
+			echo EE_Registry::instance()->CFG->organization->get_pretty('name');
730 730
 			return '';
731 731
 		}
732
-		return EE_Registry::instance()->CFG->organization->get_pretty( 'name' );
732
+		return EE_Registry::instance()->CFG->organization->get_pretty('name');
733 733
 	}
734 734
 }
735 735
 
736
-if ( ! function_exists( 'espresso_organization_address' )) {
736
+if ( ! function_exists('espresso_organization_address')) {
737 737
 	/**
738 738
 	 * espresso_organization_address
739 739
 	 * @param string $type
740 740
 	 * @return string
741 741
 	 */
742
-	function espresso_organization_address( $type = 'inline' ) {
743
-		if ( EE_Registry::instance()->CFG->organization instanceof EE_Organization_Config ) {
742
+	function espresso_organization_address($type = 'inline') {
743
+		if (EE_Registry::instance()->CFG->organization instanceof EE_Organization_Config) {
744 744
 			$address = new EventEspresso\core\domain\entities\GenericAddress(
745 745
 				EE_Registry::instance()->CFG->organization->address_1,
746 746
 				EE_Registry::instance()->CFG->organization->address_2,
@@ -749,129 +749,129 @@  discard block
 block discarded – undo
749 749
 				EE_Registry::instance()->CFG->organization->zip,
750 750
 				EE_Registry::instance()->CFG->organization->CNT_ISO
751 751
 			);
752
-			return EEH_Address::format( $address, $type );
752
+			return EEH_Address::format($address, $type);
753 753
 		}
754 754
 		return '';
755 755
 	}
756 756
 }
757 757
 
758
-if ( ! function_exists( 'espresso_organization_email' )) {
758
+if ( ! function_exists('espresso_organization_email')) {
759 759
 	/**
760 760
 	 * espresso_organization_email
761 761
 	 * @param bool $echo
762 762
 	 * @return string
763 763
 	 */
764
-	function espresso_organization_email( $echo = TRUE ) {
765
-		if($echo){
766
-			echo EE_Registry::instance()->CFG->organization->get_pretty( 'email' );
764
+	function espresso_organization_email($echo = TRUE) {
765
+		if ($echo) {
766
+			echo EE_Registry::instance()->CFG->organization->get_pretty('email');
767 767
 			return '';
768 768
 		}
769
-		return EE_Registry::instance()->CFG->organization->get_pretty( 'email' );
769
+		return EE_Registry::instance()->CFG->organization->get_pretty('email');
770 770
 	}
771 771
 }
772 772
 
773
-if ( ! function_exists( 'espresso_organization_logo_url' )) {
773
+if ( ! function_exists('espresso_organization_logo_url')) {
774 774
 	/**
775 775
 	 * espresso_organization_logo_url
776 776
 	 * @param bool $echo
777 777
 	 * @return string
778 778
 	 */
779
-	function espresso_organization_logo_url( $echo = TRUE ) {
780
-		if($echo){
781
-			echo EE_Registry::instance()->CFG->organization->get_pretty( 'logo_url' );
779
+	function espresso_organization_logo_url($echo = TRUE) {
780
+		if ($echo) {
781
+			echo EE_Registry::instance()->CFG->organization->get_pretty('logo_url');
782 782
 			return '';
783 783
 		}
784
-		return EE_Registry::instance()->CFG->organization->get_pretty( 'logo_url' );
784
+		return EE_Registry::instance()->CFG->organization->get_pretty('logo_url');
785 785
 	}
786 786
 }
787 787
 
788
-if ( ! function_exists( 'espresso_organization_facebook' )) {
788
+if ( ! function_exists('espresso_organization_facebook')) {
789 789
 	/**
790 790
 	 * espresso_organization_facebook
791 791
 	 * @param bool $echo
792 792
 	 * @return string
793 793
 	 */
794
-	function espresso_organization_facebook( $echo = TRUE ) {
795
-		if($echo){
796
-			echo EE_Registry::instance()->CFG->organization->get_pretty( 'facebook' );
794
+	function espresso_organization_facebook($echo = TRUE) {
795
+		if ($echo) {
796
+			echo EE_Registry::instance()->CFG->organization->get_pretty('facebook');
797 797
 			return '';
798 798
 		}
799
-		return EE_Registry::instance()->CFG->organization->get_pretty( 'facebook' );
799
+		return EE_Registry::instance()->CFG->organization->get_pretty('facebook');
800 800
 	}
801 801
 }
802 802
 
803
-if ( ! function_exists( 'espresso_organization_twitter' )) {
803
+if ( ! function_exists('espresso_organization_twitter')) {
804 804
 	/**
805 805
 	 * espresso_organization_twitter
806 806
 	 * @param bool $echo
807 807
 	 * @return string
808 808
 	 */
809
-	function espresso_organization_twitter( $echo = TRUE ) {
810
-		if($echo){
811
-			echo EE_Registry::instance()->CFG->organization->get_pretty( 'twitter' );
809
+	function espresso_organization_twitter($echo = TRUE) {
810
+		if ($echo) {
811
+			echo EE_Registry::instance()->CFG->organization->get_pretty('twitter');
812 812
 			return '';
813 813
 		}
814
-		return EE_Registry::instance()->CFG->organization->get_pretty( 'twitter' );
814
+		return EE_Registry::instance()->CFG->organization->get_pretty('twitter');
815 815
 	}
816 816
 }
817 817
 
818
-if ( ! function_exists( 'espresso_organization_linkedin' )) {
818
+if ( ! function_exists('espresso_organization_linkedin')) {
819 819
 	/**
820 820
 	 * espresso_organization_linkedin
821 821
 	 * @param bool $echo
822 822
 	 * @return string
823 823
 	 */
824
-	function espresso_organization_linkedin( $echo = TRUE ) {
825
-		if($echo){
826
-			echo EE_Registry::instance()->CFG->organization->get_pretty( 'linkedin' );
824
+	function espresso_organization_linkedin($echo = TRUE) {
825
+		if ($echo) {
826
+			echo EE_Registry::instance()->CFG->organization->get_pretty('linkedin');
827 827
 			return '';
828 828
 		}
829
-		return EE_Registry::instance()->CFG->organization->get_pretty( 'linkedin' );
829
+		return EE_Registry::instance()->CFG->organization->get_pretty('linkedin');
830 830
 	}
831 831
 }
832 832
 
833
-if ( ! function_exists( 'espresso_organization_pinterest' )) {
833
+if ( ! function_exists('espresso_organization_pinterest')) {
834 834
 	/**
835 835
 	 * espresso_organization_pinterest
836 836
 	 * @param bool $echo
837 837
 	 * @return string
838 838
 	 */
839
-	function espresso_organization_pinterest( $echo = TRUE ) {
840
-		if($echo){
841
-			echo EE_Registry::instance()->CFG->organization->get_pretty( 'pinterest' );
839
+	function espresso_organization_pinterest($echo = TRUE) {
840
+		if ($echo) {
841
+			echo EE_Registry::instance()->CFG->organization->get_pretty('pinterest');
842 842
 			return '';
843 843
 		}
844
-		return EE_Registry::instance()->CFG->organization->get_pretty( 'pinterest' );
844
+		return EE_Registry::instance()->CFG->organization->get_pretty('pinterest');
845 845
 	}
846 846
 }
847 847
 
848
-if ( ! function_exists( 'espresso_organization_google' )) {
848
+if ( ! function_exists('espresso_organization_google')) {
849 849
 	/**
850 850
 	 * espresso_organization_google
851 851
 	 * @param bool $echo
852 852
 	 * @return string
853 853
 	 */
854
-	function espresso_organization_google( $echo = TRUE ) {
855
-		if($echo){
856
-			echo EE_Registry::instance()->CFG->organization->get_pretty( 'google' );
854
+	function espresso_organization_google($echo = TRUE) {
855
+		if ($echo) {
856
+			echo EE_Registry::instance()->CFG->organization->get_pretty('google');
857 857
 			return '';
858 858
 		}
859
-		return EE_Registry::instance()->CFG->organization->get_pretty( 'google' );
859
+		return EE_Registry::instance()->CFG->organization->get_pretty('google');
860 860
 	}
861 861
 }
862 862
 
863
-if ( ! function_exists( 'espresso_organization_instagram' )) {
863
+if ( ! function_exists('espresso_organization_instagram')) {
864 864
 	/**
865 865
 	 * espresso_organization_instagram
866 866
 	 * @param bool $echo
867 867
 	 * @return string
868 868
 	 */
869
-	function espresso_organization_instagram( $echo = TRUE ) {
870
-		if($echo){
871
-			echo EE_Registry::instance()->CFG->organization->get_pretty( 'instagram' );
869
+	function espresso_organization_instagram($echo = TRUE) {
870
+		if ($echo) {
871
+			echo EE_Registry::instance()->CFG->organization->get_pretty('instagram');
872 872
 			return '';
873 873
 		}
874
-		return EE_Registry::instance()->CFG->organization->get_pretty( 'instagram' );
874
+		return EE_Registry::instance()->CFG->organization->get_pretty('instagram');
875 875
 	}
876 876
 }
877 877
 
@@ -881,7 +881,7 @@  discard block
 block discarded – undo
881 881
 
882 882
 
883 883
 
884
-if ( ! function_exists( 'espresso_event_venues' )) {
884
+if ( ! function_exists('espresso_event_venues')) {
885 885
 	/**
886 886
 	 * espresso_event_venues
887 887
 	 *
@@ -895,7 +895,7 @@  discard block
 block discarded – undo
895 895
 
896 896
 
897 897
 
898
-if ( ! function_exists( 'espresso_venue_id' )) {
898
+if ( ! function_exists('espresso_venue_id')) {
899 899
 	/**
900 900
 	 *    espresso_venue_name
901 901
 	 *
@@ -903,15 +903,15 @@  discard block
 block discarded – undo
903 903
 	 * @param     int $EVT_ID
904 904
 	 * @return    string
905 905
 	 */
906
-	function espresso_venue_id( $EVT_ID = 0 ) {
907
-		$venue = EEH_Venue_View::get_venue( $EVT_ID );
906
+	function espresso_venue_id($EVT_ID = 0) {
907
+		$venue = EEH_Venue_View::get_venue($EVT_ID);
908 908
 		return $venue instanceof EE_Venue ? $venue->ID() : 0;
909 909
 	}
910 910
 }
911 911
 
912 912
 
913 913
 
914
-if ( ! function_exists( 'espresso_is_venue_private' ) ) {
914
+if ( ! function_exists('espresso_is_venue_private')) {
915 915
 	/**
916 916
 	 * Return whether a venue is private or not.
917 917
 	 * @see EEH_Venue_View::get_venue() for more info on expected return results.
@@ -920,45 +920,45 @@  discard block
 block discarded – undo
920 920
 	 *
921 921
 	 * @return bool | null
922 922
 	 */
923
-	function espresso_is_venue_private( $VNU_ID = 0 ) {
924
-		return EEH_Venue_View::is_venue_private( $VNU_ID );
923
+	function espresso_is_venue_private($VNU_ID = 0) {
924
+		return EEH_Venue_View::is_venue_private($VNU_ID);
925 925
 	}
926 926
 }
927 927
 
928 928
 
929 929
 
930
-if ( ! function_exists( 'espresso_venue_is_password_protected' ) ) {
930
+if ( ! function_exists('espresso_venue_is_password_protected')) {
931 931
 	/**
932 932
 	 * returns true or false if a venue is password protected or not
933 933
 	 *
934 934
 	 * @param int     $VNU_ID optional, the venue id to check.
935 935
 	 * @return string
936 936
 	 */
937
-	function espresso_venue_is_password_protected( $VNU_ID = 0 ) {
938
-		EE_Registry::instance()->load_helper( 'Venue_View' );
939
-		return EEH_Venue_View::is_venue_password_protected( $VNU_ID );
937
+	function espresso_venue_is_password_protected($VNU_ID = 0) {
938
+		EE_Registry::instance()->load_helper('Venue_View');
939
+		return EEH_Venue_View::is_venue_password_protected($VNU_ID);
940 940
 	}
941 941
 }
942 942
 
943 943
 
944 944
 
945
-if ( ! function_exists( 'espresso_password_protected_venue_form' ) ) {
945
+if ( ! function_exists('espresso_password_protected_venue_form')) {
946 946
 	/**
947 947
 	 * Returns a password form if venue is password protected.
948 948
 	 *
949 949
 	 * @param int     $VNU_ID optional, the venue id to check.
950 950
 	 * @return string
951 951
 	 */
952
-	function espresso_password_protected_venue_form( $VNU_ID = 0 ) {
953
-		EE_Registry::instance()->load_helper( 'Venue_View' );
954
-		return EEH_Venue_View::password_protected_venue_form( $VNU_ID );
952
+	function espresso_password_protected_venue_form($VNU_ID = 0) {
953
+		EE_Registry::instance()->load_helper('Venue_View');
954
+		return EEH_Venue_View::password_protected_venue_form($VNU_ID);
955 955
 	}
956 956
 }
957 957
 
958 958
 
959 959
 
960 960
 
961
-if ( ! function_exists( 'espresso_venue_name' )) {
961
+if ( ! function_exists('espresso_venue_name')) {
962 962
 	/**
963 963
 	 *    espresso_venue_name
964 964
 	 *
@@ -968,19 +968,19 @@  discard block
 block discarded – undo
968 968
 	 * @param bool   $echo
969 969
 	 * @return    string
970 970
 	 */
971
-	function espresso_venue_name( $VNU_ID = 0, $link_to = 'details', $echo = TRUE ) {
972
-		if($echo){
973
-			echo EEH_Venue_View::venue_name( $link_to, $VNU_ID );
971
+	function espresso_venue_name($VNU_ID = 0, $link_to = 'details', $echo = TRUE) {
972
+		if ($echo) {
973
+			echo EEH_Venue_View::venue_name($link_to, $VNU_ID);
974 974
 			return '';
975 975
 		}
976
-		return EEH_Venue_View::venue_name( $link_to, $VNU_ID );
976
+		return EEH_Venue_View::venue_name($link_to, $VNU_ID);
977 977
 	}
978 978
 }
979 979
 
980 980
 
981 981
 
982 982
 
983
-if ( ! function_exists( 'espresso_venue_link' )) {
983
+if ( ! function_exists('espresso_venue_link')) {
984 984
 	/**
985 985
 	 * 	espresso_venue_link
986 986
 	 *
@@ -989,14 +989,14 @@  discard block
 block discarded – undo
989 989
 	 *  @param 	string 	$text
990 990
 	 *  @return 	string
991 991
 	 */
992
-	function espresso_venue_link( $VNU_ID = 0, $text = '' ) {
993
-		return EEH_Venue_View::venue_details_link( $VNU_ID, $text );
992
+	function espresso_venue_link($VNU_ID = 0, $text = '') {
993
+		return EEH_Venue_View::venue_details_link($VNU_ID, $text);
994 994
 	}
995 995
 }
996 996
 
997 997
 
998 998
 
999
-if ( ! function_exists( 'espresso_venue_description' )) {
999
+if ( ! function_exists('espresso_venue_description')) {
1000 1000
 	/**
1001 1001
 	 *    espresso_venue_description
1002 1002
 	 *
@@ -1005,17 +1005,17 @@  discard block
 block discarded – undo
1005 1005
 	 * @param bool $echo
1006 1006
 	 * @return    string
1007 1007
 	 */
1008
-	function espresso_venue_description( $VNU_ID = FALSE, $echo = TRUE ) {
1009
-		if($echo){
1010
-			echo EEH_Venue_View::venue_description( $VNU_ID );
1008
+	function espresso_venue_description($VNU_ID = FALSE, $echo = TRUE) {
1009
+		if ($echo) {
1010
+			echo EEH_Venue_View::venue_description($VNU_ID);
1011 1011
 			return '';
1012 1012
 		}
1013
-		return EEH_Venue_View::venue_description( $VNU_ID );
1013
+		return EEH_Venue_View::venue_description($VNU_ID);
1014 1014
 	}
1015 1015
 }
1016 1016
 
1017 1017
 
1018
-if ( ! function_exists( 'espresso_venue_excerpt' )) {
1018
+if ( ! function_exists('espresso_venue_excerpt')) {
1019 1019
 	/**
1020 1020
 	 *    espresso_venue_excerpt
1021 1021
 	 *
@@ -1024,18 +1024,18 @@  discard block
 block discarded – undo
1024 1024
 	 * @param bool $echo
1025 1025
 	 * @return    string
1026 1026
 	 */
1027
-	function espresso_venue_excerpt( $VNU_ID = 0,  $echo = TRUE ) {
1028
-		if ( $echo ) {
1029
-			echo EEH_Venue_View::venue_excerpt( $VNU_ID );
1027
+	function espresso_venue_excerpt($VNU_ID = 0, $echo = TRUE) {
1028
+		if ($echo) {
1029
+			echo EEH_Venue_View::venue_excerpt($VNU_ID);
1030 1030
 			return '';
1031 1031
 		}
1032
-		return EEH_Venue_View::venue_excerpt( $VNU_ID );
1032
+		return EEH_Venue_View::venue_excerpt($VNU_ID);
1033 1033
 	}
1034 1034
 }
1035 1035
 
1036 1036
 
1037 1037
 
1038
-if ( ! function_exists( 'espresso_venue_categories' )) {
1038
+if ( ! function_exists('espresso_venue_categories')) {
1039 1039
 	/**
1040 1040
 	 * espresso_venue_categories
1041 1041
 	 * returns the terms associated with a venue
@@ -1045,17 +1045,17 @@  discard block
 block discarded – undo
1045 1045
 	 * @param bool $echo
1046 1046
 	 * @return string
1047 1047
 	 */
1048
-	function espresso_venue_categories( $VNU_ID = 0, $hide_uncategorized = TRUE,  $echo = TRUE ) {
1049
-		if ( $echo ) {
1050
-			echo EEH_Venue_View::venue_categories( $VNU_ID, $hide_uncategorized );
1048
+	function espresso_venue_categories($VNU_ID = 0, $hide_uncategorized = TRUE, $echo = TRUE) {
1049
+		if ($echo) {
1050
+			echo EEH_Venue_View::venue_categories($VNU_ID, $hide_uncategorized);
1051 1051
 			return '';
1052 1052
 		}
1053
-		return EEH_Venue_View::venue_categories( $VNU_ID, $hide_uncategorized );
1053
+		return EEH_Venue_View::venue_categories($VNU_ID, $hide_uncategorized);
1054 1054
 	}
1055 1055
 }
1056 1056
 
1057 1057
 
1058
-if ( ! function_exists( 'espresso_venue_address' )) {
1058
+if ( ! function_exists('espresso_venue_address')) {
1059 1059
 	/**
1060 1060
 	 * espresso_venue_address
1061 1061
 	 * returns a formatted block of html  for displaying a venue's address
@@ -1065,17 +1065,17 @@  discard block
 block discarded – undo
1065 1065
 	 * @param bool   $echo
1066 1066
 	 * @return string
1067 1067
 	 */
1068
-	function espresso_venue_address( $type = 'multiline', $VNU_ID = 0, $echo = TRUE ) {
1069
-		if ( $echo ) {
1070
-			echo EEH_Venue_View::venue_address( $type, $VNU_ID );
1068
+	function espresso_venue_address($type = 'multiline', $VNU_ID = 0, $echo = TRUE) {
1069
+		if ($echo) {
1070
+			echo EEH_Venue_View::venue_address($type, $VNU_ID);
1071 1071
 			return '';
1072 1072
 		}
1073
-		return EEH_Venue_View::venue_address( $type, $VNU_ID );
1073
+		return EEH_Venue_View::venue_address($type, $VNU_ID);
1074 1074
 	}
1075 1075
 }
1076 1076
 
1077 1077
 
1078
-if ( ! function_exists( 'espresso_venue_raw_address' )) {
1078
+if ( ! function_exists('espresso_venue_raw_address')) {
1079 1079
 	/**
1080 1080
 	 * espresso_venue_address
1081 1081
 	 * returns an UN-formatted string containing a venue's address
@@ -1085,17 +1085,17 @@  discard block
 block discarded – undo
1085 1085
 	 * @param bool     $echo
1086 1086
 	 * @return string
1087 1087
 	 */
1088
-	function espresso_venue_raw_address( $type = 'multiline', $VNU_ID = 0, $echo = TRUE ) {
1089
-		if ( $echo ) {
1090
-			echo EEH_Venue_View::venue_address( $type, $VNU_ID, FALSE, FALSE );
1088
+	function espresso_venue_raw_address($type = 'multiline', $VNU_ID = 0, $echo = TRUE) {
1089
+		if ($echo) {
1090
+			echo EEH_Venue_View::venue_address($type, $VNU_ID, FALSE, FALSE);
1091 1091
 			return '';
1092 1092
 		}
1093
-		return EEH_Venue_View::venue_address( $type, $VNU_ID, FALSE, FALSE );
1093
+		return EEH_Venue_View::venue_address($type, $VNU_ID, FALSE, FALSE);
1094 1094
 	}
1095 1095
 }
1096 1096
 
1097 1097
 
1098
-if ( ! function_exists( 'espresso_venue_has_address' )) {
1098
+if ( ! function_exists('espresso_venue_has_address')) {
1099 1099
 	/**
1100 1100
 	 * espresso_venue_has_address
1101 1101
 	 * returns TRUE or FALSE if a Venue has address information
@@ -1103,13 +1103,13 @@  discard block
 block discarded – undo
1103 1103
 	 * @param int $VNU_ID
1104 1104
 	 * @return bool
1105 1105
 	 */
1106
-	function espresso_venue_has_address( $VNU_ID = 0 ) {
1107
-		return EEH_Venue_View::venue_has_address( $VNU_ID );
1106
+	function espresso_venue_has_address($VNU_ID = 0) {
1107
+		return EEH_Venue_View::venue_has_address($VNU_ID);
1108 1108
 	}
1109 1109
 }
1110 1110
 
1111 1111
 
1112
-if ( ! function_exists( 'espresso_venue_gmap' )) {
1112
+if ( ! function_exists('espresso_venue_gmap')) {
1113 1113
 	/**
1114 1114
 	 * espresso_venue_gmap
1115 1115
 	 * returns a google map for the venue address
@@ -1120,17 +1120,17 @@  discard block
 block discarded – undo
1120 1120
 	 * @param bool     $echo
1121 1121
 	 * @return string
1122 1122
 	 */
1123
-	function espresso_venue_gmap( $VNU_ID = 0, $map_ID = FALSE, $gmap = array(), $echo = TRUE  ) {
1124
-		if ( $echo ) {
1125
-			echo EEH_Venue_View::venue_gmap( $VNU_ID, $map_ID, $gmap );
1123
+	function espresso_venue_gmap($VNU_ID = 0, $map_ID = FALSE, $gmap = array(), $echo = TRUE) {
1124
+		if ($echo) {
1125
+			echo EEH_Venue_View::venue_gmap($VNU_ID, $map_ID, $gmap);
1126 1126
 			return '';
1127 1127
 		}
1128
-		return EEH_Venue_View::venue_gmap( $VNU_ID, $map_ID, $gmap );
1128
+		return EEH_Venue_View::venue_gmap($VNU_ID, $map_ID, $gmap);
1129 1129
 	}
1130 1130
 }
1131 1131
 
1132 1132
 
1133
-if ( ! function_exists( 'espresso_venue_phone' )) {
1133
+if ( ! function_exists('espresso_venue_phone')) {
1134 1134
 	/**
1135 1135
 	 * espresso_venue_phone
1136 1136
 	 *
@@ -1138,18 +1138,18 @@  discard block
 block discarded – undo
1138 1138
 	 * @param bool $echo
1139 1139
 	 * @return string
1140 1140
 	 */
1141
-	function espresso_venue_phone( $VNU_ID = 0, $echo = TRUE ) {
1142
-		if ( $echo ) {
1143
-			echo EEH_Venue_View::venue_phone( $VNU_ID );
1141
+	function espresso_venue_phone($VNU_ID = 0, $echo = TRUE) {
1142
+		if ($echo) {
1143
+			echo EEH_Venue_View::venue_phone($VNU_ID);
1144 1144
 			return '';
1145 1145
 		}
1146
-		return EEH_Venue_View::venue_phone( $VNU_ID );
1146
+		return EEH_Venue_View::venue_phone($VNU_ID);
1147 1147
 	}
1148 1148
 }
1149 1149
 
1150 1150
 
1151 1151
 
1152
-if ( ! function_exists( 'espresso_venue_website' )) {
1152
+if ( ! function_exists('espresso_venue_website')) {
1153 1153
 	/**
1154 1154
 	 * espresso_venue_website
1155 1155
 	 *
@@ -1157,18 +1157,18 @@  discard block
 block discarded – undo
1157 1157
 	 * @param bool $echo
1158 1158
 	 * @return string
1159 1159
 	 */
1160
-	function espresso_venue_website( $VNU_ID = 0, $echo = TRUE ) {
1161
-		if ( $echo ) {
1162
-			echo EEH_Venue_View::venue_website_link( $VNU_ID );
1160
+	function espresso_venue_website($VNU_ID = 0, $echo = TRUE) {
1161
+		if ($echo) {
1162
+			echo EEH_Venue_View::venue_website_link($VNU_ID);
1163 1163
 			return '';
1164 1164
 		}
1165
-		return EEH_Venue_View::venue_website_link( $VNU_ID );
1165
+		return EEH_Venue_View::venue_website_link($VNU_ID);
1166 1166
 	}
1167 1167
 }
1168 1168
 
1169 1169
 
1170 1170
 
1171
-if ( ! function_exists( 'espresso_edit_venue_link' )) {
1171
+if ( ! function_exists('espresso_edit_venue_link')) {
1172 1172
 	/**
1173 1173
 	 * espresso_edit_venue_link
1174 1174
 	 *
@@ -1176,12 +1176,12 @@  discard block
 block discarded – undo
1176 1176
 	 * @param bool $echo
1177 1177
 	 * @return string
1178 1178
 	 */
1179
-	function espresso_edit_venue_link( $VNU_ID = 0, $echo = TRUE ) {
1180
-		if($echo){
1181
-			echo EEH_Venue_View::edit_venue_link( $VNU_ID );
1179
+	function espresso_edit_venue_link($VNU_ID = 0, $echo = TRUE) {
1180
+		if ($echo) {
1181
+			echo EEH_Venue_View::edit_venue_link($VNU_ID);
1182 1182
 			return '';
1183 1183
 		}
1184
-		return EEH_Venue_View::edit_venue_link( $VNU_ID );
1184
+		return EEH_Venue_View::edit_venue_link($VNU_ID);
1185 1185
 	}
1186 1186
 }
1187 1187
 
Please login to merge, or discard this patch.
core/libraries/form_sections/inputs/EE_Float_Input.input.php 1 patch
Indentation   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -11,33 +11,33 @@
 block discarded – undo
11 11
 class EE_Float_Input extends EE_Form_Input_Base
12 12
 {
13 13
 
14
-    /**
15
-     * @param array $input_settings
16
-     * @throws InvalidArgumentException
17
-     */
18
-    public function __construct($input_settings = array())
19
-    {
20
-        $this->_set_display_strategy(
21
-            new EE_Number_Input_Display_Strategy(
22
-                isset($input_settings['min_value'])
23
-                    ? $input_settings['min_value']
24
-                    : null,
25
-                isset($input_settings['max_value'])
26
-                    ? $input_settings['max_value']
27
-                    : null,
28
-                isset($input_settings['step_value'])
29
-                    ? $input_settings['step_value']
30
-                    : null
31
-            )
32
-        );
33
-        $this->_set_normalization_strategy(new EE_Float_Normalization());
34
-        $this->_add_validation_strategy(
35
-            new EE_Float_Validation_Strategy(
36
-                isset($input_settings['validation_error_message'])
37
-                    ? $input_settings['validation_error_message']
38
-                    : null
39
-            )
40
-        );
41
-        parent::__construct($input_settings);
42
-    }
14
+	/**
15
+	 * @param array $input_settings
16
+	 * @throws InvalidArgumentException
17
+	 */
18
+	public function __construct($input_settings = array())
19
+	{
20
+		$this->_set_display_strategy(
21
+			new EE_Number_Input_Display_Strategy(
22
+				isset($input_settings['min_value'])
23
+					? $input_settings['min_value']
24
+					: null,
25
+				isset($input_settings['max_value'])
26
+					? $input_settings['max_value']
27
+					: null,
28
+				isset($input_settings['step_value'])
29
+					? $input_settings['step_value']
30
+					: null
31
+			)
32
+		);
33
+		$this->_set_normalization_strategy(new EE_Float_Normalization());
34
+		$this->_add_validation_strategy(
35
+			new EE_Float_Validation_Strategy(
36
+				isset($input_settings['validation_error_message'])
37
+					? $input_settings['validation_error_message']
38
+					: null
39
+			)
40
+		);
41
+		parent::__construct($input_settings);
42
+	}
43 43
 }
Please login to merge, or discard this patch.
core/services/orm/ModelFieldFactory.php 2 patches
Unused Use Statements   -3 removed lines patch added patch discarded remove patch
@@ -33,9 +33,6 @@
 block discarded – undo
33 33
 use EE_WP_Post_Status_Field;
34 34
 use EE_WP_Post_Type_Field;
35 35
 use EE_WP_User_Field;
36
-use EventEspresso\core\exceptions\InvalidDataTypeException;
37
-use EventEspresso\core\exceptions\InvalidInterfaceException;
38
-use EventEspresso\core\services\loaders\LoaderFactory;
39 36
 use EventEspresso\core\services\loaders\LoaderInterface;
40 37
 use InvalidArgumentException;
41 38
 
Please login to merge, or discard this patch.
Indentation   +543 added lines, -543 removed lines patch added patch discarded remove patch
@@ -51,547 +51,547 @@
 block discarded – undo
51 51
 class ModelFieldFactory
52 52
 {
53 53
 
54
-    /**
55
-     * @var LoaderInterface $loader
56
-     */
57
-    private $loader;
58
-
59
-
60
-    /**
61
-     * ModelFieldFactory constructor.
62
-     *
63
-     * @param LoaderInterface $loader
64
-     */
65
-    public function __construct(LoaderInterface $loader)
66
-    {
67
-        $this->loader = $loader;
68
-    }
69
-
70
-
71
-    /**
72
-     * @param string $table_column
73
-     * @param string $nice_name
74
-     * @param bool   $nullable
75
-     * @param null   $default_value
76
-     * @return EE_All_Caps_Text_Field
77
-     */
78
-    public function createAllCapsTextField($table_column, $nice_name, $nullable, $default_value = null)
79
-    {
80
-        return $this->loader->getNew(
81
-            'EE_All_Caps_Text_Field',
82
-            array($table_column, $nice_name, $nullable, $default_value)
83
-        );
84
-    }
85
-
86
-
87
-    /**
88
-     * @param string $table_column
89
-     * @param string $nice_name
90
-     * @param bool   $nullable
91
-     * @param null   $default_value
92
-     * @param string $model_name
93
-     * @return EE_Any_Foreign_Model_Name_Field
94
-     */
95
-    public function createAnyForeignModelNameField(
96
-        $table_column,
97
-        $nice_name,
98
-        $nullable,
99
-        $default_value = null,
100
-        $model_name
101
-    ) {
102
-        return $this->loader->getNew(
103
-            'EE_Any_Foreign_Model_Name_Field',
104
-            array($table_column, $nice_name, $nullable, $default_value, $model_name)
105
-        );
106
-    }
107
-
108
-
109
-    /**
110
-     * @param string $table_column
111
-     * @param string $nice_name
112
-     * @param bool   $nullable
113
-     * @param null   $default_value
114
-     * @return EE_Boolean_Field
115
-     */
116
-    public function createBooleanField($table_column, $nice_name, $nullable, $default_value = null)
117
-    {
118
-        return $this->loader->getNew(
119
-            'EE_Boolean_Field',
120
-            array($table_column, $nice_name, $nullable, $default_value)
121
-        );
122
-    }
123
-
124
-
125
-    /**
126
-     * @param string $table_column
127
-     * @param string $nice_name
128
-     * @param string $timezone_string
129
-     * @param bool   $nullable
130
-     * @param string $default_value
131
-     * @throws EE_Error
132
-     * @throws InvalidArgumentException
133
-     * @return EE_Datetime_Field
134
-     */
135
-    public function createDatetimeField(
136
-        $table_column,
137
-        $nice_name,
138
-        $nullable = false,
139
-        $default_value = EE_Datetime_Field::now
140
-    ) {
141
-        return $this->loader->getNew(
142
-            'EE_Datetime_Field',
143
-            array(
144
-                $table_column,
145
-                $nice_name,
146
-                $nullable,
147
-                $default_value,
148
-            )
149
-        );
150
-    }
151
-
152
-
153
-    /**
154
-     * @param string $table_column
155
-     * @param string $nice_name
156
-     * @param bool   $nullable
157
-     * @param null   $default_value
158
-     * @return EE_DB_Only_Float_Field
159
-     */
160
-    public function createDbOnlyFloatField($table_column, $nice_name, $nullable, $default_value = null)
161
-    {
162
-        return $this->loader->getNew(
163
-            'EE_DB_Only_Float_Field',
164
-            array($table_column, $nice_name, $nullable, $default_value)
165
-        );
166
-    }
167
-
168
-
169
-    /**
170
-     * @param string $table_column
171
-     * @param string $nice_name
172
-     * @param bool   $nullable
173
-     * @param null   $default_value
174
-     * @return EE_DB_Only_Int_Field
175
-     */
176
-    public function createDbOnlyIntField($table_column, $nice_name, $nullable, $default_value = null)
177
-    {
178
-        return $this->loader->getNew(
179
-            'EE_DB_Only_Int_Field',
180
-            array($table_column, $nice_name, $nullable, $default_value)
181
-        );
182
-    }
183
-
184
-
185
-    /**
186
-     * @param string $table_column
187
-     * @param string $nice_name
188
-     * @param bool   $nullable
189
-     * @param null   $default_value
190
-     * @return EE_DB_Only_Text_Field
191
-     */
192
-    public function createDbOnlyTextField($table_column, $nice_name, $nullable, $default_value = null)
193
-    {
194
-        return $this->loader->getNew(
195
-            'EE_DB_Only_Text_Field',
196
-            array($table_column, $nice_name, $nullable, $default_value)
197
-        );
198
-    }
199
-
200
-
201
-    /**
202
-     * @param string $table_column
203
-     * @param string $nice_name
204
-     * @param bool   $nullable
205
-     * @param string $default_value
206
-     * @return EE_Email_Field
207
-     */
208
-    public function createEmailField($table_column, $nice_name, $nullable = true, $default_value = '')
209
-    {
210
-        return $this->loader->getNew(
211
-            'EE_Email_Field',
212
-            array($table_column, $nice_name, $nullable, $default_value)
213
-        );
214
-    }
215
-
216
-
217
-    /**
218
-     * @param string $table_column
219
-     * @param string $nice_name
220
-     * @param bool   $nullable
221
-     * @param null   $default_value
222
-     * @param array  $allowed_enum_values keys are values to be used in the DB,
223
-     *                                    values are how they should be displayed
224
-     * @return EE_Enum_Integer_Field
225
-     */
226
-    public function createEnumIntegerField(
227
-        $table_column,
228
-        $nice_name,
229
-        $nullable,
230
-        $default_value = null,
231
-        array $allowed_enum_values
232
-    ) {
233
-        return $this->loader->getNew(
234
-            'EE_Enum_Integer_Field',
235
-            array($table_column, $nice_name, $nullable, $default_value, $allowed_enum_values)
236
-        );
237
-    }
238
-
239
-
240
-    /**
241
-     * @param string $table_column
242
-     * @param string $nice_name
243
-     * @param bool   $nullable
244
-     * @param null   $default_value
245
-     * @param array  $allowed_enum_values keys are values to be used in the DB,
246
-     *                                    values are how they should be displayed
247
-     * @return EE_Enum_Text_Field
248
-     */
249
-    public function createEnumTextField(
250
-        $table_column,
251
-        $nice_name,
252
-        $nullable,
253
-        $default_value,
254
-        array $allowed_enum_values
255
-    ) {
256
-        return $this->loader->getNew(
257
-            'EE_Enum_Text_Field',
258
-            array($table_column, $nice_name, $nullable, $default_value, $allowed_enum_values)
259
-        );
260
-    }
261
-
262
-
263
-    /**
264
-     * @param string $table_column
265
-     * @param string $nice_name
266
-     * @param bool   $nullable
267
-     * @param null   $default_value
268
-     * @return EE_Float_Field
269
-     */
270
-    public function createFloatField($table_column, $nice_name, $nullable, $default_value = null)
271
-    {
272
-        return $this->loader->getNew(
273
-            'EE_Float_Field',
274
-            array($table_column, $nice_name, $nullable, $default_value)
275
-        );
276
-    }
277
-
278
-
279
-    /**
280
-     * @param string $table_column
281
-     * @param string $nice_name
282
-     * @param bool   $nullable
283
-     * @param null   $default_value
284
-     * @param string $model_name
285
-     * @return EE_Foreign_Key_Int_Field
286
-     */
287
-    public function createForeignKeyIntField($table_column, $nice_name, $nullable, $default_value, $model_name)
288
-    {
289
-        return $this->loader->getNew(
290
-            'EE_Foreign_Key_Int_Field',
291
-            array($table_column, $nice_name, $nullable, $default_value, $model_name)
292
-        );
293
-    }
294
-
295
-
296
-    /**
297
-     * @param string $table_column
298
-     * @param string $nice_name
299
-     * @param bool   $nullable
300
-     * @param null   $default_value
301
-     * @param string $model_name
302
-     * @return EE_Foreign_Key_String_Field
303
-     */
304
-    public function createForeignKeyStringField(
305
-        $table_column,
306
-        $nice_name,
307
-        $nullable,
308
-        $default_value,
309
-        $model_name
310
-    ) {
311
-        return $this->loader->getNew(
312
-            'EE_Foreign_Key_String_Field',
313
-            array($table_column, $nice_name, $nullable, $default_value, $model_name)
314
-        );
315
-    }
316
-
317
-
318
-    /**
319
-     * @param string $table_column
320
-     * @param string $nice_name
321
-     * @param bool   $nullable
322
-     * @param null   $default_value
323
-     * @return EE_Full_HTML_Field
324
-     */
325
-    public function createFullHtmlField($table_column, $nice_name, $nullable, $default_value = null)
326
-    {
327
-        return $this->loader->getNew(
328
-            'EE_Full_HTML_Field',
329
-            array($table_column, $nice_name, $nullable, $default_value)
330
-        );
331
-    }
332
-
333
-
334
-    /**
335
-     * @param string $table_column
336
-     * @param string $nice_name
337
-     * @param bool   $nullable
338
-     * @param null   $default_value
339
-     * @return EE_Infinite_Integer_Field
340
-     */
341
-    public function createInfiniteIntegerField($table_column, $nice_name, $nullable, $default_value = null)
342
-    {
343
-        return $this->loader->getNew(
344
-            'EE_Infinite_Integer_Field',
345
-            array($table_column, $nice_name, $nullable, $default_value)
346
-        );
347
-    }
348
-
349
-
350
-    /**
351
-     * @param string  $table_column
352
-     * @param string  $nice_name
353
-     * @param bool    $nullable
354
-     * @param integer $default_value
355
-     * @return EE_Integer_Field
356
-     */
357
-    public function createIntegerField($table_column, $nice_name, $nullable = false, $default_value = 0)
358
-    {
359
-        return $this->loader->getNew(
360
-            'EE_Integer_Field',
361
-            array($table_column, $nice_name, $nullable, $default_value)
362
-        );
363
-    }
364
-
365
-
366
-    /**
367
-     * @param string $table_column
368
-     * @param string $nice_name
369
-     * @param bool   $nullable
370
-     * @param null   $default_value
371
-     * @return EE_Maybe_Serialized_Simple_HTML_Field
372
-     */
373
-    public function createMaybeSerializedSimpleHtmlField($table_column, $nice_name, $nullable, $default_value = null)
374
-    {
375
-        return $this->loader->getNew(
376
-            'EE_Maybe_Serialized_Simple_HTML_Field',
377
-            array($table_column, $nice_name, $nullable, $default_value)
378
-        );
379
-    }
380
-
381
-
382
-    /**
383
-     * @param string $table_column
384
-     * @param string $nice_name
385
-     * @param bool   $nullable
386
-     * @param null   $default_value
387
-     * @return EE_Maybe_Serialized_Text_Field
388
-     */
389
-    public function createMaybeSerializedTextField($table_column, $nice_name, $nullable, $default_value = null)
390
-    {
391
-        return $this->loader->getNew(
392
-            'EE_Maybe_Serialized_Text_Field',
393
-            array($table_column, $nice_name, $nullable, $default_value)
394
-        );
395
-    }
396
-
397
-
398
-    /**
399
-     * @param string $table_column
400
-     * @param string $nice_name
401
-     * @param bool   $nullable
402
-     * @param null   $default_value
403
-     * @return EE_Money_Field
404
-     */
405
-    public function createMoneyField($table_column, $nice_name, $nullable, $default_value = null)
406
-    {
407
-        return $this->loader->getNew(
408
-            'EE_Money_Field',
409
-            array($table_column, $nice_name, $nullable, $default_value)
410
-        );
411
-    }
412
-
413
-
414
-    /**
415
-     * @param string $table_column
416
-     * @param string $nice_name
417
-     * @param bool   $nullable
418
-     * @param string $default_value
419
-     * @return EE_Plain_Text_Field
420
-     */
421
-    public function createPlainTextField($table_column, $nice_name, $nullable = true, $default_value = '')
422
-    {
423
-        return $this->loader->getNew(
424
-            'EE_Plain_Text_Field',
425
-            array($table_column, $nice_name, $nullable, $default_value)
426
-        );
427
-    }
428
-
429
-
430
-    /**
431
-     * @param string $table_column
432
-     * @param string $nice_name
433
-     * @param bool   $nullable
434
-     * @param null   $default_value
435
-     * @return EE_Post_Content_Field
436
-     */
437
-    public function createPostContentField($table_column, $nice_name, $nullable, $default_value = null)
438
-    {
439
-        return $this->loader->getNew(
440
-            'EE_Post_Content_Field',
441
-            array($table_column, $nice_name, $nullable, $default_value)
442
-        );
443
-    }
444
-
445
-
446
-    /**
447
-     * @param string $table_column
448
-     * @param string $nice_name
449
-     * @return EE_Primary_Key_Int_Field
450
-     */
451
-    public function createPrimaryKeyIntField($table_column, $nice_name)
452
-    {
453
-        return $this->loader->getNew('EE_Primary_Key_Int_Field', array($table_column, $nice_name));
454
-    }
455
-
456
-
457
-    /**
458
-     * @param string $table_column
459
-     * @param string $nice_name
460
-     * @return EE_Primary_Key_String_Field
461
-     */
462
-    public function createPrimaryKeyStringField($table_column, $nice_name)
463
-    {
464
-        return $this->loader->getNew('EE_Primary_Key_String_Field', array($table_column, $nice_name));
465
-    }
466
-
467
-
468
-    /**
469
-     * @param string $table_column
470
-     * @param string $nice_name
471
-     * @param bool   $nullable
472
-     * @param null   $default_value
473
-     * @return EE_Serialized_Text_Field
474
-     */
475
-    public function createSerializedTextField($table_column, $nice_name, $nullable, $default_value = null)
476
-    {
477
-        return $this->loader->getNew(
478
-            'EE_Serialized_Text_Field',
479
-            array($table_column, $nice_name, $nullable, $default_value)
480
-        );
481
-    }
482
-
483
-
484
-    /**
485
-     * @param string $table_column
486
-     * @param string $nice_name
487
-     * @param bool   $nullable
488
-     * @param null   $default_value
489
-     * @return EE_Simple_HTML_Field
490
-     */
491
-    public function createSimpleHtmlField($table_column, $nice_name, $nullable, $default_value = null)
492
-    {
493
-        return $this->loader->getNew(
494
-            'EE_Simple_HTML_Field',
495
-            array($table_column, $nice_name, $nullable, $default_value)
496
-        );
497
-    }
498
-
499
-
500
-    /**
501
-     * @param string $table_column
502
-     * @param string $nice_name
503
-     * @param bool   $nullable
504
-     * @param null   $default_value
505
-     * @return EE_Slug_Field
506
-     */
507
-    public function createSlugField($table_column, $nice_name, $nullable = false, $default_value = null)
508
-    {
509
-        return $this->loader->getNew(
510
-            'EE_Slug_Field',
511
-            array($table_column, $nice_name, $nullable, $default_value)
512
-        );
513
-    }
514
-
515
-
516
-    /**
517
-     * @param string $table_column
518
-     * @param string $nice_name
519
-     * @param bool   $nullable
520
-     * @param null   $default_value
521
-     * @return EE_Trashed_Flag_Field
522
-     */
523
-    public function createTrashedFlagField($table_column, $nice_name, $nullable, $default_value = null)
524
-    {
525
-        return $this->loader->getNew(
526
-            'EE_Trashed_Flag_Field',
527
-            array($table_column, $nice_name, $nullable, $default_value)
528
-        );
529
-    }
530
-
531
-
532
-    /**
533
-     * @param string $table_column
534
-     * @param string $nice_name
535
-     * @param bool   $nullable
536
-     * @param mixed  $default_value
537
-     * @param array  $values                            If additional stati are to be used other than the default WP
538
-     *                                                  statuses, then they can be registered via this property. The
539
-     *                                                  format of the array should be as follows: array(
540
-     *                                                  'status_reference' => array(
541
-     *                                                  'label' => __('Status Reference Label', 'event_espresso'),
542
-     *                                                  'public' => true,                 // whether this status should
543
-     *                                                  be shown on the frontend of the site
544
-     *                                                  'exclude_from_search' => false,   // whether this status should
545
-     *                                                  be excluded from wp searches
546
-     *                                                  'show_in_admin_all_list' => true, // whether this status is
547
-     *                                                  included in queries for the admin "all" view in list table
548
-     *                                                  views.
549
-     *                                                  'show_in_admin_status_list' => true, // show in the list of
550
-     *                                                  statuses with post counts at the top of the admin list tables
551
-     *                                                  (i.e. Status Reference(2) )
552
-     *                                                  'label_count' => _n_noop(
553
-     *                                                  'Status Reference <span class="count">(%s)</span>',
554
-     *                                                  'Status References <span class="count">(%s)</span>'
555
-     *                                                  ),                                   // the text to display on
556
-     *                                                  the admin screen
557
-     *                                                  ( or you won't see your status count ).
558
-     *                                                  )
559
-     *                                                  )
560
-     * @link http://codex.wordpress.org/Function_Reference/register_post_status for more info
561
-     * @return EE_WP_Post_Status_Field
562
-     */
563
-    public function createWpPostStatusField(
564
-        $table_column,
565
-        $nice_name,
566
-        $nullable,
567
-        $default_value = null,
568
-        array $values = array()
569
-    ) {
570
-        return $this->loader->getNew(
571
-            'EE_WP_Post_Status_Field',
572
-            array($table_column, $nice_name, $nullable, $default_value, $values)
573
-        );
574
-    }
575
-
576
-
577
-    /**
578
-     * @param string $post_type
579
-     * @return EE_WP_Post_Type_Field
580
-     */
581
-    public function createWpPostTypeField($post_type)
582
-    {
583
-        return $this->loader->getNew('EE_WP_Post_Type_Field', array($post_type));
584
-    }
585
-
586
-
587
-    /**
588
-     * @param string $table_column
589
-     * @param string $nice_name
590
-     * @param bool   $nullable
591
-     * @return EE_WP_User_Field
592
-     */
593
-    public function createWpUserField($table_column, $nice_name, $nullable)
594
-    {
595
-        return $this->loader->getNew('EE_WP_User_Field', array($table_column, $nice_name, $nullable));
596
-    }
54
+	/**
55
+	 * @var LoaderInterface $loader
56
+	 */
57
+	private $loader;
58
+
59
+
60
+	/**
61
+	 * ModelFieldFactory constructor.
62
+	 *
63
+	 * @param LoaderInterface $loader
64
+	 */
65
+	public function __construct(LoaderInterface $loader)
66
+	{
67
+		$this->loader = $loader;
68
+	}
69
+
70
+
71
+	/**
72
+	 * @param string $table_column
73
+	 * @param string $nice_name
74
+	 * @param bool   $nullable
75
+	 * @param null   $default_value
76
+	 * @return EE_All_Caps_Text_Field
77
+	 */
78
+	public function createAllCapsTextField($table_column, $nice_name, $nullable, $default_value = null)
79
+	{
80
+		return $this->loader->getNew(
81
+			'EE_All_Caps_Text_Field',
82
+			array($table_column, $nice_name, $nullable, $default_value)
83
+		);
84
+	}
85
+
86
+
87
+	/**
88
+	 * @param string $table_column
89
+	 * @param string $nice_name
90
+	 * @param bool   $nullable
91
+	 * @param null   $default_value
92
+	 * @param string $model_name
93
+	 * @return EE_Any_Foreign_Model_Name_Field
94
+	 */
95
+	public function createAnyForeignModelNameField(
96
+		$table_column,
97
+		$nice_name,
98
+		$nullable,
99
+		$default_value = null,
100
+		$model_name
101
+	) {
102
+		return $this->loader->getNew(
103
+			'EE_Any_Foreign_Model_Name_Field',
104
+			array($table_column, $nice_name, $nullable, $default_value, $model_name)
105
+		);
106
+	}
107
+
108
+
109
+	/**
110
+	 * @param string $table_column
111
+	 * @param string $nice_name
112
+	 * @param bool   $nullable
113
+	 * @param null   $default_value
114
+	 * @return EE_Boolean_Field
115
+	 */
116
+	public function createBooleanField($table_column, $nice_name, $nullable, $default_value = null)
117
+	{
118
+		return $this->loader->getNew(
119
+			'EE_Boolean_Field',
120
+			array($table_column, $nice_name, $nullable, $default_value)
121
+		);
122
+	}
123
+
124
+
125
+	/**
126
+	 * @param string $table_column
127
+	 * @param string $nice_name
128
+	 * @param string $timezone_string
129
+	 * @param bool   $nullable
130
+	 * @param string $default_value
131
+	 * @throws EE_Error
132
+	 * @throws InvalidArgumentException
133
+	 * @return EE_Datetime_Field
134
+	 */
135
+	public function createDatetimeField(
136
+		$table_column,
137
+		$nice_name,
138
+		$nullable = false,
139
+		$default_value = EE_Datetime_Field::now
140
+	) {
141
+		return $this->loader->getNew(
142
+			'EE_Datetime_Field',
143
+			array(
144
+				$table_column,
145
+				$nice_name,
146
+				$nullable,
147
+				$default_value,
148
+			)
149
+		);
150
+	}
151
+
152
+
153
+	/**
154
+	 * @param string $table_column
155
+	 * @param string $nice_name
156
+	 * @param bool   $nullable
157
+	 * @param null   $default_value
158
+	 * @return EE_DB_Only_Float_Field
159
+	 */
160
+	public function createDbOnlyFloatField($table_column, $nice_name, $nullable, $default_value = null)
161
+	{
162
+		return $this->loader->getNew(
163
+			'EE_DB_Only_Float_Field',
164
+			array($table_column, $nice_name, $nullable, $default_value)
165
+		);
166
+	}
167
+
168
+
169
+	/**
170
+	 * @param string $table_column
171
+	 * @param string $nice_name
172
+	 * @param bool   $nullable
173
+	 * @param null   $default_value
174
+	 * @return EE_DB_Only_Int_Field
175
+	 */
176
+	public function createDbOnlyIntField($table_column, $nice_name, $nullable, $default_value = null)
177
+	{
178
+		return $this->loader->getNew(
179
+			'EE_DB_Only_Int_Field',
180
+			array($table_column, $nice_name, $nullable, $default_value)
181
+		);
182
+	}
183
+
184
+
185
+	/**
186
+	 * @param string $table_column
187
+	 * @param string $nice_name
188
+	 * @param bool   $nullable
189
+	 * @param null   $default_value
190
+	 * @return EE_DB_Only_Text_Field
191
+	 */
192
+	public function createDbOnlyTextField($table_column, $nice_name, $nullable, $default_value = null)
193
+	{
194
+		return $this->loader->getNew(
195
+			'EE_DB_Only_Text_Field',
196
+			array($table_column, $nice_name, $nullable, $default_value)
197
+		);
198
+	}
199
+
200
+
201
+	/**
202
+	 * @param string $table_column
203
+	 * @param string $nice_name
204
+	 * @param bool   $nullable
205
+	 * @param string $default_value
206
+	 * @return EE_Email_Field
207
+	 */
208
+	public function createEmailField($table_column, $nice_name, $nullable = true, $default_value = '')
209
+	{
210
+		return $this->loader->getNew(
211
+			'EE_Email_Field',
212
+			array($table_column, $nice_name, $nullable, $default_value)
213
+		);
214
+	}
215
+
216
+
217
+	/**
218
+	 * @param string $table_column
219
+	 * @param string $nice_name
220
+	 * @param bool   $nullable
221
+	 * @param null   $default_value
222
+	 * @param array  $allowed_enum_values keys are values to be used in the DB,
223
+	 *                                    values are how they should be displayed
224
+	 * @return EE_Enum_Integer_Field
225
+	 */
226
+	public function createEnumIntegerField(
227
+		$table_column,
228
+		$nice_name,
229
+		$nullable,
230
+		$default_value = null,
231
+		array $allowed_enum_values
232
+	) {
233
+		return $this->loader->getNew(
234
+			'EE_Enum_Integer_Field',
235
+			array($table_column, $nice_name, $nullable, $default_value, $allowed_enum_values)
236
+		);
237
+	}
238
+
239
+
240
+	/**
241
+	 * @param string $table_column
242
+	 * @param string $nice_name
243
+	 * @param bool   $nullable
244
+	 * @param null   $default_value
245
+	 * @param array  $allowed_enum_values keys are values to be used in the DB,
246
+	 *                                    values are how they should be displayed
247
+	 * @return EE_Enum_Text_Field
248
+	 */
249
+	public function createEnumTextField(
250
+		$table_column,
251
+		$nice_name,
252
+		$nullable,
253
+		$default_value,
254
+		array $allowed_enum_values
255
+	) {
256
+		return $this->loader->getNew(
257
+			'EE_Enum_Text_Field',
258
+			array($table_column, $nice_name, $nullable, $default_value, $allowed_enum_values)
259
+		);
260
+	}
261
+
262
+
263
+	/**
264
+	 * @param string $table_column
265
+	 * @param string $nice_name
266
+	 * @param bool   $nullable
267
+	 * @param null   $default_value
268
+	 * @return EE_Float_Field
269
+	 */
270
+	public function createFloatField($table_column, $nice_name, $nullable, $default_value = null)
271
+	{
272
+		return $this->loader->getNew(
273
+			'EE_Float_Field',
274
+			array($table_column, $nice_name, $nullable, $default_value)
275
+		);
276
+	}
277
+
278
+
279
+	/**
280
+	 * @param string $table_column
281
+	 * @param string $nice_name
282
+	 * @param bool   $nullable
283
+	 * @param null   $default_value
284
+	 * @param string $model_name
285
+	 * @return EE_Foreign_Key_Int_Field
286
+	 */
287
+	public function createForeignKeyIntField($table_column, $nice_name, $nullable, $default_value, $model_name)
288
+	{
289
+		return $this->loader->getNew(
290
+			'EE_Foreign_Key_Int_Field',
291
+			array($table_column, $nice_name, $nullable, $default_value, $model_name)
292
+		);
293
+	}
294
+
295
+
296
+	/**
297
+	 * @param string $table_column
298
+	 * @param string $nice_name
299
+	 * @param bool   $nullable
300
+	 * @param null   $default_value
301
+	 * @param string $model_name
302
+	 * @return EE_Foreign_Key_String_Field
303
+	 */
304
+	public function createForeignKeyStringField(
305
+		$table_column,
306
+		$nice_name,
307
+		$nullable,
308
+		$default_value,
309
+		$model_name
310
+	) {
311
+		return $this->loader->getNew(
312
+			'EE_Foreign_Key_String_Field',
313
+			array($table_column, $nice_name, $nullable, $default_value, $model_name)
314
+		);
315
+	}
316
+
317
+
318
+	/**
319
+	 * @param string $table_column
320
+	 * @param string $nice_name
321
+	 * @param bool   $nullable
322
+	 * @param null   $default_value
323
+	 * @return EE_Full_HTML_Field
324
+	 */
325
+	public function createFullHtmlField($table_column, $nice_name, $nullable, $default_value = null)
326
+	{
327
+		return $this->loader->getNew(
328
+			'EE_Full_HTML_Field',
329
+			array($table_column, $nice_name, $nullable, $default_value)
330
+		);
331
+	}
332
+
333
+
334
+	/**
335
+	 * @param string $table_column
336
+	 * @param string $nice_name
337
+	 * @param bool   $nullable
338
+	 * @param null   $default_value
339
+	 * @return EE_Infinite_Integer_Field
340
+	 */
341
+	public function createInfiniteIntegerField($table_column, $nice_name, $nullable, $default_value = null)
342
+	{
343
+		return $this->loader->getNew(
344
+			'EE_Infinite_Integer_Field',
345
+			array($table_column, $nice_name, $nullable, $default_value)
346
+		);
347
+	}
348
+
349
+
350
+	/**
351
+	 * @param string  $table_column
352
+	 * @param string  $nice_name
353
+	 * @param bool    $nullable
354
+	 * @param integer $default_value
355
+	 * @return EE_Integer_Field
356
+	 */
357
+	public function createIntegerField($table_column, $nice_name, $nullable = false, $default_value = 0)
358
+	{
359
+		return $this->loader->getNew(
360
+			'EE_Integer_Field',
361
+			array($table_column, $nice_name, $nullable, $default_value)
362
+		);
363
+	}
364
+
365
+
366
+	/**
367
+	 * @param string $table_column
368
+	 * @param string $nice_name
369
+	 * @param bool   $nullable
370
+	 * @param null   $default_value
371
+	 * @return EE_Maybe_Serialized_Simple_HTML_Field
372
+	 */
373
+	public function createMaybeSerializedSimpleHtmlField($table_column, $nice_name, $nullable, $default_value = null)
374
+	{
375
+		return $this->loader->getNew(
376
+			'EE_Maybe_Serialized_Simple_HTML_Field',
377
+			array($table_column, $nice_name, $nullable, $default_value)
378
+		);
379
+	}
380
+
381
+
382
+	/**
383
+	 * @param string $table_column
384
+	 * @param string $nice_name
385
+	 * @param bool   $nullable
386
+	 * @param null   $default_value
387
+	 * @return EE_Maybe_Serialized_Text_Field
388
+	 */
389
+	public function createMaybeSerializedTextField($table_column, $nice_name, $nullable, $default_value = null)
390
+	{
391
+		return $this->loader->getNew(
392
+			'EE_Maybe_Serialized_Text_Field',
393
+			array($table_column, $nice_name, $nullable, $default_value)
394
+		);
395
+	}
396
+
397
+
398
+	/**
399
+	 * @param string $table_column
400
+	 * @param string $nice_name
401
+	 * @param bool   $nullable
402
+	 * @param null   $default_value
403
+	 * @return EE_Money_Field
404
+	 */
405
+	public function createMoneyField($table_column, $nice_name, $nullable, $default_value = null)
406
+	{
407
+		return $this->loader->getNew(
408
+			'EE_Money_Field',
409
+			array($table_column, $nice_name, $nullable, $default_value)
410
+		);
411
+	}
412
+
413
+
414
+	/**
415
+	 * @param string $table_column
416
+	 * @param string $nice_name
417
+	 * @param bool   $nullable
418
+	 * @param string $default_value
419
+	 * @return EE_Plain_Text_Field
420
+	 */
421
+	public function createPlainTextField($table_column, $nice_name, $nullable = true, $default_value = '')
422
+	{
423
+		return $this->loader->getNew(
424
+			'EE_Plain_Text_Field',
425
+			array($table_column, $nice_name, $nullable, $default_value)
426
+		);
427
+	}
428
+
429
+
430
+	/**
431
+	 * @param string $table_column
432
+	 * @param string $nice_name
433
+	 * @param bool   $nullable
434
+	 * @param null   $default_value
435
+	 * @return EE_Post_Content_Field
436
+	 */
437
+	public function createPostContentField($table_column, $nice_name, $nullable, $default_value = null)
438
+	{
439
+		return $this->loader->getNew(
440
+			'EE_Post_Content_Field',
441
+			array($table_column, $nice_name, $nullable, $default_value)
442
+		);
443
+	}
444
+
445
+
446
+	/**
447
+	 * @param string $table_column
448
+	 * @param string $nice_name
449
+	 * @return EE_Primary_Key_Int_Field
450
+	 */
451
+	public function createPrimaryKeyIntField($table_column, $nice_name)
452
+	{
453
+		return $this->loader->getNew('EE_Primary_Key_Int_Field', array($table_column, $nice_name));
454
+	}
455
+
456
+
457
+	/**
458
+	 * @param string $table_column
459
+	 * @param string $nice_name
460
+	 * @return EE_Primary_Key_String_Field
461
+	 */
462
+	public function createPrimaryKeyStringField($table_column, $nice_name)
463
+	{
464
+		return $this->loader->getNew('EE_Primary_Key_String_Field', array($table_column, $nice_name));
465
+	}
466
+
467
+
468
+	/**
469
+	 * @param string $table_column
470
+	 * @param string $nice_name
471
+	 * @param bool   $nullable
472
+	 * @param null   $default_value
473
+	 * @return EE_Serialized_Text_Field
474
+	 */
475
+	public function createSerializedTextField($table_column, $nice_name, $nullable, $default_value = null)
476
+	{
477
+		return $this->loader->getNew(
478
+			'EE_Serialized_Text_Field',
479
+			array($table_column, $nice_name, $nullable, $default_value)
480
+		);
481
+	}
482
+
483
+
484
+	/**
485
+	 * @param string $table_column
486
+	 * @param string $nice_name
487
+	 * @param bool   $nullable
488
+	 * @param null   $default_value
489
+	 * @return EE_Simple_HTML_Field
490
+	 */
491
+	public function createSimpleHtmlField($table_column, $nice_name, $nullable, $default_value = null)
492
+	{
493
+		return $this->loader->getNew(
494
+			'EE_Simple_HTML_Field',
495
+			array($table_column, $nice_name, $nullable, $default_value)
496
+		);
497
+	}
498
+
499
+
500
+	/**
501
+	 * @param string $table_column
502
+	 * @param string $nice_name
503
+	 * @param bool   $nullable
504
+	 * @param null   $default_value
505
+	 * @return EE_Slug_Field
506
+	 */
507
+	public function createSlugField($table_column, $nice_name, $nullable = false, $default_value = null)
508
+	{
509
+		return $this->loader->getNew(
510
+			'EE_Slug_Field',
511
+			array($table_column, $nice_name, $nullable, $default_value)
512
+		);
513
+	}
514
+
515
+
516
+	/**
517
+	 * @param string $table_column
518
+	 * @param string $nice_name
519
+	 * @param bool   $nullable
520
+	 * @param null   $default_value
521
+	 * @return EE_Trashed_Flag_Field
522
+	 */
523
+	public function createTrashedFlagField($table_column, $nice_name, $nullable, $default_value = null)
524
+	{
525
+		return $this->loader->getNew(
526
+			'EE_Trashed_Flag_Field',
527
+			array($table_column, $nice_name, $nullable, $default_value)
528
+		);
529
+	}
530
+
531
+
532
+	/**
533
+	 * @param string $table_column
534
+	 * @param string $nice_name
535
+	 * @param bool   $nullable
536
+	 * @param mixed  $default_value
537
+	 * @param array  $values                            If additional stati are to be used other than the default WP
538
+	 *                                                  statuses, then they can be registered via this property. The
539
+	 *                                                  format of the array should be as follows: array(
540
+	 *                                                  'status_reference' => array(
541
+	 *                                                  'label' => __('Status Reference Label', 'event_espresso'),
542
+	 *                                                  'public' => true,                 // whether this status should
543
+	 *                                                  be shown on the frontend of the site
544
+	 *                                                  'exclude_from_search' => false,   // whether this status should
545
+	 *                                                  be excluded from wp searches
546
+	 *                                                  'show_in_admin_all_list' => true, // whether this status is
547
+	 *                                                  included in queries for the admin "all" view in list table
548
+	 *                                                  views.
549
+	 *                                                  'show_in_admin_status_list' => true, // show in the list of
550
+	 *                                                  statuses with post counts at the top of the admin list tables
551
+	 *                                                  (i.e. Status Reference(2) )
552
+	 *                                                  'label_count' => _n_noop(
553
+	 *                                                  'Status Reference <span class="count">(%s)</span>',
554
+	 *                                                  'Status References <span class="count">(%s)</span>'
555
+	 *                                                  ),                                   // the text to display on
556
+	 *                                                  the admin screen
557
+	 *                                                  ( or you won't see your status count ).
558
+	 *                                                  )
559
+	 *                                                  )
560
+	 * @link http://codex.wordpress.org/Function_Reference/register_post_status for more info
561
+	 * @return EE_WP_Post_Status_Field
562
+	 */
563
+	public function createWpPostStatusField(
564
+		$table_column,
565
+		$nice_name,
566
+		$nullable,
567
+		$default_value = null,
568
+		array $values = array()
569
+	) {
570
+		return $this->loader->getNew(
571
+			'EE_WP_Post_Status_Field',
572
+			array($table_column, $nice_name, $nullable, $default_value, $values)
573
+		);
574
+	}
575
+
576
+
577
+	/**
578
+	 * @param string $post_type
579
+	 * @return EE_WP_Post_Type_Field
580
+	 */
581
+	public function createWpPostTypeField($post_type)
582
+	{
583
+		return $this->loader->getNew('EE_WP_Post_Type_Field', array($post_type));
584
+	}
585
+
586
+
587
+	/**
588
+	 * @param string $table_column
589
+	 * @param string $nice_name
590
+	 * @param bool   $nullable
591
+	 * @return EE_WP_User_Field
592
+	 */
593
+	public function createWpUserField($table_column, $nice_name, $nullable)
594
+	{
595
+		return $this->loader->getNew('EE_WP_User_Field', array($table_column, $nice_name, $nullable));
596
+	}
597 597
 }
Please login to merge, or discard this patch.
messages/templates/ee_msg_editor_active_context_element.template.php 1 patch
Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -10,22 +10,22 @@  discard block
 block discarded – undo
10 10
  * @var int    $message_template_group_id The ID for the message template group this context belongs to.
11 11
  */
12 12
 $active_message = sprintf(
13
-    esc_html__(
14
-        'The template for %1$s is currently %2$sactive%3$s.',
15
-        'event_espresso'
16
-    ),
17
-    $context_label,
18
-    '<strong>',
19
-    '</strong>'
13
+	esc_html__(
14
+		'The template for %1$s is currently %2$sactive%3$s.',
15
+		'event_espresso'
16
+	),
17
+	$context_label,
18
+	'<strong>',
19
+	'</strong>'
20 20
 );
21 21
 $inactive_message = sprintf(
22
-    esc_html__(
23
-        'The template for %1$s is currently %2$sinactive%3$s.',
24
-        'event_espresso'
25
-    ),
26
-    $context_label,
27
-    '<strong>',
28
-    '</strong>'
22
+	esc_html__(
23
+		'The template for %1$s is currently %2$sinactive%3$s.',
24
+		'event_espresso'
25
+	),
26
+	$context_label,
27
+	'<strong>',
28
+	'</strong>'
29 29
 );
30 30
 ?>
31 31
 <div class="context-active-control-container">
@@ -34,8 +34,8 @@  discard block
 block discarded – undo
34 34
         <span id="on-off-nonce-<?php echo $context; ?>" class="hidden"><?php echo $nonce; ?></span>
35 35
         <span class="ee-on-off-toggle-label">
36 36
             <?php
37
-            echo $is_active ? $active_message : $inactive_message;
38
-            ?>
37
+			echo $is_active ? $active_message : $inactive_message;
38
+			?>
39 39
         </span>
40 40
         <div class="hidden js-data">
41 41
             <span class="ee-active-message"><?php echo $active_message; ?></span>
@@ -43,8 +43,8 @@  discard block
 block discarded – undo
43 43
         </div>
44 44
         <div class="switch">
45 45
             <?php
46
-            $checked = $is_active ? ' checked="checked"' : '';
47
-            ?>
46
+			$checked = $is_active ? ' checked="checked"' : '';
47
+			?>
48 48
             <input data-grpid="<?php echo $message_template_group_id; ?>" id="ee-on-off-toggle-<?php echo $context; ?>" type="checkbox" class="ee-on-off-toggle ee-toggle-round-flat"<?php echo $checked; ?> value="<?php echo $on_off_action; ?>">
49 49
             <label for="ee-on-off-toggle-<?php echo $context; ?>"></label>
50 50
         </div>
Please login to merge, or discard this patch.
acceptance_tests/tests/e-TestContextActivationToggleCept.php 1 patch
Indentation   +62 added lines, -62 removed lines patch added patch discarded remove patch
@@ -8,8 +8,8 @@  discard block
 block discarded – undo
8 8
 $event_label = 'Testing Context Deactivation';
9 9
 
10 10
 $I->wantTo(
11
-    'Test that the context activation toggle for turning on or off specific contexts for message sending works as'
12
-    . ' expected'
11
+	'Test that the context activation toggle for turning on or off specific contexts for message sending works as'
12
+	. ' expected'
13 13
 );
14 14
 
15 15
 $I->loginAsAdmin();
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
 $I->see('The template for Primary Registrant Recipient is currently inactive.');
35 35
 
36 36
 $I->amGoingTo(
37
-    'Trigger Registration Approved Messages and verify primary registrant context is excluded from sent messages.'
37
+	'Trigger Registration Approved Messages and verify primary registrant context is excluded from sent messages.'
38 38
 );
39 39
 $I->amOnDefaultEventsListTablePage();
40 40
 $I->click(EventsAdmin::ADD_NEW_EVENT_BUTTON_SELECTOR);
@@ -44,9 +44,9 @@  discard block
 block discarded – undo
44 44
 $event_link = $I->observeLinkUrlAt(EventsAdmin::EVENT_EDITOR_VIEW_LINK_AFTER_PUBLISH_SELECTOR);
45 45
 $event_id = $I->observeValueFromInputAt(EventsAdmin::EVENT_EDITOR_EVT_ID_SELECTOR);
46 46
 $test_registration_details = array(
47
-    'fname' => 'ContextTestGuy',
48
-    'lname' => 'ContextTestDude',
49
-    'email' => '[email protected]',
47
+	'fname' => 'ContextTestGuy',
48
+	'lname' => 'ContextTestDude',
49
+	'email' => '[email protected]',
50 50
 );
51 51
 $I->logOut();
52 52
 $I->amOnUrl($event_link);
@@ -63,48 +63,48 @@  discard block
 block discarded – undo
63 63
 $I->amOnMessagesActivityListTablePage();
64 64
 //verify registrant context
65 65
 $I->see(
66
-    $test_registration_details['email'],
67
-    MessagesAdmin::messagesActivityListTableCellSelectorFor(
68
-        'to',
69
-        'Registration Approved',
70
-        MessagesAdmin::MESSAGE_STATUS_SENT,
71
-        '',
72
-        'Registrant'
73
-    )
66
+	$test_registration_details['email'],
67
+	MessagesAdmin::messagesActivityListTableCellSelectorFor(
68
+		'to',
69
+		'Registration Approved',
70
+		MessagesAdmin::MESSAGE_STATUS_SENT,
71
+		'',
72
+		'Registrant'
73
+	)
74 74
 );
75 75
 $I->deleteMessageInMessagesListTableFor(
76
-    'Registration Approved',
77
-    MessagesAdmin::MESSAGE_STATUS_SENT,
78
-    'Email',
79
-    'Registrant'
76
+	'Registration Approved',
77
+	MessagesAdmin::MESSAGE_STATUS_SENT,
78
+	'Email',
79
+	'Registrant'
80 80
 );
81 81
 //verify admin context
82 82
 $I->see(
83
-    '[email protected]',
84
-    MessagesAdmin::messagesActivityListTableCellSelectorFor(
85
-        'to',
86
-        'Registration Approved',
87
-        MessagesAdmin::MESSAGE_STATUS_SENT
88
-    )
83
+	'[email protected]',
84
+	MessagesAdmin::messagesActivityListTableCellSelectorFor(
85
+		'to',
86
+		'Registration Approved',
87
+		MessagesAdmin::MESSAGE_STATUS_SENT
88
+	)
89 89
 );
90 90
 $I->deleteMessageInMessagesListTableFor(
91
-    'Registration Approved'
91
+	'Registration Approved'
92 92
 );
93 93
 //verify primary registrant context is NOT present.
94 94
 $I->dontSee(
95
-    $test_registration_details['email'],
96
-    MessagesAdmin::messagesActivityListTableCellSelectorFor(
97
-        'to',
98
-        'Registration Approved',
99
-        MessagesAdmin::MESSAGE_STATUS_SENT,
100
-        '',
101
-        'Primary Registrant'
102
-    )
95
+	$test_registration_details['email'],
96
+	MessagesAdmin::messagesActivityListTableCellSelectorFor(
97
+		'to',
98
+		'Registration Approved',
99
+		MessagesAdmin::MESSAGE_STATUS_SENT,
100
+		'',
101
+		'Primary Registrant'
102
+	)
103 103
 );
104 104
 
105 105
 $I->amGoingTo(
106
-    'Deactivate primary registrant context for Registration Approved Message Templates and restore the "To"'
107
-    . ' field to an empty string to verify the message does not send for that context.'
106
+	'Deactivate primary registrant context for Registration Approved Message Templates and restore the "To"'
107
+	. ' field to an empty string to verify the message does not send for that context.'
108 108
 );
109 109
 $I->amOnDefaultMessageTemplateListTablePage();
110 110
 $I->clickToEditMessageTemplateByMessageType('registration', 'primary_attendee');
@@ -128,41 +128,41 @@  discard block
 block discarded – undo
128 128
 $I->amOnMessagesActivityListTablePage();
129 129
 //verify registrant context
130 130
 $I->see(
131
-    $test_registration_details['email'],
132
-    MessagesAdmin::messagesActivityListTableCellSelectorFor(
133
-        'to',
134
-        'Registration Approved',
135
-        MessagesAdmin::MESSAGE_STATUS_SENT,
136
-        '',
137
-        'Registrant'
138
-    )
131
+	$test_registration_details['email'],
132
+	MessagesAdmin::messagesActivityListTableCellSelectorFor(
133
+		'to',
134
+		'Registration Approved',
135
+		MessagesAdmin::MESSAGE_STATUS_SENT,
136
+		'',
137
+		'Registrant'
138
+	)
139 139
 );
140 140
 $I->deleteMessageInMessagesListTableFor(
141
-    'Registration Approved',
142
-    MessagesAdmin::MESSAGE_STATUS_SENT,
143
-    'Email',
144
-    'Registrant'
141
+	'Registration Approved',
142
+	MessagesAdmin::MESSAGE_STATUS_SENT,
143
+	'Email',
144
+	'Registrant'
145 145
 );
146 146
 //verify admin context
147 147
 $I->see(
148
-    '[email protected]',
149
-    MessagesAdmin::messagesActivityListTableCellSelectorFor(
150
-        'to',
151
-        'Registration Approved',
152
-        MessagesAdmin::MESSAGE_STATUS_SENT
153
-    )
148
+	'[email protected]',
149
+	MessagesAdmin::messagesActivityListTableCellSelectorFor(
150
+		'to',
151
+		'Registration Approved',
152
+		MessagesAdmin::MESSAGE_STATUS_SENT
153
+	)
154 154
 );
155 155
 $I->deleteMessageInMessagesListTableFor(
156
-    'Registration Approved'
156
+	'Registration Approved'
157 157
 );
158 158
 //verify primary registrant context is NOT present.
159 159
 $I->dontSee(
160
-    $test_registration_details['email'],
161
-    MessagesAdmin::messagesActivityListTableCellSelectorFor(
162
-        'to',
163
-        'Registration Approved',
164
-        MessagesAdmin::MESSAGE_STATUS_SENT,
165
-        '',
166
-        'Primary Registrant'
167
-    )
160
+	$test_registration_details['email'],
161
+	MessagesAdmin::messagesActivityListTableCellSelectorFor(
162
+		'to',
163
+		'Registration Approved',
164
+		MessagesAdmin::MESSAGE_STATUS_SENT,
165
+		'',
166
+		'Primary Registrant'
167
+	)
168 168
 );
169 169
\ No newline at end of file
Please login to merge, or discard this patch.
public/Espresso_Arabica_2014/functions.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -9,9 +9,9 @@  discard block
 block discarded – undo
9 9
  * @ link			http://www.eventespresso.com
10 10
  * @ version		4+
11 11
  */
12
-define( 'EE_THEME_FUNCTIONS_LOADED', TRUE );
12
+define('EE_THEME_FUNCTIONS_LOADED', TRUE);
13 13
 
14
-if ( ! function_exists( 'espresso_pagination' ) ) {
14
+if ( ! function_exists('espresso_pagination')) {
15 15
 	/**
16 16
 	 *    espresso_pagination
17 17
 	 *
@@ -23,21 +23,21 @@  discard block
 block discarded – undo
23 23
 		$big = 999999999; // need an unlikely integer
24 24
 		$pagination = paginate_links(
25 25
 			array(
26
-				'base'         => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ),
26
+				'base'         => str_replace($big, '%#%', esc_url(get_pagenum_link($big))),
27 27
 				'format'       => '?paged=%#%',
28
-				'current'      => max( 1, get_query_var( 'paged' ) ),
28
+				'current'      => max(1, get_query_var('paged')),
29 29
 				'total'        => $wp_query->max_num_pages,
30 30
 				'show_all'     => true,
31 31
 				'end_size'     => 10,
32 32
 				'mid_size'     => 6,
33 33
 				'prev_next'    => true,
34
-				'prev_text'    => __( '&lsaquo; PREV', 'event_espresso' ),
35
-				'next_text'    => __( 'NEXT &rsaquo;', 'event_espresso' ),
34
+				'prev_text'    => __('&lsaquo; PREV', 'event_espresso'),
35
+				'next_text'    => __('NEXT &rsaquo;', 'event_espresso'),
36 36
 				'type'         => 'plain',
37 37
 				'add_args'     => false,
38 38
 				'add_fragment' => ''
39 39
 			)
40 40
 		);
41
-		echo ! empty( $pagination ) ? '<div class="ee-pagination-dv ee-clear-float">' . $pagination . '</div>' : '';
41
+		echo ! empty($pagination) ? '<div class="ee-pagination-dv ee-clear-float">'.$pagination.'</div>' : '';
42 42
 	}
43 43
 }
44 44
\ No newline at end of file
Please login to merge, or discard this patch.
admin_pages/messages/help_tabs/messages_settings_messengers.help_tab.php 2 patches
Indentation   +50 added lines, -50 removed lines patch added patch discarded remove patch
@@ -3,79 +3,79 @@
 block discarded – undo
3 3
 </p>
4 4
 <p>
5 5
     <?php esc_html_e(
6
-        'You can select Messengers via the tabs across the top of the settings page. The available messengers you see depends on what version of Event Espresso you have and what addons are installed. Every install include an "Email" messenger tab.  When you click one of those tabs it will display that messenger.',
7
-        'event_espresso'
8
-    ); ?>
6
+		'You can select Messengers via the tabs across the top of the settings page. The available messengers you see depends on what version of Event Espresso you have and what addons are installed. Every install include an "Email" messenger tab.  When you click one of those tabs it will display that messenger.',
7
+		'event_espresso'
8
+	); ?>
9 9
 </p>
10 10
 <p>
11 11
     <?php esc_html_e(
12
-        'There are two ways to determine whether a messenger is active or not.  The first way is via the messenger tab itself.',
13
-        'event_espresso'
14
-    ); ?>
12
+		'There are two ways to determine whether a messenger is active or not.  The first way is via the messenger tab itself.',
13
+		'event_espresso'
14
+	); ?>
15 15
 </p>
16 16
 <p>
17 17
     <?php printf(
18
-        esc_html__(
19
-            'The green colored gear %s indicates that this messenger is currently active.',
20
-            'event_espresso'
21
-        ),
22
-        '<img class="inline-text" src="' . EE_MSG_ASSETS_URL . 'images/email-tab-active.png' . '"'
23
-        . ' alt="' . esc_attr__('Active Email Tab', 'event_espresso') . '" />'
24
-    );
25
-    printf(
26
-        esc_html__(
27
-            ' The white colored gear %s indicates the messenger is inactive. This is very helpful for seeing at a glance all the messengers that are active when you first view the page.',
28
-            'event_espresso'
29
-        ),
30
-        '<img class="inline-text" src="' . EE_MSG_ASSETS_URL . 'images/email-tab-inactive.png'
31
-        . '" alt="' . esc_attr__('Inactive Email Tab', 'event_espresso') . '" />'
32
-    ); ?>
18
+		esc_html__(
19
+			'The green colored gear %s indicates that this messenger is currently active.',
20
+			'event_espresso'
21
+		),
22
+		'<img class="inline-text" src="' . EE_MSG_ASSETS_URL . 'images/email-tab-active.png' . '"'
23
+		. ' alt="' . esc_attr__('Active Email Tab', 'event_espresso') . '" />'
24
+	);
25
+	printf(
26
+		esc_html__(
27
+			' The white colored gear %s indicates the messenger is inactive. This is very helpful for seeing at a glance all the messengers that are active when you first view the page.',
28
+			'event_espresso'
29
+		),
30
+		'<img class="inline-text" src="' . EE_MSG_ASSETS_URL . 'images/email-tab-inactive.png'
31
+		. '" alt="' . esc_attr__('Inactive Email Tab', 'event_espresso') . '" />'
32
+	); ?>
33 33
 </p>
34 34
 <p>
35 35
     <?php esc_html_e(
36
-        'The second way to determine whether a messenger is active or not is via the "on/off" button in the top right corner of the active messenger displayed content:',
37
-        'event_espresso'
38
-    ); ?>
36
+		'The second way to determine whether a messenger is active or not is via the "on/off" button in the top right corner of the active messenger displayed content:',
37
+		'event_espresso'
38
+	); ?>
39 39
 </p>
40 40
 <p>
41 41
     <?php printf(
42
-        esc_html__(
43
-            '%1$s means of course that the messenger is active and %2$s means the messenger is inactive.',
44
-            'event_espresso'
45
-        ),
46
-        '<div class="switch">'
47
-            . '<input class="ee-on-off-toggle ee-toggle-round-flat" type="checkbox" checked="checked" disabled>'
48
-            . '<label for="ee-on-off-toggle-on"></label>'
49
-        . '</div>',
50
-        '<div class="switch">'
51
-            . '<input class="ee-on-off-toggle ee-toggle-round-flat" type="checkbox" disabled>'
52
-            . '<label for="ee-on-off-toggle-on"></label>'
53
-        . '</div>'
54
-    ); ?>
42
+		esc_html__(
43
+			'%1$s means of course that the messenger is active and %2$s means the messenger is inactive.',
44
+			'event_espresso'
45
+		),
46
+		'<div class="switch">'
47
+			. '<input class="ee-on-off-toggle ee-toggle-round-flat" type="checkbox" checked="checked" disabled>'
48
+			. '<label for="ee-on-off-toggle-on"></label>'
49
+		. '</div>',
50
+		'<div class="switch">'
51
+			. '<input class="ee-on-off-toggle ee-toggle-round-flat" type="checkbox" disabled>'
52
+			. '<label for="ee-on-off-toggle-on"></label>'
53
+		. '</div>'
54
+	); ?>
55 55
 </p>
56 56
 <p>
57 57
     <?php
58
-        esc_html_e(
59
-            'The on/off toggle is also what you use to activate or deactivate a messenger.',
60
-            'event_espresso'
61
-        ); ?>
58
+		esc_html_e(
59
+			'The on/off toggle is also what you use to activate or deactivate a messenger.',
60
+			'event_espresso'
61
+		); ?>
62 62
 </p>
63 63
 <p>
64 64
     <?php esc_html_e(
65
-        'What happens when you click the toggle to activate is the messenger is activated and the system determines what default message types are activated with the messenger.  Then, if there are any default settings for either the messenger or message types those settings are saved.  Next, the system will generate any default templates (if none have been generated before, if there are previously generated templates then they are reactivated).  Finally, you will see the display change to reflect that the messenger is active. If the messenger has settings you can modify them then. Any message types that have settings will also automatically expand so you can see the default settings and make any changes as necessary to fit your needs. Usually the defaults are sufficient however.',
66
-        'event_espresso'
67
-    ); ?>
65
+		'What happens when you click the toggle to activate is the messenger is activated and the system determines what default message types are activated with the messenger.  Then, if there are any default settings for either the messenger or message types those settings are saved.  Next, the system will generate any default templates (if none have been generated before, if there are previously generated templates then they are reactivated).  Finally, you will see the display change to reflect that the messenger is active. If the messenger has settings you can modify them then. Any message types that have settings will also automatically expand so you can see the default settings and make any changes as necessary to fit your needs. Usually the defaults are sufficient however.',
66
+		'event_espresso'
67
+	); ?>
68 68
 </p>
69 69
 <p>
70 70
     <?php esc_html_e(
71
-        'When you deactivate a messenger, the system will first check if there are any custom event templates for that messenger. If there are you will be unable to deactivate the messenger. This is a fail safe to make sure you know that no messages will go out for those specific events so you don\'t accidentally deactivate.  If this check passes, then the system will deactivate any global templates for that messenger (note the templates are not erased, they just become inactive, so if you decide to reactivate the messenger later all your customizations are preserved). Then the display will change to reflect the deactivation.',
72
-        'event_espresso'
73
-    ); ?>
71
+		'When you deactivate a messenger, the system will first check if there are any custom event templates for that messenger. If there are you will be unable to deactivate the messenger. This is a fail safe to make sure you know that no messages will go out for those specific events so you don\'t accidentally deactivate.  If this check passes, then the system will deactivate any global templates for that messenger (note the templates are not erased, they just become inactive, so if you decide to reactivate the messenger later all your customizations are preserved). Then the display will change to reflect the deactivation.',
72
+		'event_espresso'
73
+	); ?>
74 74
 </p>
75 75
 <p>
76 76
     <strong><?php esc_html_e('Important', 'event_espresso'); ?></strong><br/>
77 77
     <?php esc_html_e(
78
-        'Although customizations made to global templates are preserved when a messenger is deactivated, any settings for that messenger (or the message types that were attached to it) are lost on deactivation.  Also, once you deactivate a messenger, no more messages will be delivered using that messenger for any of your events.',
79
-        'event_espresso'
80
-    ); ?>
78
+		'Although customizations made to global templates are preserved when a messenger is deactivated, any settings for that messenger (or the message types that were attached to it) are lost on deactivation.  Also, once you deactivate a messenger, no more messages will be delivered using that messenger for any of your events.',
79
+		'event_espresso'
80
+	); ?>
81 81
 </p>
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -19,16 +19,16 @@
 block discarded – undo
19 19
             'The green colored gear %s indicates that this messenger is currently active.',
20 20
             'event_espresso'
21 21
         ),
22
-        '<img class="inline-text" src="' . EE_MSG_ASSETS_URL . 'images/email-tab-active.png' . '"'
23
-        . ' alt="' . esc_attr__('Active Email Tab', 'event_espresso') . '" />'
22
+        '<img class="inline-text" src="'.EE_MSG_ASSETS_URL.'images/email-tab-active.png'.'"'
23
+        . ' alt="'.esc_attr__('Active Email Tab', 'event_espresso').'" />'
24 24
     );
25 25
     printf(
26 26
         esc_html__(
27 27
             ' The white colored gear %s indicates the messenger is inactive. This is very helpful for seeing at a glance all the messengers that are active when you first view the page.',
28 28
             'event_espresso'
29 29
         ),
30
-        '<img class="inline-text" src="' . EE_MSG_ASSETS_URL . 'images/email-tab-inactive.png'
31
-        . '" alt="' . esc_attr__('Inactive Email Tab', 'event_espresso') . '" />'
30
+        '<img class="inline-text" src="'.EE_MSG_ASSETS_URL.'images/email-tab-inactive.png'
31
+        . '" alt="'.esc_attr__('Inactive Email Tab', 'event_espresso').'" />'
32 32
     ); ?>
33 33
 </p>
34 34
 <p>
Please login to merge, or discard this patch.