Completed
Branch old/BUG-7514-7935-7936-price-o... (518ae6)
by
unknown
25:14 queued 22:51
created
public/template_tags.php 1 patch
Spacing   +298 added lines, -298 removed lines patch added patch discarded remove patch
@@ -27,14 +27,14 @@  discard block
 block discarded – undo
27 27
  * @param int | \EE_Event $event
28 28
  * @return bool
29 29
  */
30
-function is_espresso_event( $event = NULL ) {
31
-	if ( can_use_espresso_conditionals( __FUNCTION__ )) {
30
+function is_espresso_event($event = NULL) {
31
+	if (can_use_espresso_conditionals(__FUNCTION__)) {
32 32
 		// load event view helper
33
-		EE_Registry::instance()->load_helper( 'Event_View' );
33
+		EE_Registry::instance()->load_helper('Event_View');
34 34
 		// extract EE_Event object from passed param regardless of what it is (within reason of course)
35
-		$event = EEH_Event_View::get_event( $event );
35
+		$event = EEH_Event_View::get_event($event);
36 36
 		// do we have a valid event ?
37
-		return $event instanceof EE_Event  ? TRUE : FALSE;
37
+		return $event instanceof EE_Event ? TRUE : FALSE;
38 38
 	}
39 39
 	return FALSE;
40 40
 }
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
  * @return bool
47 47
  */
48 48
 function is_espresso_event_single() {
49
-	if ( can_use_espresso_conditionals( __FUNCTION__ )) {
49
+	if (can_use_espresso_conditionals(__FUNCTION__)) {
50 50
 		global $wp_query;
51 51
 		// return conditionals set by CPTs
52 52
 		return $wp_query instanceof WP_Query ? $wp_query->is_espresso_event_single : FALSE;
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
  * @return bool
62 62
  */
63 63
 function is_espresso_event_archive() {
64
-	if ( can_use_espresso_conditionals( __FUNCTION__ )) {
64
+	if (can_use_espresso_conditionals(__FUNCTION__)) {
65 65
 		global $wp_query;
66 66
 		return $wp_query instanceof WP_Query ? $wp_query->is_espresso_event_archive : FALSE;
67 67
 	}
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
  * @return bool
76 76
  */
77 77
 function is_espresso_event_taxonomy() {
78
-	if ( can_use_espresso_conditionals( __FUNCTION__ )) {
78
+	if (can_use_espresso_conditionals(__FUNCTION__)) {
79 79
 		global $wp_query;
80 80
 		return $wp_query instanceof WP_Query ? $wp_query->is_espresso_event_taxonomy : FALSE;
81 81
 	}
@@ -89,12 +89,12 @@  discard block
 block discarded – undo
89 89
  * @param int | \EE_Venue $venue
90 90
  * @return bool
91 91
  */
92
-function is_espresso_venue( $venue = NULL ) {
93
-	if ( can_use_espresso_conditionals( __FUNCTION__ )) {
92
+function is_espresso_venue($venue = NULL) {
93
+	if (can_use_espresso_conditionals(__FUNCTION__)) {
94 94
 		// load event view helper
95
-		EE_Registry::instance()->load_helper( 'Venue_View' );
95
+		EE_Registry::instance()->load_helper('Venue_View');
96 96
 		// extract EE_Venue object from passed param regardless of what it is (within reason of course)
97
-		$venue = EEH_Venue_View::get_venue( $venue, FALSE );
97
+		$venue = EEH_Venue_View::get_venue($venue, FALSE);
98 98
 		// do we have a valid event ?
99 99
 		return $venue instanceof EE_Venue ? TRUE : FALSE;
100 100
 	}
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
  * @return bool
109 109
  */
110 110
 function is_espresso_venue_single() {
111
-	if ( can_use_espresso_conditionals( __FUNCTION__ )) {
111
+	if (can_use_espresso_conditionals(__FUNCTION__)) {
112 112
 		global $wp_query;
113 113
 		return $wp_query instanceof WP_Query ? $wp_query->is_espresso_venue_single : FALSE;
114 114
 	}
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
  * @return bool
123 123
  */
124 124
 function is_espresso_venue_archive() {
125
-	if ( can_use_espresso_conditionals( __FUNCTION__ )) {
125
+	if (can_use_espresso_conditionals(__FUNCTION__)) {
126 126
 		global $wp_query;
127 127
 		return $wp_query instanceof WP_Query ? $wp_query->is_espresso_venue_archive : FALSE;
128 128
 	}
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
  * @return bool
137 137
  */
138 138
 function is_espresso_venue_taxonomy() {
139
-	if ( can_use_espresso_conditionals( __FUNCTION__ )) {
139
+	if (can_use_espresso_conditionals(__FUNCTION__)) {
140 140
 		global $wp_query;
141 141
 		return $wp_query instanceof WP_Query ? $wp_query->is_espresso_venue_taxonomy : FALSE;
142 142
 	}
@@ -150,12 +150,12 @@  discard block
 block discarded – undo
150 150
  * @param $conditional_tag
151 151
  * @return bool
152 152
  */
153
-function can_use_espresso_conditionals( $conditional_tag ) {
154
-	if ( ! did_action( 'AHEE__EE_System__initialize' )) {
153
+function can_use_espresso_conditionals($conditional_tag) {
154
+	if ( ! did_action('AHEE__EE_System__initialize')) {
155 155
 		EE_Error::doing_it_wrong(
156 156
 			__FUNCTION__,
157 157
 			sprintf(
158
-				__( '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'),
158
+				__('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'),
159 159
 				$conditional_tag
160 160
 			),
161 161
 			'4.4.0'
@@ -170,13 +170,13 @@  discard block
 block discarded – undo
170 170
 
171 171
 /*************************** Event Queries ***************************/
172 172
 
173
-if ( ! function_exists( 'espresso_get_events' )) {
173
+if ( ! function_exists('espresso_get_events')) {
174 174
 	/**
175 175
 	 * 	espresso_get_events
176 176
 	 * @param array $params
177 177
 	 * @return array
178 178
 	 */
179
-	function espresso_get_events( $params = array() ) {
179
+	function espresso_get_events($params = array()) {
180 180
 		//set default params
181 181
 		$default_espresso_events_params = array(
182 182
 			'limit' => 10,
@@ -187,18 +187,18 @@  discard block
 block discarded – undo
187 187
 			'sort' => 'ASC'
188 188
 		);
189 189
 		// allow the defaults to be filtered
190
-		$default_espresso_events_params = apply_filters( 'espresso_get_events__default_espresso_events_params', $default_espresso_events_params );
190
+		$default_espresso_events_params = apply_filters('espresso_get_events__default_espresso_events_params', $default_espresso_events_params);
191 191
 		// grab params and merge with defaults, then extract
192
-		$params = array_merge( $default_espresso_events_params, $params );
192
+		$params = array_merge($default_espresso_events_params, $params);
193 193
 		// run the query
194
-		$events_query = new EE_Event_List_Query( $params );
194
+		$events_query = new EE_Event_List_Query($params);
195 195
 		// assign results to a variable so we can return it
196 196
 		$events = $events_query->have_posts() ? $events_query->posts : array();
197 197
 		// but first reset the query and postdata
198 198
 		wp_reset_query();
199 199
 		wp_reset_postdata();
200 200
 		EED_Events_Archive::remove_all_events_archive_filters();
201
-		unset( $events_query );
201
+		unset($events_query);
202 202
 		return $events;
203 203
 	}
204 204
 }
@@ -212,32 +212,32 @@  discard block
 block discarded – undo
212 212
  * espresso_load_ticket_selector
213 213
  */
214 214
 function espresso_load_ticket_selector() {
215
-	EE_Registry::instance()->load_file( EE_MODULES . 'ticket_selector', 'EED_Ticket_Selector', 'module' );
215
+	EE_Registry::instance()->load_file(EE_MODULES.'ticket_selector', 'EED_Ticket_Selector', 'module');
216 216
 }
217 217
 
218
-if ( ! function_exists( 'espresso_ticket_selector' )) {
218
+if ( ! function_exists('espresso_ticket_selector')) {
219 219
 	/**
220 220
 	 * espresso_ticket_selector
221 221
 	 * @param null $event
222 222
 	 */
223
-	function espresso_ticket_selector( $event = NULL ) {
224
-		if (  ! apply_filters( 'FHEE_disable_espresso_ticket_selector', FALSE ) ) {
223
+	function espresso_ticket_selector($event = NULL) {
224
+		if ( ! apply_filters('FHEE_disable_espresso_ticket_selector', FALSE)) {
225 225
 			espresso_load_ticket_selector();
226
-			echo EED_Ticket_Selector::display_ticket_selector( $event );
226
+			echo EED_Ticket_Selector::display_ticket_selector($event);
227 227
 		}
228 228
 	}
229 229
 }
230 230
 
231 231
 
232
-	if ( ! function_exists( 'espresso_view_details_btn' )) {
232
+	if ( ! function_exists('espresso_view_details_btn')) {
233 233
 	/**
234 234
 	 * espresso_view_details_btn
235 235
 	 * @param null $event
236 236
 	 */
237
-	function espresso_view_details_btn( $event = NULL ) {
238
-		if (  ! apply_filters( 'FHEE_disable_espresso_view_details_btn', FALSE ) ) {
237
+	function espresso_view_details_btn($event = NULL) {
238
+		if ( ! apply_filters('FHEE_disable_espresso_view_details_btn', FALSE)) {
239 239
 			espresso_load_ticket_selector();
240
-			echo EED_Ticket_Selector::display_ticket_selector( $event, TRUE );
240
+			echo EED_Ticket_Selector::display_ticket_selector($event, TRUE);
241 241
 		}
242 242
 	}
243 243
 }
@@ -247,7 +247,7 @@  discard block
 block discarded – undo
247 247
 
248 248
 /*************************** EEH_Event_View ***************************/
249 249
 
250
-if ( ! function_exists( 'espresso_load_event_list_assets' )) {
250
+if ( ! function_exists('espresso_load_event_list_assets')) {
251 251
 	/**
252 252
 	 * espresso_load_event_list_assets
253 253
 	 * ensures that event list styles and scripts are loaded
@@ -256,13 +256,13 @@  discard block
 block discarded – undo
256 256
 	 */
257 257
 	function espresso_load_event_list_assets() {
258 258
 		$event_list = EED_Events_Archive::instance();
259
-		add_action( 'AHEE__EE_System__initialize_last', array( $event_list, 'load_event_list_assets' ), 10 );
260
-		add_filter( 'FHEE_enable_default_espresso_css', '__return_true' );
259
+		add_action('AHEE__EE_System__initialize_last', array($event_list, 'load_event_list_assets'), 10);
260
+		add_filter('FHEE_enable_default_espresso_css', '__return_true');
261 261
 	}
262 262
 }
263 263
 
264 264
 
265
-if ( ! function_exists( 'espresso_event_reg_button' )) {
265
+if ( ! function_exists('espresso_event_reg_button')) {
266 266
 	/**
267 267
 	 * espresso_event_reg_button
268 268
 	 * returns the "Register Now" button if event is active,
@@ -274,10 +274,10 @@  discard block
 block discarded – undo
274 274
 	 * @param bool $EVT_ID
275 275
 	 * @return string
276 276
 	 */
277
-	function espresso_event_reg_button( $btn_text_if_active = NULL, $btn_text_if_inactive = FALSE, $EVT_ID = FALSE ) {
278
-		EE_Registry::instance()->load_helper( 'Event_View' );
279
-		$event_status = EEH_Event_View::event_active_status( $EVT_ID );
280
-		switch ( $event_status ) {
277
+	function espresso_event_reg_button($btn_text_if_active = NULL, $btn_text_if_inactive = FALSE, $EVT_ID = FALSE) {
278
+		EE_Registry::instance()->load_helper('Event_View');
279
+		$event_status = EEH_Event_View::event_active_status($EVT_ID);
280
+		switch ($event_status) {
281 281
 			case EE_Datetime::sold_out :
282 282
 				$btn_text = __('Sold Out', 'event_espresso');
283 283
 				$class = 'ee-pink';
@@ -293,10 +293,10 @@  discard block
 block discarded – undo
293 293
 			case EE_Datetime::upcoming :
294 294
 			case EE_Datetime::active :
295 295
 			default :
296
-				$btn_text =! empty( $btn_text_if_active ) ? $btn_text_if_active : __( 'Register Now', 'event_espresso' );
296
+				$btn_text = ! empty($btn_text_if_active) ? $btn_text_if_active : __('Register Now', 'event_espresso');
297 297
 				$class = 'ee-green';
298 298
 		}
299
-		if ( $event_status < 1 && ! empty( $btn_text_if_inactive )) {
299
+		if ($event_status < 1 && ! empty($btn_text_if_inactive)) {
300 300
 			$btn_text = $btn_text_if_inactive;
301 301
 			$class = 'ee-grey';
302 302
 		}
@@ -310,7 +310,7 @@  discard block
 block discarded – undo
310 310
 
311 311
 
312 312
 
313
-if ( ! function_exists( 'espresso_display_ticket_selector' )) {
313
+if ( ! function_exists('espresso_display_ticket_selector')) {
314 314
 	/**
315 315
 	 * espresso_display_ticket_selector
316 316
 	 * whether or not to display the Ticket Selector for an event
@@ -318,15 +318,15 @@  discard block
 block discarded – undo
318 318
 	 * @param bool $EVT_ID
319 319
 	 * @return boolean
320 320
 	 */
321
-	function espresso_display_ticket_selector( $EVT_ID = FALSE ) {
322
-		EE_Registry::instance()->load_helper( 'Event_View' );
323
-		return EEH_Event_View::display_ticket_selector( $EVT_ID );
321
+	function espresso_display_ticket_selector($EVT_ID = FALSE) {
322
+		EE_Registry::instance()->load_helper('Event_View');
323
+		return EEH_Event_View::display_ticket_selector($EVT_ID);
324 324
 	}
325 325
 }
326 326
 
327 327
 
328 328
 
329
-if ( ! function_exists( 'espresso_event_status_banner' )) {
329
+if ( ! function_exists('espresso_event_status_banner')) {
330 330
 	/**
331 331
 	 * espresso_event_status
332 332
 	 * returns a banner showing the event status if it is sold out, expired, or inactive
@@ -334,14 +334,14 @@  discard block
 block discarded – undo
334 334
 	 * @param bool $EVT_ID
335 335
 	 * @return string
336 336
 	 */
337
-	function espresso_event_status_banner( $EVT_ID = FALSE ) {
338
-		EE_Registry::instance()->load_helper( 'Event_View' );
339
-		return EEH_Event_View::event_status( $EVT_ID );
337
+	function espresso_event_status_banner($EVT_ID = FALSE) {
338
+		EE_Registry::instance()->load_helper('Event_View');
339
+		return EEH_Event_View::event_status($EVT_ID);
340 340
 	}
341 341
 }
342 342
 
343 343
 
344
-if ( ! function_exists( 'espresso_event_status' )) {
344
+if ( ! function_exists('espresso_event_status')) {
345 345
 	/**
346 346
 	 * espresso_event_status
347 347
 	 * returns the event status if it is sold out, expired, or inactive
@@ -350,18 +350,18 @@  discard block
 block discarded – undo
350 350
 	 * @param bool $echo
351 351
 	 * @return string
352 352
 	 */
353
-	function espresso_event_status( $EVT_ID = 0, $echo = TRUE ) {
354
-		EE_Registry::instance()->load_helper( 'Event_View' );
355
-		if ( $echo ) {
356
-			echo EEH_Event_View::event_active_status( $EVT_ID );
353
+	function espresso_event_status($EVT_ID = 0, $echo = TRUE) {
354
+		EE_Registry::instance()->load_helper('Event_View');
355
+		if ($echo) {
356
+			echo EEH_Event_View::event_active_status($EVT_ID);
357 357
 			return '';
358 358
 		}
359
-		return EEH_Event_View::event_active_status( $EVT_ID );
359
+		return EEH_Event_View::event_active_status($EVT_ID);
360 360
 	}
361 361
 }
362 362
 
363 363
 
364
-if ( ! function_exists( 'espresso_event_categories' )) {
364
+if ( ! function_exists('espresso_event_categories')) {
365 365
 	/**
366 366
 	 * espresso_event_categories
367 367
 	 * returns the terms associated with an event
@@ -371,18 +371,18 @@  discard block
 block discarded – undo
371 371
 	 * @param bool $echo
372 372
 	 * @return string
373 373
 	 */
374
-	function espresso_event_categories( $EVT_ID = 0, $hide_uncategorized = TRUE, $echo = TRUE ) {
375
-		EE_Registry::instance()->load_helper( 'Event_View' );
376
-		if ( $echo ) {
377
-			echo EEH_Event_View::event_categories( $EVT_ID, $hide_uncategorized );
374
+	function espresso_event_categories($EVT_ID = 0, $hide_uncategorized = TRUE, $echo = TRUE) {
375
+		EE_Registry::instance()->load_helper('Event_View');
376
+		if ($echo) {
377
+			echo EEH_Event_View::event_categories($EVT_ID, $hide_uncategorized);
378 378
 			return '';
379 379
 		}
380
-		return EEH_Event_View::event_categories( $EVT_ID, $hide_uncategorized );
380
+		return EEH_Event_View::event_categories($EVT_ID, $hide_uncategorized);
381 381
 	}
382 382
 }
383 383
 
384 384
 
385
-if ( ! function_exists( 'espresso_event_tickets_available' )) {
385
+if ( ! function_exists('espresso_event_tickets_available')) {
386 386
 	/**
387 387
 	 * espresso_event_tickets_available
388 388
 	 * returns the ticket types available for purchase for an event
@@ -392,27 +392,27 @@  discard block
 block discarded – undo
392 392
 	 * @param bool $format
393 393
 	 * @return string
394 394
 	 */
395
-	function espresso_event_tickets_available( $EVT_ID = 0, $echo = TRUE, $format = TRUE ) {
396
-		EE_Registry::instance()->load_helper( 'Event_View' );
397
-		$tickets = EEH_Event_View::event_tickets_available( $EVT_ID );
398
-		if ( is_array( $tickets ) && ! empty( $tickets )) {
395
+	function espresso_event_tickets_available($EVT_ID = 0, $echo = TRUE, $format = TRUE) {
396
+		EE_Registry::instance()->load_helper('Event_View');
397
+		$tickets = EEH_Event_View::event_tickets_available($EVT_ID);
398
+		if (is_array($tickets) && ! empty($tickets)) {
399 399
 			// if formatting then $html will be a string, else it will be an array of ticket objects
400
-			$html = $format ? '<ul id="ee-event-tickets-ul-' . $EVT_ID . '" class="ee-event-tickets-ul">' : array();
401
-			foreach ( $tickets as $ticket ) {
402
-				if ( $ticket instanceof EE_Ticket ) {
403
-					if ( $format ) {
404
-						$html .= '<li id="ee-event-tickets-li-' . $ticket->ID() . '" class="ee-event-tickets-li">';
405
-						$html .= $ticket->name() . ' ' . EEH_Template::format_currency( $ticket->get_ticket_total_with_taxes() );
400
+			$html = $format ? '<ul id="ee-event-tickets-ul-'.$EVT_ID.'" class="ee-event-tickets-ul">' : array();
401
+			foreach ($tickets as $ticket) {
402
+				if ($ticket instanceof EE_Ticket) {
403
+					if ($format) {
404
+						$html .= '<li id="ee-event-tickets-li-'.$ticket->ID().'" class="ee-event-tickets-li">';
405
+						$html .= $ticket->name().' '.EEH_Template::format_currency($ticket->get_ticket_total_with_taxes());
406 406
 						$html .= '</li>';
407 407
 					} else {
408 408
 						$html[] = $ticket;
409 409
 					}
410 410
 				}
411 411
 			}
412
-			if ( $format ) {
412
+			if ($format) {
413 413
 				$html .= '</ul>';
414 414
 			}
415
-			if ( $echo && ! $format ) {
415
+			if ($echo && ! $format) {
416 416
 				echo $html;
417 417
 				return '';
418 418
 			}
@@ -422,7 +422,7 @@  discard block
 block discarded – undo
422 422
 	}
423 423
 }
424 424
 
425
-if ( ! function_exists( 'espresso_event_date_obj' )) {
425
+if ( ! function_exists('espresso_event_date_obj')) {
426 426
 	/**
427 427
 	 * espresso_event_date_obj
428 428
 	 * returns the primary date object for an event
@@ -430,14 +430,14 @@  discard block
 block discarded – undo
430 430
 	 * @param bool $EVT_ID
431 431
 	 * @return object
432 432
 	 */
433
-	function espresso_event_date_obj( $EVT_ID = FALSE ) {
434
-		EE_Registry::instance()->load_helper( 'Event_View' );
435
-		return EEH_Event_View::get_primary_date_obj( $EVT_ID );
433
+	function espresso_event_date_obj($EVT_ID = FALSE) {
434
+		EE_Registry::instance()->load_helper('Event_View');
435
+		return EEH_Event_View::get_primary_date_obj($EVT_ID);
436 436
 	}
437 437
 }
438 438
 
439 439
 
440
-if ( ! function_exists( 'espresso_event_date' )) {
440
+if ( ! function_exists('espresso_event_date')) {
441 441
 	/**
442 442
 	 * espresso_event_date
443 443
 	 * returns the primary date for an event
@@ -448,23 +448,23 @@  discard block
 block discarded – undo
448 448
 	 * @param bool $echo
449 449
 	 * @return string
450 450
 	 */
451
-	function espresso_event_date( $date_format = '', $time_format = '', $EVT_ID = FALSE, $echo = TRUE ) {
452
-		$date_format = ! empty( $date_format ) ? $date_format : get_option( 'date_format' );
453
-		$time_format = ! empty( $time_format ) ? $time_format : get_option( 'time_format' );
454
-		$date_format = apply_filters( 'FHEE__espresso_event_date__date_format', $date_format );
455
-		$time_format = apply_filters( 'FHEE__espresso_event_date__time_format', $time_format );
456
-		EE_Registry::instance()->load_helper( 'Event_View' );
457
-		if($echo){
458
-			echo date_i18n( $date_format . ' ' . $time_format, strtotime( EEH_Event_View::the_event_date( $date_format, $time_format, $EVT_ID )));
451
+	function espresso_event_date($date_format = '', $time_format = '', $EVT_ID = FALSE, $echo = TRUE) {
452
+		$date_format = ! empty($date_format) ? $date_format : get_option('date_format');
453
+		$time_format = ! empty($time_format) ? $time_format : get_option('time_format');
454
+		$date_format = apply_filters('FHEE__espresso_event_date__date_format', $date_format);
455
+		$time_format = apply_filters('FHEE__espresso_event_date__time_format', $time_format);
456
+		EE_Registry::instance()->load_helper('Event_View');
457
+		if ($echo) {
458
+			echo date_i18n($date_format.' '.$time_format, strtotime(EEH_Event_View::the_event_date($date_format, $time_format, $EVT_ID)));
459 459
 			return '';
460 460
 		}
461
-		return date_i18n( $date_format . ' ' . $time_format, strtotime( EEH_Event_View::the_event_date( $date_format, $time_format, $EVT_ID )));
461
+		return date_i18n($date_format.' '.$time_format, strtotime(EEH_Event_View::the_event_date($date_format, $time_format, $EVT_ID)));
462 462
 
463 463
 	}
464 464
 }
465 465
 
466 466
 
467
-if ( ! function_exists( 'espresso_list_of_event_dates' )) {
467
+if ( ! function_exists('espresso_list_of_event_dates')) {
468 468
 	/**
469 469
 	 * espresso_list_of_event_dates
470 470
 	 * returns a unordered list of dates for an event
@@ -479,40 +479,40 @@  discard block
 block discarded – undo
479 479
 	 * @param null   $limit
480 480
 	 * @return string
481 481
 	 */
482
-	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 ) {
483
-		$date_format = ! empty( $date_format ) ? $date_format : get_option( 'date_format' );
484
-		$time_format = ! empty( $time_format ) ? $time_format : get_option( 'time_format' );
485
-		$date_format = apply_filters( 'FHEE__espresso_list_of_event_dates__date_format', $date_format );
486
-		$time_format = apply_filters( 'FHEE__espresso_list_of_event_dates__time_format', $time_format );
487
-		EE_Registry::instance()->load_helper( 'Event_View' );
488
-		$datetimes = EEH_Event_View::get_all_date_obj( $EVT_ID, $show_expired, FALSE, $limit );
489
-		if ( ! $format ) {
490
-			return apply_filters( 'FHEE__espresso_list_of_event_dates__datetimes', $datetimes );
482
+	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) {
483
+		$date_format = ! empty($date_format) ? $date_format : get_option('date_format');
484
+		$time_format = ! empty($time_format) ? $time_format : get_option('time_format');
485
+		$date_format = apply_filters('FHEE__espresso_list_of_event_dates__date_format', $date_format);
486
+		$time_format = apply_filters('FHEE__espresso_list_of_event_dates__time_format', $time_format);
487
+		EE_Registry::instance()->load_helper('Event_View');
488
+		$datetimes = EEH_Event_View::get_all_date_obj($EVT_ID, $show_expired, FALSE, $limit);
489
+		if ( ! $format) {
490
+			return apply_filters('FHEE__espresso_list_of_event_dates__datetimes', $datetimes);
491 491
 		}
492 492
 		//d( $datetimes );
493
-		if ( is_array( $datetimes ) && ! empty( $datetimes )) {
493
+		if (is_array($datetimes) && ! empty($datetimes)) {
494 494
 			global $post;
495
-			$html = $format ? '<ul id="ee-event-datetimes-ul-' . $post->ID . '" class="ee-event-datetimes-ul">' : '';
496
-			foreach ( $datetimes as $datetime ) {
497
-				if ( $datetime instanceof EE_Datetime ) {
498
-					$html .= '<li id="ee-event-datetimes-li-' . $datetime->ID() . '" class="ee-event-datetimes-li">';
495
+			$html = $format ? '<ul id="ee-event-datetimes-ul-'.$post->ID.'" class="ee-event-datetimes-ul">' : '';
496
+			foreach ($datetimes as $datetime) {
497
+				if ($datetime instanceof EE_Datetime) {
498
+					$html .= '<li id="ee-event-datetimes-li-'.$datetime->ID().'" class="ee-event-datetimes-li">';
499 499
 					$datetime_name = $datetime->name();
500
-					$html .= ! empty( $datetime_name ) ? '<strong>' . $datetime_name . '</strong>' : '';
501
-					$html .= ! empty( $datetime_name )  && $add_breaks ? '<br />' : '';
502
-					$html .= '<span class="dashicons dashicons-calendar"></span>' . $datetime->date_range( $date_format ) . '<br/>';
503
-					$html .= '<span class="dashicons dashicons-clock"></span>' . $datetime->time_range( $time_format );
500
+					$html .= ! empty($datetime_name) ? '<strong>'.$datetime_name.'</strong>' : '';
501
+					$html .= ! empty($datetime_name) && $add_breaks ? '<br />' : '';
502
+					$html .= '<span class="dashicons dashicons-calendar"></span>'.$datetime->date_range($date_format).'<br/>';
503
+					$html .= '<span class="dashicons dashicons-clock"></span>'.$datetime->time_range($time_format);
504 504
 					$datetime_description = $datetime->description();
505
-					$html .= ! empty( $datetime_description )  && $add_breaks ? '<br />' : '';
506
-					$html .= ! empty( $datetime_description ) ? ' - ' . $datetime_description : '';
507
-					$html = apply_filters( 'FHEE__espresso_list_of_event_dates__datetime_html', $html, $datetime );
505
+					$html .= ! empty($datetime_description) && $add_breaks ? '<br />' : '';
506
+					$html .= ! empty($datetime_description) ? ' - '.$datetime_description : '';
507
+					$html = apply_filters('FHEE__espresso_list_of_event_dates__datetime_html', $html, $datetime);
508 508
 					$html .= '</li>';
509 509
 				}
510 510
 			}
511 511
 			$html .= $format ? '</ul>' : '';
512 512
 		} else {
513
-			$html = $format ?  '<p><span class="dashicons dashicons-marker pink-text"></span>' . __( 'There are no upcoming dates for this event.', 'event_espresso' ) . '</p><br/>' : '';
513
+			$html = $format ? '<p><span class="dashicons dashicons-marker pink-text"></span>'.__('There are no upcoming dates for this event.', 'event_espresso').'</p><br/>' : '';
514 514
 		}
515
-		if ( $echo ) {
515
+		if ($echo) {
516 516
 			echo $html;
517 517
 			return '';
518 518
 		}
@@ -521,7 +521,7 @@  discard block
 block discarded – undo
521 521
 }
522 522
 
523 523
 
524
-if ( ! function_exists( 'espresso_event_end_date' )) {
524
+if ( ! function_exists('espresso_event_end_date')) {
525 525
 	/**
526 526
 	 * espresso_event_end_date
527 527
 	 * returns the last date for an event
@@ -532,21 +532,21 @@  discard block
 block discarded – undo
532 532
 	 * @param bool   $echo
533 533
 	 * @return string
534 534
 	 */
535
-	function espresso_event_end_date( $date_format = '', $time_format = '', $EVT_ID = FALSE, $echo = TRUE ) {
536
-		$date_format = ! empty( $date_format ) ? $date_format : get_option( 'date_format' );
537
-		$time_format = ! empty( $time_format ) ? $time_format : get_option( 'time_format' );
538
-		$date_format = apply_filters( 'FHEE__espresso_event_end_date__date_format', $date_format );
539
-		$time_format = apply_filters( 'FHEE__espresso_event_end_date__time_format', $time_format );
540
-		EE_Registry::instance()->load_helper( 'Event_View' );
541
-		if($echo){
542
-			echo date_i18n( $date_format . ' ' . $time_format, strtotime( EEH_Event_View::the_event_end_date( $date_format, $time_format, $EVT_ID )));
535
+	function espresso_event_end_date($date_format = '', $time_format = '', $EVT_ID = FALSE, $echo = TRUE) {
536
+		$date_format = ! empty($date_format) ? $date_format : get_option('date_format');
537
+		$time_format = ! empty($time_format) ? $time_format : get_option('time_format');
538
+		$date_format = apply_filters('FHEE__espresso_event_end_date__date_format', $date_format);
539
+		$time_format = apply_filters('FHEE__espresso_event_end_date__time_format', $time_format);
540
+		EE_Registry::instance()->load_helper('Event_View');
541
+		if ($echo) {
542
+			echo date_i18n($date_format.' '.$time_format, strtotime(EEH_Event_View::the_event_end_date($date_format, $time_format, $EVT_ID)));
543 543
 			return '';
544 544
 		}
545
-		return date_i18n( $date_format . ' ' . $time_format, strtotime( EEH_Event_View::the_event_end_date( $date_format, $time_format, $EVT_ID )));
545
+		return date_i18n($date_format.' '.$time_format, strtotime(EEH_Event_View::the_event_end_date($date_format, $time_format, $EVT_ID)));
546 546
 	}
547 547
 }
548 548
 
549
-if ( ! function_exists( 'espresso_event_date_range' )) {
549
+if ( ! function_exists('espresso_event_date_range')) {
550 550
 	/**
551 551
 	 * espresso_event_date_range
552 552
 	 * returns the first and last chronologically ordered dates for an event (if different)
@@ -558,22 +558,22 @@  discard block
 block discarded – undo
558 558
 	 * @param bool   $EVT_ID
559 559
 	 * @return string
560 560
 	 */
561
-	function espresso_event_date_range( $date_format = '', $time_format = '', $single_date_format = '', $single_time_format = '', $EVT_ID = FALSE ) {
561
+	function espresso_event_date_range($date_format = '', $time_format = '', $single_date_format = '', $single_time_format = '', $EVT_ID = FALSE) {
562 562
 		// set and filter date and time formats when a range is returned
563
-		$date_format = ! empty( $date_format ) ? $date_format : get_option( 'date_format' );
564
-		$time_format = ! empty( $time_format ) ? $time_format : get_option( 'time_format' );
565
-		$date_format = apply_filters( 'FHEE__espresso_event_date_range__date_format', $date_format );
566
-		$time_format = apply_filters( 'FHEE__espresso_event_date_range__time_format', $time_format );
563
+		$date_format = ! empty($date_format) ? $date_format : get_option('date_format');
564
+		$time_format = ! empty($time_format) ? $time_format : get_option('time_format');
565
+		$date_format = apply_filters('FHEE__espresso_event_date_range__date_format', $date_format);
566
+		$time_format = apply_filters('FHEE__espresso_event_date_range__time_format', $time_format);
567 567
 		// set and filter date and time formats when only a single datetime is returned
568
-		$single_date_format = ! empty( $single_date_format ) ? $single_date_format : get_option( 'date_format' );
569
-		$single_time_format = ! empty( $single_time_format ) ? $single_time_format : get_option( 'time_format' );
570
-		$single_date_format = apply_filters( 'FHEE__espresso_event_date_range__single_date_format', $single_date_format );
571
-		$single_time_format = apply_filters( 'FHEE__espresso_event_date_range__single_time_format', $single_time_format );
572
-		EE_Registry::instance()->load_helper( 'Event_View' );
573
-		$the_event_date = date_i18n( $date_format . ' ' . $time_format, strtotime( EEH_Event_View::the_earliest_event_date( $date_format, $time_format, $EVT_ID )));
574
-		$the_event_end_date = date_i18n( $date_format . ' ' . $time_format, strtotime( EEH_Event_View::the_latest_event_date( $date_format, $time_format, $EVT_ID )));
575
-		if ( $the_event_date != $the_event_end_date ) {
576
-			echo $the_event_date . __( ' - ', 'event_espresso' ) . $the_event_end_date;
568
+		$single_date_format = ! empty($single_date_format) ? $single_date_format : get_option('date_format');
569
+		$single_time_format = ! empty($single_time_format) ? $single_time_format : get_option('time_format');
570
+		$single_date_format = apply_filters('FHEE__espresso_event_date_range__single_date_format', $single_date_format);
571
+		$single_time_format = apply_filters('FHEE__espresso_event_date_range__single_time_format', $single_time_format);
572
+		EE_Registry::instance()->load_helper('Event_View');
573
+		$the_event_date = date_i18n($date_format.' '.$time_format, strtotime(EEH_Event_View::the_earliest_event_date($date_format, $time_format, $EVT_ID)));
574
+		$the_event_end_date = date_i18n($date_format.' '.$time_format, strtotime(EEH_Event_View::the_latest_event_date($date_format, $time_format, $EVT_ID)));
575
+		if ($the_event_date != $the_event_end_date) {
576
+			echo $the_event_date.__(' - ', 'event_espresso').$the_event_end_date;
577 577
 		} else {
578 578
 			echo $the_event_date;
579 579
 		}
@@ -581,7 +581,7 @@  discard block
 block discarded – undo
581 581
 }
582 582
 
583 583
 
584
-if ( ! function_exists( 'espresso_event_date_as_calendar_page' )) {
584
+if ( ! function_exists('espresso_event_date_as_calendar_page')) {
585 585
 	/**
586 586
 	 * espresso_event_date_as_calendar_page
587 587
 	 * returns the primary date for an event, stylized to appear as the page of a calendar
@@ -589,16 +589,16 @@  discard block
 block discarded – undo
589 589
 	 * @param bool $EVT_ID
590 590
 	 * @return string
591 591
 	 */
592
-	function espresso_event_date_as_calendar_page( $EVT_ID = FALSE ) {
593
-		EE_Registry::instance()->load_helper( 'Event_View' );
594
-		EEH_Event_View::event_date_as_calendar_page( $EVT_ID );
592
+	function espresso_event_date_as_calendar_page($EVT_ID = FALSE) {
593
+		EE_Registry::instance()->load_helper('Event_View');
594
+		EEH_Event_View::event_date_as_calendar_page($EVT_ID);
595 595
 	}
596 596
 }
597 597
 
598 598
 
599 599
 
600 600
 
601
-if ( ! function_exists( 'espresso_event_link_url' )) {
601
+if ( ! function_exists('espresso_event_link_url')) {
602 602
 	/**
603 603
 	 * espresso_event_link_url
604 604
 	 *
@@ -606,19 +606,19 @@  discard block
 block discarded – undo
606 606
 	 * @param bool $echo
607 607
 	 * @return string
608 608
 	 */
609
-	function espresso_event_link_url( $EVT_ID = 0, $echo = TRUE ) {
610
-		EE_Registry::instance()->load_helper( 'Event_View' );
611
-		if ( $echo ) {
612
-			echo EEH_Event_View::event_link_url( $EVT_ID );
609
+	function espresso_event_link_url($EVT_ID = 0, $echo = TRUE) {
610
+		EE_Registry::instance()->load_helper('Event_View');
611
+		if ($echo) {
612
+			echo EEH_Event_View::event_link_url($EVT_ID);
613 613
 			return '';
614 614
 		}
615
-		return EEH_Event_View::event_link_url( $EVT_ID );
615
+		return EEH_Event_View::event_link_url($EVT_ID);
616 616
 	}
617 617
 }
618 618
 
619 619
 
620 620
 
621
-if ( ! function_exists( 'espresso_event_has_content_or_excerpt' )) {
621
+if ( ! function_exists('espresso_event_has_content_or_excerpt')) {
622 622
 	/**
623 623
 	 *    espresso_event_has_content_or_excerpt
624 624
 	 *
@@ -626,16 +626,16 @@  discard block
 block discarded – undo
626 626
 	 * @param bool $EVT_ID
627 627
 	 * @return    boolean
628 628
 	 */
629
-	function espresso_event_has_content_or_excerpt( $EVT_ID = FALSE ) {
630
-		EE_Registry::instance()->load_helper( 'Event_View' );
631
-		return EEH_Event_View::event_has_content_or_excerpt( $EVT_ID );
629
+	function espresso_event_has_content_or_excerpt($EVT_ID = FALSE) {
630
+		EE_Registry::instance()->load_helper('Event_View');
631
+		return EEH_Event_View::event_has_content_or_excerpt($EVT_ID);
632 632
 	}
633 633
 }
634 634
 
635 635
 
636 636
 
637 637
 
638
-if ( ! function_exists( 'espresso_event_content_or_excerpt' )) {
638
+if ( ! function_exists('espresso_event_content_or_excerpt')) {
639 639
 	/**
640 640
 	 * espresso_event_content_or_excerpt
641 641
 	 *
@@ -644,19 +644,19 @@  discard block
 block discarded – undo
644 644
 	 * @param bool $echo
645 645
 	 * @return string
646 646
 	 */
647
-	function espresso_event_content_or_excerpt( $num_words = 55, $more = NULL, $echo = TRUE ) {
648
-		EE_Registry::instance()->load_helper( 'Event_View' );
649
-		if ( $echo ) {
650
-			echo EEH_Event_View::event_content_or_excerpt( $num_words, $more );
647
+	function espresso_event_content_or_excerpt($num_words = 55, $more = NULL, $echo = TRUE) {
648
+		EE_Registry::instance()->load_helper('Event_View');
649
+		if ($echo) {
650
+			echo EEH_Event_View::event_content_or_excerpt($num_words, $more);
651 651
 			return '';
652 652
 		}
653
-		return EEH_Event_View::event_content_or_excerpt( $num_words, $more );
653
+		return EEH_Event_View::event_content_or_excerpt($num_words, $more);
654 654
 	}
655 655
 }
656 656
 
657 657
 
658 658
 
659
-if ( ! function_exists( 'espresso_event_phone' )) {
659
+if ( ! function_exists('espresso_event_phone')) {
660 660
 	/**
661 661
 	 * espresso_event_phone
662 662
 	 *
@@ -664,19 +664,19 @@  discard block
 block discarded – undo
664 664
 	 * @param bool $echo
665 665
 	 * @return string
666 666
 	 */
667
-	function espresso_event_phone( $EVT_ID = 0, $echo = TRUE ) {
668
-		EE_Registry::instance()->load_helper( 'Event_View' );
669
-		if ( $echo ) {
670
-			echo EEH_Event_View::event_phone( $EVT_ID );
667
+	function espresso_event_phone($EVT_ID = 0, $echo = TRUE) {
668
+		EE_Registry::instance()->load_helper('Event_View');
669
+		if ($echo) {
670
+			echo EEH_Event_View::event_phone($EVT_ID);
671 671
 			return '';
672 672
 		}
673
-		return EEH_Event_View::event_phone( $EVT_ID );
673
+		return EEH_Event_View::event_phone($EVT_ID);
674 674
 	}
675 675
 }
676 676
 
677 677
 
678 678
 
679
-if ( ! function_exists( 'espresso_edit_event_link' )) {
679
+if ( ! function_exists('espresso_edit_event_link')) {
680 680
 	/**
681 681
 	 * espresso_edit_event_link
682 682
 	 * returns a link to edit an event
@@ -685,41 +685,41 @@  discard block
 block discarded – undo
685 685
 	 * @param bool $echo
686 686
 	 * @return string
687 687
 	 */
688
-	function espresso_edit_event_link( $EVT_ID = 0, $echo = TRUE ) {
689
-		EE_Registry::instance()->load_helper( 'Event_View' );
690
-		if ( $echo ) {
691
-			echo EEH_Event_View::edit_event_link( $EVT_ID );
688
+	function espresso_edit_event_link($EVT_ID = 0, $echo = TRUE) {
689
+		EE_Registry::instance()->load_helper('Event_View');
690
+		if ($echo) {
691
+			echo EEH_Event_View::edit_event_link($EVT_ID);
692 692
 			return '';
693 693
 		}
694
-		return EEH_Event_View::edit_event_link( $EVT_ID );
694
+		return EEH_Event_View::edit_event_link($EVT_ID);
695 695
 	}
696 696
 }
697 697
 
698 698
 
699
-if ( ! function_exists( 'espresso_organization_name' )) {
699
+if ( ! function_exists('espresso_organization_name')) {
700 700
 	/**
701 701
 	 * espresso_organization_name
702 702
 	 * @param bool $echo
703 703
 	 * @return string
704 704
 	 */
705 705
 	function espresso_organization_name($echo = TRUE) {
706
-		if($echo){
707
-			echo EE_Registry::instance()->CFG->organization->get_pretty( 'name' );
706
+		if ($echo) {
707
+			echo EE_Registry::instance()->CFG->organization->get_pretty('name');
708 708
 			return '';
709 709
 		}
710
-		return EE_Registry::instance()->CFG->organization->get_pretty( 'name' );
710
+		return EE_Registry::instance()->CFG->organization->get_pretty('name');
711 711
 	}
712 712
 }
713 713
 
714
-if ( ! function_exists( 'espresso_organization_address' )) {
714
+if ( ! function_exists('espresso_organization_address')) {
715 715
 	/**
716 716
 	 * espresso_organization_address
717 717
 	 * @param string $type
718 718
 	 * @return string
719 719
 	 */
720
-	function espresso_organization_address( $type = 'inline' ) {
721
-		if ( EE_Registry::instance()->CFG->organization instanceof EE_Organization_Config ) {
722
-			EE_Registry::instance()->load_helper( 'Formatter' );
720
+	function espresso_organization_address($type = 'inline') {
721
+		if (EE_Registry::instance()->CFG->organization instanceof EE_Organization_Config) {
722
+			EE_Registry::instance()->load_helper('Formatter');
723 723
 			$address = new EE_Generic_Address(
724 724
 				EE_Registry::instance()->CFG->organization->address_1,
725 725
 				EE_Registry::instance()->CFG->organization->address_2,
@@ -728,129 +728,129 @@  discard block
 block discarded – undo
728 728
 				EE_Registry::instance()->CFG->organization->CNT_ISO,
729 729
 				EE_Registry::instance()->CFG->organization->zip
730 730
 			);
731
-			return EEH_Address::format( $address, $type );
731
+			return EEH_Address::format($address, $type);
732 732
 		}
733 733
 		return '';
734 734
 	}
735 735
 }
736 736
 
737
-if ( ! function_exists( 'espresso_organization_email' )) {
737
+if ( ! function_exists('espresso_organization_email')) {
738 738
 	/**
739 739
 	 * espresso_organization_email
740 740
 	 * @param bool $echo
741 741
 	 * @return string
742 742
 	 */
743
-	function espresso_organization_email( $echo = TRUE ) {
744
-		if($echo){
745
-			echo EE_Registry::instance()->CFG->organization->get_pretty( 'email' );
743
+	function espresso_organization_email($echo = TRUE) {
744
+		if ($echo) {
745
+			echo EE_Registry::instance()->CFG->organization->get_pretty('email');
746 746
 			return '';
747 747
 		}
748
-		return EE_Registry::instance()->CFG->organization->get_pretty( 'email' );
748
+		return EE_Registry::instance()->CFG->organization->get_pretty('email');
749 749
 	}
750 750
 }
751 751
 
752
-if ( ! function_exists( 'espresso_organization_logo_url' )) {
752
+if ( ! function_exists('espresso_organization_logo_url')) {
753 753
 	/**
754 754
 	 * espresso_organization_logo_url
755 755
 	 * @param bool $echo
756 756
 	 * @return string
757 757
 	 */
758
-	function espresso_organization_logo_url( $echo = TRUE ) {
759
-		if($echo){
760
-			echo EE_Registry::instance()->CFG->organization->get_pretty( 'logo_url' );
758
+	function espresso_organization_logo_url($echo = TRUE) {
759
+		if ($echo) {
760
+			echo EE_Registry::instance()->CFG->organization->get_pretty('logo_url');
761 761
 			return '';
762 762
 		}
763
-		return EE_Registry::instance()->CFG->organization->get_pretty( 'logo_url' );
763
+		return EE_Registry::instance()->CFG->organization->get_pretty('logo_url');
764 764
 	}
765 765
 }
766 766
 
767
-if ( ! function_exists( 'espresso_organization_facebook' )) {
767
+if ( ! function_exists('espresso_organization_facebook')) {
768 768
 	/**
769 769
 	 * espresso_organization_facebook
770 770
 	 * @param bool $echo
771 771
 	 * @return string
772 772
 	 */
773
-	function espresso_organization_facebook( $echo = TRUE ) {
774
-		if($echo){
775
-			echo EE_Registry::instance()->CFG->organization->get_pretty( 'facebook' );
773
+	function espresso_organization_facebook($echo = TRUE) {
774
+		if ($echo) {
775
+			echo EE_Registry::instance()->CFG->organization->get_pretty('facebook');
776 776
 			return '';
777 777
 		}
778
-		return EE_Registry::instance()->CFG->organization->get_pretty( 'facebook' );
778
+		return EE_Registry::instance()->CFG->organization->get_pretty('facebook');
779 779
 	}
780 780
 }
781 781
 
782
-if ( ! function_exists( 'espresso_organization_twitter' )) {
782
+if ( ! function_exists('espresso_organization_twitter')) {
783 783
 	/**
784 784
 	 * espresso_organization_twitter
785 785
 	 * @param bool $echo
786 786
 	 * @return string
787 787
 	 */
788
-	function espresso_organization_twitter( $echo = TRUE ) {
789
-		if($echo){
790
-			echo EE_Registry::instance()->CFG->organization->get_pretty( 'twitter' );
788
+	function espresso_organization_twitter($echo = TRUE) {
789
+		if ($echo) {
790
+			echo EE_Registry::instance()->CFG->organization->get_pretty('twitter');
791 791
 			return '';
792 792
 		}
793
-		return EE_Registry::instance()->CFG->organization->get_pretty( 'twitter' );
793
+		return EE_Registry::instance()->CFG->organization->get_pretty('twitter');
794 794
 	}
795 795
 }
796 796
 
797
-if ( ! function_exists( 'espresso_organization_linkedin' )) {
797
+if ( ! function_exists('espresso_organization_linkedin')) {
798 798
 	/**
799 799
 	 * espresso_organization_linkedin
800 800
 	 * @param bool $echo
801 801
 	 * @return string
802 802
 	 */
803
-	function espresso_organization_linkedin( $echo = TRUE ) {
804
-		if($echo){
805
-			echo EE_Registry::instance()->CFG->organization->get_pretty( 'linkedin' );
803
+	function espresso_organization_linkedin($echo = TRUE) {
804
+		if ($echo) {
805
+			echo EE_Registry::instance()->CFG->organization->get_pretty('linkedin');
806 806
 			return '';
807 807
 		}
808
-		return EE_Registry::instance()->CFG->organization->get_pretty( 'linkedin' );
808
+		return EE_Registry::instance()->CFG->organization->get_pretty('linkedin');
809 809
 	}
810 810
 }
811 811
 
812
-if ( ! function_exists( 'espresso_organization_pinterest' )) {
812
+if ( ! function_exists('espresso_organization_pinterest')) {
813 813
 	/**
814 814
 	 * espresso_organization_pinterest
815 815
 	 * @param bool $echo
816 816
 	 * @return string
817 817
 	 */
818
-	function espresso_organization_pinterest( $echo = TRUE ) {
819
-		if($echo){
820
-			echo EE_Registry::instance()->CFG->organization->get_pretty( 'pinterest' );
818
+	function espresso_organization_pinterest($echo = TRUE) {
819
+		if ($echo) {
820
+			echo EE_Registry::instance()->CFG->organization->get_pretty('pinterest');
821 821
 			return '';
822 822
 		}
823
-		return EE_Registry::instance()->CFG->organization->get_pretty( 'pinterest' );
823
+		return EE_Registry::instance()->CFG->organization->get_pretty('pinterest');
824 824
 	}
825 825
 }
826 826
 
827
-if ( ! function_exists( 'espresso_organization_google' )) {
827
+if ( ! function_exists('espresso_organization_google')) {
828 828
 	/**
829 829
 	 * espresso_organization_google
830 830
 	 * @param bool $echo
831 831
 	 * @return string
832 832
 	 */
833
-	function espresso_organization_google( $echo = TRUE ) {
834
-		if($echo){
835
-			echo EE_Registry::instance()->CFG->organization->get_pretty( 'google' );
833
+	function espresso_organization_google($echo = TRUE) {
834
+		if ($echo) {
835
+			echo EE_Registry::instance()->CFG->organization->get_pretty('google');
836 836
 			return '';
837 837
 		}
838
-		return EE_Registry::instance()->CFG->organization->get_pretty( 'google' );
838
+		return EE_Registry::instance()->CFG->organization->get_pretty('google');
839 839
 	}
840 840
 }
841 841
 
842
-if ( ! function_exists( 'espresso_organization_instagram' )) {
842
+if ( ! function_exists('espresso_organization_instagram')) {
843 843
 	/**
844 844
 	 * espresso_organization_instagram
845 845
 	 * @param bool $echo
846 846
 	 * @return string
847 847
 	 */
848
-	function espresso_organization_instagram( $echo = TRUE ) {
849
-		if($echo){
850
-			echo EE_Registry::instance()->CFG->organization->get_pretty( 'instagram' );
848
+	function espresso_organization_instagram($echo = TRUE) {
849
+		if ($echo) {
850
+			echo EE_Registry::instance()->CFG->organization->get_pretty('instagram');
851 851
 			return '';
852 852
 		}
853
-		return EE_Registry::instance()->CFG->organization->get_pretty( 'instagram' );
853
+		return EE_Registry::instance()->CFG->organization->get_pretty('instagram');
854 854
 	}
855 855
 }
856 856
 
@@ -860,14 +860,14 @@  discard block
 block discarded – undo
860 860
 
861 861
 
862 862
 
863
-if ( ! function_exists( 'espresso_event_venues' )) {
863
+if ( ! function_exists('espresso_event_venues')) {
864 864
 	/**
865 865
 	 * espresso_event_venues
866 866
 	 *
867 867
 	 * @return array  all venues related to an event
868 868
 	 */
869 869
 	function espresso_event_venues() {
870
-		EE_Registry::instance()->load_helper( 'Venue_View' );
870
+		EE_Registry::instance()->load_helper('Venue_View');
871 871
 		return EEH_Venue_View::get_event_venues();
872 872
 	}
873 873
 }
@@ -875,7 +875,7 @@  discard block
 block discarded – undo
875 875
 
876 876
 
877 877
 
878
-if ( ! function_exists( 'espresso_venue_id' )) {
878
+if ( ! function_exists('espresso_venue_id')) {
879 879
 	/**
880 880
 	 *    espresso_venue_name
881 881
 	 *
@@ -883,16 +883,16 @@  discard block
 block discarded – undo
883 883
 	 * @param     int $EVT_ID
884 884
 	 * @return    string
885 885
 	 */
886
-	function espresso_venue_id( $EVT_ID = 0 ) {
887
-		EE_Registry::instance()->load_helper( 'Venue_View' );
888
-		$venue = EEH_Venue_View::get_venue( $EVT_ID );
886
+	function espresso_venue_id($EVT_ID = 0) {
887
+		EE_Registry::instance()->load_helper('Venue_View');
888
+		$venue = EEH_Venue_View::get_venue($EVT_ID);
889 889
 		return $venue instanceof EE_Venue ? $venue->ID() : 0;
890 890
 	}
891 891
 }
892 892
 
893 893
 
894 894
 
895
-if ( ! function_exists( 'espresso_is_venue_private' ) ) {
895
+if ( ! function_exists('espresso_is_venue_private')) {
896 896
 	/**
897 897
 	 * Return whether a venue is private or not.
898 898
 	 * @see EEH_Venue_View::get_venue() for more info on expected return results.
@@ -901,16 +901,16 @@  discard block
 block discarded – undo
901 901
 	 *
902 902
 	 * @return bool | null
903 903
 	 */
904
-	function espresso_is_venue_private( $VNU_ID = 0 ) {
905
-		EE_Registry::instance()->load_helper( 'Venue_View' );
906
-		return EEH_Venue_View::is_venue_private( $VNU_ID );
904
+	function espresso_is_venue_private($VNU_ID = 0) {
905
+		EE_Registry::instance()->load_helper('Venue_View');
906
+		return EEH_Venue_View::is_venue_private($VNU_ID);
907 907
 	}
908 908
 }
909 909
 
910 910
 
911 911
 
912 912
 
913
-if ( ! function_exists( 'espresso_venue_name' )) {
913
+if ( ! function_exists('espresso_venue_name')) {
914 914
 	/**
915 915
 	 *    espresso_venue_name
916 916
 	 *
@@ -920,20 +920,20 @@  discard block
 block discarded – undo
920 920
 	 * @param bool   $echo
921 921
 	 * @return    string
922 922
 	 */
923
-	function espresso_venue_name( $VNU_ID = 0, $link_to = 'details', $echo = TRUE ) {
924
-		EE_Registry::instance()->load_helper( 'Venue_View' );
925
-		if($echo){
926
-			echo EEH_Venue_View::venue_name( $link_to, $VNU_ID );
923
+	function espresso_venue_name($VNU_ID = 0, $link_to = 'details', $echo = TRUE) {
924
+		EE_Registry::instance()->load_helper('Venue_View');
925
+		if ($echo) {
926
+			echo EEH_Venue_View::venue_name($link_to, $VNU_ID);
927 927
 			return '';
928 928
 		}
929
-		return EEH_Venue_View::venue_name( $link_to, $VNU_ID );
929
+		return EEH_Venue_View::venue_name($link_to, $VNU_ID);
930 930
 	}
931 931
 }
932 932
 
933 933
 
934 934
 
935 935
 
936
-if ( ! function_exists( 'espresso_venue_link' )) {
936
+if ( ! function_exists('espresso_venue_link')) {
937 937
 	/**
938 938
 	 * 	espresso_venue_link
939 939
 	 *
@@ -942,15 +942,15 @@  discard block
 block discarded – undo
942 942
 	 *  @param 	string 	$text
943 943
 	 *  @return 	string
944 944
 	 */
945
-	function espresso_venue_link( $VNU_ID = 0, $text = '' ) {
946
-		EE_Registry::instance()->load_helper( 'Venue_View' );
947
-		return EEH_Venue_View::venue_details_link( $VNU_ID, $text );
945
+	function espresso_venue_link($VNU_ID = 0, $text = '') {
946
+		EE_Registry::instance()->load_helper('Venue_View');
947
+		return EEH_Venue_View::venue_details_link($VNU_ID, $text);
948 948
 	}
949 949
 }
950 950
 
951 951
 
952 952
 
953
-if ( ! function_exists( 'espresso_venue_description' )) {
953
+if ( ! function_exists('espresso_venue_description')) {
954 954
 	/**
955 955
 	 *    espresso_venue_description
956 956
 	 *
@@ -959,18 +959,18 @@  discard block
 block discarded – undo
959 959
 	 * @param bool $echo
960 960
 	 * @return    string
961 961
 	 */
962
-	function espresso_venue_description( $VNU_ID = FALSE, $echo = TRUE ) {
963
-		EE_Registry::instance()->load_helper( 'Venue_View' );
964
-		if($echo){
965
-			echo EEH_Venue_View::venue_description( $VNU_ID );
962
+	function espresso_venue_description($VNU_ID = FALSE, $echo = TRUE) {
963
+		EE_Registry::instance()->load_helper('Venue_View');
964
+		if ($echo) {
965
+			echo EEH_Venue_View::venue_description($VNU_ID);
966 966
 			return '';
967 967
 		}
968
-		return EEH_Venue_View::venue_description( $VNU_ID );
968
+		return EEH_Venue_View::venue_description($VNU_ID);
969 969
 	}
970 970
 }
971 971
 
972 972
 
973
-if ( ! function_exists( 'espresso_venue_excerpt' )) {
973
+if ( ! function_exists('espresso_venue_excerpt')) {
974 974
 	/**
975 975
 	 *    espresso_venue_excerpt
976 976
 	 *
@@ -979,19 +979,19 @@  discard block
 block discarded – undo
979 979
 	 * @param bool $echo
980 980
 	 * @return    string
981 981
 	 */
982
-	function espresso_venue_excerpt( $VNU_ID = 0,  $echo = TRUE ) {
983
-		EE_Registry::instance()->load_helper( 'Venue_View' );
984
-		if ( $echo ) {
985
-			echo EEH_Venue_View::venue_excerpt( $VNU_ID,  $echo );
982
+	function espresso_venue_excerpt($VNU_ID = 0, $echo = TRUE) {
983
+		EE_Registry::instance()->load_helper('Venue_View');
984
+		if ($echo) {
985
+			echo EEH_Venue_View::venue_excerpt($VNU_ID, $echo);
986 986
 			return '';
987 987
 		}
988
-		return EEH_Venue_View::venue_excerpt( $VNU_ID,  $echo );
988
+		return EEH_Venue_View::venue_excerpt($VNU_ID, $echo);
989 989
 	}
990 990
 }
991 991
 
992 992
 
993 993
 
994
-if ( ! function_exists( 'espresso_venue_categories' )) {
994
+if ( ! function_exists('espresso_venue_categories')) {
995 995
 	/**
996 996
 	 * espresso_venue_categories
997 997
 	 * returns the terms associated with a venue
@@ -1001,18 +1001,18 @@  discard block
 block discarded – undo
1001 1001
 	 * @param bool $echo
1002 1002
 	 * @return string
1003 1003
 	 */
1004
-	function espresso_venue_categories( $VNU_ID = 0, $hide_uncategorized = TRUE,  $echo = TRUE ) {
1005
-		EE_Registry::instance()->load_helper( 'Venue_View' );
1006
-		if ( $echo ) {
1007
-			echo EEH_Venue_View::venue_categories( $VNU_ID, $hide_uncategorized );
1004
+	function espresso_venue_categories($VNU_ID = 0, $hide_uncategorized = TRUE, $echo = TRUE) {
1005
+		EE_Registry::instance()->load_helper('Venue_View');
1006
+		if ($echo) {
1007
+			echo EEH_Venue_View::venue_categories($VNU_ID, $hide_uncategorized);
1008 1008
 			return '';
1009 1009
 		}
1010
-		return EEH_Venue_View::venue_categories( $VNU_ID, $hide_uncategorized );
1010
+		return EEH_Venue_View::venue_categories($VNU_ID, $hide_uncategorized);
1011 1011
 	}
1012 1012
 }
1013 1013
 
1014 1014
 
1015
-if ( ! function_exists( 'espresso_venue_address' )) {
1015
+if ( ! function_exists('espresso_venue_address')) {
1016 1016
 	/**
1017 1017
 	 * espresso_venue_address
1018 1018
 	 * returns a formatted block of html  for displaying a venue's address
@@ -1022,18 +1022,18 @@  discard block
 block discarded – undo
1022 1022
 	 * @param bool   $echo
1023 1023
 	 * @return string
1024 1024
 	 */
1025
-	function espresso_venue_address( $type = 'multiline', $VNU_ID = 0, $echo = TRUE ) {
1026
-		EE_Registry::instance()->load_helper( 'Venue_View' );
1027
-		if ( $echo ) {
1028
-			echo EEH_Venue_View::venue_address( $type, $VNU_ID );
1025
+	function espresso_venue_address($type = 'multiline', $VNU_ID = 0, $echo = TRUE) {
1026
+		EE_Registry::instance()->load_helper('Venue_View');
1027
+		if ($echo) {
1028
+			echo EEH_Venue_View::venue_address($type, $VNU_ID);
1029 1029
 			return '';
1030 1030
 		}
1031
-		return EEH_Venue_View::venue_address( $type, $VNU_ID );
1031
+		return EEH_Venue_View::venue_address($type, $VNU_ID);
1032 1032
 	}
1033 1033
 }
1034 1034
 
1035 1035
 
1036
-if ( ! function_exists( 'espresso_venue_raw_address' )) {
1036
+if ( ! function_exists('espresso_venue_raw_address')) {
1037 1037
 	/**
1038 1038
 	 * espresso_venue_address
1039 1039
 	 * returns an UN-formatted string containing a venue's address
@@ -1043,18 +1043,18 @@  discard block
 block discarded – undo
1043 1043
 	 * @param bool     $echo
1044 1044
 	 * @return string
1045 1045
 	 */
1046
-	function espresso_venue_raw_address( $type = 'multiline', $VNU_ID = 0, $echo = TRUE ) {
1047
-		EE_Registry::instance()->load_helper( 'Venue_View' );
1048
-		if ( $echo ) {
1049
-			echo EEH_Venue_View::venue_address( $type, $VNU_ID, FALSE, FALSE );
1046
+	function espresso_venue_raw_address($type = 'multiline', $VNU_ID = 0, $echo = TRUE) {
1047
+		EE_Registry::instance()->load_helper('Venue_View');
1048
+		if ($echo) {
1049
+			echo EEH_Venue_View::venue_address($type, $VNU_ID, FALSE, FALSE);
1050 1050
 			return '';
1051 1051
 		}
1052
-		return EEH_Venue_View::venue_address( $type, $VNU_ID, FALSE, FALSE );
1052
+		return EEH_Venue_View::venue_address($type, $VNU_ID, FALSE, FALSE);
1053 1053
 	}
1054 1054
 }
1055 1055
 
1056 1056
 
1057
-if ( ! function_exists( 'espresso_venue_has_address' )) {
1057
+if ( ! function_exists('espresso_venue_has_address')) {
1058 1058
 	/**
1059 1059
 	 * espresso_venue_has_address
1060 1060
 	 * returns TRUE or FALSE if a Venue has address information
@@ -1062,14 +1062,14 @@  discard block
 block discarded – undo
1062 1062
 	 * @param int $VNU_ID
1063 1063
 	 * @return bool
1064 1064
 	 */
1065
-	function espresso_venue_has_address( $VNU_ID = 0 ) {
1066
-		EE_Registry::instance()->load_helper( 'Venue_View' );
1067
-		return EEH_Venue_View::venue_has_address( $VNU_ID );
1065
+	function espresso_venue_has_address($VNU_ID = 0) {
1066
+		EE_Registry::instance()->load_helper('Venue_View');
1067
+		return EEH_Venue_View::venue_has_address($VNU_ID);
1068 1068
 	}
1069 1069
 }
1070 1070
 
1071 1071
 
1072
-if ( ! function_exists( 'espresso_venue_gmap' )) {
1072
+if ( ! function_exists('espresso_venue_gmap')) {
1073 1073
 	/**
1074 1074
 	 * espresso_venue_gmap
1075 1075
 	 * returns a google map for the venue address
@@ -1080,18 +1080,18 @@  discard block
 block discarded – undo
1080 1080
 	 * @param bool     $echo
1081 1081
 	 * @return string
1082 1082
 	 */
1083
-	function espresso_venue_gmap( $VNU_ID = 0, $map_ID = FALSE, $gmap = array(), $echo = TRUE  ) {
1084
-		EE_Registry::instance()->load_helper( 'Venue_View' );
1085
-		if ( $echo ) {
1086
-			echo EEH_Venue_View::venue_gmap( $VNU_ID, $map_ID, $gmap );
1083
+	function espresso_venue_gmap($VNU_ID = 0, $map_ID = FALSE, $gmap = array(), $echo = TRUE) {
1084
+		EE_Registry::instance()->load_helper('Venue_View');
1085
+		if ($echo) {
1086
+			echo EEH_Venue_View::venue_gmap($VNU_ID, $map_ID, $gmap);
1087 1087
 			return '';
1088 1088
 		}
1089
-		return EEH_Venue_View::venue_gmap( $VNU_ID, $map_ID, $gmap );
1089
+		return EEH_Venue_View::venue_gmap($VNU_ID, $map_ID, $gmap);
1090 1090
 	}
1091 1091
 }
1092 1092
 
1093 1093
 
1094
-if ( ! function_exists( 'espresso_venue_phone' )) {
1094
+if ( ! function_exists('espresso_venue_phone')) {
1095 1095
 	/**
1096 1096
 	 * espresso_venue_phone
1097 1097
 	 *
@@ -1099,19 +1099,19 @@  discard block
 block discarded – undo
1099 1099
 	 * @param bool $echo
1100 1100
 	 * @return string
1101 1101
 	 */
1102
-	function espresso_venue_phone( $VNU_ID = 0, $echo = TRUE ) {
1103
-		EE_Registry::instance()->load_helper( 'Venue_View' );
1104
-		if ( $echo ) {
1105
-			echo EEH_Venue_View::venue_phone( $VNU_ID );
1102
+	function espresso_venue_phone($VNU_ID = 0, $echo = TRUE) {
1103
+		EE_Registry::instance()->load_helper('Venue_View');
1104
+		if ($echo) {
1105
+			echo EEH_Venue_View::venue_phone($VNU_ID);
1106 1106
 			return '';
1107 1107
 		}
1108
-		return EEH_Venue_View::venue_phone( $VNU_ID );
1108
+		return EEH_Venue_View::venue_phone($VNU_ID);
1109 1109
 	}
1110 1110
 }
1111 1111
 
1112 1112
 
1113 1113
 
1114
-if ( ! function_exists( 'espresso_venue_website' )) {
1114
+if ( ! function_exists('espresso_venue_website')) {
1115 1115
 	/**
1116 1116
 	 * espresso_venue_website
1117 1117
 	 *
@@ -1119,19 +1119,19 @@  discard block
 block discarded – undo
1119 1119
 	 * @param bool $echo
1120 1120
 	 * @return string
1121 1121
 	 */
1122
-	function espresso_venue_website( $VNU_ID = 0, $echo = TRUE ) {
1123
-		EE_Registry::instance()->load_helper( 'Venue_View' );
1124
-		if ( $echo ) {
1125
-			echo EEH_Venue_View::venue_website_link( $VNU_ID );
1122
+	function espresso_venue_website($VNU_ID = 0, $echo = TRUE) {
1123
+		EE_Registry::instance()->load_helper('Venue_View');
1124
+		if ($echo) {
1125
+			echo EEH_Venue_View::venue_website_link($VNU_ID);
1126 1126
 			return '';
1127 1127
 		}
1128
-		return EEH_Venue_View::venue_website_link( $VNU_ID );
1128
+		return EEH_Venue_View::venue_website_link($VNU_ID);
1129 1129
 	}
1130 1130
 }
1131 1131
 
1132 1132
 
1133 1133
 
1134
-if ( ! function_exists( 'espresso_edit_venue_link' )) {
1134
+if ( ! function_exists('espresso_edit_venue_link')) {
1135 1135
 	/**
1136 1136
 	 * espresso_edit_venue_link
1137 1137
 	 *
@@ -1139,13 +1139,13 @@  discard block
 block discarded – undo
1139 1139
 	 * @param bool $echo
1140 1140
 	 * @return string
1141 1141
 	 */
1142
-	function espresso_edit_venue_link( $VNU_ID = 0, $echo = TRUE ) {
1143
-		EE_Registry::instance()->load_helper( 'Venue_View' );
1144
-		if($echo){
1145
-			echo EEH_Venue_View::edit_venue_link( $VNU_ID );
1142
+	function espresso_edit_venue_link($VNU_ID = 0, $echo = TRUE) {
1143
+		EE_Registry::instance()->load_helper('Venue_View');
1144
+		if ($echo) {
1145
+			echo EEH_Venue_View::edit_venue_link($VNU_ID);
1146 1146
 			return '';
1147 1147
 		}
1148
-		return EEH_Venue_View::edit_venue_link( $VNU_ID );
1148
+		return EEH_Venue_View::edit_venue_link($VNU_ID);
1149 1149
 	}
1150 1150
 }
1151 1151
 
Please login to merge, or discard this patch.
admin_pages/events/Events_Admin_Page_Init.core.php 2 patches
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -30,12 +30,12 @@  discard block
 block discarded – undo
30 30
 
31 31
 	public function __construct() {
32 32
 		//define some events related constants
33
-		define( 'EVENTS_PG_SLUG', 'espresso_events' );
34
-		define( 'EVENTS_LABEL', __('Events', 'event_espresso'));
35
-		define( 'EVENTS_ADMIN', EE_ADMIN_PAGES . 'events' . DS );
36
-		define( 'EVENTS_ADMIN_URL', admin_url( 'admin.php?page=' . EVENTS_PG_SLUG ));
37
-		define( 'EVENTS_TEMPLATE_PATH', EVENTS_ADMIN . 'templates' . DS );
38
-		define( 'EVENTS_ASSETS_URL', EE_ADMIN_PAGES_URL . 'events/assets/' );
33
+		define('EVENTS_PG_SLUG', 'espresso_events');
34
+		define('EVENTS_LABEL', __('Events', 'event_espresso'));
35
+		define('EVENTS_ADMIN', EE_ADMIN_PAGES.'events'.DS);
36
+		define('EVENTS_ADMIN_URL', admin_url('admin.php?page='.EVENTS_PG_SLUG));
37
+		define('EVENTS_TEMPLATE_PATH', EVENTS_ADMIN.'templates'.DS);
38
+		define('EVENTS_ASSETS_URL', EE_ADMIN_PAGES_URL.'events/assets/');
39 39
 		parent::__construct();
40 40
 	}
41 41
 
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 	}
45 45
 
46 46
 	protected function _set_menu_map() {
47
-		$this->_menu_map = new EE_Admin_Page_Main_Menu( array(
47
+		$this->_menu_map = new EE_Admin_Page_Main_Menu(array(
48 48
 			'menu_group' => 'main',
49 49
 			'menu_order' => 10,
50 50
 			'subtitle' => __('Events', 'event_espresso'),
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,6 @@
 block discarded – undo
1
-<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) exit('No direct script access allowed');
1
+<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) {
2
+	exit('No direct script access allowed');
3
+}
2 4
 /**
3 5
  * Event Espresso
4 6
  *
Please login to merge, or discard this patch.
admin_pages/registrations/Registrations_Admin_Page_Init.core.php 2 patches
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
  *
22 22
  * ------------------------------------------------------------------------
23 23
  */
24
-class Registrations_Admin_Page_Init extends EE_Admin_Page_CPT_Init  {
24
+class Registrations_Admin_Page_Init extends EE_Admin_Page_CPT_Init {
25 25
 
26 26
 
27 27
 
@@ -34,16 +34,16 @@  discard block
 block discarded – undo
34 34
 	 * 		@return void
35 35
 	 */
36 36
 	public function __construct() {
37
-		do_action( 'AHEE_log', __FILE__, __FUNCTION__, '' );
37
+		do_action('AHEE_log', __FILE__, __FUNCTION__, '');
38 38
 
39
-		define( 'REG_PG_SLUG', 'espresso_registrations' );
40
-		define( 'REG_PG_NAME', ucwords( str_replace( '_', '', REG_PG_SLUG )));
41
-		define( 'REG_ADMIN', EE_ADMIN_PAGES . 'registrations' . DS );
42
-		define( 'REG_ADMIN_URL', admin_url( 'admin.php?page=' . REG_PG_SLUG ));
43
-		define( 'REG_ASSETS_PATH', REG_ADMIN . 'assets' . DS );
44
-		define( 'REG_ASSETS_URL', EE_ADMIN_PAGES_URL . 'registrations/assets/' );
45
-		define( 'REG_TEMPLATE_PATH', REG_ADMIN . 'templates' . DS );
46
-		define( 'REG_TEMPLATE_URL', EE_ADMIN_PAGES_URL . 'registrations/templates/' );
39
+		define('REG_PG_SLUG', 'espresso_registrations');
40
+		define('REG_PG_NAME', ucwords(str_replace('_', '', REG_PG_SLUG)));
41
+		define('REG_ADMIN', EE_ADMIN_PAGES.'registrations'.DS);
42
+		define('REG_ADMIN_URL', admin_url('admin.php?page='.REG_PG_SLUG));
43
+		define('REG_ASSETS_PATH', REG_ADMIN.'assets'.DS);
44
+		define('REG_ASSETS_URL', EE_ADMIN_PAGES_URL.'registrations/assets/');
45
+		define('REG_TEMPLATE_PATH', REG_ADMIN.'templates'.DS);
46
+		define('REG_TEMPLATE_URL', EE_ADMIN_PAGES_URL.'registrations/templates/');
47 47
 
48 48
 		parent::__construct();
49 49
 	}
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
 
59 59
 
60 60
 	protected function _set_menu_map() {
61
-		$this->_menu_map = new EE_Admin_Page_Sub_Menu( array(
61
+		$this->_menu_map = new EE_Admin_Page_Sub_Menu(array(
62 62
 			'menu_group' => 'main',
63 63
 			'menu_order' => 40,
64 64
 			'show_on_menu' => EE_Admin_Page_Menu_Map::BLOG_ADMIN_ONLY,
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,6 @@
 block discarded – undo
1
-<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) exit('No direct script access allowed');
1
+<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) {
2
+	exit('No direct script access allowed');
3
+}
2 4
 /**
3 5
  * Event Espresso
4 6
  *
Please login to merge, or discard this patch.
general_settings/help_tabs/general_settings_templates.help_tab.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
 </li>
34 34
 <li>
35 35
 <strong><?php _e('Display Descriptions', 'event_espresso'); ?></strong><br />
36
-<?php printf( __('Whether descriptions should be shown on the event list page.%sSelecting "none" will NOT display any of the text content you entered into the main text editor on the event admin page.%sSelecting "excerpt" will display the text you entered into the "Excerpt" textarea on the event admin page, OR, any text in the main text editor above the "' . htmlentities( '<!--more-->' ) . '" tag.%sSelecting "full description" will display ALL of the text content you entered into the main text editor on the event admin page.', 'event_espresso'), '<br/>', '<br/>', '<br/>' );?>
36
+<?php printf(__('Whether descriptions should be shown on the event list page.%sSelecting "none" will NOT display any of the text content you entered into the main text editor on the event admin page.%sSelecting "excerpt" will display the text you entered into the "Excerpt" textarea on the event admin page, OR, any text in the main text editor above the "'.htmlentities('<!--more-->').'" tag.%sSelecting "full description" will display ALL of the text content you entered into the main text editor on the event admin page.', 'event_espresso'), '<br/>', '<br/>', '<br/>'); ?>
37 37
 </li>
38 38
 <li>
39 39
 <strong><?php _e('Display Ticket Selector', 'event_espresso'); ?></strong><br />
Please login to merge, or discard this patch.
admin_pages/general_settings/help_tours/Google_Maps_Help_Tour.class.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if (!defined('EVENT_ESPRESSO_VERSION') )
2
+if ( ! defined('EVENT_ESPRESSO_VERSION'))
3 3
 	exit('NO direct script access allowed');
4 4
 
5 5
 /**
@@ -71,21 +71,21 @@  discard block
 block discarded – undo
71 71
 
72 72
 
73 73
 	protected function _start() {
74
-		$content = '<h3>' . __('Google Maps Settings', 'event_espresso') . '</h3>';
75
-		$content .= '<p>' . __('This tour of the Google Maps page will go over different areas of the screen to help you understand what they are used for.', 'event_espresso') . '</p>';
74
+		$content = '<h3>'.__('Google Maps Settings', 'event_espresso').'</h3>';
75
+		$content .= '<p>'.__('This tour of the Google Maps page will go over different areas of the screen to help you understand what they are used for.', 'event_espresso').'</p>';
76 76
 		return $content;
77 77
 	}
78 78
 
79 79
 	protected function _use_google_maps_stop() {
80
-		return '<p>' . __('Turn Google maps on or off site wide for Event Espresso.', 'event_espresso') . '</p>';
80
+		return '<p>'.__('Turn Google maps on or off site wide for Event Espresso.', 'event_espresso').'</p>';
81 81
 	}
82 82
 
83 83
 	protected function _reg_page_map_settings_stop() {
84
-		return '<p>' . __('These settings affect the single registration page maps only.', 'event_espresso') . '</p>';
84
+		return '<p>'.__('These settings affect the single registration page maps only.', 'event_espresso').'</p>';
85 85
 	}
86 86
 
87 87
 	protected function _event_list_map_stop() {
88
-		return '<p>' . __('These setting affect the event list page maps.', 'event_espresso') . '</p>';
88
+		return '<p>'.__('These setting affect the event list page maps.', 'event_espresso').'</p>';
89 89
 	}
90 90
 
91 91
 }
92 92
\ No newline at end of file
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,7 @@
 block discarded – undo
1 1
 <?php
2
-if (!defined('EVENT_ESPRESSO_VERSION') )
2
+if (!defined('EVENT_ESPRESSO_VERSION') ) {
3 3
 	exit('NO direct script access allowed');
4
+}
4 5
 
5 6
 /**
6 7
  * Event Espresso
Please login to merge, or discard this patch.
admin_pages/general_settings/help_tours/Templates_Help_Tour.class.php 3 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
 			10 => array(
40 40
 				'content' => $this->_start(),
41 41
 				),
42
-            15 => array(
42
+			15 => array(
43 43
 				'id' => 'display_status_banner_single',
44 44
 				'content' => $this->_default_status_banner_single_stop(),
45 45
 				'options' => array(
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
 					'tipAdjustmentX' => 15
112 112
 					)
113 113
 				),
114
-            90 => array(
114
+			90 => array(
115 115
 				'id' => 'reset_event_list_settings',
116 116
 				'content' => $this->_reset_event_list_settings_stop(),
117 117
 				'options' => array(
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
 					'tipAdjustmentX' => 15
121 121
 					)
122 122
 				),
123
-            100 => array(
123
+			100 => array(
124 124
 				'id' => 'display_status_banner',
125 125
 				'content' => $this->_display_status_banner_stop(),
126 126
 				'options' => array(
@@ -180,11 +180,11 @@  discard block
 block discarded – undo
180 180
 		return '<p>' . __('This is the website address (URL) for your event listings page.', 'event_espresso') . '</p>';
181 181
 	}
182 182
     
183
-    protected function _reset_event_list_settings_stop() {
183
+	protected function _reset_event_list_settings_stop() {
184 184
 		return '<p>' . __('Notice: When this option is set to yes, any customization from the above settings will be lost and your event list settings will be set to default.', 'event_espresso') . '</p>';
185 185
 	}
186 186
     
187
-    protected function _display_status_banner_stop() {
187
+	protected function _display_status_banner_stop() {
188 188
 		return '<p>' . __('Specify whether event status banners should be shown next to the title on the event list page.', 'event_espresso') . '</p>';
189 189
 	}
190 190
 
Please login to merge, or discard this patch.
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if (!defined('EVENT_ESPRESSO_VERSION') )
2
+if ( ! defined('EVENT_ESPRESSO_VERSION'))
3 3
 	exit('NO direct script access allowed');
4 4
 
5 5
 /**
@@ -143,53 +143,53 @@  discard block
 block discarded – undo
143 143
 
144 144
 
145 145
 	protected function _start() {
146
-		$content = '<h3>' . __('Template Settings', 'event_espresso') . '</h3>';
147
-		$content .= '<p>' . __('This tour of the Templates Page will go over different areas of the screen to help you understand what they are used for.', 'event_espresso') . '</p>';
146
+		$content = '<h3>'.__('Template Settings', 'event_espresso').'</h3>';
147
+		$content .= '<p>'.__('This tour of the Templates Page will go over different areas of the screen to help you understand what they are used for.', 'event_espresso').'</p>';
148 148
 		return $content;
149 149
 	}
150 150
     
151 151
 	protected function _default_status_banner_single_stop() {
152
-		return '<p>' . __('Specify whether event status banners should be shown next to the title on the single event page.', 'event_espresso') . '</p>';
152
+		return '<p>'.__('Specify whether event status banners should be shown next to the title on the single event page.', 'event_espresso').'</p>';
153 153
 	}
154 154
 
155 155
 	protected function _default_view_stop() {
156
-		return '<p>' . __('Define how your basic event list will appear.', 'event_espresso') . '</p>';
156
+		return '<p>'.__('Define how your basic event list will appear.', 'event_espresso').'</p>';
157 157
 	}
158 158
 
159 159
 	protected function _event_list_grid_size_stop() {
160
-		return '<p>' . __('If you have selected grid view in the option above, then you can use these settings to change the size of the grids.', 'event_espresso') . '</p>';
160
+		return '<p>'.__('If you have selected grid view in the option above, then you can use these settings to change the size of the grids.', 'event_espresso').'</p>';
161 161
 	}
162 162
 
163 163
 	protected function _display_description_stop() {
164
-		return '<p>' . __('Specify whether descriptions be shown on the event list.', 'event_espresso') . '</p>';
164
+		return '<p>'.__('Specify whether descriptions be shown on the event list.', 'event_espresso').'</p>';
165 165
 	}
166 166
 
167 167
 	protected function _display_address_stop() {
168
-		return '<p>' . __('Specify whether  the venue address be displayed on the event list.', 'event_espresso') . '</p>';
168
+		return '<p>'.__('Specify whether  the venue address be displayed on the event list.', 'event_espresso').'</p>';
169 169
 	}
170 170
 
171 171
 	protected function _display_venue_stop() {
172
-		return '<p>' . __('Specify whether  the venue information be displayed on the event list.', 'event_espresso') . '</p>';
172
+		return '<p>'.__('Specify whether  the venue information be displayed on the event list.', 'event_espresso').'</p>';
173 173
 	}
174 174
 
175 175
 	protected function _display_expired_events_stop() {
176
-		return '<p>' . __('Should expired events be shown on the default event list.', 'event_espresso') . '</p>';
176
+		return '<p>'.__('Should expired events be shown on the default event list.', 'event_espresso').'</p>';
177 177
 	}
178 178
 	
179 179
 	protected function _event_listings_url_stop() {
180
-		return '<p>' . __('This is the website address (URL) for your event listings page.', 'event_espresso') . '</p>';
180
+		return '<p>'.__('This is the website address (URL) for your event listings page.', 'event_espresso').'</p>';
181 181
 	}
182 182
     
183 183
     protected function _reset_event_list_settings_stop() {
184
-		return '<p>' . __('Notice: When this option is set to yes, any customization from the above settings will be lost and your event list settings will be set to default.', 'event_espresso') . '</p>';
184
+		return '<p>'.__('Notice: When this option is set to yes, any customization from the above settings will be lost and your event list settings will be set to default.', 'event_espresso').'</p>';
185 185
 	}
186 186
     
187 187
     protected function _display_status_banner_stop() {
188
-		return '<p>' . __('Specify whether event status banners should be shown next to the title on the event list page.', 'event_espresso') . '</p>';
188
+		return '<p>'.__('Specify whether event status banners should be shown next to the title on the event list page.', 'event_espresso').'</p>';
189 189
 	}
190 190
 
191 191
 	protected function _display_address_in_reg_form_stop() {
192
-		return '<p>' . __('Specify whether the address for a venue be shown on the single registration page.', 'event_espresso') . '</p>';
192
+		return '<p>'.__('Specify whether the address for a venue be shown on the single registration page.', 'event_espresso').'</p>';
193 193
 	}
194 194
 
195 195
 }
196 196
\ No newline at end of file
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,7 @@
 block discarded – undo
1 1
 <?php
2
-if (!defined('EVENT_ESPRESSO_VERSION') )
2
+if (!defined('EVENT_ESPRESSO_VERSION') ) {
3 3
 	exit('NO direct script access allowed');
4
+}
4 5
 
5 6
 /**
6 7
  * Event Espresso
Please login to merge, or discard this patch.
registration_form/templates/questions_main_meta_box.template.php 2 patches
Spacing   +47 added lines, -47 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
 		<tbody>
22 22
 			<tr>
23 23
 				<th>
24
-					<label for="QST_display_text"><?php echo $fields['QST_display_text']->get_nicename();?></label> <?php echo EEH_Template::get_help_tab_link('question_text_info');?>
24
+					<label for="QST_display_text"><?php echo $fields['QST_display_text']->get_nicename(); ?></label> <?php echo EEH_Template::get_help_tab_link('question_text_info'); ?>
25 25
 				</th>
26 26
 				<td>
27 27
 					<input type="text" class="regular-text" id="QST_display_text" name="QST_display_text" value="<?php $question->f('QST_display_text')?>"/>
@@ -31,23 +31,23 @@  discard block
 block discarded – undo
31 31
 
32 32
 			<tr>
33 33
 				<th>
34
-					<label for="QST_admin_label"><?php echo $fields['QST_admin_label']->get_nicename();?></label> <?php echo EEH_Template::get_help_tab_link('question_label_info');?>
34
+					<label for="QST_admin_label"><?php echo $fields['QST_admin_label']->get_nicename(); ?></label> <?php echo EEH_Template::get_help_tab_link('question_label_info'); ?>
35 35
 				</th>
36 36
 				<td>
37 37
 					<?php
38
-						$disabled = ! empty( $QST_system ) ? ' disabled="disabled"' : '';
39
-						$id =  ! empty( $QST_system ) ? '_disabled' : '';
38
+						$disabled = ! empty($QST_system) ? ' disabled="disabled"' : '';
39
+						$id = ! empty($QST_system) ? '_disabled' : '';
40 40
 					?>
41 41
 					<input type="text" class="regular-text" id="QST_admin_label<?php echo $id?>" name="QST_admin_label<?php echo $id?>" value="<?php $question->f('QST_admin_label')?>"<?php echo $disabled?>/>
42 42
 					<input class="QST_order" type="hidden" id="QST_order<?php echo $id; ?>" name = "QST_order<?php echo $id; ?>" value="<?php echo $question->get('QST_order'); ?>" />
43
-					<?php if ( ! empty( $QST_system )) { ?>
43
+					<?php if ( ! empty($QST_system)) { ?>
44 44
 						<input type="hidden"  id="QST_admin_label" name="QST_admin_label" value="<?php echo $question->admin_label()?>"/>
45 45
 					<?php } ?>
46 46
 					<br/>
47 47
 					<p class="description">
48
-					<?php if ( ! empty( $QST_system )) { ?>
48
+					<?php if ( ! empty($QST_system)) { ?>
49 49
 					<span class="description" style="color:#D54E21;">
50
-						<?php _e('System question! This field cannot be changed.','event_espresso')?>
50
+						<?php _e('System question! This field cannot be changed.', 'event_espresso')?>
51 51
 					</span>
52 52
 					<?php } ?>
53 53
 
@@ -57,21 +57,21 @@  discard block
 block discarded – undo
57 57
 
58 58
 			<tr>
59 59
 				<th>
60
-					<label for="QST_admin_only"><?php echo $fields['QST_admin_only']->get_nicename();?></label> <?php echo EEH_Template::get_help_tab_link('question_admin_only_info');?>
60
+					<label for="QST_admin_only"><?php echo $fields['QST_admin_only']->get_nicename(); ?></label> <?php echo EEH_Template::get_help_tab_link('question_admin_only_info'); ?>
61 61
 				</th>
62 62
 				<td>
63 63
 					<?php
64
-						$disabled = ! empty( $QST_system ) ? ' disabled="disabled"' : '';
65
-						$id =  ! empty( $QST_system ) ? '_disabled' : '';
64
+						$disabled = ! empty($QST_system) ? ' disabled="disabled"' : '';
65
+						$id = ! empty($QST_system) ? '_disabled' : '';
66 66
 						$admin_only = $question->get('QST_admin_only');
67
-						$checked = !empty( $admin_only ) ? ' checked="checked"' : '';
67
+						$checked = ! empty($admin_only) ? ' checked="checked"' : '';
68 68
 					?>
69 69
 					<input class="QST_admin_only" type="checkbox" id="QST_admin_only<?php echo $id; ?>" name = "QST_admin_only<?php echo $id; ?>" value="1"<?php echo $disabled; echo $checked; ?>/>
70 70
 					<br/>
71 71
 					<p class="description">
72
-					<?php if ( ! empty( $QST_system )) { ?>
72
+					<?php if ( ! empty($QST_system)) { ?>
73 73
 					<span class="description" style="color:#D54E21;">
74
-						<?php _e('System question! This field cannot be changed.','event_espresso')?>
74
+						<?php _e('System question! This field cannot be changed.', 'event_espresso')?>
75 75
 					</span>
76 76
 					<?php } ?>
77 77
 
@@ -81,22 +81,22 @@  discard block
 block discarded – undo
81 81
 
82 82
 			<tr>
83 83
 				<th>
84
-					<label for="QST_type"><?php echo $fields['QST_type']->get_nicename();?></label> <?php echo EEH_Template::get_help_tab_link('question_type_info');?>
84
+					<label for="QST_type"><?php echo $fields['QST_type']->get_nicename(); ?></label> <?php echo EEH_Template::get_help_tab_link('question_type_info'); ?>
85 85
 				</th>
86 86
 				<td>
87 87
 					<?php
88
-						$disabled = ! empty( $QST_system ) ? ' disabled="disabled"' : '';
89
-						$id =  ! empty( $QST_system ) ? '_disabled' : '';
88
+						$disabled = ! empty($QST_system) ? ' disabled="disabled"' : '';
89
+						$id = ! empty($QST_system) ? '_disabled' : '';
90 90
 						$disabled = $has_answers ? ' disabled="disabled"' : $disabled;
91 91
 						$id = $has_answers ? ' _disabled' : $id;
92
-						echo EEH_Form_Fields::select_input( 'QST_type' . $id, $question_types, $question->type(), 'id="QST_type' . $id . '"' . $disabled );
93
-						if ( ! empty( $QST_system ) || $has_answers ) { ?>
92
+						echo EEH_Form_Fields::select_input('QST_type'.$id, $question_types, $question->type(), 'id="QST_type'.$id.'"'.$disabled);
93
+						if ( ! empty($QST_system) || $has_answers) { ?>
94 94
 							<input type="hidden"  id="QST_type" name="QST_type" value="<?php echo $question->type()?>"/>
95 95
 							<p><span class="description" style="color:#D54E21;">
96
-								<?php if ( $has_answers ) : ?>
97
-									<?php _e('This field cannot be changed because there are currently answers for this question in the database.','event_espresso')?>
96
+								<?php if ($has_answers) : ?>
97
+									<?php _e('This field cannot be changed because there are currently answers for this question in the database.', 'event_espresso')?>
98 98
 								<?php else : ?>
99
-									<?php _e('System question! This field cannot be changed.','event_espresso')?>
99
+									<?php _e('System question! This field cannot be changed.', 'event_espresso')?>
100 100
 								<?php endif; ?>
101 101
 							</span></p>
102 102
 					<?php } ?>
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
 			<tr id="question_options">
110 110
 				<th>
111 111
 					<label>
112
-						<?php _e('Answer Options','event_espresso')?>
112
+						<?php _e('Answer Options', 'event_espresso')?>
113 113
 					</label>
114 114
 				</th>
115 115
 				<td>
@@ -118,10 +118,10 @@  discard block
 block discarded – undo
118 118
 						<thead>
119 119
 							<tr>
120 120
 								<th class="option-value-header">
121
-									<?php _e('Value','event_espresso')?>
121
+									<?php _e('Value', 'event_espresso')?>
122 122
 								</th>
123 123
 								<th class="option-desc-header">
124
-									<?php _e('Description (optional, only shown on registration form)','event_espresso')?>
124
+									<?php _e('Description (optional, only shown on registration form)', 'event_espresso')?>
125 125
 								</th>
126 126
 								<th>
127 127
 								</th>
@@ -144,18 +144,18 @@  discard block
 block discarded – undo
144 144
 							</tr>
145 145
 
146 146
 							<?php
147
-							$count=0;
147
+							$count = 0;
148 148
 							$question_options = $question->options();
149
-							if ( ! empty( $question_options )) {
150
-								foreach( $question_options as $option_id => $option ) {
151
-									$disabled =  $has_answers ? ' disabled="disabled"' : '';
149
+							if ( ! empty($question_options)) {
150
+								foreach ($question_options as $option_id => $option) {
151
+									$disabled = $has_answers ? ' disabled="disabled"' : '';
152 152
 									$id = $has_answers ? '_disabled' : '';
153 153
 							?>
154 154
 								<tr class="question-option ee-options-sortable">
155 155
 									<td class="option-value-cell">
156
-										<input type="hidden" class="QSO_order" name="question_options<?php echo $id;?>[<?php echo $count; ?>][QSO_order]" value="<?php $count; ?>">
156
+										<input type="hidden" class="QSO_order" name="question_options<?php echo $id; ?>[<?php echo $count; ?>][QSO_order]" value="<?php $count; ?>">
157 157
 										<input type="text" class="option-value regular-text" name="question_options<?php echo $id; ?>[<?php echo $count?>][QSO_value]" value="<?php  $option->f('QSO_value')?>"<?php echo $disabled; ?>>
158
-										<?php if ( $has_answers ) : ?>
158
+										<?php if ($has_answers) : ?>
159 159
 											<input type="hidden" name="question_options[<?php echo $count; ?>][QSO_value]" value="<?php echo $option->f('QSO_value'); ?>" >
160 160
 										<?php endif; ?>
161 161
 									</td>
@@ -200,13 +200,13 @@  discard block
 block discarded – undo
200 200
 					</table>
201 201
 
202 202
 					<a id="new-question-option" class="button" style="margin:0 0 1em 3px;">
203
-						<?php _e('Add Another Answer Option','event_espresso')?>
203
+						<?php _e('Add Another Answer Option', 'event_espresso')?>
204 204
 					</a><br/>
205 205
 
206 206
 					<p class="description">
207
-						<?php _e('Answer Options are the choices that you give people to select from for RADIO_BTN, CHECKBOX or DROPDOWN questions. The Value is a simple key that will be saved to the database and the description is optional. Note that values CANNOT contain any HTML, but descriptions can.','event_espresso')?>
207
+						<?php _e('Answer Options are the choices that you give people to select from for RADIO_BTN, CHECKBOX or DROPDOWN questions. The Value is a simple key that will be saved to the database and the description is optional. Note that values CANNOT contain any HTML, but descriptions can.', 'event_espresso')?>
208 208
 					</p>
209
-					<?php if ( $has_answers ) : ?>
209
+					<?php if ($has_answers) : ?>
210 210
 					<p class="description" style="color:#D54E21;">
211 211
 							<?php _e('Answer values that are uneditable are this way because there are registrations in the database that have answers for this question.  If you need to correct a mistake, or edit an existing option value, then trash the existing one and create a new option with the changes.  This will ensure that the existing registrations that chose the original answer will preserve that answer.', 'event_espresso'); ?>
212 212
 					</p>
@@ -217,32 +217,32 @@  discard block
 block discarded – undo
217 217
 
218 218
 			<tr>
219 219
 				<th>
220
-					<label for="QST_required"><?php echo $fields['QST_required']->get_nicename();?></label> <?php echo EEH_Template::get_help_tab_link('required_question_info');?>
220
+					<label for="QST_required"><?php echo $fields['QST_required']->get_nicename(); ?></label> <?php echo EEH_Template::get_help_tab_link('required_question_info'); ?>
221 221
 				</th>
222 222
 				<td>
223 223
 					<?php
224
-					$system_required = array( 'fname', 'lname', 'email' );
225
-					$disabled = in_array( $QST_system, $system_required ) ? ' disabled="disabled"' : '';
224
+					$system_required = array('fname', 'lname', 'email');
225
+					$disabled = in_array($QST_system, $system_required) ? ' disabled="disabled"' : '';
226 226
 					$required_on = $question->get('QST_admin_only');
227 227
 					$show_required_msg = $required_on ? '' : ' display:none;';
228
-					$disabled = $required_on || ! empty( $disabled ) ? ' disabled="disabled"' : '';
229
-					$id =  ! empty( $disabled ) && in_array( $QST_system, $system_required) ? '_disabled' : '';
230
-					$requiredOptions=array(
231
-						array('text'=>'Optional','id'=>0),
232
-						array('text'=>'Required','id'=>1)
228
+					$disabled = $required_on || ! empty($disabled) ? ' disabled="disabled"' : '';
229
+					$id = ! empty($disabled) && in_array($QST_system, $system_required) ? '_disabled' : '';
230
+					$requiredOptions = array(
231
+						array('text'=>'Optional', 'id'=>0),
232
+						array('text'=>'Required', 'id'=>1)
233 233
 					);
234
-					echo EEH_Form_Fields::select_input('QST_required' . $id, $requiredOptions, $question->required(), 'id="QST_required' . $id . '"' . $disabled );
234
+					echo EEH_Form_Fields::select_input('QST_required'.$id, $requiredOptions, $question->required(), 'id="QST_required'.$id.'"'.$disabled);
235 235
 					?>
236 236
 						<p><span id="required_toggled_on" class="description" style="color:#D54E21;<?php echo $show_required_msg; ?>">
237
-						<?php _e('Required is set to optional, and this field is disabled, because the question is Admin-Only.','event_espresso')?>
237
+						<?php _e('Required is set to optional, and this field is disabled, because the question is Admin-Only.', 'event_espresso')?>
238 238
 						</span></p>
239 239
 						<p><span id="required_toggled_off" class="description" style="color:#D54E21; display: none;">
240
-							<?php _e('Required option field is no longer disabled because the question is not Admin-Only','event_espresso')?>
240
+							<?php _e('Required option field is no longer disabled because the question is not Admin-Only', 'event_espresso')?>
241 241
 						</span></p>
242
-					<?php if ( ! empty( $disabled ) && in_array( $QST_system, $system_required ) ) { ?>
242
+					<?php if ( ! empty($disabled) && in_array($QST_system, $system_required)) { ?>
243 243
 						<input type="hidden"  id="QST_required" name="QST_required" value="1"/>
244 244
 						<p><span class="description" style="color:#D54E21;">
245
-						<?php _e('System question! This field cannot be changed.','event_espresso')?>
245
+						<?php _e('System question! This field cannot be changed.', 'event_espresso')?>
246 246
 					</span></p>
247 247
 					<?php } ?>
248 248
 
@@ -251,7 +251,7 @@  discard block
 block discarded – undo
251 251
 
252 252
 			<tr>
253 253
 				<th>
254
-					<label for="QST_required_text"><?php _e('Required Text', 'event_espresso'); ?></label> <?php echo EEH_Template::get_help_tab_link('required_text_info');?>
254
+					<label for="QST_required_text"><?php _e('Required Text', 'event_espresso'); ?></label> <?php echo EEH_Template::get_help_tab_link('required_text_info'); ?>
255 255
 				</th>
256 256
 				<td>
257 257
 					<input type="text" class="regular-text" id="QST_required_text" name="QST_required_text" value="<?php  $question->f('QST_required_text')?>"/>
Please login to merge, or discard this patch.
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -95,9 +95,12 @@
 block discarded – undo
95 95
 							<p><span class="description" style="color:#D54E21;">
96 96
 								<?php if ( $has_answers ) : ?>
97 97
 									<?php _e('This field cannot be changed because there are currently answers for this question in the database.','event_espresso')?>
98
-								<?php else : ?>
98
+								<?php else {
99
+	: ?>
99 100
 									<?php _e('System question! This field cannot be changed.','event_espresso')?>
100
-								<?php endif; ?>
101
+								<?php endif;
102
+}
103
+?>
101 104
 							</span></p>
102 105
 					<?php } ?>
103 106
 
Please login to merge, or discard this patch.
registrations/templates/attendee_registrations_main_meta_box.template.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -5,42 +5,42 @@
 block discarded – undo
5 5
 		<table class="admin-primary-mbox-tbl">
6 6
 			<thead>
7 7
 				<tr>
8
-					<th class="jst-left"><?php _e( 'Event Name', 'event_espresso' );?></th>
9
-					<th class="jst-left"><?php _e( 'REG ID', 'event_espresso' );?></th>
10
-					<th class="jst-left"><?php _e( 'TXN ID', 'event_espresso' );?></th>
11
-					<th class="jst-left"><?php _e( 'Reg Code', 'event_espresso' );?></th>
12
-					<th class="jst-rght"><?php _e( 'Ticket Price', 'event_espresso' );?></th>
8
+					<th class="jst-left"><?php _e('Event Name', 'event_espresso'); ?></th>
9
+					<th class="jst-left"><?php _e('REG ID', 'event_espresso'); ?></th>
10
+					<th class="jst-left"><?php _e('TXN ID', 'event_espresso'); ?></th>
11
+					<th class="jst-left"><?php _e('Reg Code', 'event_espresso'); ?></th>
12
+					<th class="jst-rght"><?php _e('Ticket Price', 'event_espresso'); ?></th>
13 13
 				</tr>
14 14
 			</thead>
15 15
 			<tbody>
16
-			<?php foreach( $registrations as $registration ) : ?>
16
+			<?php foreach ($registrations as $registration) : ?>
17 17
 				<tr>
18 18
 					<td class="jst-left">
19 19
 					<?php
20
-						$event_url = add_query_arg( array( 'action' => 'edit', 'post' => $registration->event_ID() ), admin_url( 'admin.php?page=espresso_events' ));
21
-						echo EE_Registry::instance()->CAP->current_user_can( 'ee_edit_event', 'espresso_events_edit', $registration->event_ID() ) ?  '<a href="'. $event_url .'"  title="'. esc_attr__( 'Edit Event', 'event_espresso' ) .'">' . $registration->event_name() . '</a>' : $registration->event_name();
20
+						$event_url = add_query_arg(array('action' => 'edit', 'post' => $registration->event_ID()), admin_url('admin.php?page=espresso_events'));
21
+						echo EE_Registry::instance()->CAP->current_user_can('ee_edit_event', 'espresso_events_edit', $registration->event_ID()) ? '<a href="'.$event_url.'"  title="'.esc_attr__('Edit Event', 'event_espresso').'">'.$registration->event_name().'</a>' : $registration->event_name();
22 22
 					?>
23 23
 					</td>
24 24
 					<td class="jst-left">
25 25
 					<?php
26
-							$reg_url = EE_Admin_Page::add_query_args_and_nonce( array( 'action'=>'view_registration', '_REG_ID'=>$registration->ID() ), REG_ADMIN_URL );
27
-							echo EE_Registry::instance()->CAP->current_user_can( 'ee_read_registration', 'espresso_registrations_view_registration', $registration->ID() ) ? '
28
-							<a href="'.$reg_url.'" title="' . esc_attr__( 'View Registration Details', 'event_espresso' ) . '">' . sprintf( __( '
29
-								View Registration ', 'event_espresso'), $registration->ID() ) .
26
+							$reg_url = EE_Admin_Page::add_query_args_and_nonce(array('action'=>'view_registration', '_REG_ID'=>$registration->ID()), REG_ADMIN_URL);
27
+							echo EE_Registry::instance()->CAP->current_user_can('ee_read_registration', 'espresso_registrations_view_registration', $registration->ID()) ? '
28
+							<a href="'.$reg_url.'" title="'.esc_attr__('View Registration Details', 'event_espresso').'">'.sprintf(__('
29
+								View Registration ', 'event_espresso'), $registration->ID()).
30 30
 							'</a>' : '';
31 31
 					?>
32 32
 					</td>
33 33
 					<td class="jst-left">
34 34
 					<?php
35
-						$txn_url = EE_Admin_Page::add_query_args_and_nonce( array( 'action'=>'view_transaction', 'TXN_ID'=>$registration->transaction_ID() ), TXN_ADMIN_URL );
36
-						echo EE_Registry::instance()->CAP->current_user_can( 'ee_read_transaction', 'espresso_transactions_view_transaction' ) ? '
37
-						<a href="'.$txn_url.'" title="' . esc_attr__( 'View Transaction Details', 'event_espresso' ) . '">
38
-							View Transaction ' . $registration->transaction_ID() . '
35
+						$txn_url = EE_Admin_Page::add_query_args_and_nonce(array('action'=>'view_transaction', 'TXN_ID'=>$registration->transaction_ID()), TXN_ADMIN_URL);
36
+						echo EE_Registry::instance()->CAP->current_user_can('ee_read_transaction', 'espresso_transactions_view_transaction') ? '
37
+						<a href="'.$txn_url.'" title="'.esc_attr__('View Transaction Details', 'event_espresso').'">
38
+							View Transaction ' . $registration->transaction_ID().'
39 39
 						</a>' : '';
40 40
 					?>
41 41
 					</td>
42
-					<td class="jst-left"><?php echo $registration->reg_code();?></td>
43
-					<td class="jst-rght"><?php echo EEH_Template::format_currency( $registration->price_paid() );?></td>
42
+					<td class="jst-left"><?php echo $registration->reg_code(); ?></td>
43
+					<td class="jst-rght"><?php echo EEH_Template::format_currency($registration->price_paid()); ?></td>
44 44
 				</tr>
45 45
 			<?php endforeach; ?>
46 46
 			</tbody>
Please login to merge, or discard this patch.
admin_pages/registrations/templates/reg_admin_details_wrapper.template.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,21 +1,21 @@
 block discarded – undo
1 1
 		
2 2
 	<div class="wrap">
3 3
 	
4
-		<h3><?php echo __( 'Registration # ', 'event_espresso' ) . $reg_nmbr['value'];?></h3>
5
-		<h2><?php echo $reg_datetime['value'];?></h2>
6
-		<h2><?php echo __( 'Registration Status : ', 'event_espresso' );?><span class="<?php echo $reg_status['class'];?>"><?php echo $reg_status['value'];?></span></h2>
4
+		<h3><?php echo __('Registration # ', 'event_espresso').$reg_nmbr['value']; ?></h3>
5
+		<h2><?php echo $reg_datetime['value']; ?></h2>
6
+		<h2><?php echo __('Registration Status : ', 'event_espresso'); ?><span class="<?php echo $reg_status['class']; ?>"><?php echo $reg_status['value']; ?></span></h2>
7 7
 		
8 8
 		<?php echo $notices; ?>
9 9
 				
10 10
 	    <div id="poststuff" class="metabox-holder has-right-sidebar">
11 11
 				
12 12
 	        <div id="side-info-column" class="inner-sidebar">
13
-				<?php do_meta_boxes( $registrations_page, 'side', '' ); ?>
13
+				<?php do_meta_boxes($registrations_page, 'side', ''); ?>
14 14
 	        </div>
15 15
 			
16 16
 	        <div id="post-body" class="">					
17 17
 	            <div id="post-body-content" class="">		
18
-					<?php do_meta_boxes( $registrations_page, 'normal', '' ); ?>
18
+					<?php do_meta_boxes($registrations_page, 'normal', ''); ?>
19 19
 	           </div>
20 20
 	        </div>
21 21
 	        <br class="clear"/>
Please login to merge, or discard this patch.