Completed
Branch BUG-9482-password-protected-ve... (ea1952)
by
unknown
435:41 queued 420:32
created
public/template_tags.php 2 patches
Doc Comments   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
  * can_use_espresso_conditionals
148 148
  * tests whether the Espresso Conditional tags like is_espresso_event_single() can be called
149 149
  *
150
- * @param $conditional_tag
150
+ * @param string $conditional_tag
151 151
  * @return bool
152 152
  */
153 153
 function can_use_espresso_conditionals( $conditional_tag ) {
@@ -877,7 +877,7 @@  discard block
 block discarded – undo
877 877
 	/**
878 878
 	 * espresso_event_venues
879 879
 	 *
880
-	 * @return array  all venues related to an event
880
+	 * @return EE_Venue[]  all venues related to an event
881 881
 	 */
882 882
 	function espresso_event_venues() {
883 883
 		EE_Registry::instance()->load_helper( 'Venue_View' );
@@ -912,7 +912,7 @@  discard block
 block discarded – undo
912 912
 	 *
913 913
 	 * @param int     $VNU_ID optional, the venue id to check.
914 914
 	 *
915
-	 * @return bool | null
915
+	 * @return null|boolean | null
916 916
 	 */
917 917
 	function espresso_is_venue_private( $VNU_ID = 0 ) {
918 918
 		EE_Registry::instance()->load_helper( 'Venue_View' );
@@ -927,7 +927,7 @@  discard block
 block discarded – undo
927 927
 	 * returns true or false if a venue is password protected or not
928 928
 	 *
929 929
 	 * @param int     $VNU_ID optional, the venue id to check.
930
-	 * @return string
930
+	 * @return boolean
931 931
 	 */
932 932
 	function espresso_venue_is_password_protected( $VNU_ID = 0 ) {
933 933
 		EE_Registry::instance()->load_helper( 'Venue_View' );
Please login to merge, or discard this patch.
Spacing   +311 added lines, -311 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 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 EEH_Event_View::the_event_date($date_format, $time_format, $EVT_ID);
459 459
 			return '';
460 460
 		}
461
-		return EEH_Event_View::the_event_date( $date_format, $time_format, $EVT_ID );
461
+		return 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,41 +479,41 @@  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();
499
-					$html .= '" class="ee-event-datetimes-li ee-event-datetimes-li-' . $datetime->get_active_status() . '">';
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();
499
+					$html .= '" class="ee-event-datetimes-li ee-event-datetimes-li-'.$datetime->get_active_status().'">';
500 500
 					$datetime_name = $datetime->name();
501
-					$html .= ! empty( $datetime_name ) ? '<strong>' . $datetime_name . '</strong>' : '';
502
-					$html .= ! empty( $datetime_name )  && $add_breaks ? '<br />' : '';
503
-					$html .= '<span class="dashicons dashicons-calendar"></span>' . $datetime->date_range( $date_format ) . '<br/>';
504
-					$html .= '<span class="dashicons dashicons-clock"></span>' . $datetime->time_range( $time_format );
501
+					$html .= ! empty($datetime_name) ? '<strong>'.$datetime_name.'</strong>' : '';
502
+					$html .= ! empty($datetime_name) && $add_breaks ? '<br />' : '';
503
+					$html .= '<span class="dashicons dashicons-calendar"></span>'.$datetime->date_range($date_format).'<br/>';
504
+					$html .= '<span class="dashicons dashicons-clock"></span>'.$datetime->time_range($time_format);
505 505
 					$datetime_description = $datetime->description();
506
-					$html .= ! empty( $datetime_description )  && $add_breaks ? '<br />' : '';
507
-					$html .= ! empty( $datetime_description ) ? ' - ' . $datetime_description : '';
508
-					$html = apply_filters( 'FHEE__espresso_list_of_event_dates__datetime_html', $html, $datetime );
506
+					$html .= ! empty($datetime_description) && $add_breaks ? '<br />' : '';
507
+					$html .= ! empty($datetime_description) ? ' - '.$datetime_description : '';
508
+					$html = apply_filters('FHEE__espresso_list_of_event_dates__datetime_html', $html, $datetime);
509 509
 					$html .= '</li>';
510 510
 				}
511 511
 			}
512 512
 			$html .= $format ? '</ul>' : '';
513 513
 		} else {
514
-			$html = $format ?  '<p><span class="dashicons dashicons-marker pink-text"></span>' . __( 'There are no upcoming dates for this event.', 'event_espresso' ) . '</p><br/>' : '';
514
+			$html = $format ? '<p><span class="dashicons dashicons-marker pink-text"></span>'.__('There are no upcoming dates for this event.', 'event_espresso').'</p><br/>' : '';
515 515
 		}
516
-		if ( $echo ) {
516
+		if ($echo) {
517 517
 			echo $html;
518 518
 			return '';
519 519
 		}
@@ -522,7 +522,7 @@  discard block
 block discarded – undo
522 522
 }
523 523
 
524 524
 
525
-if ( ! function_exists( 'espresso_event_end_date' )) {
525
+if ( ! function_exists('espresso_event_end_date')) {
526 526
 	/**
527 527
 	 * espresso_event_end_date
528 528
 	 * returns the last date for an event
@@ -533,21 +533,21 @@  discard block
 block discarded – undo
533 533
 	 * @param bool   $echo
534 534
 	 * @return string
535 535
 	 */
536
-	function espresso_event_end_date( $date_format = '', $time_format = '', $EVT_ID = FALSE, $echo = TRUE ) {
537
-		$date_format = ! empty( $date_format ) ? $date_format : get_option( 'date_format' );
538
-		$time_format = ! empty( $time_format ) ? $time_format : get_option( 'time_format' );
539
-		$date_format = apply_filters( 'FHEE__espresso_event_end_date__date_format', $date_format );
540
-		$time_format = apply_filters( 'FHEE__espresso_event_end_date__time_format', $time_format );
541
-		EE_Registry::instance()->load_helper( 'Event_View' );
542
-		if($echo){
543
-			echo EEH_Event_View::the_event_end_date( $date_format, $time_format, $EVT_ID );
536
+	function espresso_event_end_date($date_format = '', $time_format = '', $EVT_ID = FALSE, $echo = TRUE) {
537
+		$date_format = ! empty($date_format) ? $date_format : get_option('date_format');
538
+		$time_format = ! empty($time_format) ? $time_format : get_option('time_format');
539
+		$date_format = apply_filters('FHEE__espresso_event_end_date__date_format', $date_format);
540
+		$time_format = apply_filters('FHEE__espresso_event_end_date__time_format', $time_format);
541
+		EE_Registry::instance()->load_helper('Event_View');
542
+		if ($echo) {
543
+			echo EEH_Event_View::the_event_end_date($date_format, $time_format, $EVT_ID);
544 544
 			return '';
545 545
 		}
546
-		return EEH_Event_View::the_event_end_date( $date_format, $time_format, $EVT_ID );
546
+		return EEH_Event_View::the_event_end_date($date_format, $time_format, $EVT_ID);
547 547
 	}
548 548
 }
549 549
 
550
-if ( ! function_exists( 'espresso_event_date_range' )) {
550
+if ( ! function_exists('espresso_event_date_range')) {
551 551
 	/**
552 552
 	 * espresso_event_date_range
553 553
 	 * returns the first and last chronologically ordered dates for an event (if different)
@@ -560,32 +560,32 @@  discard block
 block discarded – undo
560 560
 	 * @param bool   $echo
561 561
 	 * @return string
562 562
 	 */
563
-	function espresso_event_date_range( $date_format = '', $time_format = '', $single_date_format = '', $single_time_format = '', $EVT_ID = FALSE, $echo = TRUE ) {
564
-		EE_Registry::instance()->load_helper( 'Event_View' );
563
+	function espresso_event_date_range($date_format = '', $time_format = '', $single_date_format = '', $single_time_format = '', $EVT_ID = FALSE, $echo = TRUE) {
564
+		EE_Registry::instance()->load_helper('Event_View');
565 565
 		// set and filter date and time formats when a range is returned
566
-		$date_format = ! empty( $date_format ) ? $date_format : get_option( 'date_format' );
567
-		$date_format = apply_filters( 'FHEE__espresso_event_date_range__date_format', $date_format );
566
+		$date_format = ! empty($date_format) ? $date_format : get_option('date_format');
567
+		$date_format = apply_filters('FHEE__espresso_event_date_range__date_format', $date_format);
568 568
 		// get the start and end date with NO time portion
569
-		$the_event_date = EEH_Event_View::the_earliest_event_date( $date_format, '', $EVT_ID );
570
-		$the_event_end_date = EEH_Event_View::the_latest_event_date( $date_format, '', $EVT_ID );
569
+		$the_event_date = EEH_Event_View::the_earliest_event_date($date_format, '', $EVT_ID);
570
+		$the_event_end_date = EEH_Event_View::the_latest_event_date($date_format, '', $EVT_ID);
571 571
 		// now we can determine if date range spans more than one day
572
-		if ( $the_event_date != $the_event_end_date ) {
573
-			$time_format = ! empty( $time_format ) ? $time_format : get_option( 'time_format' );
574
-			$time_format = apply_filters( 'FHEE__espresso_event_date_range__time_format', $time_format );
572
+		if ($the_event_date != $the_event_end_date) {
573
+			$time_format = ! empty($time_format) ? $time_format : get_option('time_format');
574
+			$time_format = apply_filters('FHEE__espresso_event_date_range__time_format', $time_format);
575 575
 			$html = sprintf(
576
-				__( '%1$s - %2$s', 'event_espresso' ),
577
-				EEH_Event_View::the_earliest_event_date( $date_format, $time_format, $EVT_ID ),
578
-				EEH_Event_View::the_latest_event_date( $date_format, $time_format, $EVT_ID )
576
+				__('%1$s - %2$s', 'event_espresso'),
577
+				EEH_Event_View::the_earliest_event_date($date_format, $time_format, $EVT_ID),
578
+				EEH_Event_View::the_latest_event_date($date_format, $time_format, $EVT_ID)
579 579
 			);
580 580
 		} else {
581 581
 			// set and filter date and time formats when only a single datetime is returned
582
-			$single_date_format = ! empty( $single_date_format ) ? $single_date_format : get_option( 'date_format' );
583
-			$single_time_format = ! empty( $single_time_format ) ? $single_time_format : get_option( 'time_format' );
584
-			$single_date_format = apply_filters( 'FHEE__espresso_event_date_range__single_date_format', $single_date_format );
585
-			$single_time_format = apply_filters( 'FHEE__espresso_event_date_range__single_time_format', $single_time_format );
586
-			$html = EEH_Event_View::the_earliest_event_date( $single_date_format, $single_time_format, $EVT_ID );
582
+			$single_date_format = ! empty($single_date_format) ? $single_date_format : get_option('date_format');
583
+			$single_time_format = ! empty($single_time_format) ? $single_time_format : get_option('time_format');
584
+			$single_date_format = apply_filters('FHEE__espresso_event_date_range__single_date_format', $single_date_format);
585
+			$single_time_format = apply_filters('FHEE__espresso_event_date_range__single_time_format', $single_time_format);
586
+			$html = EEH_Event_View::the_earliest_event_date($single_date_format, $single_time_format, $EVT_ID);
587 587
 		}
588
-		if ( $echo ) {
588
+		if ($echo) {
589 589
 			echo $html;
590 590
 			return '';
591 591
 		}
@@ -594,7 +594,7 @@  discard block
 block discarded – undo
594 594
 }
595 595
 
596 596
 
597
-if ( ! function_exists( 'espresso_event_date_as_calendar_page' )) {
597
+if ( ! function_exists('espresso_event_date_as_calendar_page')) {
598 598
 	/**
599 599
 	 * espresso_event_date_as_calendar_page
600 600
 	 * returns the primary date for an event, stylized to appear as the page of a calendar
@@ -602,16 +602,16 @@  discard block
 block discarded – undo
602 602
 	 * @param bool $EVT_ID
603 603
 	 * @return string
604 604
 	 */
605
-	function espresso_event_date_as_calendar_page( $EVT_ID = FALSE ) {
606
-		EE_Registry::instance()->load_helper( 'Event_View' );
607
-		EEH_Event_View::event_date_as_calendar_page( $EVT_ID );
605
+	function espresso_event_date_as_calendar_page($EVT_ID = FALSE) {
606
+		EE_Registry::instance()->load_helper('Event_View');
607
+		EEH_Event_View::event_date_as_calendar_page($EVT_ID);
608 608
 	}
609 609
 }
610 610
 
611 611
 
612 612
 
613 613
 
614
-if ( ! function_exists( 'espresso_event_link_url' )) {
614
+if ( ! function_exists('espresso_event_link_url')) {
615 615
 	/**
616 616
 	 * espresso_event_link_url
617 617
 	 *
@@ -619,19 +619,19 @@  discard block
 block discarded – undo
619 619
 	 * @param bool $echo
620 620
 	 * @return string
621 621
 	 */
622
-	function espresso_event_link_url( $EVT_ID = 0, $echo = TRUE ) {
623
-		EE_Registry::instance()->load_helper( 'Event_View' );
624
-		if ( $echo ) {
625
-			echo EEH_Event_View::event_link_url( $EVT_ID );
622
+	function espresso_event_link_url($EVT_ID = 0, $echo = TRUE) {
623
+		EE_Registry::instance()->load_helper('Event_View');
624
+		if ($echo) {
625
+			echo EEH_Event_View::event_link_url($EVT_ID);
626 626
 			return '';
627 627
 		}
628
-		return EEH_Event_View::event_link_url( $EVT_ID );
628
+		return EEH_Event_View::event_link_url($EVT_ID);
629 629
 	}
630 630
 }
631 631
 
632 632
 
633 633
 
634
-if ( ! function_exists( 'espresso_event_has_content_or_excerpt' )) {
634
+if ( ! function_exists('espresso_event_has_content_or_excerpt')) {
635 635
 	/**
636 636
 	 *    espresso_event_has_content_or_excerpt
637 637
 	 *
@@ -639,16 +639,16 @@  discard block
 block discarded – undo
639 639
 	 * @param bool $EVT_ID
640 640
 	 * @return    boolean
641 641
 	 */
642
-	function espresso_event_has_content_or_excerpt( $EVT_ID = FALSE ) {
643
-		EE_Registry::instance()->load_helper( 'Event_View' );
644
-		return EEH_Event_View::event_has_content_or_excerpt( $EVT_ID );
642
+	function espresso_event_has_content_or_excerpt($EVT_ID = FALSE) {
643
+		EE_Registry::instance()->load_helper('Event_View');
644
+		return EEH_Event_View::event_has_content_or_excerpt($EVT_ID);
645 645
 	}
646 646
 }
647 647
 
648 648
 
649 649
 
650 650
 
651
-if ( ! function_exists( 'espresso_event_content_or_excerpt' )) {
651
+if ( ! function_exists('espresso_event_content_or_excerpt')) {
652 652
 	/**
653 653
 	 * espresso_event_content_or_excerpt
654 654
 	 *
@@ -657,19 +657,19 @@  discard block
 block discarded – undo
657 657
 	 * @param bool $echo
658 658
 	 * @return string
659 659
 	 */
660
-	function espresso_event_content_or_excerpt( $num_words = 55, $more = NULL, $echo = TRUE ) {
661
-		EE_Registry::instance()->load_helper( 'Event_View' );
662
-		if ( $echo ) {
663
-			echo EEH_Event_View::event_content_or_excerpt( $num_words, $more );
660
+	function espresso_event_content_or_excerpt($num_words = 55, $more = NULL, $echo = TRUE) {
661
+		EE_Registry::instance()->load_helper('Event_View');
662
+		if ($echo) {
663
+			echo EEH_Event_View::event_content_or_excerpt($num_words, $more);
664 664
 			return '';
665 665
 		}
666
-		return EEH_Event_View::event_content_or_excerpt( $num_words, $more );
666
+		return EEH_Event_View::event_content_or_excerpt($num_words, $more);
667 667
 	}
668 668
 }
669 669
 
670 670
 
671 671
 
672
-if ( ! function_exists( 'espresso_event_phone' )) {
672
+if ( ! function_exists('espresso_event_phone')) {
673 673
 	/**
674 674
 	 * espresso_event_phone
675 675
 	 *
@@ -677,19 +677,19 @@  discard block
 block discarded – undo
677 677
 	 * @param bool $echo
678 678
 	 * @return string
679 679
 	 */
680
-	function espresso_event_phone( $EVT_ID = 0, $echo = TRUE ) {
681
-		EE_Registry::instance()->load_helper( 'Event_View' );
682
-		if ( $echo ) {
683
-			echo EEH_Event_View::event_phone( $EVT_ID );
680
+	function espresso_event_phone($EVT_ID = 0, $echo = TRUE) {
681
+		EE_Registry::instance()->load_helper('Event_View');
682
+		if ($echo) {
683
+			echo EEH_Event_View::event_phone($EVT_ID);
684 684
 			return '';
685 685
 		}
686
-		return EEH_Event_View::event_phone( $EVT_ID );
686
+		return EEH_Event_View::event_phone($EVT_ID);
687 687
 	}
688 688
 }
689 689
 
690 690
 
691 691
 
692
-if ( ! function_exists( 'espresso_edit_event_link' )) {
692
+if ( ! function_exists('espresso_edit_event_link')) {
693 693
 	/**
694 694
 	 * espresso_edit_event_link
695 695
 	 * returns a link to edit an event
@@ -698,41 +698,41 @@  discard block
 block discarded – undo
698 698
 	 * @param bool $echo
699 699
 	 * @return string
700 700
 	 */
701
-	function espresso_edit_event_link( $EVT_ID = 0, $echo = TRUE ) {
702
-		EE_Registry::instance()->load_helper( 'Event_View' );
703
-		if ( $echo ) {
704
-			echo EEH_Event_View::edit_event_link( $EVT_ID );
701
+	function espresso_edit_event_link($EVT_ID = 0, $echo = TRUE) {
702
+		EE_Registry::instance()->load_helper('Event_View');
703
+		if ($echo) {
704
+			echo EEH_Event_View::edit_event_link($EVT_ID);
705 705
 			return '';
706 706
 		}
707
-		return EEH_Event_View::edit_event_link( $EVT_ID );
707
+		return EEH_Event_View::edit_event_link($EVT_ID);
708 708
 	}
709 709
 }
710 710
 
711 711
 
712
-if ( ! function_exists( 'espresso_organization_name' )) {
712
+if ( ! function_exists('espresso_organization_name')) {
713 713
 	/**
714 714
 	 * espresso_organization_name
715 715
 	 * @param bool $echo
716 716
 	 * @return string
717 717
 	 */
718 718
 	function espresso_organization_name($echo = TRUE) {
719
-		if($echo){
720
-			echo EE_Registry::instance()->CFG->organization->get_pretty( 'name' );
719
+		if ($echo) {
720
+			echo EE_Registry::instance()->CFG->organization->get_pretty('name');
721 721
 			return '';
722 722
 		}
723
-		return EE_Registry::instance()->CFG->organization->get_pretty( 'name' );
723
+		return EE_Registry::instance()->CFG->organization->get_pretty('name');
724 724
 	}
725 725
 }
726 726
 
727
-if ( ! function_exists( 'espresso_organization_address' )) {
727
+if ( ! function_exists('espresso_organization_address')) {
728 728
 	/**
729 729
 	 * espresso_organization_address
730 730
 	 * @param string $type
731 731
 	 * @return string
732 732
 	 */
733
-	function espresso_organization_address( $type = 'inline' ) {
734
-		if ( EE_Registry::instance()->CFG->organization instanceof EE_Organization_Config ) {
735
-			EE_Registry::instance()->load_helper( 'Formatter' );
733
+	function espresso_organization_address($type = 'inline') {
734
+		if (EE_Registry::instance()->CFG->organization instanceof EE_Organization_Config) {
735
+			EE_Registry::instance()->load_helper('Formatter');
736 736
 			$address = new EE_Generic_Address(
737 737
 				EE_Registry::instance()->CFG->organization->address_1,
738 738
 				EE_Registry::instance()->CFG->organization->address_2,
@@ -741,129 +741,129 @@  discard block
 block discarded – undo
741 741
 				EE_Registry::instance()->CFG->organization->zip,
742 742
 				EE_Registry::instance()->CFG->organization->CNT_ISO
743 743
 			);
744
-			return EEH_Address::format( $address, $type );
744
+			return EEH_Address::format($address, $type);
745 745
 		}
746 746
 		return '';
747 747
 	}
748 748
 }
749 749
 
750
-if ( ! function_exists( 'espresso_organization_email' )) {
750
+if ( ! function_exists('espresso_organization_email')) {
751 751
 	/**
752 752
 	 * espresso_organization_email
753 753
 	 * @param bool $echo
754 754
 	 * @return string
755 755
 	 */
756
-	function espresso_organization_email( $echo = TRUE ) {
757
-		if($echo){
758
-			echo EE_Registry::instance()->CFG->organization->get_pretty( 'email' );
756
+	function espresso_organization_email($echo = TRUE) {
757
+		if ($echo) {
758
+			echo EE_Registry::instance()->CFG->organization->get_pretty('email');
759 759
 			return '';
760 760
 		}
761
-		return EE_Registry::instance()->CFG->organization->get_pretty( 'email' );
761
+		return EE_Registry::instance()->CFG->organization->get_pretty('email');
762 762
 	}
763 763
 }
764 764
 
765
-if ( ! function_exists( 'espresso_organization_logo_url' )) {
765
+if ( ! function_exists('espresso_organization_logo_url')) {
766 766
 	/**
767 767
 	 * espresso_organization_logo_url
768 768
 	 * @param bool $echo
769 769
 	 * @return string
770 770
 	 */
771
-	function espresso_organization_logo_url( $echo = TRUE ) {
772
-		if($echo){
773
-			echo EE_Registry::instance()->CFG->organization->get_pretty( 'logo_url' );
771
+	function espresso_organization_logo_url($echo = TRUE) {
772
+		if ($echo) {
773
+			echo EE_Registry::instance()->CFG->organization->get_pretty('logo_url');
774 774
 			return '';
775 775
 		}
776
-		return EE_Registry::instance()->CFG->organization->get_pretty( 'logo_url' );
776
+		return EE_Registry::instance()->CFG->organization->get_pretty('logo_url');
777 777
 	}
778 778
 }
779 779
 
780
-if ( ! function_exists( 'espresso_organization_facebook' )) {
780
+if ( ! function_exists('espresso_organization_facebook')) {
781 781
 	/**
782 782
 	 * espresso_organization_facebook
783 783
 	 * @param bool $echo
784 784
 	 * @return string
785 785
 	 */
786
-	function espresso_organization_facebook( $echo = TRUE ) {
787
-		if($echo){
788
-			echo EE_Registry::instance()->CFG->organization->get_pretty( 'facebook' );
786
+	function espresso_organization_facebook($echo = TRUE) {
787
+		if ($echo) {
788
+			echo EE_Registry::instance()->CFG->organization->get_pretty('facebook');
789 789
 			return '';
790 790
 		}
791
-		return EE_Registry::instance()->CFG->organization->get_pretty( 'facebook' );
791
+		return EE_Registry::instance()->CFG->organization->get_pretty('facebook');
792 792
 	}
793 793
 }
794 794
 
795
-if ( ! function_exists( 'espresso_organization_twitter' )) {
795
+if ( ! function_exists('espresso_organization_twitter')) {
796 796
 	/**
797 797
 	 * espresso_organization_twitter
798 798
 	 * @param bool $echo
799 799
 	 * @return string
800 800
 	 */
801
-	function espresso_organization_twitter( $echo = TRUE ) {
802
-		if($echo){
803
-			echo EE_Registry::instance()->CFG->organization->get_pretty( 'twitter' );
801
+	function espresso_organization_twitter($echo = TRUE) {
802
+		if ($echo) {
803
+			echo EE_Registry::instance()->CFG->organization->get_pretty('twitter');
804 804
 			return '';
805 805
 		}
806
-		return EE_Registry::instance()->CFG->organization->get_pretty( 'twitter' );
806
+		return EE_Registry::instance()->CFG->organization->get_pretty('twitter');
807 807
 	}
808 808
 }
809 809
 
810
-if ( ! function_exists( 'espresso_organization_linkedin' )) {
810
+if ( ! function_exists('espresso_organization_linkedin')) {
811 811
 	/**
812 812
 	 * espresso_organization_linkedin
813 813
 	 * @param bool $echo
814 814
 	 * @return string
815 815
 	 */
816
-	function espresso_organization_linkedin( $echo = TRUE ) {
817
-		if($echo){
818
-			echo EE_Registry::instance()->CFG->organization->get_pretty( 'linkedin' );
816
+	function espresso_organization_linkedin($echo = TRUE) {
817
+		if ($echo) {
818
+			echo EE_Registry::instance()->CFG->organization->get_pretty('linkedin');
819 819
 			return '';
820 820
 		}
821
-		return EE_Registry::instance()->CFG->organization->get_pretty( 'linkedin' );
821
+		return EE_Registry::instance()->CFG->organization->get_pretty('linkedin');
822 822
 	}
823 823
 }
824 824
 
825
-if ( ! function_exists( 'espresso_organization_pinterest' )) {
825
+if ( ! function_exists('espresso_organization_pinterest')) {
826 826
 	/**
827 827
 	 * espresso_organization_pinterest
828 828
 	 * @param bool $echo
829 829
 	 * @return string
830 830
 	 */
831
-	function espresso_organization_pinterest( $echo = TRUE ) {
832
-		if($echo){
833
-			echo EE_Registry::instance()->CFG->organization->get_pretty( 'pinterest' );
831
+	function espresso_organization_pinterest($echo = TRUE) {
832
+		if ($echo) {
833
+			echo EE_Registry::instance()->CFG->organization->get_pretty('pinterest');
834 834
 			return '';
835 835
 		}
836
-		return EE_Registry::instance()->CFG->organization->get_pretty( 'pinterest' );
836
+		return EE_Registry::instance()->CFG->organization->get_pretty('pinterest');
837 837
 	}
838 838
 }
839 839
 
840
-if ( ! function_exists( 'espresso_organization_google' )) {
840
+if ( ! function_exists('espresso_organization_google')) {
841 841
 	/**
842 842
 	 * espresso_organization_google
843 843
 	 * @param bool $echo
844 844
 	 * @return string
845 845
 	 */
846
-	function espresso_organization_google( $echo = TRUE ) {
847
-		if($echo){
848
-			echo EE_Registry::instance()->CFG->organization->get_pretty( 'google' );
846
+	function espresso_organization_google($echo = TRUE) {
847
+		if ($echo) {
848
+			echo EE_Registry::instance()->CFG->organization->get_pretty('google');
849 849
 			return '';
850 850
 		}
851
-		return EE_Registry::instance()->CFG->organization->get_pretty( 'google' );
851
+		return EE_Registry::instance()->CFG->organization->get_pretty('google');
852 852
 	}
853 853
 }
854 854
 
855
-if ( ! function_exists( 'espresso_organization_instagram' )) {
855
+if ( ! function_exists('espresso_organization_instagram')) {
856 856
 	/**
857 857
 	 * espresso_organization_instagram
858 858
 	 * @param bool $echo
859 859
 	 * @return string
860 860
 	 */
861
-	function espresso_organization_instagram( $echo = TRUE ) {
862
-		if($echo){
863
-			echo EE_Registry::instance()->CFG->organization->get_pretty( 'instagram' );
861
+	function espresso_organization_instagram($echo = TRUE) {
862
+		if ($echo) {
863
+			echo EE_Registry::instance()->CFG->organization->get_pretty('instagram');
864 864
 			return '';
865 865
 		}
866
-		return EE_Registry::instance()->CFG->organization->get_pretty( 'instagram' );
866
+		return EE_Registry::instance()->CFG->organization->get_pretty('instagram');
867 867
 	}
868 868
 }
869 869
 
@@ -873,14 +873,14 @@  discard block
 block discarded – undo
873 873
 
874 874
 
875 875
 
876
-if ( ! function_exists( 'espresso_event_venues' )) {
876
+if ( ! function_exists('espresso_event_venues')) {
877 877
 	/**
878 878
 	 * espresso_event_venues
879 879
 	 *
880 880
 	 * @return array  all venues related to an event
881 881
 	 */
882 882
 	function espresso_event_venues() {
883
-		EE_Registry::instance()->load_helper( 'Venue_View' );
883
+		EE_Registry::instance()->load_helper('Venue_View');
884 884
 		return EEH_Venue_View::get_event_venues();
885 885
 	}
886 886
 }
@@ -888,7 +888,7 @@  discard block
 block discarded – undo
888 888
 
889 889
 
890 890
 
891
-if ( ! function_exists( 'espresso_venue_id' )) {
891
+if ( ! function_exists('espresso_venue_id')) {
892 892
 	/**
893 893
 	 *    espresso_venue_name
894 894
 	 *
@@ -896,16 +896,16 @@  discard block
 block discarded – undo
896 896
 	 * @param     int $EVT_ID
897 897
 	 * @return    string
898 898
 	 */
899
-	function espresso_venue_id( $EVT_ID = 0 ) {
900
-		EE_Registry::instance()->load_helper( 'Venue_View' );
901
-		$venue = EEH_Venue_View::get_venue( $EVT_ID );
899
+	function espresso_venue_id($EVT_ID = 0) {
900
+		EE_Registry::instance()->load_helper('Venue_View');
901
+		$venue = EEH_Venue_View::get_venue($EVT_ID);
902 902
 		return $venue instanceof EE_Venue ? $venue->ID() : 0;
903 903
 	}
904 904
 }
905 905
 
906 906
 
907 907
 
908
-if ( ! function_exists( 'espresso_is_venue_private' ) ) {
908
+if ( ! function_exists('espresso_is_venue_private')) {
909 909
 	/**
910 910
 	 * Return whether a venue is private or not.
911 911
 	 * @see EEH_Venue_View::get_venue() for more info on expected return results.
@@ -914,46 +914,46 @@  discard block
 block discarded – undo
914 914
 	 *
915 915
 	 * @return bool | null
916 916
 	 */
917
-	function espresso_is_venue_private( $VNU_ID = 0 ) {
918
-		EE_Registry::instance()->load_helper( 'Venue_View' );
919
-		return EEH_Venue_View::is_venue_private( $VNU_ID );
917
+	function espresso_is_venue_private($VNU_ID = 0) {
918
+		EE_Registry::instance()->load_helper('Venue_View');
919
+		return EEH_Venue_View::is_venue_private($VNU_ID);
920 920
 	}
921 921
 }
922 922
 
923 923
 
924 924
 
925
-if ( ! function_exists( 'espresso_venue_is_password_protected' ) ) {
925
+if ( ! function_exists('espresso_venue_is_password_protected')) {
926 926
 	/**
927 927
 	 * returns true or false if a venue is password protected or not
928 928
 	 *
929 929
 	 * @param int     $VNU_ID optional, the venue id to check.
930 930
 	 * @return string
931 931
 	 */
932
-	function espresso_venue_is_password_protected( $VNU_ID = 0 ) {
933
-		EE_Registry::instance()->load_helper( 'Venue_View' );
934
-		return EEH_Venue_View::is_venue_password_protected( $VNU_ID );
932
+	function espresso_venue_is_password_protected($VNU_ID = 0) {
933
+		EE_Registry::instance()->load_helper('Venue_View');
934
+		return EEH_Venue_View::is_venue_password_protected($VNU_ID);
935 935
 	}
936 936
 }
937 937
 
938 938
 
939 939
 
940
-if ( ! function_exists( 'espresso_password_protected_venue_form' ) ) {
940
+if ( ! function_exists('espresso_password_protected_venue_form')) {
941 941
 	/**
942 942
 	 * Returns a password form if venue is password protected.
943 943
 	 *
944 944
 	 * @param int     $VNU_ID optional, the venue id to check.
945 945
 	 * @return string
946 946
 	 */
947
-	function espresso_password_protected_venue_form( $VNU_ID = 0 ) {
948
-		EE_Registry::instance()->load_helper( 'Venue_View' );
949
-		return EEH_Venue_View::password_protected_venue_form( $VNU_ID );
947
+	function espresso_password_protected_venue_form($VNU_ID = 0) {
948
+		EE_Registry::instance()->load_helper('Venue_View');
949
+		return EEH_Venue_View::password_protected_venue_form($VNU_ID);
950 950
 	}
951 951
 }
952 952
 
953 953
 
954 954
 
955 955
 
956
-if ( ! function_exists( 'espresso_venue_name' )) {
956
+if ( ! function_exists('espresso_venue_name')) {
957 957
 	/**
958 958
 	 *    espresso_venue_name
959 959
 	 *
@@ -963,20 +963,20 @@  discard block
 block discarded – undo
963 963
 	 * @param bool   $echo
964 964
 	 * @return    string
965 965
 	 */
966
-	function espresso_venue_name( $VNU_ID = 0, $link_to = 'details', $echo = TRUE ) {
967
-		EE_Registry::instance()->load_helper( 'Venue_View' );
968
-		if($echo){
969
-			echo EEH_Venue_View::venue_name( $link_to, $VNU_ID );
966
+	function espresso_venue_name($VNU_ID = 0, $link_to = 'details', $echo = TRUE) {
967
+		EE_Registry::instance()->load_helper('Venue_View');
968
+		if ($echo) {
969
+			echo EEH_Venue_View::venue_name($link_to, $VNU_ID);
970 970
 			return '';
971 971
 		}
972
-		return EEH_Venue_View::venue_name( $link_to, $VNU_ID );
972
+		return EEH_Venue_View::venue_name($link_to, $VNU_ID);
973 973
 	}
974 974
 }
975 975
 
976 976
 
977 977
 
978 978
 
979
-if ( ! function_exists( 'espresso_venue_link' )) {
979
+if ( ! function_exists('espresso_venue_link')) {
980 980
 	/**
981 981
 	 * 	espresso_venue_link
982 982
 	 *
@@ -985,15 +985,15 @@  discard block
 block discarded – undo
985 985
 	 *  @param 	string 	$text
986 986
 	 *  @return 	string
987 987
 	 */
988
-	function espresso_venue_link( $VNU_ID = 0, $text = '' ) {
989
-		EE_Registry::instance()->load_helper( 'Venue_View' );
990
-		return EEH_Venue_View::venue_details_link( $VNU_ID, $text );
988
+	function espresso_venue_link($VNU_ID = 0, $text = '') {
989
+		EE_Registry::instance()->load_helper('Venue_View');
990
+		return EEH_Venue_View::venue_details_link($VNU_ID, $text);
991 991
 	}
992 992
 }
993 993
 
994 994
 
995 995
 
996
-if ( ! function_exists( 'espresso_venue_description' )) {
996
+if ( ! function_exists('espresso_venue_description')) {
997 997
 	/**
998 998
 	 *    espresso_venue_description
999 999
 	 *
@@ -1002,18 +1002,18 @@  discard block
 block discarded – undo
1002 1002
 	 * @param bool $echo
1003 1003
 	 * @return    string
1004 1004
 	 */
1005
-	function espresso_venue_description( $VNU_ID = FALSE, $echo = TRUE ) {
1006
-		EE_Registry::instance()->load_helper( 'Venue_View' );
1007
-		if($echo){
1008
-			echo EEH_Venue_View::venue_description( $VNU_ID );
1005
+	function espresso_venue_description($VNU_ID = FALSE, $echo = TRUE) {
1006
+		EE_Registry::instance()->load_helper('Venue_View');
1007
+		if ($echo) {
1008
+			echo EEH_Venue_View::venue_description($VNU_ID);
1009 1009
 			return '';
1010 1010
 		}
1011
-		return EEH_Venue_View::venue_description( $VNU_ID );
1011
+		return EEH_Venue_View::venue_description($VNU_ID);
1012 1012
 	}
1013 1013
 }
1014 1014
 
1015 1015
 
1016
-if ( ! function_exists( 'espresso_venue_excerpt' )) {
1016
+if ( ! function_exists('espresso_venue_excerpt')) {
1017 1017
 	/**
1018 1018
 	 *    espresso_venue_excerpt
1019 1019
 	 *
@@ -1022,19 +1022,19 @@  discard block
 block discarded – undo
1022 1022
 	 * @param bool $echo
1023 1023
 	 * @return    string
1024 1024
 	 */
1025
-	function espresso_venue_excerpt( $VNU_ID = 0,  $echo = TRUE ) {
1026
-		EE_Registry::instance()->load_helper( 'Venue_View' );
1027
-		if ( $echo ) {
1028
-			echo EEH_Venue_View::venue_excerpt( $VNU_ID );
1025
+	function espresso_venue_excerpt($VNU_ID = 0, $echo = TRUE) {
1026
+		EE_Registry::instance()->load_helper('Venue_View');
1027
+		if ($echo) {
1028
+			echo EEH_Venue_View::venue_excerpt($VNU_ID);
1029 1029
 			return '';
1030 1030
 		}
1031
-		return EEH_Venue_View::venue_excerpt( $VNU_ID );
1031
+		return EEH_Venue_View::venue_excerpt($VNU_ID);
1032 1032
 	}
1033 1033
 }
1034 1034
 
1035 1035
 
1036 1036
 
1037
-if ( ! function_exists( 'espresso_venue_categories' )) {
1037
+if ( ! function_exists('espresso_venue_categories')) {
1038 1038
 	/**
1039 1039
 	 * espresso_venue_categories
1040 1040
 	 * returns the terms associated with a venue
@@ -1044,18 +1044,18 @@  discard block
 block discarded – undo
1044 1044
 	 * @param bool $echo
1045 1045
 	 * @return string
1046 1046
 	 */
1047
-	function espresso_venue_categories( $VNU_ID = 0, $hide_uncategorized = TRUE,  $echo = TRUE ) {
1048
-		EE_Registry::instance()->load_helper( 'Venue_View' );
1049
-		if ( $echo ) {
1050
-			echo EEH_Venue_View::venue_categories( $VNU_ID, $hide_uncategorized );
1047
+	function espresso_venue_categories($VNU_ID = 0, $hide_uncategorized = TRUE, $echo = TRUE) {
1048
+		EE_Registry::instance()->load_helper('Venue_View');
1049
+		if ($echo) {
1050
+			echo EEH_Venue_View::venue_categories($VNU_ID, $hide_uncategorized);
1051 1051
 			return '';
1052 1052
 		}
1053
-		return EEH_Venue_View::venue_categories( $VNU_ID, $hide_uncategorized );
1053
+		return EEH_Venue_View::venue_categories($VNU_ID, $hide_uncategorized);
1054 1054
 	}
1055 1055
 }
1056 1056
 
1057 1057
 
1058
-if ( ! function_exists( 'espresso_venue_address' )) {
1058
+if ( ! function_exists('espresso_venue_address')) {
1059 1059
 	/**
1060 1060
 	 * espresso_venue_address
1061 1061
 	 * returns a formatted block of html  for displaying a venue's address
@@ -1065,18 +1065,18 @@  discard block
 block discarded – undo
1065 1065
 	 * @param bool   $echo
1066 1066
 	 * @return string
1067 1067
 	 */
1068
-	function espresso_venue_address( $type = 'multiline', $VNU_ID = 0, $echo = TRUE ) {
1069
-		EE_Registry::instance()->load_helper( 'Venue_View' );
1070
-		if ( $echo ) {
1071
-			echo EEH_Venue_View::venue_address( $type, $VNU_ID );
1068
+	function espresso_venue_address($type = 'multiline', $VNU_ID = 0, $echo = TRUE) {
1069
+		EE_Registry::instance()->load_helper('Venue_View');
1070
+		if ($echo) {
1071
+			echo EEH_Venue_View::venue_address($type, $VNU_ID);
1072 1072
 			return '';
1073 1073
 		}
1074
-		return EEH_Venue_View::venue_address( $type, $VNU_ID );
1074
+		return EEH_Venue_View::venue_address($type, $VNU_ID);
1075 1075
 	}
1076 1076
 }
1077 1077
 
1078 1078
 
1079
-if ( ! function_exists( 'espresso_venue_raw_address' )) {
1079
+if ( ! function_exists('espresso_venue_raw_address')) {
1080 1080
 	/**
1081 1081
 	 * espresso_venue_address
1082 1082
 	 * returns an UN-formatted string containing a venue's address
@@ -1086,18 +1086,18 @@  discard block
 block discarded – undo
1086 1086
 	 * @param bool     $echo
1087 1087
 	 * @return string
1088 1088
 	 */
1089
-	function espresso_venue_raw_address( $type = 'multiline', $VNU_ID = 0, $echo = TRUE ) {
1090
-		EE_Registry::instance()->load_helper( 'Venue_View' );
1091
-		if ( $echo ) {
1092
-			echo EEH_Venue_View::venue_address( $type, $VNU_ID, FALSE, FALSE );
1089
+	function espresso_venue_raw_address($type = 'multiline', $VNU_ID = 0, $echo = TRUE) {
1090
+		EE_Registry::instance()->load_helper('Venue_View');
1091
+		if ($echo) {
1092
+			echo EEH_Venue_View::venue_address($type, $VNU_ID, FALSE, FALSE);
1093 1093
 			return '';
1094 1094
 		}
1095
-		return EEH_Venue_View::venue_address( $type, $VNU_ID, FALSE, FALSE );
1095
+		return EEH_Venue_View::venue_address($type, $VNU_ID, FALSE, FALSE);
1096 1096
 	}
1097 1097
 }
1098 1098
 
1099 1099
 
1100
-if ( ! function_exists( 'espresso_venue_has_address' )) {
1100
+if ( ! function_exists('espresso_venue_has_address')) {
1101 1101
 	/**
1102 1102
 	 * espresso_venue_has_address
1103 1103
 	 * returns TRUE or FALSE if a Venue has address information
@@ -1105,14 +1105,14 @@  discard block
 block discarded – undo
1105 1105
 	 * @param int $VNU_ID
1106 1106
 	 * @return bool
1107 1107
 	 */
1108
-	function espresso_venue_has_address( $VNU_ID = 0 ) {
1109
-		EE_Registry::instance()->load_helper( 'Venue_View' );
1110
-		return EEH_Venue_View::venue_has_address( $VNU_ID );
1108
+	function espresso_venue_has_address($VNU_ID = 0) {
1109
+		EE_Registry::instance()->load_helper('Venue_View');
1110
+		return EEH_Venue_View::venue_has_address($VNU_ID);
1111 1111
 	}
1112 1112
 }
1113 1113
 
1114 1114
 
1115
-if ( ! function_exists( 'espresso_venue_gmap' )) {
1115
+if ( ! function_exists('espresso_venue_gmap')) {
1116 1116
 	/**
1117 1117
 	 * espresso_venue_gmap
1118 1118
 	 * returns a google map for the venue address
@@ -1123,18 +1123,18 @@  discard block
 block discarded – undo
1123 1123
 	 * @param bool     $echo
1124 1124
 	 * @return string
1125 1125
 	 */
1126
-	function espresso_venue_gmap( $VNU_ID = 0, $map_ID = FALSE, $gmap = array(), $echo = TRUE  ) {
1127
-		EE_Registry::instance()->load_helper( 'Venue_View' );
1128
-		if ( $echo ) {
1129
-			echo EEH_Venue_View::venue_gmap( $VNU_ID, $map_ID, $gmap );
1126
+	function espresso_venue_gmap($VNU_ID = 0, $map_ID = FALSE, $gmap = array(), $echo = TRUE) {
1127
+		EE_Registry::instance()->load_helper('Venue_View');
1128
+		if ($echo) {
1129
+			echo EEH_Venue_View::venue_gmap($VNU_ID, $map_ID, $gmap);
1130 1130
 			return '';
1131 1131
 		}
1132
-		return EEH_Venue_View::venue_gmap( $VNU_ID, $map_ID, $gmap );
1132
+		return EEH_Venue_View::venue_gmap($VNU_ID, $map_ID, $gmap);
1133 1133
 	}
1134 1134
 }
1135 1135
 
1136 1136
 
1137
-if ( ! function_exists( 'espresso_venue_phone' )) {
1137
+if ( ! function_exists('espresso_venue_phone')) {
1138 1138
 	/**
1139 1139
 	 * espresso_venue_phone
1140 1140
 	 *
@@ -1142,19 +1142,19 @@  discard block
 block discarded – undo
1142 1142
 	 * @param bool $echo
1143 1143
 	 * @return string
1144 1144
 	 */
1145
-	function espresso_venue_phone( $VNU_ID = 0, $echo = TRUE ) {
1146
-		EE_Registry::instance()->load_helper( 'Venue_View' );
1147
-		if ( $echo ) {
1148
-			echo EEH_Venue_View::venue_phone( $VNU_ID );
1145
+	function espresso_venue_phone($VNU_ID = 0, $echo = TRUE) {
1146
+		EE_Registry::instance()->load_helper('Venue_View');
1147
+		if ($echo) {
1148
+			echo EEH_Venue_View::venue_phone($VNU_ID);
1149 1149
 			return '';
1150 1150
 		}
1151
-		return EEH_Venue_View::venue_phone( $VNU_ID );
1151
+		return EEH_Venue_View::venue_phone($VNU_ID);
1152 1152
 	}
1153 1153
 }
1154 1154
 
1155 1155
 
1156 1156
 
1157
-if ( ! function_exists( 'espresso_venue_website' )) {
1157
+if ( ! function_exists('espresso_venue_website')) {
1158 1158
 	/**
1159 1159
 	 * espresso_venue_website
1160 1160
 	 *
@@ -1162,19 +1162,19 @@  discard block
 block discarded – undo
1162 1162
 	 * @param bool $echo
1163 1163
 	 * @return string
1164 1164
 	 */
1165
-	function espresso_venue_website( $VNU_ID = 0, $echo = TRUE ) {
1166
-		EE_Registry::instance()->load_helper( 'Venue_View' );
1167
-		if ( $echo ) {
1168
-			echo EEH_Venue_View::venue_website_link( $VNU_ID );
1165
+	function espresso_venue_website($VNU_ID = 0, $echo = TRUE) {
1166
+		EE_Registry::instance()->load_helper('Venue_View');
1167
+		if ($echo) {
1168
+			echo EEH_Venue_View::venue_website_link($VNU_ID);
1169 1169
 			return '';
1170 1170
 		}
1171
-		return EEH_Venue_View::venue_website_link( $VNU_ID );
1171
+		return EEH_Venue_View::venue_website_link($VNU_ID);
1172 1172
 	}
1173 1173
 }
1174 1174
 
1175 1175
 
1176 1176
 
1177
-if ( ! function_exists( 'espresso_edit_venue_link' )) {
1177
+if ( ! function_exists('espresso_edit_venue_link')) {
1178 1178
 	/**
1179 1179
 	 * espresso_edit_venue_link
1180 1180
 	 *
@@ -1182,13 +1182,13 @@  discard block
 block discarded – undo
1182 1182
 	 * @param bool $echo
1183 1183
 	 * @return string
1184 1184
 	 */
1185
-	function espresso_edit_venue_link( $VNU_ID = 0, $echo = TRUE ) {
1186
-		EE_Registry::instance()->load_helper( 'Venue_View' );
1187
-		if($echo){
1188
-			echo EEH_Venue_View::edit_venue_link( $VNU_ID );
1185
+	function espresso_edit_venue_link($VNU_ID = 0, $echo = TRUE) {
1186
+		EE_Registry::instance()->load_helper('Venue_View');
1187
+		if ($echo) {
1188
+			echo EEH_Venue_View::edit_venue_link($VNU_ID);
1189 1189
 			return '';
1190 1190
 		}
1191
-		return EEH_Venue_View::edit_venue_link( $VNU_ID );
1191
+		return EEH_Venue_View::edit_venue_link($VNU_ID);
1192 1192
 	}
1193 1193
 }
1194 1194
 
Please login to merge, or discard this patch.
modules/venues_archive/EED_Venues_Archive.module.php 1 patch
Spacing   +31 added lines, -31 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
 	 * @return EED_Venues_Archive
28 28
 	 */
29 29
 	public static function instance() {
30
-		return parent::get_instance( __CLASS__ );
30
+		return parent::get_instance(__CLASS__);
31 31
 	}
32 32
 
33 33
 	/**
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 	 *  @return 	void
38 38
 	 */
39 39
 	public static function set_hooks() {
40
-		EE_Config::register_route( 'venues', 'Venues_Archive', 'run' );
40
+		EE_Config::register_route('venues', 'Venues_Archive', 'run');
41 41
 //		EE_Config::register_view( 'venues', 0, EE_TEMPLATES . EE_Config::get_current_theme() . DS . 'archive-espresso_venues.php' );
42 42
 	}
43 43
 
@@ -58,10 +58,10 @@  discard block
 block discarded – undo
58 58
 	 * @access    public
59 59
 	 * @param \WP $WP
60 60
 	 */
61
-	public function run( $WP ) {
61
+	public function run($WP) {
62 62
 		// check what template is loaded
63
-		add_filter( 'template_include',  array( $this, 'template_include' ), 999, 1 );
64
-		add_action('wp_enqueue_scripts', array( $this, 'wp_enqueue_scripts' ), 10 );
63
+		add_filter('template_include', array($this, 'template_include'), 999, 1);
64
+		add_action('wp_enqueue_scripts', array($this, 'wp_enqueue_scripts'), 10);
65 65
 	}
66 66
 
67 67
 
@@ -73,18 +73,18 @@  discard block
 block discarded – undo
73 73
 	 * @param  string $template
74 74
 	 * @return string
75 75
 	 */
76
-	public function template_include( $template ) {
76
+	public function template_include($template) {
77 77
 		// not a custom template?
78
-		if ( EE_Front_Controller::instance()->get_selected_template() != 'archive-espresso_venues.php' ) {
78
+		if (EE_Front_Controller::instance()->get_selected_template() != 'archive-espresso_venues.php') {
79 79
 			EEH_Template::load_espresso_theme_functions();
80 80
 			// then add extra event data via hooks
81
-			add_filter( 'the_title', array( $this, 'the_title' ), 100, 1 );
81
+			add_filter('the_title', array($this, 'the_title'), 100, 1);
82 82
 			// don't know if theme uses the_excerpt
83
-			add_filter( 'the_excerpt', array( $this, 'venue_details' ), 100 );
83
+			add_filter('the_excerpt', array($this, 'venue_details'), 100);
84 84
 			// or the_content
85
-			add_filter( 'the_content', array( $this, 'venue_details' ), 100 );
85
+			add_filter('the_content', array($this, 'venue_details'), 100);
86 86
 			// don't display entry meta because the existing theme will take care of that
87
-			add_filter( 'FHEE__content_espresso_venues_details_template__display_entry_meta', '__return_false' );
87
+			add_filter('FHEE__content_espresso_venues_details_template__display_entry_meta', '__return_false');
88 88
 		}
89 89
 		return $template;
90 90
 	}
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
 	 * @param  string $title
99 99
 	 * @return string
100 100
 	 */
101
-	public function the_title( $title = '' ) {
101
+	public function the_title($title = '') {
102 102
 		return $title;
103 103
 	}
104 104
 
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
 	 * @param  string $content
111 111
 	 * @return string
112 112
 	 */
113
-	public function venue_details( $content ) {
113
+	public function venue_details($content) {
114 114
 		global $post;
115 115
 		if (
116 116
 			$post->post_type == 'espresso_venues'
@@ -120,22 +120,22 @@  discard block
 block discarded – undo
120 120
 			// it uses the_content() for displaying the $post->post_content
121 121
 			// so in order to load a template that uses the_content() from within a callback being used to filter the_content(),
122 122
 			// we need to first remove this callback from being applied to the_content() (otherwise it will recurse and blow up the interweb)
123
-			remove_filter( 'the_excerpt', array( $this, 'venue_details' ), 100 );
124
-			remove_filter( 'the_content', array( $this, 'venue_details' ), 100 );
123
+			remove_filter('the_excerpt', array($this, 'venue_details'), 100);
124
+			remove_filter('the_content', array($this, 'venue_details'), 100);
125 125
 			// add filters we want
126
-			add_filter( 'the_content', array( $this, 'venue_location' ), 110 );
127
-			add_filter( 'the_excerpt', array( $this, 'venue_location' ), 110 );
126
+			add_filter('the_content', array($this, 'venue_location'), 110);
127
+			add_filter('the_excerpt', array($this, 'venue_location'), 110);
128 128
 			// now load our template
129
-			$template = EEH_Template::locate_template( 'content-espresso_venues-details.php' );
129
+			$template = EEH_Template::locate_template('content-espresso_venues-details.php');
130 130
 			//now add our filter back in, plus some others
131
-			add_filter( 'the_excerpt', array( $this, 'venue_details' ), 100 );
132
-			add_filter( 'the_content', array( $this, 'venue_details' ), 100 );
131
+			add_filter('the_excerpt', array($this, 'venue_details'), 100);
132
+			add_filter('the_content', array($this, 'venue_details'), 100);
133 133
 			// remove other filters we added so they won't get applied to the next post
134
-			remove_filter( 'the_content', array( $this, 'venue_location' ), 110 );
135
-			remove_filter( 'the_excerpt', array( $this, 'venue_location' ), 110 );
134
+			remove_filter('the_content', array($this, 'venue_location'), 110);
135
+			remove_filter('the_excerpt', array($this, 'venue_location'), 110);
136 136
 			// we're not returning the $content directly because the template we are loading uses the_content (or the_excerpt)
137 137
 		}
138
-		return ! empty( $template ) ? $template : $content;
138
+		return ! empty($template) ? $template : $content;
139 139
 	}
140 140
 
141 141
 
@@ -147,8 +147,8 @@  discard block
 block discarded – undo
147 147
 	 * @param  string $content
148 148
 	 * @return string
149 149
 	 */
150
-	public function venue_location( $content ) {
151
-		return $content . EEH_Template::locate_template( 'content-espresso_venues-location.php' );
150
+	public function venue_location($content) {
151
+		return $content.EEH_Template::locate_template('content-espresso_venues-location.php');
152 152
 	}
153 153
 
154 154
 
@@ -162,14 +162,14 @@  discard block
 block discarded – undo
162 162
 	 */
163 163
 	public function wp_enqueue_scripts() {
164 164
 		// get some style
165
-		if ( apply_filters( 'FHEE_enable_default_espresso_css', TRUE ) && is_archive() ) {
165
+		if (apply_filters('FHEE_enable_default_espresso_css', TRUE) && is_archive()) {
166 166
 			// first check theme folder
167
-			if ( is_readable( get_stylesheet_directory() . $this->theme . DS . 'style.css' )) {
168
-				wp_register_style( $this->theme, get_stylesheet_directory_uri() . $this->theme . DS . 'style.css', array( 'dashicons', 'espresso_default' ) );
169
-			} else if ( is_readable( EE_TEMPLATES . $this->theme . DS . 'style.css' )) {
170
-				wp_register_style( $this->theme, EE_TEMPLATES_URL . $this->theme . DS . 'style.css', array( 'dashicons', 'espresso_default' ) );
167
+			if (is_readable(get_stylesheet_directory().$this->theme.DS.'style.css')) {
168
+				wp_register_style($this->theme, get_stylesheet_directory_uri().$this->theme.DS.'style.css', array('dashicons', 'espresso_default'));
169
+			} else if (is_readable(EE_TEMPLATES.$this->theme.DS.'style.css')) {
170
+				wp_register_style($this->theme, EE_TEMPLATES_URL.$this->theme.DS.'style.css', array('dashicons', 'espresso_default'));
171 171
 			}
172
-			wp_enqueue_style( $this->theme );
172
+			wp_enqueue_style($this->theme);
173 173
 		}
174 174
 	}
175 175
 
Please login to merge, or discard this patch.
modules/venue_single/EED_Venue_Single.module.php 1 patch
Spacing   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
 	 * @return EED_Venue_Single
28 28
 	 */
29 29
 	public static function instance() {
30
-		return parent::get_instance( __CLASS__ );
30
+		return parent::get_instance(__CLASS__);
31 31
 	}
32 32
 
33 33
 	/**
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 	 *  @return 	void
38 38
 	 */
39 39
 	public static function set_hooks() {
40
-		EE_Config::register_route( 'venue', 'Venue_Single', 'run' );
40
+		EE_Config::register_route('venue', 'Venue_Single', 'run');
41 41
 //		EE_Config::register_view( 'venue', 0, EE_TEMPLATES . EE_Config::get_current_theme() . DS . 'single-espresso_venues.php' );
42 42
 	}
43 43
 
@@ -58,10 +58,10 @@  discard block
 block discarded – undo
58 58
 	 * @access    public
59 59
 	 * @param \WP $WP
60 60
 	 */
61
-	public function run( $WP ) {
61
+	public function run($WP) {
62 62
 		// check what template is loaded
63
-		add_filter( 'template_include',  array( $this, 'template_include' ), 999, 1 );
64
-		add_action('wp_enqueue_scripts', array( $this, 'wp_enqueue_scripts' ), 10 );
63
+		add_filter('template_include', array($this, 'template_include'), 999, 1);
64
+		add_action('wp_enqueue_scripts', array($this, 'wp_enqueue_scripts'), 10);
65 65
 	}
66 66
 
67 67
 
@@ -73,15 +73,15 @@  discard block
 block discarded – undo
73 73
 	 * @param  string $template
74 74
 	 * @return string
75 75
 	 */
76
-	public function template_include( $template ) {
76
+	public function template_include($template) {
77 77
 		// not a custom template?
78
-		if ( EE_Front_Controller::instance()->get_selected_template() != 'single-espresso_venues.php' ) {
78
+		if (EE_Front_Controller::instance()->get_selected_template() != 'single-espresso_venues.php') {
79 79
 			EEH_Template::load_espresso_theme_functions();
80 80
 			// then add extra event data via hooks
81
-			add_filter( 'the_title', array( $this, 'the_title' ), 100, 1 );
82
-			add_filter( 'the_content', array( $this, 'venue_details' ), 100 );
81
+			add_filter('the_title', array($this, 'the_title'), 100, 1);
82
+			add_filter('the_content', array($this, 'venue_details'), 100);
83 83
 			// don't display entry meta because the existing theme will take car of that
84
-			add_filter( 'FHEE__content_espresso_venues_details_template__display_entry_meta', '__return_false' );
84
+			add_filter('FHEE__content_espresso_venues_details_template__display_entry_meta', '__return_false');
85 85
 		}
86 86
 		return $template;
87 87
 	}
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
 	 * @param  string $title
96 96
 	 * @return string
97 97
 	 */
98
-	public function the_title( $title = '' ) {
98
+	public function the_title($title = '') {
99 99
 		return $title;
100 100
 	}
101 101
 
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
 	 * @param  string $content
108 108
 	 * @return string
109 109
 	 */
110
-	public function venue_details( $content ) {
110
+	public function venue_details($content) {
111 111
 		global $post;
112 112
 		if (
113 113
 			$post->post_type == 'espresso_venues'
@@ -117,16 +117,16 @@  discard block
 block discarded – undo
117 117
 			// it uses the_content() for displaying the $post->post_content
118 118
 			// so in order to load a template that uses the_content() from within a callback being used to filter the_content(),
119 119
 			// we need to first remove this callback from being applied to the_content() (otherwise it will recurse and blow up the interweb)
120
-			remove_filter( 'the_content', array( $this, 'venue_details' ), 100 );
120
+			remove_filter('the_content', array($this, 'venue_details'), 100);
121 121
 			// add filters we want
122
-			add_filter( 'the_content', array( $this, 'venue_location' ), 110 );
122
+			add_filter('the_content', array($this, 'venue_location'), 110);
123 123
 			// now load our template
124
-			$template = EEH_Template::locate_template( 'content-espresso_venues-details.php' );
124
+			$template = EEH_Template::locate_template('content-espresso_venues-details.php');
125 125
 			// remove other filters we added so they won't get applied to the next post
126
-			remove_filter( 'the_content', array( $this, 'venue_location' ), 110 );
126
+			remove_filter('the_content', array($this, 'venue_location'), 110);
127 127
 		}
128 128
 		// we're not returning the $content directly because the template we are loading uses the_content (or the_excerpt)
129
-		return ! empty( $template ) ? $template : $content;
129
+		return ! empty($template) ? $template : $content;
130 130
 	}
131 131
 
132 132
 
@@ -138,8 +138,8 @@  discard block
 block discarded – undo
138 138
 	 * @param  string $content
139 139
 	 * @return string
140 140
 	 */
141
-	public function venue_location( $content ) {
142
-		return $content . EEH_Template::locate_template( 'content-espresso_venues-location.php' );
141
+	public function venue_location($content) {
142
+		return $content.EEH_Template::locate_template('content-espresso_venues-location.php');
143 143
 	}
144 144
 
145 145
 
@@ -152,17 +152,17 @@  discard block
 block discarded – undo
152 152
 	 */
153 153
 	public function wp_enqueue_scripts() {
154 154
 		// get some style
155
-		if ( apply_filters( 'FHEE_enable_default_espresso_css', TRUE ) && is_single() ) {
155
+		if (apply_filters('FHEE_enable_default_espresso_css', TRUE) && is_single()) {
156 156
 			// first check theme folder
157
-			if ( is_readable( get_stylesheet_directory() . $this->theme . DS . 'style.css' )) {
158
-				wp_register_style( $this->theme, get_stylesheet_directory_uri() . $this->theme . DS . 'style.css', array( 'dashicons', 'espresso_default' ) );
159
-			} else if ( is_readable( EE_TEMPLATES . $this->theme . DS . 'style.css' )) {
160
-				wp_register_style( $this->theme, EE_TEMPLATES_URL . $this->theme . DS . 'style.css', array( 'dashicons', 'espresso_default' ) );
157
+			if (is_readable(get_stylesheet_directory().$this->theme.DS.'style.css')) {
158
+				wp_register_style($this->theme, get_stylesheet_directory_uri().$this->theme.DS.'style.css', array('dashicons', 'espresso_default'));
159
+			} else if (is_readable(EE_TEMPLATES.$this->theme.DS.'style.css')) {
160
+				wp_register_style($this->theme, EE_TEMPLATES_URL.$this->theme.DS.'style.css', array('dashicons', 'espresso_default'));
161 161
 			}
162
-			wp_enqueue_style( $this->theme );
163
-			if ( EE_Registry::instance()->CFG->map_settings->use_google_maps ) {
164
-				EE_Registry::instance()->load_helper( 'Maps' );
165
-				add_action('wp_enqueue_scripts', array( 'EEH_Maps', 'espresso_google_map_js' ), 11 );
162
+			wp_enqueue_style($this->theme);
163
+			if (EE_Registry::instance()->CFG->map_settings->use_google_maps) {
164
+				EE_Registry::instance()->load_helper('Maps');
165
+				add_action('wp_enqueue_scripts', array('EEH_Maps', 'espresso_google_map_js'), 11);
166 166
 			}
167 167
 		}
168 168
 	}
Please login to merge, or discard this patch.
core/helpers/EEH_Venue_View.helper.php 2 patches
Spacing   +117 added lines, -117 removed lines patch added patch discarded remove patch
@@ -45,16 +45,16 @@  discard block
 block discarded – undo
45 45
 	 * @param bool $password_check
46 46
 	 * @return \EE_Venue|null
47 47
 	 */
48
-	public static function get_venue( $VNU_ID = 0, $look_in_event = TRUE, $privacy_check = true, $password_check = true ) {
49
-		$VNU_ID = absint( $VNU_ID );
48
+	public static function get_venue($VNU_ID = 0, $look_in_event = TRUE, $privacy_check = true, $password_check = true) {
49
+		$VNU_ID = absint($VNU_ID);
50 50
 		// do we already have the Venue you are looking for?
51
-		if ( EEH_Venue_View::$_venue instanceof EE_Venue && EEH_Venue_View::$_venue->ID() == $VNU_ID ) {
52
-			return EEH_Venue_View::_get_venue( $privacy_check );
51
+		if (EEH_Venue_View::$_venue instanceof EE_Venue && EEH_Venue_View::$_venue->ID() == $VNU_ID) {
52
+			return EEH_Venue_View::_get_venue($privacy_check);
53 53
 		}
54 54
 		// international newspaper?
55 55
 		global $post;
56
-		if ( $post instanceof WP_Post ) {
57
-			switch ( $post->post_type ) {
56
+		if ($post instanceof WP_Post) {
57
+			switch ($post->post_type) {
58 58
 				// if this is being called from an EE_Venue post,
59 59
 				// and the EE_Venue post corresponds to the EE_Venue that is being asked for,
60 60
 				// then we can try to just grab the attached EE_Venue object
@@ -62,31 +62,31 @@  discard block
 block discarded – undo
62 62
 					// the post already contains the related EE_Venue object AND one of the following is TRUE:
63 63
 					// the requested Venue ID matches the post ID OR...
64 64
 					// there was no specific Venue ID requested
65
-					if ( isset( $post->EE_Venue ) && ( $VNU_ID == $post->ID || ! $VNU_ID )) {
65
+					if (isset($post->EE_Venue) && ($VNU_ID == $post->ID || ! $VNU_ID)) {
66 66
 						// use existing related EE_Venue object
67
-						EEH_Venue_View::$_venue =  $post->EE_Venue;
68
-					} else if ( $VNU_ID ) {
67
+						EEH_Venue_View::$_venue = $post->EE_Venue;
68
+					} else if ($VNU_ID) {
69 69
 						// there WAS a specific Venue ID requested, but it's NOT the current post object
70
-						EEH_Venue_View::$_venue = EEM_Venue::instance()->get_one_by_ID( $VNU_ID );
70
+						EEH_Venue_View::$_venue = EEM_Venue::instance()->get_one_by_ID($VNU_ID);
71 71
 					} else {
72 72
 						// no specific Venue ID requested, so use post ID to generate EE_Venue object
73
-						EEH_Venue_View::$_venue = EEM_Venue::instance()->get_one_by_ID( $post->ID );
73
+						EEH_Venue_View::$_venue = EEM_Venue::instance()->get_one_by_ID($post->ID);
74 74
 					}
75 75
 				break;
76 76
 
77 77
 				case 'espresso_events':
78
-					if ( $look_in_event ) {
78
+					if ($look_in_event) {
79 79
 						// grab the events related venues
80 80
 						$venues = EEH_Venue_View::get_event_venues();
81 81
 						// make sure the result is an array
82
-						$venues = is_array( $venues ) ? $venues : array();
82
+						$venues = is_array($venues) ? $venues : array();
83 83
 						// do we have an ID for a specific venue?
84
-						if ( $VNU_ID ) {
84
+						if ($VNU_ID) {
85 85
 							// loop thru the related venues
86
-							foreach( $venues as $venue ) {
87
-								if ( $venue instanceof EE_Venue ) {
86
+							foreach ($venues as $venue) {
87
+								if ($venue instanceof EE_Venue) {
88 88
 									// until we find the venue we're looking for
89
-									if ( $venue->ID() == $VNU_ID ) {
89
+									if ($venue->ID() == $VNU_ID) {
90 90
 										EEH_Venue_View::$_venue = $venue;
91 91
 										break;
92 92
 									}
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
 							// then the global post is an events post and this function was called with no argument
99 99
 						} else {
100 100
 							// just grab the first related event venue
101
-							EEH_Venue_View::$_venue = reset( $venues );
101
+							EEH_Venue_View::$_venue = reset($venues);
102 102
 						}
103 103
 					}
104 104
 				break;
@@ -106,11 +106,11 @@  discard block
 block discarded – undo
106 106
 			}
107 107
 		}
108 108
 		// now if we STILL do NOT have an EE_Venue model object, BUT we have a Venue ID...
109
-		if ( ! EEH_Venue_View::$_venue instanceof EE_Venue && $VNU_ID ) {
109
+		if ( ! EEH_Venue_View::$_venue instanceof EE_Venue && $VNU_ID) {
110 110
 			// sigh... pull it from the db
111
-			EEH_Venue_View::$_venue = EEM_Venue::instance()->get_one_by_ID( $VNU_ID );
111
+			EEH_Venue_View::$_venue = EEM_Venue::instance()->get_one_by_ID($VNU_ID);
112 112
 		}
113
-		return EEH_Venue_View::_get_venue( $privacy_check, $password_check );
113
+		return EEH_Venue_View::_get_venue($privacy_check, $password_check);
114 114
 	}
115 115
 
116 116
 
@@ -123,13 +123,13 @@  discard block
 block discarded – undo
123 123
 	 * @param bool $password_check
124 124
 	 * @return 	EE_Venue
125 125
 	 */
126
-	protected static function _get_venue( $privacy_check = true, $password_check = true ) {
126
+	protected static function _get_venue($privacy_check = true, $password_check = true) {
127 127
 		// check for private venues.
128 128
 		if (
129 129
 			EEH_Venue_View::$_venue instanceof EE_Venue
130 130
 			&& EEH_Venue_View::$_venue->status() == 'private'
131 131
 			&& $privacy_check
132
-			&& ! EE_Registry::instance()->CAP->current_user_can( 'ee_read_private_venues', 'get_venues' )
132
+			&& ! EE_Registry::instance()->CAP->current_user_can('ee_read_private_venues', 'get_venues')
133 133
 		) {
134 134
 			return null;
135 135
 		}
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
 		if (
138 138
 			EEH_Venue_View::$_venue instanceof EE_Venue
139 139
 			&& $password_check
140
-			&& post_password_required( EEH_Venue_View::$_venue->ID() )
140
+			&& post_password_required(EEH_Venue_View::$_venue->ID())
141 141
 		) {
142 142
 			return null;
143 143
 		}
@@ -154,8 +154,8 @@  discard block
 block discarded – undo
154 154
 	 */
155 155
 	public static function get_event_venues() {
156 156
 		global $post;
157
-		if ( $post->post_type == 'espresso_events' ) {
158
-			if ( isset( $post->EE_Event ) && $post->EE_Event instanceof EE_Event ) {
157
+		if ($post->post_type == 'espresso_events') {
158
+			if (isset($post->EE_Event) && $post->EE_Event instanceof EE_Event) {
159 159
 				return $post->EE_Event->venues();
160 160
 			}
161 161
 		}
@@ -175,9 +175,9 @@  discard block
 block discarded – undo
175 175
 	 *
176 176
 	 * @return bool|null
177 177
 	 */
178
-	public static function is_venue_private( $VNU_ID = false ) {
179
-		$venue = EEH_Venue_View::get_venue( $VNU_ID, true, true );
180
-		if ( ! $venue instanceof EE_Venue ) {
178
+	public static function is_venue_private($VNU_ID = false) {
179
+		$venue = EEH_Venue_View::get_venue($VNU_ID, true, true);
180
+		if ( ! $venue instanceof EE_Venue) {
181 181
 			return null;
182 182
 		}
183 183
 
@@ -192,11 +192,11 @@  discard block
 block discarded – undo
192 192
 	 * @param bool $VNU_ID venue to check (optional). If not included will use internally derived venue object.
193 193
 	 * @return bool
194 194
 	 */
195
-	public static function is_venue_password_protected( $VNU_ID = false ) {
196
-		$venue = EEH_Venue_View::get_venue( $VNU_ID, true, true, false );
195
+	public static function is_venue_password_protected($VNU_ID = false) {
196
+		$venue = EEH_Venue_View::get_venue($VNU_ID, true, true, false);
197 197
 		if (
198 198
 			$venue instanceof EE_Venue
199
-			&& post_password_required( $venue->ID() )
199
+			&& post_password_required($venue->ID())
200 200
 		) {
201 201
 			return true;
202 202
 		}
@@ -213,13 +213,13 @@  discard block
 block discarded – undo
213 213
 	 *
214 214
 	 * @return string
215 215
 	 */
216
-	public static function password_protected_venue_form( $VNU_ID = false ) {
217
-		$venue = EEH_Venue_View::get_venue( $VNU_ID, true, true, false );
216
+	public static function password_protected_venue_form($VNU_ID = false) {
217
+		$venue = EEH_Venue_View::get_venue($VNU_ID, true, true, false);
218 218
 		if (
219 219
 			$venue instanceof EE_Venue
220
-			&& post_password_required( $venue->ID() )
220
+			&& post_password_required($venue->ID())
221 221
 		) {
222
-			return get_the_password_form( $venue->ID() );
222
+			return get_the_password_form($venue->ID());
223 223
 		}
224 224
 		return '';
225 225
 	}
@@ -233,9 +233,9 @@  discard block
 block discarded – undo
233 233
 	 * @param int $VNU_ID
234 234
 	 * @return string
235 235
 	 */
236
-	public static function venue_description( $VNU_ID = 0 ) {
237
-		$venue = EEH_Venue_View::get_venue( $VNU_ID );
238
-		if ( $venue instanceof EE_Venue ) {
236
+	public static function venue_description($VNU_ID = 0) {
237
+		$venue = EEH_Venue_View::get_venue($VNU_ID);
238
+		if ($venue instanceof EE_Venue) {
239 239
 			return$venue->description();
240 240
 		}
241 241
 		return '';
@@ -250,12 +250,12 @@  discard block
 block discarded – undo
250 250
 	 * @param int $VNU_ID
251 251
 	 * @return string
252 252
 	 */
253
-	public static function venue_excerpt( $VNU_ID = 0 ) {
254
-		$venue = EEH_Venue_View::get_venue( $VNU_ID );
255
-		if ( $venue instanceof EE_Venue ) {
253
+	public static function venue_excerpt($VNU_ID = 0) {
254
+		$venue = EEH_Venue_View::get_venue($VNU_ID);
255
+		if ($venue instanceof EE_Venue) {
256 256
 			$excerpt = $venue->excerpt() != NULL && $venue->excerpt() ? $venue->excerpt() : $venue->description();
257
-			$venue_link = ' ' . EEH_Venue_View::venue_details_link( $venue->ID(), __( 'more', 'event_espresso' ) . '&hellip;' );
258
-			return ! empty( $excerpt ) ? wp_trim_words( $excerpt, 25, '' ) . $venue_link : '';
257
+			$venue_link = ' '.EEH_Venue_View::venue_details_link($venue->ID(), __('more', 'event_espresso').'&hellip;');
258
+			return ! empty($excerpt) ? wp_trim_words($excerpt, 25, '').$venue_link : '';
259 259
 		}
260 260
 		return '';
261 261
 	}
@@ -270,22 +270,22 @@  discard block
 block discarded – undo
270 270
 	 * @param bool $hide_uncategorized
271 271
 	 * @return string
272 272
 	 */
273
-	public static function venue_categories( $VNU_ID = 0, $hide_uncategorized = TRUE ) {
273
+	public static function venue_categories($VNU_ID = 0, $hide_uncategorized = TRUE) {
274 274
 		$category_links = array();
275
-		$venue = EEH_Venue_View::get_venue( $VNU_ID );
276
-		if ( $venue instanceof EE_Venue ) {
275
+		$venue = EEH_Venue_View::get_venue($VNU_ID);
276
+		if ($venue instanceof EE_Venue) {
277 277
 			// get category terms
278
-			if ( $venue_categories = get_the_terms( $venue->ID(), 'espresso_venue_categories' )) {
278
+			if ($venue_categories = get_the_terms($venue->ID(), 'espresso_venue_categories')) {
279 279
 				// loop thru terms and create links
280
-				foreach ( $venue_categories as $term ) {
281
-					$url = get_term_link( $term, 'espresso_venue_categories' );
282
-					if ( ! is_wp_error( $url ) && (( $hide_uncategorized && strtolower( $term->name ) != __( 'uncategorized', 'event_espresso' )) || ! $hide_uncategorized )) {
283
-						$category_links[] = '<a href="' . esc_url( $url ) . '" rel="tag">' . $term->name . '</a> ';
280
+				foreach ($venue_categories as $term) {
281
+					$url = get_term_link($term, 'espresso_venue_categories');
282
+					if ( ! is_wp_error($url) && (($hide_uncategorized && strtolower($term->name) != __('uncategorized', 'event_espresso')) || ! $hide_uncategorized)) {
283
+						$category_links[] = '<a href="'.esc_url($url).'" rel="tag">'.$term->name.'</a> ';
284 284
 					}
285 285
 				}
286 286
 			}
287 287
 		}
288
-		return implode( ', ', $category_links );
288
+		return implode(', ', $category_links);
289 289
 	}
290 290
 
291 291
 
@@ -300,11 +300,11 @@  discard block
 block discarded – undo
300 300
 	 * @param bool $add_wrapper
301 301
 	 * @return string
302 302
 	 */
303
-	public static function venue_address( $type = 'multiline', $VNU_ID = 0, $use_schema = true, $add_wrapper = true ) {
304
-		$venue = EEH_Venue_View::get_venue( $VNU_ID );
305
-		if ( $venue instanceof EE_Venue ) {
306
-			EE_Registry::instance()->load_helper( 'Formatter' );
307
-			return EEH_Address::format( $venue, $type, $use_schema, $add_wrapper );
303
+	public static function venue_address($type = 'multiline', $VNU_ID = 0, $use_schema = true, $add_wrapper = true) {
304
+		$venue = EEH_Venue_View::get_venue($VNU_ID);
305
+		if ($venue instanceof EE_Venue) {
306
+			EE_Registry::instance()->load_helper('Formatter');
307
+			return EEH_Address::format($venue, $type, $use_schema, $add_wrapper);
308 308
 		}
309 309
 		return '';
310 310
 	}
@@ -318,11 +318,11 @@  discard block
 block discarded – undo
318 318
 	 * @param int $VNU_ID
319 319
 	 * @return bool|string
320 320
 	 */
321
-	public static function venue_has_address( $VNU_ID = 0 ) {
322
-		$venue = EEH_Venue_View::get_venue( $VNU_ID );
323
-		if ( $venue instanceof EE_Venue ) {
324
-			EE_Registry::instance()->load_helper( 'Formatter' );
325
-			return EEH_Address::format( $venue, 'inline', FALSE, FALSE );
321
+	public static function venue_has_address($VNU_ID = 0) {
322
+		$venue = EEH_Venue_View::get_venue($VNU_ID);
323
+		if ($venue instanceof EE_Venue) {
324
+			EE_Registry::instance()->load_helper('Formatter');
325
+			return EEH_Address::format($venue, 'inline', FALSE, FALSE);
326 326
 		}
327 327
 		return false;
328 328
 	}
@@ -337,31 +337,31 @@  discard block
 block discarded – undo
337 337
 	 * @param int $VNU_ID
338 338
 	 * @return string
339 339
 	 */
340
-	public static function venue_name( $link_to = 'details', $VNU_ID = 0 ) {
341
-		$venue = EEH_Venue_View::get_venue( $VNU_ID );
342
-		if ( $venue instanceof EE_Venue ) {
343
-			EE_Registry::instance()->load_helper( 'Formatter' );
340
+	public static function venue_name($link_to = 'details', $VNU_ID = 0) {
341
+		$venue = EEH_Venue_View::get_venue($VNU_ID);
342
+		if ($venue instanceof EE_Venue) {
343
+			EE_Registry::instance()->load_helper('Formatter');
344 344
 			$venue_name = apply_filters(
345 345
 				'FHEE__EEH_Venue__venue_name__append_private_venue_name',
346 346
 				EEH_Venue_View::is_venue_private()
347
-					? EEH_Venue_View::$_venue->name() . "&nbsp;" . __( '(Private)', 'event_espresso' )
347
+					? EEH_Venue_View::$_venue->name()."&nbsp;".__('(Private)', 'event_espresso')
348 348
 					: EEH_Venue_View::$_venue->name(),
349 349
 				EEH_Venue_View::$_venue
350 350
 			);
351
-			$venue_name = EEH_Schema::name( $venue_name );
351
+			$venue_name = EEH_Schema::name($venue_name);
352 352
 
353 353
 			//if venue is trashed then ignore the "link to" setting because the venue is trashed.
354
-			if ( $venue->get('status') == 'trash' ) {
354
+			if ($venue->get('status') == 'trash') {
355 355
 				$link_to = '';
356 356
 			}
357
-			switch( $link_to ) {
357
+			switch ($link_to) {
358 358
 
359 359
 				case 'details' :
360
-					return EEH_Venue_View::venue_details_link( $venue->ID(), $venue_name );
360
+					return EEH_Venue_View::venue_details_link($venue->ID(), $venue_name);
361 361
 				break;
362 362
 
363 363
 				case 'website' :
364
-					return EEH_Venue_View::venue_website_link( $venue->ID(), $venue_name );
364
+					return EEH_Venue_View::venue_website_link($venue->ID(), $venue_name);
365 365
 				break;
366 366
 
367 367
 				default :
@@ -381,10 +381,10 @@  discard block
 block discarded – undo
381 381
 	 * @param    string $text
382 382
 	 * @return string
383 383
 	 */
384
-	public static function venue_details_link( $VNU_ID = 0, $text = '' ) {
385
-		$venue = EEH_Venue_View::get_venue( $VNU_ID );
386
-		if ( $venue instanceof EE_Venue ) {
387
-			return EEH_Schema::url( get_permalink( $venue->ID() ), $text );
384
+	public static function venue_details_link($VNU_ID = 0, $text = '') {
385
+		$venue = EEH_Venue_View::get_venue($VNU_ID);
386
+		if ($venue instanceof EE_Venue) {
387
+			return EEH_Schema::url(get_permalink($venue->ID()), $text);
388 388
 		}
389 389
 		return '';
390 390
 	}
@@ -399,13 +399,13 @@  discard block
 block discarded – undo
399 399
 	 * @param    string $text
400 400
 	 * @return string
401 401
 	 */
402
-	public static function venue_website_link( $VNU_ID = 0, $text = '' ) {
403
-		$venue = EEH_Venue_View::get_venue( $VNU_ID );
404
-		if ( $venue instanceof EE_Venue ) {
405
-			EE_Registry::instance()->load_helper( 'Formatter' );
402
+	public static function venue_website_link($VNU_ID = 0, $text = '') {
403
+		$venue = EEH_Venue_View::get_venue($VNU_ID);
404
+		if ($venue instanceof EE_Venue) {
405
+			EE_Registry::instance()->load_helper('Formatter');
406 406
 			$url = $venue->venue_url();
407
-			$text = ! empty( $text ) ? $text : $url;
408
-			return ! empty( $url ) ? EEH_Schema::url( $url, $text ) : '';
407
+			$text = ! empty($text) ? $text : $url;
408
+			return ! empty($url) ? EEH_Schema::url($url, $text) : '';
409 409
 		}
410 410
 		return '';
411 411
 	}
@@ -419,11 +419,11 @@  discard block
 block discarded – undo
419 419
 	 * @param int $VNU_ID
420 420
 	 * @return string
421 421
 	 */
422
-	public static function venue_phone( $VNU_ID = 0) {
423
-		$venue = EEH_Venue_View::get_venue( $VNU_ID );
424
-		if ( $venue instanceof EE_Venue ) {
425
-			EE_Registry::instance()->load_helper( 'Formatter' );
426
-			return EEH_Schema::telephone( $venue->phone() );
422
+	public static function venue_phone($VNU_ID = 0) {
423
+		$venue = EEH_Venue_View::get_venue($VNU_ID);
424
+		if ($venue instanceof EE_Venue) {
425
+			EE_Registry::instance()->load_helper('Formatter');
426
+			return EEH_Schema::telephone($venue->phone());
427 427
 		}
428 428
 		return '';
429 429
 	}
@@ -439,51 +439,51 @@  discard block
 block discarded – undo
439 439
 	 * @param    array $gmap map options
440 440
 	 * @return string
441 441
 	 */
442
-	public static function venue_gmap( $VNU_ID = 0, $map_ID = FALSE, $gmap = array() ) {
442
+	public static function venue_gmap($VNU_ID = 0, $map_ID = FALSE, $gmap = array()) {
443 443
 
444
-		$venue = EEH_Venue_View::get_venue( $VNU_ID );
445
-		if ( $venue instanceof EE_Venue ) {
444
+		$venue = EEH_Venue_View::get_venue($VNU_ID);
445
+		if ($venue instanceof EE_Venue) {
446 446
 			// check for global espresso_events post and use it's ID if no map_ID is set
447 447
 			global $post;
448
-			$map_ID = empty( $map_ID ) && $post->post_type == 'espresso_events' ? $post->ID : $map_ID;
448
+			$map_ID = empty($map_ID) && $post->post_type == 'espresso_events' ? $post->ID : $map_ID;
449 449
 			// grab map settings
450 450
 			$map_cfg = EE_Registry::instance()->CFG->map_settings;
451 451
 			// are maps enabled ?
452
-			if ( $map_cfg->use_google_maps && $venue->enable_for_gmap() ) {
452
+			if ($map_cfg->use_google_maps && $venue->enable_for_gmap()) {
453 453
 
454
-				EE_Registry::instance()->load_helper( 'Maps' );
455
-				EE_Registry::instance()->load_helper( 'Formatter' );
454
+				EE_Registry::instance()->load_helper('Maps');
455
+				EE_Registry::instance()->load_helper('Formatter');
456 456
 
457 457
 				$details_page = is_single();
458 458
 				$options = array();
459
-				$options['map_ID'] = $map_ID && $map_ID != $venue->ID() ? $map_ID . '-' . $venue->ID()/* . '-' . $static_map_id*/ : $venue->ID()/* . '-' . $static_map_id*/;
459
+				$options['map_ID'] = $map_ID && $map_ID != $venue->ID() ? $map_ID.'-'.$venue->ID()/* . '-' . $static_map_id*/ : $venue->ID()/* . '-' . $static_map_id*/;
460 460
 
461
-				$options['location'] = EEH_Address::format( $venue, 'inline', FALSE, FALSE );
461
+				$options['location'] = EEH_Address::format($venue, 'inline', FALSE, FALSE);
462 462
 
463 463
 				$options['ee_map_width'] = $details_page ? $map_cfg->event_details_map_width : $map_cfg->event_list_map_width;
464
-				$options['ee_map_width'] = isset( $gmap['ee_map_width'] ) && ! empty( $gmap['ee_map_width'] ) ? $gmap['ee_map_width'] : $options['ee_map_width'];
464
+				$options['ee_map_width'] = isset($gmap['ee_map_width']) && ! empty($gmap['ee_map_width']) ? $gmap['ee_map_width'] : $options['ee_map_width'];
465 465
 
466 466
 				$options['ee_map_height'] = $details_page ? $map_cfg->event_details_map_height : $map_cfg->event_list_map_height;
467
-				$options['ee_map_height'] = isset( $gmap['ee_map_height'] ) && ! empty( $gmap['ee_map_height'] ) ? $gmap['ee_map_height'] : $options['ee_map_height'];
467
+				$options['ee_map_height'] = isset($gmap['ee_map_height']) && ! empty($gmap['ee_map_height']) ? $gmap['ee_map_height'] : $options['ee_map_height'];
468 468
 
469 469
 				$options['ee_map_zoom'] = $details_page ? $map_cfg->event_details_map_zoom : $map_cfg->event_list_map_zoom;
470
-				$options['ee_map_zoom'] = isset( $gmap['ee_map_zoom'] ) && ! empty( $gmap['ee_map_zoom'] ) ? $gmap['ee_map_zoom'] : $options['ee_map_zoom'];
470
+				$options['ee_map_zoom'] = isset($gmap['ee_map_zoom']) && ! empty($gmap['ee_map_zoom']) ? $gmap['ee_map_zoom'] : $options['ee_map_zoom'];
471 471
 
472 472
 				$options['ee_map_nav_display'] = $details_page ? $map_cfg->event_details_display_nav : $map_cfg->event_list_display_nav;
473
-				$options['ee_map_nav_display'] = isset( $gmap['ee_map_nav_display'] ) && ! empty( $gmap['ee_map_nav_display'] ) ? 'true' : $options['ee_map_nav_display'];;
473
+				$options['ee_map_nav_display'] = isset($gmap['ee_map_nav_display']) && ! empty($gmap['ee_map_nav_display']) ? 'true' : $options['ee_map_nav_display']; ;
474 474
 
475 475
 				$options['ee_map_nav_size'] = $details_page ? $map_cfg->event_details_nav_size : $map_cfg->event_list_nav_size;
476
-				$options['ee_map_nav_size'] =  isset( $gmap['ee_map_nav_size'] ) && ! empty( $gmap['ee_map_nav_size'] )? $gmap['ee_map_nav_size'] : $options['ee_map_nav_size'];
476
+				$options['ee_map_nav_size'] = isset($gmap['ee_map_nav_size']) && ! empty($gmap['ee_map_nav_size']) ? $gmap['ee_map_nav_size'] : $options['ee_map_nav_size'];
477 477
 
478 478
 				$options['ee_map_type_control'] = $details_page ? $map_cfg->event_details_control_type : $map_cfg->event_list_control_type;
479
-				$options['ee_map_type_control'] =  isset( $gmap['ee_map_type_control'] ) && ! empty( $gmap['ee_map_type_control'] )? $gmap['ee_map_type_control'] : $options['ee_map_type_control'];
479
+				$options['ee_map_type_control'] = isset($gmap['ee_map_type_control']) && ! empty($gmap['ee_map_type_control']) ? $gmap['ee_map_type_control'] : $options['ee_map_type_control'];
480 480
 
481 481
 				$options['ee_map_align'] = $details_page ? $map_cfg->event_details_map_align : $map_cfg->event_list_map_align;
482
-				$options['ee_map_align'] =  isset( $gmap['ee_map_align'] ) && ! empty( $gmap['ee_map_align'] )? $gmap['ee_map_align'] : $options['ee_map_align'];
482
+				$options['ee_map_align'] = isset($gmap['ee_map_align']) && ! empty($gmap['ee_map_align']) ? $gmap['ee_map_align'] : $options['ee_map_align'];
483 483
 
484
-				$options['ee_static_url'] =  isset( $gmap['ee_static_url'] ) && ! empty( $gmap['ee_static_url'] ) ? (bool)absint( $gmap['ee_static_url'] ) : $venue->google_map_link();
484
+				$options['ee_static_url'] = isset($gmap['ee_static_url']) && ! empty($gmap['ee_static_url']) ? (bool) absint($gmap['ee_static_url']) : $venue->google_map_link();
485 485
 
486
-				return EEH_Maps::google_map( $options );
486
+				return EEH_Maps::google_map($options);
487 487
 
488 488
 			}
489 489
 		}
@@ -498,7 +498,7 @@  discard block
 block discarded – undo
498 498
 	 * @param array $atts like EEH_Maps::google_map_link
499 499
 	 * @return string
500 500
 	 */
501
-	public static function espresso_google_static_map( EE_Venue $venue, $atts = array() ){
501
+	public static function espresso_google_static_map(EE_Venue $venue, $atts = array()) {
502 502
 		EE_Registry::instance()->load_helper('Maps');
503 503
 		$state = $venue->state_obj();
504 504
 		$country = $venue->country_obj();
@@ -530,23 +530,23 @@  discard block
 block discarded – undo
530 530
 	 * @param string $after
531 531
 	 * @return string
532 532
 	 */
533
-	public static function edit_venue_link( $VNU_ID = 0, $link = '', $before = '<p class="edit-venue-lnk small-txt">', $after = '</p>' ) {
534
-		$venue = EEH_Venue_View::get_venue( $VNU_ID );
535
-		if ( $venue instanceof EE_Venue ) {
533
+	public static function edit_venue_link($VNU_ID = 0, $link = '', $before = '<p class="edit-venue-lnk small-txt">', $after = '</p>') {
534
+		$venue = EEH_Venue_View::get_venue($VNU_ID);
535
+		if ($venue instanceof EE_Venue) {
536 536
 			// can the user edit this post ?
537
-			if ( current_user_can( 'edit_post', $venue->ID() )) {
537
+			if (current_user_can('edit_post', $venue->ID())) {
538 538
 				// set link text
539
-				$link = ! empty( $link ) ? $link : __('edit this venue');
539
+				$link = ! empty($link) ? $link : __('edit this venue');
540 540
 				// generate nonce
541
-				$nonce = wp_create_nonce( 'edit_nonce' );
541
+				$nonce = wp_create_nonce('edit_nonce');
542 542
 				// generate url to venue editor for this venue
543
-				$url = add_query_arg( array( 'page' => 'espresso_venues', 'action' => 'edit', 'post' => $venue->ID(), 'edit_nonce' => $nonce ), admin_url( 'admin.php' ) );
543
+				$url = add_query_arg(array('page' => 'espresso_venues', 'action' => 'edit', 'post' => $venue->ID(), 'edit_nonce' => $nonce), admin_url('admin.php'));
544 544
 				// get edit CPT text
545
-				$post_type_obj = get_post_type_object( 'espresso_venues' );
545
+				$post_type_obj = get_post_type_object('espresso_venues');
546 546
 				// build final link html
547
-				$link = '<a class="post-edit-link" href="' . $url . '" title="' . esc_attr( $post_type_obj->labels->edit_item ) . '">' . $link . '</a>';
547
+				$link = '<a class="post-edit-link" href="'.$url.'" title="'.esc_attr($post_type_obj->labels->edit_item).'">'.$link.'</a>';
548 548
 				// put it all together
549
-				return $before . apply_filters( 'edit_post_link', $link, $venue->ID() ) . $after;
549
+				return $before.apply_filters('edit_post_link', $link, $venue->ID()).$after;
550 550
 			}
551 551
 		}
552 552
 		return '';
Please login to merge, or discard this patch.
Indentation   -1 removed lines patch added patch discarded remove patch
@@ -799,7 +799,6 @@
 block discarded – undo
799 799
 
800 800
 
801 801
 	/**
802
-
803 802
 	 *
804 803
 	 * 	 If the the first date starts at midnight on one day, and the next date ends at midnight on the
805 804
 	 * 	 very next day then this method will return true.
Please login to merge, or discard this patch.
public/Espresso_Arabica_2014/content-espresso_events-venues.php 2 patches
Spacing   +31 added lines, -31 removed lines patch added patch discarded remove patch
@@ -1,64 +1,64 @@
 block discarded – undo
1 1
 <?php
2 2
 //echo '<br/><h6 style="color:#2EA2CC;">'. __FILE__ . ' &nbsp; <span style="font-weight:normal;color:#E76700"> Line #: ' . __LINE__ . '</span></h6>';
3 3
 if (
4
-	( is_single() && espresso_display_venue_in_event_details() )
5
-	|| ( is_archive() && espresso_display_venue_in_event_list() )
4
+	(is_single() && espresso_display_venue_in_event_details())
5
+	|| (is_archive() && espresso_display_venue_in_event_list())
6 6
 ) :
7 7
 	global $post;
8
-	do_action( 'AHEE_event_details_before_venue_details', $post );
9
-	$venue_name = espresso_venue_name( 0, 'details', FALSE );
10
-	if ( empty( $venue_name ) && espresso_is_venue_private() ) {
11
-		do_action( 'AHEE_event_details_after_venue_details', $post );
8
+	do_action('AHEE_event_details_before_venue_details', $post);
9
+	$venue_name = espresso_venue_name(0, 'details', FALSE);
10
+	if (empty($venue_name) && espresso_is_venue_private()) {
11
+		do_action('AHEE_event_details_after_venue_details', $post);
12 12
 		return '';
13 13
 	}
14 14
 ?>
15 15
 
16 16
 <div class="espresso-venue-dv<?php echo espresso_is_venue_private() ? ' espresso-private-venue-dv' : ''; ?>">
17 17
 	<h3 class="event-venues-h3 ee-event-h3">
18
-		<?php _e( 'Location', 'event_espresso' ); ?>
18
+		<?php _e('Location', 'event_espresso'); ?>
19 19
 	</h3>
20
-	<h4><strong><?php _e( 'Venue:', 'event_espresso' ); ?></strong>&nbsp;&nbsp; <strong> <?php echo $venue_name; ?></strong></h4>
20
+	<h4><strong><?php _e('Venue:', 'event_espresso'); ?></strong>&nbsp;&nbsp; <strong> <?php echo $venue_name; ?></strong></h4>
21 21
 	<p><span class="smaller-text tags-links"><?php echo espresso_venue_categories(); ?></span></p>
22
-<?php  if ( $venue_phone = espresso_venue_phone( $post->ID, FALSE )) : ?>
22
+<?php  if ($venue_phone = espresso_venue_phone($post->ID, FALSE)) : ?>
23 23
 	<p>
24
-		<span class="small-text"><strong><?php _e( 'Venue Phone:', 'event_espresso' ); ?></strong></span> <?php echo $venue_phone; ?>
24
+		<span class="small-text"><strong><?php _e('Venue Phone:', 'event_espresso'); ?></strong></span> <?php echo $venue_phone; ?>
25 25
 	</p>
26
-<?php endif;  ?>
27
-<?php  if ( espresso_venue_has_address( $post->ID )) : ?>
28
-	<strong><span class="dashicons dashicons-location-alt"></span><?php _e( 'Address:', 'event_espresso' ); ?></strong>
29
-	<?php espresso_venue_address( 'inline' ); ?>
30
-	<?php espresso_venue_gmap( $post->ID ); ?>
26
+<?php endif; ?>
27
+<?php  if (espresso_venue_has_address($post->ID)) : ?>
28
+	<strong><span class="dashicons dashicons-location-alt"></span><?php _e('Address:', 'event_espresso'); ?></strong>
29
+	<?php espresso_venue_address('inline'); ?>
30
+	<?php espresso_venue_gmap($post->ID); ?>
31 31
 	<div class="clear"><br/></div>
32
-<?php endif;  ?>
32
+<?php endif; ?>
33 33
 
34
-	<?php $VNU_ID = espresso_venue_id( $post->ID ); ?>
35
-	<?php if ( is_single() ) : ?>
36
-		<?php $venue_description = espresso_venue_description( $VNU_ID, FALSE ); ?>
37
-		<?php if ( $venue_description ) : ?>
34
+	<?php $VNU_ID = espresso_venue_id($post->ID); ?>
35
+	<?php if (is_single()) : ?>
36
+		<?php $venue_description = espresso_venue_description($VNU_ID, FALSE); ?>
37
+		<?php if ($venue_description) : ?>
38 38
 	<p>
39
-		<strong><?php _e( 'Description:', 'event_espresso' ); ?></strong><br/>
40
-		<?php echo do_shortcode( $venue_description ); ?>
39
+		<strong><?php _e('Description:', 'event_espresso'); ?></strong><br/>
40
+		<?php echo do_shortcode($venue_description); ?>
41 41
 	</p>
42
-		<?php endif;  ?>
42
+		<?php endif; ?>
43 43
 	<?php else : ?>
44
-		<?php $venue_excerpt = espresso_venue_excerpt( $VNU_ID, FALSE ); ?>
45
-		<?php if ( $venue_excerpt ) : ?>
44
+		<?php $venue_excerpt = espresso_venue_excerpt($VNU_ID, FALSE); ?>
45
+		<?php if ($venue_excerpt) : ?>
46 46
 	<p>
47
-		<strong><?php _e( 'Description:', 'event_espresso' ); ?></strong><br/>
47
+		<strong><?php _e('Description:', 'event_espresso'); ?></strong><br/>
48 48
 		<?php echo $venue_excerpt; ?>
49 49
 	</p>
50
-			<?php endif;  ?>
51
-		<?php endif;  ?>
50
+			<?php endif; ?>
51
+		<?php endif; ?>
52 52
 </div>
53 53
 <!-- .espresso-venue-dv -->
54 54
 <?php
55
-do_action( 'AHEE_event_details_after_venue_details', $post );
55
+do_action('AHEE_event_details_after_venue_details', $post);
56 56
 else :
57
-	if ( espresso_venue_is_password_protected() ) :
57
+	if (espresso_venue_is_password_protected()) :
58 58
 ?>
59 59
 	<div class="espresso-venue-dv  espresso-password-protected-venue-dv" >
60 60
 		<h3 class="event-venues-h3 ee-event-h3">
61
-			<?php _e( 'Location', 'event_espresso' );?>
61
+			<?php _e('Location', 'event_espresso'); ?>
62 62
 		</h3>
63 63
 		<?php echo espresso_password_protected_venue_form(); ?>
64 64
 	</div>
Please login to merge, or discard this patch.
Braces   +10 added lines, -4 removed lines patch added patch discarded remove patch
@@ -40,8 +40,11 @@  discard block
 block discarded – undo
40 40
 		<?php echo do_shortcode( $venue_description ); ?>
41 41
 	</p>
42 42
 		<?php endif;  ?>
43
-	<?php else : ?>
44
-		<?php $venue_excerpt = espresso_venue_excerpt( $VNU_ID, FALSE ); ?>
43
+	<?php else {
44
+	: ?>
45
+		<?php $venue_excerpt = espresso_venue_excerpt( $VNU_ID, FALSE );
46
+}
47
+?>
45 48
 		<?php if ( $venue_excerpt ) : ?>
46 49
 	<p>
47 50
 		<strong><?php _e( 'Description:', 'event_espresso' ); ?></strong><br/>
@@ -53,12 +56,15 @@  discard block
 block discarded – undo
53 56
 <!-- .espresso-venue-dv -->
54 57
 <?php
55 58
 do_action( 'AHEE_event_details_after_venue_details', $post );
56
-else :
59
+else {
60
+	:
57 61
 	if ( espresso_venue_is_password_protected() ) :
58 62
 ?>
59 63
 	<div class="espresso-venue-dv  espresso-password-protected-venue-dv" >
60 64
 		<h3 class="event-venues-h3 ee-event-h3">
61
-			<?php _e( 'Location', 'event_espresso' );?>
65
+			<?php _e( 'Location', 'event_espresso' );
66
+}
67
+?>
62 68
 		</h3>
63 69
 		<?php echo espresso_password_protected_venue_form(); ?>
64 70
 	</div>
Please login to merge, or discard this patch.