Completed
Branch BUG-8698-ticket-sellouts (a43227)
by
unknown
939:57 queued 919:17
created
core/EE_Dependency_Map.core.php 1 patch
Spacing   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if ( ! defined( 'EVENT_ESPRESSO_VERSION' ) ) {
3
-	exit( 'No direct script access allowed' );
2
+if ( ! defined('EVENT_ESPRESSO_VERSION')) {
3
+	exit('No direct script access allowed');
4 4
 }
5 5
 
6 6
 
@@ -70,11 +70,11 @@  discard block
 block discarded – undo
70 70
 	 * @param  \EE_Request  $request
71 71
 	 * @param  \EE_Response $response
72 72
 	 */
73
-	protected function __construct( EE_Request $request, EE_Response $response ) {
73
+	protected function __construct(EE_Request $request, EE_Response $response) {
74 74
 		$this->_request = $request;
75 75
 		$this->_response = $response;
76
-		add_action( 'EE_Load_Espresso_Core__handle_request__initialize_core_loading', array( $this, 'initialize' ) );
77
-		do_action( 'EE_Dependency_Map____construct' );
76
+		add_action('EE_Load_Espresso_Core__handle_request__initialize_core_loading', array($this, 'initialize'));
77
+		do_action('EE_Dependency_Map____construct');
78 78
 	}
79 79
 
80 80
 
@@ -95,10 +95,10 @@  discard block
 block discarded – undo
95 95
 	 * @param  \EE_Response $response
96 96
 	 * @return \EE_Dependency_Map instance
97 97
 	 */
98
-	public static function instance( EE_Request $request = null, EE_Response $response = null ) {
98
+	public static function instance(EE_Request $request = null, EE_Response $response = null) {
99 99
 		// check if class object is instantiated, and instantiated properly
100
-		if ( ! self::$_instance instanceof EE_Dependency_Map ) {
101
-			self::$_instance = new EE_Dependency_Map( $request, $response );
100
+		if ( ! self::$_instance instanceof EE_Dependency_Map) {
101
+			self::$_instance = new EE_Dependency_Map($request, $response);
102 102
 		}
103 103
 		return self::$_instance;
104 104
 	}
@@ -110,9 +110,9 @@  discard block
 block discarded – undo
110 110
 	 * @param array  $dependencies
111 111
 	 * @return boolean
112 112
 	 */
113
-	public static function register_dependencies( $class, $dependencies ) {
114
-		if ( ! isset( self::$_instance->_dependency_map[ $class ] ) ) {
115
-			self::$_instance->_dependency_map[ $class ] = (array)$dependencies;
113
+	public static function register_dependencies($class, $dependencies) {
114
+		if ( ! isset(self::$_instance->_dependency_map[$class])) {
115
+			self::$_instance->_dependency_map[$class] = (array) $dependencies;
116 116
 			return true;
117 117
 		}
118 118
 		return false;
@@ -126,18 +126,18 @@  discard block
 block discarded – undo
126 126
 	 * @return bool
127 127
 	 * @throws \EE_Error
128 128
 	 */
129
-	public static function register_class_loader( $class_name, $loader = 'load_core' ) {
129
+	public static function register_class_loader($class_name, $loader = 'load_core') {
130 130
 		// check that loader method starts with "load_" and exists in EE_Registry
131
-		if ( strpos( $loader, 'load_' ) !== 0 || ! method_exists( 'EE_Registry', $loader ) ) {
131
+		if (strpos($loader, 'load_') !== 0 || ! method_exists('EE_Registry', $loader)) {
132 132
 			throw new EE_Error(
133 133
 				sprintf(
134
-					__( '"%1$s" is not a valid loader method on EE_Registry.', 'event_espresso' ),
134
+					__('"%1$s" is not a valid loader method on EE_Registry.', 'event_espresso'),
135 135
 					$loader
136 136
 				)
137 137
 			);
138 138
 		}
139
-		if ( ! isset( self::$_instance->_class_loaders[ $class_name ] ) ) {
140
-			self::$_instance->_class_loaders[ $class_name ] = $loader;
139
+		if ( ! isset(self::$_instance->_class_loaders[$class_name])) {
140
+			self::$_instance->_class_loaders[$class_name] = $loader;
141 141
 			return true;
142 142
 		}
143 143
 		return false;
@@ -160,8 +160,8 @@  discard block
 block discarded – undo
160 160
 	 * @param string $class_name
161 161
 	 * @return boolean
162 162
 	 */
163
-	public function has( $class_name = '' ) {
164
-		return isset( $this->_dependency_map[ $class_name ] ) ? true : false;
163
+	public function has($class_name = '') {
164
+		return isset($this->_dependency_map[$class_name]) ? true : false;
165 165
 	}
166 166
 
167 167
 
@@ -173,8 +173,8 @@  discard block
 block discarded – undo
173 173
 	 * @param string $dependency
174 174
 	 * @return bool
175 175
 	 */
176
-	public function has_dependency_for_class( $class_name = '', $dependency = '' ) {
177
-		return isset( $this->_dependency_map[ $class_name ], $this->_dependency_map[ $class_name ][ $dependency ] )
176
+	public function has_dependency_for_class($class_name = '', $dependency = '') {
177
+		return isset($this->_dependency_map[$class_name], $this->_dependency_map[$class_name][$dependency])
178 178
 			? true
179 179
 			: false;
180 180
 	}
@@ -188,9 +188,9 @@  discard block
 block discarded – undo
188 188
 	 * @param string $dependency
189 189
 	 * @return int
190 190
 	 */
191
-	public function loading_strategy_for_class_dependency( $class_name = '', $dependency = '' ) {
192
-		return $this->has_dependency_for_class( $class_name, $dependency )
193
-			? $this->_dependency_map[ $class_name ][ $dependency ]
191
+	public function loading_strategy_for_class_dependency($class_name = '', $dependency = '') {
192
+		return $this->has_dependency_for_class($class_name, $dependency)
193
+			? $this->_dependency_map[$class_name][$dependency]
194 194
 			: EE_Dependency_Map::not_registered;
195 195
 	}
196 196
 
@@ -200,8 +200,8 @@  discard block
 block discarded – undo
200 200
 	 * @param string $class_name
201 201
 	 * @return string | Closure
202 202
 	 */
203
-	public function class_loader( $class_name ) {
204
-		return isset( $this->_class_loaders[ $class_name ] ) ? $this->_class_loaders[ $class_name ] : '';
203
+	public function class_loader($class_name) {
204
+		return isset($this->_class_loaders[$class_name]) ? $this->_class_loaders[$class_name] : '';
205 205
 	}
206 206
 
207 207
 
@@ -339,17 +339,17 @@  discard block
 block discarded – undo
339 339
 			'EE_Messages_Data_Handler_Collection'  => 'load_lib',
340 340
 			'EE_Message_Template_Group_Collection' => 'load_lib',
341 341
 			'EE_Messages_Generator' => function() {
342
-				return EE_Registry::instance()->load_lib( 'Messages_Generator', array(), false, false );
342
+				return EE_Registry::instance()->load_lib('Messages_Generator', array(), false, false);
343 343
 			},
344
-			'EE_Messages_Template_Defaults' => function( $arguments = array() ) {
345
-				return EE_Registry::instance()->load_lib( 'Messages_Template_Defaults', $arguments, false, false );
344
+			'EE_Messages_Template_Defaults' => function($arguments = array()) {
345
+				return EE_Registry::instance()->load_lib('Messages_Template_Defaults', $arguments, false, false);
346 346
 			},
347 347
 			//load_model
348 348
 			'EEM_Message_Template_Group'           => 'load_model',
349 349
 			'EEM_Message_Template'                 => 'load_model',
350 350
 			//load_helper
351 351
 			'EEH_Parse_Shortcodes'                 => function() {
352
-				if ( EE_Registry::instance()->load_helper( 'Parse_Shortcodes' ) ) {
352
+				if (EE_Registry::instance()->load_helper('Parse_Shortcodes')) {
353 353
 					return new EEH_Parse_Shortcodes();
354 354
 				}
355 355
 				return null;
Please login to merge, or discard this patch.
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   +276 added lines, -276 removed lines patch added patch discarded remove patch
@@ -27,12 +27,12 @@  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
 		// extract EE_Event object from passed param regardless of what it is (within reason of course)
33
-		$event = EEH_Event_View::get_event( $event );
33
+		$event = EEH_Event_View::get_event($event);
34 34
 		// do we have a valid event ?
35
-		return $event instanceof EE_Event  ? TRUE : FALSE;
35
+		return $event instanceof EE_Event ? TRUE : FALSE;
36 36
 	}
37 37
 	return FALSE;
38 38
 }
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
  * @return bool
45 45
  */
46 46
 function is_espresso_event_single() {
47
-	if ( can_use_espresso_conditionals( __FUNCTION__ )) {
47
+	if (can_use_espresso_conditionals(__FUNCTION__)) {
48 48
 		global $wp_query;
49 49
 		// return conditionals set by CPTs
50 50
 		return $wp_query instanceof WP_Query ? $wp_query->is_espresso_event_single : FALSE;
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
  * @return bool
60 60
  */
61 61
 function is_espresso_event_archive() {
62
-	if ( can_use_espresso_conditionals( __FUNCTION__ )) {
62
+	if (can_use_espresso_conditionals(__FUNCTION__)) {
63 63
 		global $wp_query;
64 64
 		return $wp_query instanceof WP_Query ? $wp_query->is_espresso_event_archive : FALSE;
65 65
 	}
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
  * @return bool
74 74
  */
75 75
 function is_espresso_event_taxonomy() {
76
-	if ( can_use_espresso_conditionals( __FUNCTION__ )) {
76
+	if (can_use_espresso_conditionals(__FUNCTION__)) {
77 77
 		global $wp_query;
78 78
 		return $wp_query instanceof WP_Query ? $wp_query->is_espresso_event_taxonomy : FALSE;
79 79
 	}
@@ -87,10 +87,10 @@  discard block
 block discarded – undo
87 87
  * @param int | \EE_Venue $venue
88 88
  * @return bool
89 89
  */
90
-function is_espresso_venue( $venue = NULL ) {
91
-	if ( can_use_espresso_conditionals( __FUNCTION__ )) {
90
+function is_espresso_venue($venue = NULL) {
91
+	if (can_use_espresso_conditionals(__FUNCTION__)) {
92 92
 		// extract EE_Venue object from passed param regardless of what it is (within reason of course)
93
-		$venue = EEH_Venue_View::get_venue( $venue, FALSE );
93
+		$venue = EEH_Venue_View::get_venue($venue, FALSE);
94 94
 		// do we have a valid event ?
95 95
 		return $venue instanceof EE_Venue ? TRUE : FALSE;
96 96
 	}
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
  * @return bool
105 105
  */
106 106
 function is_espresso_venue_single() {
107
-	if ( can_use_espresso_conditionals( __FUNCTION__ )) {
107
+	if (can_use_espresso_conditionals(__FUNCTION__)) {
108 108
 		global $wp_query;
109 109
 		return $wp_query instanceof WP_Query ? $wp_query->is_espresso_venue_single : FALSE;
110 110
 	}
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
  * @return bool
119 119
  */
120 120
 function is_espresso_venue_archive() {
121
-	if ( can_use_espresso_conditionals( __FUNCTION__ )) {
121
+	if (can_use_espresso_conditionals(__FUNCTION__)) {
122 122
 		global $wp_query;
123 123
 		return $wp_query instanceof WP_Query ? $wp_query->is_espresso_venue_archive : FALSE;
124 124
 	}
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
  * @return bool
133 133
  */
134 134
 function is_espresso_venue_taxonomy() {
135
-	if ( can_use_espresso_conditionals( __FUNCTION__ )) {
135
+	if (can_use_espresso_conditionals(__FUNCTION__)) {
136 136
 		global $wp_query;
137 137
 		return $wp_query instanceof WP_Query ? $wp_query->is_espresso_venue_taxonomy : FALSE;
138 138
 	}
@@ -146,12 +146,12 @@  discard block
 block discarded – undo
146 146
  * @param $conditional_tag
147 147
  * @return bool
148 148
  */
149
-function can_use_espresso_conditionals( $conditional_tag ) {
150
-	if ( ! did_action( 'AHEE__EE_System__initialize' )) {
149
+function can_use_espresso_conditionals($conditional_tag) {
150
+	if ( ! did_action('AHEE__EE_System__initialize')) {
151 151
 		EE_Error::doing_it_wrong(
152 152
 			__FUNCTION__,
153 153
 			sprintf(
154
-				__( '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'),
154
+				__('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'),
155 155
 				$conditional_tag
156 156
 			),
157 157
 			'4.4.0'
@@ -166,13 +166,13 @@  discard block
 block discarded – undo
166 166
 
167 167
 /*************************** Event Queries ***************************/
168 168
 
169
-if ( ! function_exists( 'espresso_get_events' )) {
169
+if ( ! function_exists('espresso_get_events')) {
170 170
 	/**
171 171
 	 * 	espresso_get_events
172 172
 	 * @param array $params
173 173
 	 * @return array
174 174
 	 */
175
-	function espresso_get_events( $params = array() ) {
175
+	function espresso_get_events($params = array()) {
176 176
 		//set default params
177 177
 		$default_espresso_events_params = array(
178 178
 			'limit' => 10,
@@ -183,18 +183,18 @@  discard block
 block discarded – undo
183 183
 			'sort' => 'ASC'
184 184
 		);
185 185
 		// allow the defaults to be filtered
186
-		$default_espresso_events_params = apply_filters( 'espresso_get_events__default_espresso_events_params', $default_espresso_events_params );
186
+		$default_espresso_events_params = apply_filters('espresso_get_events__default_espresso_events_params', $default_espresso_events_params);
187 187
 		// grab params and merge with defaults, then extract
188
-		$params = array_merge( $default_espresso_events_params, $params );
188
+		$params = array_merge($default_espresso_events_params, $params);
189 189
 		// run the query
190
-		$events_query = new EE_Event_List_Query( $params );
190
+		$events_query = new EE_Event_List_Query($params);
191 191
 		// assign results to a variable so we can return it
192 192
 		$events = $events_query->have_posts() ? $events_query->posts : array();
193 193
 		// but first reset the query and postdata
194 194
 		wp_reset_query();
195 195
 		wp_reset_postdata();
196 196
 		EED_Events_Archive::remove_all_events_archive_filters();
197
-		unset( $events_query );
197
+		unset($events_query);
198 198
 		return $events;
199 199
 	}
200 200
 }
@@ -208,32 +208,32 @@  discard block
 block discarded – undo
208 208
  * espresso_load_ticket_selector
209 209
  */
210 210
 function espresso_load_ticket_selector() {
211
-	EE_Registry::instance()->load_file( EE_MODULES . 'ticket_selector', 'EED_Ticket_Selector', 'module' );
211
+	EE_Registry::instance()->load_file(EE_MODULES.'ticket_selector', 'EED_Ticket_Selector', 'module');
212 212
 }
213 213
 
214
-if ( ! function_exists( 'espresso_ticket_selector' )) {
214
+if ( ! function_exists('espresso_ticket_selector')) {
215 215
 	/**
216 216
 	 * espresso_ticket_selector
217 217
 	 * @param null $event
218 218
 	 */
219
-	function espresso_ticket_selector( $event = NULL ) {
220
-		if (  ! apply_filters( 'FHEE_disable_espresso_ticket_selector', FALSE ) ) {
219
+	function espresso_ticket_selector($event = NULL) {
220
+		if ( ! apply_filters('FHEE_disable_espresso_ticket_selector', FALSE)) {
221 221
 			espresso_load_ticket_selector();
222
-			echo EED_Ticket_Selector::display_ticket_selector( $event );
222
+			echo EED_Ticket_Selector::display_ticket_selector($event);
223 223
 		}
224 224
 	}
225 225
 }
226 226
 
227 227
 
228
-	if ( ! function_exists( 'espresso_view_details_btn' )) {
228
+	if ( ! function_exists('espresso_view_details_btn')) {
229 229
 	/**
230 230
 	 * espresso_view_details_btn
231 231
 	 * @param null $event
232 232
 	 */
233
-	function espresso_view_details_btn( $event = NULL ) {
234
-		if (  ! apply_filters( 'FHEE_disable_espresso_view_details_btn', FALSE ) ) {
233
+	function espresso_view_details_btn($event = NULL) {
234
+		if ( ! apply_filters('FHEE_disable_espresso_view_details_btn', FALSE)) {
235 235
 			espresso_load_ticket_selector();
236
-			echo EED_Ticket_Selector::display_ticket_selector( $event, TRUE );
236
+			echo EED_Ticket_Selector::display_ticket_selector($event, TRUE);
237 237
 		}
238 238
 	}
239 239
 }
@@ -243,7 +243,7 @@  discard block
 block discarded – undo
243 243
 
244 244
 /*************************** EEH_Event_View ***************************/
245 245
 
246
-if ( ! function_exists( 'espresso_load_event_list_assets' )) {
246
+if ( ! function_exists('espresso_load_event_list_assets')) {
247 247
 	/**
248 248
 	 * espresso_load_event_list_assets
249 249
 	 * ensures that event list styles and scripts are loaded
@@ -252,13 +252,13 @@  discard block
 block discarded – undo
252 252
 	 */
253 253
 	function espresso_load_event_list_assets() {
254 254
 		$event_list = EED_Events_Archive::instance();
255
-		add_action( 'AHEE__EE_System__initialize_last', array( $event_list, 'load_event_list_assets' ), 10 );
256
-		add_filter( 'FHEE_enable_default_espresso_css', '__return_true' );
255
+		add_action('AHEE__EE_System__initialize_last', array($event_list, 'load_event_list_assets'), 10);
256
+		add_filter('FHEE_enable_default_espresso_css', '__return_true');
257 257
 	}
258 258
 }
259 259
 
260 260
 
261
-if ( ! function_exists( 'espresso_event_reg_button' )) {
261
+if ( ! function_exists('espresso_event_reg_button')) {
262 262
 	/**
263 263
 	 * espresso_event_reg_button
264 264
 	 * returns the "Register Now" button if event is active,
@@ -270,9 +270,9 @@  discard block
 block discarded – undo
270 270
 	 * @param bool $EVT_ID
271 271
 	 * @return string
272 272
 	 */
273
-	function espresso_event_reg_button( $btn_text_if_active = NULL, $btn_text_if_inactive = FALSE, $EVT_ID = FALSE ) {
274
-		$event_status = EEH_Event_View::event_active_status( $EVT_ID );
275
-		switch ( $event_status ) {
273
+	function espresso_event_reg_button($btn_text_if_active = NULL, $btn_text_if_inactive = FALSE, $EVT_ID = FALSE) {
274
+		$event_status = EEH_Event_View::event_active_status($EVT_ID);
275
+		switch ($event_status) {
276 276
 			case EE_Datetime::sold_out :
277 277
 				$btn_text = __('Sold Out', 'event_espresso');
278 278
 				$class = 'ee-pink';
@@ -288,10 +288,10 @@  discard block
 block discarded – undo
288 288
 			case EE_Datetime::upcoming :
289 289
 			case EE_Datetime::active :
290 290
 			default :
291
-				$btn_text =! empty( $btn_text_if_active ) ? $btn_text_if_active : __( 'Register Now', 'event_espresso' );
291
+				$btn_text = ! empty($btn_text_if_active) ? $btn_text_if_active : __('Register Now', 'event_espresso');
292 292
 				$class = 'ee-green';
293 293
 		}
294
-		if ( $event_status < 1 && ! empty( $btn_text_if_inactive )) {
294
+		if ($event_status < 1 && ! empty($btn_text_if_inactive)) {
295 295
 			$btn_text = $btn_text_if_inactive;
296 296
 			$class = 'ee-grey';
297 297
 		}
@@ -305,7 +305,7 @@  discard block
 block discarded – undo
305 305
 
306 306
 
307 307
 
308
-if ( ! function_exists( 'espresso_display_ticket_selector' )) {
308
+if ( ! function_exists('espresso_display_ticket_selector')) {
309 309
 	/**
310 310
 	 * espresso_display_ticket_selector
311 311
 	 * whether or not to display the Ticket Selector for an event
@@ -313,14 +313,14 @@  discard block
 block discarded – undo
313 313
 	 * @param bool $EVT_ID
314 314
 	 * @return boolean
315 315
 	 */
316
-	function espresso_display_ticket_selector( $EVT_ID = FALSE ) {
317
-		return EEH_Event_View::display_ticket_selector( $EVT_ID );
316
+	function espresso_display_ticket_selector($EVT_ID = FALSE) {
317
+		return EEH_Event_View::display_ticket_selector($EVT_ID);
318 318
 	}
319 319
 }
320 320
 
321 321
 
322 322
 
323
-if ( ! function_exists( 'espresso_event_status_banner' )) {
323
+if ( ! function_exists('espresso_event_status_banner')) {
324 324
 	/**
325 325
 	 * espresso_event_status
326 326
 	 * returns a banner showing the event status if it is sold out, expired, or inactive
@@ -328,13 +328,13 @@  discard block
 block discarded – undo
328 328
 	 * @param bool $EVT_ID
329 329
 	 * @return string
330 330
 	 */
331
-	function espresso_event_status_banner( $EVT_ID = FALSE ) {
332
-		return EEH_Event_View::event_status( $EVT_ID );
331
+	function espresso_event_status_banner($EVT_ID = FALSE) {
332
+		return EEH_Event_View::event_status($EVT_ID);
333 333
 	}
334 334
 }
335 335
 
336 336
 
337
-if ( ! function_exists( 'espresso_event_status' )) {
337
+if ( ! function_exists('espresso_event_status')) {
338 338
 	/**
339 339
 	 * espresso_event_status
340 340
 	 * returns the event status if it is sold out, expired, or inactive
@@ -343,17 +343,17 @@  discard block
 block discarded – undo
343 343
 	 * @param bool $echo
344 344
 	 * @return string
345 345
 	 */
346
-	function espresso_event_status( $EVT_ID = 0, $echo = TRUE ) {
347
-		if ( $echo ) {
348
-			echo EEH_Event_View::event_active_status( $EVT_ID );
346
+	function espresso_event_status($EVT_ID = 0, $echo = TRUE) {
347
+		if ($echo) {
348
+			echo EEH_Event_View::event_active_status($EVT_ID);
349 349
 			return '';
350 350
 		}
351
-		return EEH_Event_View::event_active_status( $EVT_ID );
351
+		return EEH_Event_View::event_active_status($EVT_ID);
352 352
 	}
353 353
 }
354 354
 
355 355
 
356
-if ( ! function_exists( 'espresso_event_categories' )) {
356
+if ( ! function_exists('espresso_event_categories')) {
357 357
 	/**
358 358
 	 * espresso_event_categories
359 359
 	 * returns the terms associated with an event
@@ -363,17 +363,17 @@  discard block
 block discarded – undo
363 363
 	 * @param bool $echo
364 364
 	 * @return string
365 365
 	 */
366
-	function espresso_event_categories( $EVT_ID = 0, $hide_uncategorized = TRUE, $echo = TRUE ) {
367
-		if ( $echo ) {
368
-			echo EEH_Event_View::event_categories( $EVT_ID, $hide_uncategorized );
366
+	function espresso_event_categories($EVT_ID = 0, $hide_uncategorized = TRUE, $echo = TRUE) {
367
+		if ($echo) {
368
+			echo EEH_Event_View::event_categories($EVT_ID, $hide_uncategorized);
369 369
 			return '';
370 370
 		}
371
-		return EEH_Event_View::event_categories( $EVT_ID, $hide_uncategorized );
371
+		return EEH_Event_View::event_categories($EVT_ID, $hide_uncategorized);
372 372
 	}
373 373
 }
374 374
 
375 375
 
376
-if ( ! function_exists( 'espresso_event_tickets_available' )) {
376
+if ( ! function_exists('espresso_event_tickets_available')) {
377 377
 	/**
378 378
 	 * espresso_event_tickets_available
379 379
 	 * returns the ticket types available for purchase for an event
@@ -383,26 +383,26 @@  discard block
 block discarded – undo
383 383
 	 * @param bool $format
384 384
 	 * @return string
385 385
 	 */
386
-	function espresso_event_tickets_available( $EVT_ID = 0, $echo = TRUE, $format = TRUE ) {
387
-		$tickets = EEH_Event_View::event_tickets_available( $EVT_ID );
388
-		if ( is_array( $tickets ) && ! empty( $tickets )) {
386
+	function espresso_event_tickets_available($EVT_ID = 0, $echo = TRUE, $format = TRUE) {
387
+		$tickets = EEH_Event_View::event_tickets_available($EVT_ID);
388
+		if (is_array($tickets) && ! empty($tickets)) {
389 389
 			// if formatting then $html will be a string, else it will be an array of ticket objects
390
-			$html = $format ? '<ul id="ee-event-tickets-ul-' . $EVT_ID . '" class="ee-event-tickets-ul">' : array();
391
-			foreach ( $tickets as $ticket ) {
392
-				if ( $ticket instanceof EE_Ticket ) {
393
-					if ( $format ) {
394
-						$html .= '<li id="ee-event-tickets-li-' . $ticket->ID() . '" class="ee-event-tickets-li">';
395
-						$html .= $ticket->name() . ' ' . EEH_Template::format_currency( $ticket->get_ticket_total_with_taxes() );
390
+			$html = $format ? '<ul id="ee-event-tickets-ul-'.$EVT_ID.'" class="ee-event-tickets-ul">' : array();
391
+			foreach ($tickets as $ticket) {
392
+				if ($ticket instanceof EE_Ticket) {
393
+					if ($format) {
394
+						$html .= '<li id="ee-event-tickets-li-'.$ticket->ID().'" class="ee-event-tickets-li">';
395
+						$html .= $ticket->name().' '.EEH_Template::format_currency($ticket->get_ticket_total_with_taxes());
396 396
 						$html .= '</li>';
397 397
 					} else {
398 398
 						$html[] = $ticket;
399 399
 					}
400 400
 				}
401 401
 			}
402
-			if ( $format ) {
402
+			if ($format) {
403 403
 				$html .= '</ul>';
404 404
 			}
405
-			if ( $echo && ! $format ) {
405
+			if ($echo && ! $format) {
406 406
 				echo $html;
407 407
 				return '';
408 408
 			}
@@ -412,7 +412,7 @@  discard block
 block discarded – undo
412 412
 	}
413 413
 }
414 414
 
415
-if ( ! function_exists( 'espresso_event_date_obj' )) {
415
+if ( ! function_exists('espresso_event_date_obj')) {
416 416
 	/**
417 417
 	 * espresso_event_date_obj
418 418
 	 * returns the primary date object for an event
@@ -420,13 +420,13 @@  discard block
 block discarded – undo
420 420
 	 * @param bool $EVT_ID
421 421
 	 * @return object
422 422
 	 */
423
-	function espresso_event_date_obj( $EVT_ID = FALSE ) {
424
-		return EEH_Event_View::get_primary_date_obj( $EVT_ID );
423
+	function espresso_event_date_obj($EVT_ID = FALSE) {
424
+		return EEH_Event_View::get_primary_date_obj($EVT_ID);
425 425
 	}
426 426
 }
427 427
 
428 428
 
429
-if ( ! function_exists( 'espresso_event_date' )) {
429
+if ( ! function_exists('espresso_event_date')) {
430 430
 	/**
431 431
 	 * espresso_event_date
432 432
 	 * returns the primary date for an event
@@ -437,22 +437,22 @@  discard block
 block discarded – undo
437 437
 	 * @param bool $echo
438 438
 	 * @return string
439 439
 	 */
440
-	function espresso_event_date( $date_format = '', $time_format = '', $EVT_ID = FALSE, $echo = TRUE ) {
441
-		$date_format = ! empty( $date_format ) ? $date_format : get_option( 'date_format' );
442
-		$time_format = ! empty( $time_format ) ? $time_format : get_option( 'time_format' );
443
-		$date_format = apply_filters( 'FHEE__espresso_event_date__date_format', $date_format );
444
-		$time_format = apply_filters( 'FHEE__espresso_event_date__time_format', $time_format );
445
-		if($echo){
446
-			echo EEH_Event_View::the_event_date( $date_format, $time_format, $EVT_ID );
440
+	function espresso_event_date($date_format = '', $time_format = '', $EVT_ID = FALSE, $echo = TRUE) {
441
+		$date_format = ! empty($date_format) ? $date_format : get_option('date_format');
442
+		$time_format = ! empty($time_format) ? $time_format : get_option('time_format');
443
+		$date_format = apply_filters('FHEE__espresso_event_date__date_format', $date_format);
444
+		$time_format = apply_filters('FHEE__espresso_event_date__time_format', $time_format);
445
+		if ($echo) {
446
+			echo EEH_Event_View::the_event_date($date_format, $time_format, $EVT_ID);
447 447
 			return '';
448 448
 		}
449
-		return EEH_Event_View::the_event_date( $date_format, $time_format, $EVT_ID );
449
+		return EEH_Event_View::the_event_date($date_format, $time_format, $EVT_ID);
450 450
 
451 451
 	}
452 452
 }
453 453
 
454 454
 
455
-if ( ! function_exists( 'espresso_list_of_event_dates' )) {
455
+if ( ! function_exists('espresso_list_of_event_dates')) {
456 456
 	/**
457 457
 	 * espresso_list_of_event_dates
458 458
 	 * returns a unordered list of dates for an event
@@ -467,40 +467,40 @@  discard block
 block discarded – undo
467 467
 	 * @param null   $limit
468 468
 	 * @return string
469 469
 	 */
470
-	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 ) {
471
-		$date_format = ! empty( $date_format ) ? $date_format : get_option( 'date_format' );
472
-		$time_format = ! empty( $time_format ) ? $time_format : get_option( 'time_format' );
473
-		$date_format = apply_filters( 'FHEE__espresso_list_of_event_dates__date_format', $date_format );
474
-		$time_format = apply_filters( 'FHEE__espresso_list_of_event_dates__time_format', $time_format );
475
-		$datetimes = EEH_Event_View::get_all_date_obj( $EVT_ID, $show_expired, FALSE, $limit );
476
-		if ( ! $format ) {
477
-			return apply_filters( 'FHEE__espresso_list_of_event_dates__datetimes', $datetimes );
470
+	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) {
471
+		$date_format = ! empty($date_format) ? $date_format : get_option('date_format');
472
+		$time_format = ! empty($time_format) ? $time_format : get_option('time_format');
473
+		$date_format = apply_filters('FHEE__espresso_list_of_event_dates__date_format', $date_format);
474
+		$time_format = apply_filters('FHEE__espresso_list_of_event_dates__time_format', $time_format);
475
+		$datetimes = EEH_Event_View::get_all_date_obj($EVT_ID, $show_expired, FALSE, $limit);
476
+		if ( ! $format) {
477
+			return apply_filters('FHEE__espresso_list_of_event_dates__datetimes', $datetimes);
478 478
 		}
479 479
 		//d( $datetimes );
480
-		if ( is_array( $datetimes ) && ! empty( $datetimes )) {
480
+		if (is_array($datetimes) && ! empty($datetimes)) {
481 481
 			global $post;
482
-			$html = $format ? '<ul id="ee-event-datetimes-ul-' . $post->ID . '" class="ee-event-datetimes-ul ee-clearfix">' : '';
483
-			foreach ( $datetimes as $datetime ) {
484
-				if ( $datetime instanceof EE_Datetime ) {
485
-					$html .= '<li id="ee-event-datetimes-li-' . $datetime->ID();
486
-					$html .= '" class="ee-event-datetimes-li ee-event-datetimes-li-' . $datetime->get_active_status() . '">';
482
+			$html = $format ? '<ul id="ee-event-datetimes-ul-'.$post->ID.'" class="ee-event-datetimes-ul ee-clearfix">' : '';
483
+			foreach ($datetimes as $datetime) {
484
+				if ($datetime instanceof EE_Datetime) {
485
+					$html .= '<li id="ee-event-datetimes-li-'.$datetime->ID();
486
+					$html .= '" class="ee-event-datetimes-li ee-event-datetimes-li-'.$datetime->get_active_status().'">';
487 487
 					$datetime_name = $datetime->name();
488
-					$html .= ! empty( $datetime_name ) ? '<strong>' . $datetime_name . '</strong>' : '';
489
-					$html .= ! empty( $datetime_name )  && $add_breaks ? '<br />' : '';
490
-					$html .= '<span class="dashicons dashicons-calendar"></span>' . $datetime->date_range( $date_format ) . '<br/>';
491
-					$html .= '<span class="dashicons dashicons-clock"></span>' . $datetime->time_range( $time_format );
488
+					$html .= ! empty($datetime_name) ? '<strong>'.$datetime_name.'</strong>' : '';
489
+					$html .= ! empty($datetime_name) && $add_breaks ? '<br />' : '';
490
+					$html .= '<span class="dashicons dashicons-calendar"></span>'.$datetime->date_range($date_format).'<br/>';
491
+					$html .= '<span class="dashicons dashicons-clock"></span>'.$datetime->time_range($time_format);
492 492
 					$datetime_description = $datetime->description();
493
-					$html .= ! empty( $datetime_description )  && $add_breaks ? '<br />' : '';
494
-					$html .= ! empty( $datetime_description ) ? ' - ' . $datetime_description : '';
495
-					$html = apply_filters( 'FHEE__espresso_list_of_event_dates__datetime_html', $html, $datetime );
493
+					$html .= ! empty($datetime_description) && $add_breaks ? '<br />' : '';
494
+					$html .= ! empty($datetime_description) ? ' - '.$datetime_description : '';
495
+					$html = apply_filters('FHEE__espresso_list_of_event_dates__datetime_html', $html, $datetime);
496 496
 					$html .= '</li>';
497 497
 				}
498 498
 			}
499 499
 			$html .= $format ? '</ul>' : '';
500 500
 		} else {
501
-			$html = $format ?  '<p><span class="dashicons dashicons-marker pink-text"></span>' . __( 'There are no upcoming dates for this event.', 'event_espresso' ) . '</p><br/>' : '';
501
+			$html = $format ? '<p><span class="dashicons dashicons-marker pink-text"></span>'.__('There are no upcoming dates for this event.', 'event_espresso').'</p><br/>' : '';
502 502
 		}
503
-		if ( $echo ) {
503
+		if ($echo) {
504 504
 			echo $html;
505 505
 			return '';
506 506
 		}
@@ -509,7 +509,7 @@  discard block
 block discarded – undo
509 509
 }
510 510
 
511 511
 
512
-if ( ! function_exists( 'espresso_event_end_date' )) {
512
+if ( ! function_exists('espresso_event_end_date')) {
513 513
 	/**
514 514
 	 * espresso_event_end_date
515 515
 	 * returns the last date for an event
@@ -520,20 +520,20 @@  discard block
 block discarded – undo
520 520
 	 * @param bool   $echo
521 521
 	 * @return string
522 522
 	 */
523
-	function espresso_event_end_date( $date_format = '', $time_format = '', $EVT_ID = FALSE, $echo = TRUE ) {
524
-		$date_format = ! empty( $date_format ) ? $date_format : get_option( 'date_format' );
525
-		$time_format = ! empty( $time_format ) ? $time_format : get_option( 'time_format' );
526
-		$date_format = apply_filters( 'FHEE__espresso_event_end_date__date_format', $date_format );
527
-		$time_format = apply_filters( 'FHEE__espresso_event_end_date__time_format', $time_format );
528
-		if($echo){
529
-			echo EEH_Event_View::the_event_end_date( $date_format, $time_format, $EVT_ID );
523
+	function espresso_event_end_date($date_format = '', $time_format = '', $EVT_ID = FALSE, $echo = TRUE) {
524
+		$date_format = ! empty($date_format) ? $date_format : get_option('date_format');
525
+		$time_format = ! empty($time_format) ? $time_format : get_option('time_format');
526
+		$date_format = apply_filters('FHEE__espresso_event_end_date__date_format', $date_format);
527
+		$time_format = apply_filters('FHEE__espresso_event_end_date__time_format', $time_format);
528
+		if ($echo) {
529
+			echo EEH_Event_View::the_event_end_date($date_format, $time_format, $EVT_ID);
530 530
 			return '';
531 531
 		}
532
-		return EEH_Event_View::the_event_end_date( $date_format, $time_format, $EVT_ID );
532
+		return EEH_Event_View::the_event_end_date($date_format, $time_format, $EVT_ID);
533 533
 	}
534 534
 }
535 535
 
536
-if ( ! function_exists( 'espresso_event_date_range' )) {
536
+if ( ! function_exists('espresso_event_date_range')) {
537 537
 	/**
538 538
 	 * espresso_event_date_range
539 539
 	 * returns the first and last chronologically ordered dates for an event (if different)
@@ -546,31 +546,31 @@  discard block
 block discarded – undo
546 546
 	 * @param bool   $echo
547 547
 	 * @return string
548 548
 	 */
549
-	function espresso_event_date_range( $date_format = '', $time_format = '', $single_date_format = '', $single_time_format = '', $EVT_ID = FALSE, $echo = TRUE ) {
549
+	function espresso_event_date_range($date_format = '', $time_format = '', $single_date_format = '', $single_time_format = '', $EVT_ID = FALSE, $echo = TRUE) {
550 550
 		// set and filter date and time formats when a range is returned
551
-		$date_format = ! empty( $date_format ) ? $date_format : get_option( 'date_format' );
552
-		$date_format = apply_filters( 'FHEE__espresso_event_date_range__date_format', $date_format );
551
+		$date_format = ! empty($date_format) ? $date_format : get_option('date_format');
552
+		$date_format = apply_filters('FHEE__espresso_event_date_range__date_format', $date_format);
553 553
 		// get the start and end date with NO time portion
554
-		$the_event_date = EEH_Event_View::the_earliest_event_date( $date_format, '', $EVT_ID );
555
-		$the_event_end_date = EEH_Event_View::the_latest_event_date( $date_format, '', $EVT_ID );
554
+		$the_event_date = EEH_Event_View::the_earliest_event_date($date_format, '', $EVT_ID);
555
+		$the_event_end_date = EEH_Event_View::the_latest_event_date($date_format, '', $EVT_ID);
556 556
 		// now we can determine if date range spans more than one day
557
-		if ( $the_event_date != $the_event_end_date ) {
558
-			$time_format = ! empty( $time_format ) ? $time_format : get_option( 'time_format' );
559
-			$time_format = apply_filters( 'FHEE__espresso_event_date_range__time_format', $time_format );
557
+		if ($the_event_date != $the_event_end_date) {
558
+			$time_format = ! empty($time_format) ? $time_format : get_option('time_format');
559
+			$time_format = apply_filters('FHEE__espresso_event_date_range__time_format', $time_format);
560 560
 			$html = sprintf(
561
-				__( '%1$s - %2$s', 'event_espresso' ),
562
-				EEH_Event_View::the_earliest_event_date( $date_format, $time_format, $EVT_ID ),
563
-				EEH_Event_View::the_latest_event_date( $date_format, $time_format, $EVT_ID )
561
+				__('%1$s - %2$s', 'event_espresso'),
562
+				EEH_Event_View::the_earliest_event_date($date_format, $time_format, $EVT_ID),
563
+				EEH_Event_View::the_latest_event_date($date_format, $time_format, $EVT_ID)
564 564
 			);
565 565
 		} else {
566 566
 			// set and filter date and time formats when only a single datetime is returned
567
-			$single_date_format = ! empty( $single_date_format ) ? $single_date_format : get_option( 'date_format' );
568
-			$single_time_format = ! empty( $single_time_format ) ? $single_time_format : get_option( 'time_format' );
569
-			$single_date_format = apply_filters( 'FHEE__espresso_event_date_range__single_date_format', $single_date_format );
570
-			$single_time_format = apply_filters( 'FHEE__espresso_event_date_range__single_time_format', $single_time_format );
571
-			$html = EEH_Event_View::the_earliest_event_date( $single_date_format, $single_time_format, $EVT_ID );
567
+			$single_date_format = ! empty($single_date_format) ? $single_date_format : get_option('date_format');
568
+			$single_time_format = ! empty($single_time_format) ? $single_time_format : get_option('time_format');
569
+			$single_date_format = apply_filters('FHEE__espresso_event_date_range__single_date_format', $single_date_format);
570
+			$single_time_format = apply_filters('FHEE__espresso_event_date_range__single_time_format', $single_time_format);
571
+			$html = EEH_Event_View::the_earliest_event_date($single_date_format, $single_time_format, $EVT_ID);
572 572
 		}
573
-		if ( $echo ) {
573
+		if ($echo) {
574 574
 			echo $html;
575 575
 			return '';
576 576
 		}
@@ -579,7 +579,7 @@  discard block
 block discarded – undo
579 579
 }
580 580
 
581 581
 
582
-if ( ! function_exists( 'espresso_event_date_as_calendar_page' )) {
582
+if ( ! function_exists('espresso_event_date_as_calendar_page')) {
583 583
 	/**
584 584
 	 * espresso_event_date_as_calendar_page
585 585
 	 * returns the primary date for an event, stylized to appear as the page of a calendar
@@ -587,15 +587,15 @@  discard block
 block discarded – undo
587 587
 	 * @param bool $EVT_ID
588 588
 	 * @return string
589 589
 	 */
590
-	function espresso_event_date_as_calendar_page( $EVT_ID = FALSE ) {
591
-		EEH_Event_View::event_date_as_calendar_page( $EVT_ID );
590
+	function espresso_event_date_as_calendar_page($EVT_ID = FALSE) {
591
+		EEH_Event_View::event_date_as_calendar_page($EVT_ID);
592 592
 	}
593 593
 }
594 594
 
595 595
 
596 596
 
597 597
 
598
-if ( ! function_exists( 'espresso_event_link_url' )) {
598
+if ( ! function_exists('espresso_event_link_url')) {
599 599
 	/**
600 600
 	 * espresso_event_link_url
601 601
 	 *
@@ -603,18 +603,18 @@  discard block
 block discarded – undo
603 603
 	 * @param bool $echo
604 604
 	 * @return string
605 605
 	 */
606
-	function espresso_event_link_url( $EVT_ID = 0, $echo = TRUE ) {
607
-		if ( $echo ) {
608
-			echo EEH_Event_View::event_link_url( $EVT_ID );
606
+	function espresso_event_link_url($EVT_ID = 0, $echo = TRUE) {
607
+		if ($echo) {
608
+			echo EEH_Event_View::event_link_url($EVT_ID);
609 609
 			return '';
610 610
 		}
611
-		return EEH_Event_View::event_link_url( $EVT_ID );
611
+		return EEH_Event_View::event_link_url($EVT_ID);
612 612
 	}
613 613
 }
614 614
 
615 615
 
616 616
 
617
-if ( ! function_exists( 'espresso_event_has_content_or_excerpt' )) {
617
+if ( ! function_exists('espresso_event_has_content_or_excerpt')) {
618 618
 	/**
619 619
 	 *    espresso_event_has_content_or_excerpt
620 620
 	 *
@@ -622,15 +622,15 @@  discard block
 block discarded – undo
622 622
 	 * @param bool $EVT_ID
623 623
 	 * @return    boolean
624 624
 	 */
625
-	function espresso_event_has_content_or_excerpt( $EVT_ID = FALSE ) {
626
-		return EEH_Event_View::event_has_content_or_excerpt( $EVT_ID );
625
+	function espresso_event_has_content_or_excerpt($EVT_ID = FALSE) {
626
+		return EEH_Event_View::event_has_content_or_excerpt($EVT_ID);
627 627
 	}
628 628
 }
629 629
 
630 630
 
631 631
 
632 632
 
633
-if ( ! function_exists( 'espresso_event_content_or_excerpt' )) {
633
+if ( ! function_exists('espresso_event_content_or_excerpt')) {
634 634
 	/**
635 635
 	 * espresso_event_content_or_excerpt
636 636
 	 *
@@ -639,18 +639,18 @@  discard block
 block discarded – undo
639 639
 	 * @param bool $echo
640 640
 	 * @return string
641 641
 	 */
642
-	function espresso_event_content_or_excerpt( $num_words = 55, $more = NULL, $echo = TRUE ) {
643
-		if ( $echo ) {
644
-			echo EEH_Event_View::event_content_or_excerpt( $num_words, $more );
642
+	function espresso_event_content_or_excerpt($num_words = 55, $more = NULL, $echo = TRUE) {
643
+		if ($echo) {
644
+			echo EEH_Event_View::event_content_or_excerpt($num_words, $more);
645 645
 			return '';
646 646
 		}
647
-		return EEH_Event_View::event_content_or_excerpt( $num_words, $more );
647
+		return EEH_Event_View::event_content_or_excerpt($num_words, $more);
648 648
 	}
649 649
 }
650 650
 
651 651
 
652 652
 
653
-if ( ! function_exists( 'espresso_event_phone' )) {
653
+if ( ! function_exists('espresso_event_phone')) {
654 654
 	/**
655 655
 	 * espresso_event_phone
656 656
 	 *
@@ -658,18 +658,18 @@  discard block
 block discarded – undo
658 658
 	 * @param bool $echo
659 659
 	 * @return string
660 660
 	 */
661
-	function espresso_event_phone( $EVT_ID = 0, $echo = TRUE ) {
662
-		if ( $echo ) {
663
-			echo EEH_Event_View::event_phone( $EVT_ID );
661
+	function espresso_event_phone($EVT_ID = 0, $echo = TRUE) {
662
+		if ($echo) {
663
+			echo EEH_Event_View::event_phone($EVT_ID);
664 664
 			return '';
665 665
 		}
666
-		return EEH_Event_View::event_phone( $EVT_ID );
666
+		return EEH_Event_View::event_phone($EVT_ID);
667 667
 	}
668 668
 }
669 669
 
670 670
 
671 671
 
672
-if ( ! function_exists( 'espresso_edit_event_link' )) {
672
+if ( ! function_exists('espresso_edit_event_link')) {
673 673
 	/**
674 674
 	 * espresso_edit_event_link
675 675
 	 * returns a link to edit an event
@@ -678,39 +678,39 @@  discard block
 block discarded – undo
678 678
 	 * @param bool $echo
679 679
 	 * @return string
680 680
 	 */
681
-	function espresso_edit_event_link( $EVT_ID = 0, $echo = TRUE ) {
682
-		if ( $echo ) {
683
-			echo EEH_Event_View::edit_event_link( $EVT_ID );
681
+	function espresso_edit_event_link($EVT_ID = 0, $echo = TRUE) {
682
+		if ($echo) {
683
+			echo EEH_Event_View::edit_event_link($EVT_ID);
684 684
 			return '';
685 685
 		}
686
-		return EEH_Event_View::edit_event_link( $EVT_ID );
686
+		return EEH_Event_View::edit_event_link($EVT_ID);
687 687
 	}
688 688
 }
689 689
 
690 690
 
691
-if ( ! function_exists( 'espresso_organization_name' )) {
691
+if ( ! function_exists('espresso_organization_name')) {
692 692
 	/**
693 693
 	 * espresso_organization_name
694 694
 	 * @param bool $echo
695 695
 	 * @return string
696 696
 	 */
697 697
 	function espresso_organization_name($echo = TRUE) {
698
-		if($echo){
699
-			echo EE_Registry::instance()->CFG->organization->get_pretty( 'name' );
698
+		if ($echo) {
699
+			echo EE_Registry::instance()->CFG->organization->get_pretty('name');
700 700
 			return '';
701 701
 		}
702
-		return EE_Registry::instance()->CFG->organization->get_pretty( 'name' );
702
+		return EE_Registry::instance()->CFG->organization->get_pretty('name');
703 703
 	}
704 704
 }
705 705
 
706
-if ( ! function_exists( 'espresso_organization_address' )) {
706
+if ( ! function_exists('espresso_organization_address')) {
707 707
 	/**
708 708
 	 * espresso_organization_address
709 709
 	 * @param string $type
710 710
 	 * @return string
711 711
 	 */
712
-	function espresso_organization_address( $type = 'inline' ) {
713
-		if ( EE_Registry::instance()->CFG->organization instanceof EE_Organization_Config ) {
712
+	function espresso_organization_address($type = 'inline') {
713
+		if (EE_Registry::instance()->CFG->organization instanceof EE_Organization_Config) {
714 714
 			$address = new EventEspresso\core\entities\GenericAddress(
715 715
 				EE_Registry::instance()->CFG->organization->address_1,
716 716
 				EE_Registry::instance()->CFG->organization->address_2,
@@ -719,129 +719,129 @@  discard block
 block discarded – undo
719 719
 				EE_Registry::instance()->CFG->organization->zip,
720 720
 				EE_Registry::instance()->CFG->organization->CNT_ISO
721 721
 			);
722
-			return EEH_Address::format( $address, $type );
722
+			return EEH_Address::format($address, $type);
723 723
 		}
724 724
 		return '';
725 725
 	}
726 726
 }
727 727
 
728
-if ( ! function_exists( 'espresso_organization_email' )) {
728
+if ( ! function_exists('espresso_organization_email')) {
729 729
 	/**
730 730
 	 * espresso_organization_email
731 731
 	 * @param bool $echo
732 732
 	 * @return string
733 733
 	 */
734
-	function espresso_organization_email( $echo = TRUE ) {
735
-		if($echo){
736
-			echo EE_Registry::instance()->CFG->organization->get_pretty( 'email' );
734
+	function espresso_organization_email($echo = TRUE) {
735
+		if ($echo) {
736
+			echo EE_Registry::instance()->CFG->organization->get_pretty('email');
737 737
 			return '';
738 738
 		}
739
-		return EE_Registry::instance()->CFG->organization->get_pretty( 'email' );
739
+		return EE_Registry::instance()->CFG->organization->get_pretty('email');
740 740
 	}
741 741
 }
742 742
 
743
-if ( ! function_exists( 'espresso_organization_logo_url' )) {
743
+if ( ! function_exists('espresso_organization_logo_url')) {
744 744
 	/**
745 745
 	 * espresso_organization_logo_url
746 746
 	 * @param bool $echo
747 747
 	 * @return string
748 748
 	 */
749
-	function espresso_organization_logo_url( $echo = TRUE ) {
750
-		if($echo){
751
-			echo EE_Registry::instance()->CFG->organization->get_pretty( 'logo_url' );
749
+	function espresso_organization_logo_url($echo = TRUE) {
750
+		if ($echo) {
751
+			echo EE_Registry::instance()->CFG->organization->get_pretty('logo_url');
752 752
 			return '';
753 753
 		}
754
-		return EE_Registry::instance()->CFG->organization->get_pretty( 'logo_url' );
754
+		return EE_Registry::instance()->CFG->organization->get_pretty('logo_url');
755 755
 	}
756 756
 }
757 757
 
758
-if ( ! function_exists( 'espresso_organization_facebook' )) {
758
+if ( ! function_exists('espresso_organization_facebook')) {
759 759
 	/**
760 760
 	 * espresso_organization_facebook
761 761
 	 * @param bool $echo
762 762
 	 * @return string
763 763
 	 */
764
-	function espresso_organization_facebook( $echo = TRUE ) {
765
-		if($echo){
766
-			echo EE_Registry::instance()->CFG->organization->get_pretty( 'facebook' );
764
+	function espresso_organization_facebook($echo = TRUE) {
765
+		if ($echo) {
766
+			echo EE_Registry::instance()->CFG->organization->get_pretty('facebook');
767 767
 			return '';
768 768
 		}
769
-		return EE_Registry::instance()->CFG->organization->get_pretty( 'facebook' );
769
+		return EE_Registry::instance()->CFG->organization->get_pretty('facebook');
770 770
 	}
771 771
 }
772 772
 
773
-if ( ! function_exists( 'espresso_organization_twitter' )) {
773
+if ( ! function_exists('espresso_organization_twitter')) {
774 774
 	/**
775 775
 	 * espresso_organization_twitter
776 776
 	 * @param bool $echo
777 777
 	 * @return string
778 778
 	 */
779
-	function espresso_organization_twitter( $echo = TRUE ) {
780
-		if($echo){
781
-			echo EE_Registry::instance()->CFG->organization->get_pretty( 'twitter' );
779
+	function espresso_organization_twitter($echo = TRUE) {
780
+		if ($echo) {
781
+			echo EE_Registry::instance()->CFG->organization->get_pretty('twitter');
782 782
 			return '';
783 783
 		}
784
-		return EE_Registry::instance()->CFG->organization->get_pretty( 'twitter' );
784
+		return EE_Registry::instance()->CFG->organization->get_pretty('twitter');
785 785
 	}
786 786
 }
787 787
 
788
-if ( ! function_exists( 'espresso_organization_linkedin' )) {
788
+if ( ! function_exists('espresso_organization_linkedin')) {
789 789
 	/**
790 790
 	 * espresso_organization_linkedin
791 791
 	 * @param bool $echo
792 792
 	 * @return string
793 793
 	 */
794
-	function espresso_organization_linkedin( $echo = TRUE ) {
795
-		if($echo){
796
-			echo EE_Registry::instance()->CFG->organization->get_pretty( 'linkedin' );
794
+	function espresso_organization_linkedin($echo = TRUE) {
795
+		if ($echo) {
796
+			echo EE_Registry::instance()->CFG->organization->get_pretty('linkedin');
797 797
 			return '';
798 798
 		}
799
-		return EE_Registry::instance()->CFG->organization->get_pretty( 'linkedin' );
799
+		return EE_Registry::instance()->CFG->organization->get_pretty('linkedin');
800 800
 	}
801 801
 }
802 802
 
803
-if ( ! function_exists( 'espresso_organization_pinterest' )) {
803
+if ( ! function_exists('espresso_organization_pinterest')) {
804 804
 	/**
805 805
 	 * espresso_organization_pinterest
806 806
 	 * @param bool $echo
807 807
 	 * @return string
808 808
 	 */
809
-	function espresso_organization_pinterest( $echo = TRUE ) {
810
-		if($echo){
811
-			echo EE_Registry::instance()->CFG->organization->get_pretty( 'pinterest' );
809
+	function espresso_organization_pinterest($echo = TRUE) {
810
+		if ($echo) {
811
+			echo EE_Registry::instance()->CFG->organization->get_pretty('pinterest');
812 812
 			return '';
813 813
 		}
814
-		return EE_Registry::instance()->CFG->organization->get_pretty( 'pinterest' );
814
+		return EE_Registry::instance()->CFG->organization->get_pretty('pinterest');
815 815
 	}
816 816
 }
817 817
 
818
-if ( ! function_exists( 'espresso_organization_google' )) {
818
+if ( ! function_exists('espresso_organization_google')) {
819 819
 	/**
820 820
 	 * espresso_organization_google
821 821
 	 * @param bool $echo
822 822
 	 * @return string
823 823
 	 */
824
-	function espresso_organization_google( $echo = TRUE ) {
825
-		if($echo){
826
-			echo EE_Registry::instance()->CFG->organization->get_pretty( 'google' );
824
+	function espresso_organization_google($echo = TRUE) {
825
+		if ($echo) {
826
+			echo EE_Registry::instance()->CFG->organization->get_pretty('google');
827 827
 			return '';
828 828
 		}
829
-		return EE_Registry::instance()->CFG->organization->get_pretty( 'google' );
829
+		return EE_Registry::instance()->CFG->organization->get_pretty('google');
830 830
 	}
831 831
 }
832 832
 
833
-if ( ! function_exists( 'espresso_organization_instagram' )) {
833
+if ( ! function_exists('espresso_organization_instagram')) {
834 834
 	/**
835 835
 	 * espresso_organization_instagram
836 836
 	 * @param bool $echo
837 837
 	 * @return string
838 838
 	 */
839
-	function espresso_organization_instagram( $echo = TRUE ) {
840
-		if($echo){
841
-			echo EE_Registry::instance()->CFG->organization->get_pretty( 'instagram' );
839
+	function espresso_organization_instagram($echo = TRUE) {
840
+		if ($echo) {
841
+			echo EE_Registry::instance()->CFG->organization->get_pretty('instagram');
842 842
 			return '';
843 843
 		}
844
-		return EE_Registry::instance()->CFG->organization->get_pretty( 'instagram' );
844
+		return EE_Registry::instance()->CFG->organization->get_pretty('instagram');
845 845
 	}
846 846
 }
847 847
 
@@ -851,7 +851,7 @@  discard block
 block discarded – undo
851 851
 
852 852
 
853 853
 
854
-if ( ! function_exists( 'espresso_event_venues' )) {
854
+if ( ! function_exists('espresso_event_venues')) {
855 855
 	/**
856 856
 	 * espresso_event_venues
857 857
 	 *
@@ -865,7 +865,7 @@  discard block
 block discarded – undo
865 865
 
866 866
 
867 867
 
868
-if ( ! function_exists( 'espresso_venue_id' )) {
868
+if ( ! function_exists('espresso_venue_id')) {
869 869
 	/**
870 870
 	 *    espresso_venue_name
871 871
 	 *
@@ -873,15 +873,15 @@  discard block
 block discarded – undo
873 873
 	 * @param     int $EVT_ID
874 874
 	 * @return    string
875 875
 	 */
876
-	function espresso_venue_id( $EVT_ID = 0 ) {
877
-		$venue = EEH_Venue_View::get_venue( $EVT_ID );
876
+	function espresso_venue_id($EVT_ID = 0) {
877
+		$venue = EEH_Venue_View::get_venue($EVT_ID);
878 878
 		return $venue instanceof EE_Venue ? $venue->ID() : 0;
879 879
 	}
880 880
 }
881 881
 
882 882
 
883 883
 
884
-if ( ! function_exists( 'espresso_is_venue_private' ) ) {
884
+if ( ! function_exists('espresso_is_venue_private')) {
885 885
 	/**
886 886
 	 * Return whether a venue is private or not.
887 887
 	 * @see EEH_Venue_View::get_venue() for more info on expected return results.
@@ -890,45 +890,45 @@  discard block
 block discarded – undo
890 890
 	 *
891 891
 	 * @return bool | null
892 892
 	 */
893
-	function espresso_is_venue_private( $VNU_ID = 0 ) {
894
-		return EEH_Venue_View::is_venue_private( $VNU_ID );
893
+	function espresso_is_venue_private($VNU_ID = 0) {
894
+		return EEH_Venue_View::is_venue_private($VNU_ID);
895 895
 	}
896 896
 }
897 897
 
898 898
 
899 899
 
900
-if ( ! function_exists( 'espresso_venue_is_password_protected' ) ) {
900
+if ( ! function_exists('espresso_venue_is_password_protected')) {
901 901
 	/**
902 902
 	 * returns true or false if a venue is password protected or not
903 903
 	 *
904 904
 	 * @param int     $VNU_ID optional, the venue id to check.
905 905
 	 * @return string
906 906
 	 */
907
-	function espresso_venue_is_password_protected( $VNU_ID = 0 ) {
908
-		EE_Registry::instance()->load_helper( 'Venue_View' );
909
-		return EEH_Venue_View::is_venue_password_protected( $VNU_ID );
907
+	function espresso_venue_is_password_protected($VNU_ID = 0) {
908
+		EE_Registry::instance()->load_helper('Venue_View');
909
+		return EEH_Venue_View::is_venue_password_protected($VNU_ID);
910 910
 	}
911 911
 }
912 912
 
913 913
 
914 914
 
915
-if ( ! function_exists( 'espresso_password_protected_venue_form' ) ) {
915
+if ( ! function_exists('espresso_password_protected_venue_form')) {
916 916
 	/**
917 917
 	 * Returns a password form if venue is password protected.
918 918
 	 *
919 919
 	 * @param int     $VNU_ID optional, the venue id to check.
920 920
 	 * @return string
921 921
 	 */
922
-	function espresso_password_protected_venue_form( $VNU_ID = 0 ) {
923
-		EE_Registry::instance()->load_helper( 'Venue_View' );
924
-		return EEH_Venue_View::password_protected_venue_form( $VNU_ID );
922
+	function espresso_password_protected_venue_form($VNU_ID = 0) {
923
+		EE_Registry::instance()->load_helper('Venue_View');
924
+		return EEH_Venue_View::password_protected_venue_form($VNU_ID);
925 925
 	}
926 926
 }
927 927
 
928 928
 
929 929
 
930 930
 
931
-if ( ! function_exists( 'espresso_venue_name' )) {
931
+if ( ! function_exists('espresso_venue_name')) {
932 932
 	/**
933 933
 	 *    espresso_venue_name
934 934
 	 *
@@ -938,19 +938,19 @@  discard block
 block discarded – undo
938 938
 	 * @param bool   $echo
939 939
 	 * @return    string
940 940
 	 */
941
-	function espresso_venue_name( $VNU_ID = 0, $link_to = 'details', $echo = TRUE ) {
942
-		if($echo){
943
-			echo EEH_Venue_View::venue_name( $link_to, $VNU_ID );
941
+	function espresso_venue_name($VNU_ID = 0, $link_to = 'details', $echo = TRUE) {
942
+		if ($echo) {
943
+			echo EEH_Venue_View::venue_name($link_to, $VNU_ID);
944 944
 			return '';
945 945
 		}
946
-		return EEH_Venue_View::venue_name( $link_to, $VNU_ID );
946
+		return EEH_Venue_View::venue_name($link_to, $VNU_ID);
947 947
 	}
948 948
 }
949 949
 
950 950
 
951 951
 
952 952
 
953
-if ( ! function_exists( 'espresso_venue_link' )) {
953
+if ( ! function_exists('espresso_venue_link')) {
954 954
 	/**
955 955
 	 * 	espresso_venue_link
956 956
 	 *
@@ -959,14 +959,14 @@  discard block
 block discarded – undo
959 959
 	 *  @param 	string 	$text
960 960
 	 *  @return 	string
961 961
 	 */
962
-	function espresso_venue_link( $VNU_ID = 0, $text = '' ) {
963
-		return EEH_Venue_View::venue_details_link( $VNU_ID, $text );
962
+	function espresso_venue_link($VNU_ID = 0, $text = '') {
963
+		return EEH_Venue_View::venue_details_link($VNU_ID, $text);
964 964
 	}
965 965
 }
966 966
 
967 967
 
968 968
 
969
-if ( ! function_exists( 'espresso_venue_description' )) {
969
+if ( ! function_exists('espresso_venue_description')) {
970 970
 	/**
971 971
 	 *    espresso_venue_description
972 972
 	 *
@@ -975,17 +975,17 @@  discard block
 block discarded – undo
975 975
 	 * @param bool $echo
976 976
 	 * @return    string
977 977
 	 */
978
-	function espresso_venue_description( $VNU_ID = FALSE, $echo = TRUE ) {
979
-		if($echo){
980
-			echo EEH_Venue_View::venue_description( $VNU_ID );
978
+	function espresso_venue_description($VNU_ID = FALSE, $echo = TRUE) {
979
+		if ($echo) {
980
+			echo EEH_Venue_View::venue_description($VNU_ID);
981 981
 			return '';
982 982
 		}
983
-		return EEH_Venue_View::venue_description( $VNU_ID );
983
+		return EEH_Venue_View::venue_description($VNU_ID);
984 984
 	}
985 985
 }
986 986
 
987 987
 
988
-if ( ! function_exists( 'espresso_venue_excerpt' )) {
988
+if ( ! function_exists('espresso_venue_excerpt')) {
989 989
 	/**
990 990
 	 *    espresso_venue_excerpt
991 991
 	 *
@@ -994,18 +994,18 @@  discard block
 block discarded – undo
994 994
 	 * @param bool $echo
995 995
 	 * @return    string
996 996
 	 */
997
-	function espresso_venue_excerpt( $VNU_ID = 0,  $echo = TRUE ) {
998
-		if ( $echo ) {
999
-			echo EEH_Venue_View::venue_excerpt( $VNU_ID );
997
+	function espresso_venue_excerpt($VNU_ID = 0, $echo = TRUE) {
998
+		if ($echo) {
999
+			echo EEH_Venue_View::venue_excerpt($VNU_ID);
1000 1000
 			return '';
1001 1001
 		}
1002
-		return EEH_Venue_View::venue_excerpt( $VNU_ID );
1002
+		return EEH_Venue_View::venue_excerpt($VNU_ID);
1003 1003
 	}
1004 1004
 }
1005 1005
 
1006 1006
 
1007 1007
 
1008
-if ( ! function_exists( 'espresso_venue_categories' )) {
1008
+if ( ! function_exists('espresso_venue_categories')) {
1009 1009
 	/**
1010 1010
 	 * espresso_venue_categories
1011 1011
 	 * returns the terms associated with a venue
@@ -1015,17 +1015,17 @@  discard block
 block discarded – undo
1015 1015
 	 * @param bool $echo
1016 1016
 	 * @return string
1017 1017
 	 */
1018
-	function espresso_venue_categories( $VNU_ID = 0, $hide_uncategorized = TRUE,  $echo = TRUE ) {
1019
-		if ( $echo ) {
1020
-			echo EEH_Venue_View::venue_categories( $VNU_ID, $hide_uncategorized );
1018
+	function espresso_venue_categories($VNU_ID = 0, $hide_uncategorized = TRUE, $echo = TRUE) {
1019
+		if ($echo) {
1020
+			echo EEH_Venue_View::venue_categories($VNU_ID, $hide_uncategorized);
1021 1021
 			return '';
1022 1022
 		}
1023
-		return EEH_Venue_View::venue_categories( $VNU_ID, $hide_uncategorized );
1023
+		return EEH_Venue_View::venue_categories($VNU_ID, $hide_uncategorized);
1024 1024
 	}
1025 1025
 }
1026 1026
 
1027 1027
 
1028
-if ( ! function_exists( 'espresso_venue_address' )) {
1028
+if ( ! function_exists('espresso_venue_address')) {
1029 1029
 	/**
1030 1030
 	 * espresso_venue_address
1031 1031
 	 * returns a formatted block of html  for displaying a venue's address
@@ -1035,17 +1035,17 @@  discard block
 block discarded – undo
1035 1035
 	 * @param bool   $echo
1036 1036
 	 * @return string
1037 1037
 	 */
1038
-	function espresso_venue_address( $type = 'multiline', $VNU_ID = 0, $echo = TRUE ) {
1039
-		if ( $echo ) {
1040
-			echo EEH_Venue_View::venue_address( $type, $VNU_ID );
1038
+	function espresso_venue_address($type = 'multiline', $VNU_ID = 0, $echo = TRUE) {
1039
+		if ($echo) {
1040
+			echo EEH_Venue_View::venue_address($type, $VNU_ID);
1041 1041
 			return '';
1042 1042
 		}
1043
-		return EEH_Venue_View::venue_address( $type, $VNU_ID );
1043
+		return EEH_Venue_View::venue_address($type, $VNU_ID);
1044 1044
 	}
1045 1045
 }
1046 1046
 
1047 1047
 
1048
-if ( ! function_exists( 'espresso_venue_raw_address' )) {
1048
+if ( ! function_exists('espresso_venue_raw_address')) {
1049 1049
 	/**
1050 1050
 	 * espresso_venue_address
1051 1051
 	 * returns an UN-formatted string containing a venue's address
@@ -1055,17 +1055,17 @@  discard block
 block discarded – undo
1055 1055
 	 * @param bool     $echo
1056 1056
 	 * @return string
1057 1057
 	 */
1058
-	function espresso_venue_raw_address( $type = 'multiline', $VNU_ID = 0, $echo = TRUE ) {
1059
-		if ( $echo ) {
1060
-			echo EEH_Venue_View::venue_address( $type, $VNU_ID, FALSE, FALSE );
1058
+	function espresso_venue_raw_address($type = 'multiline', $VNU_ID = 0, $echo = TRUE) {
1059
+		if ($echo) {
1060
+			echo EEH_Venue_View::venue_address($type, $VNU_ID, FALSE, FALSE);
1061 1061
 			return '';
1062 1062
 		}
1063
-		return EEH_Venue_View::venue_address( $type, $VNU_ID, FALSE, FALSE );
1063
+		return EEH_Venue_View::venue_address($type, $VNU_ID, FALSE, FALSE);
1064 1064
 	}
1065 1065
 }
1066 1066
 
1067 1067
 
1068
-if ( ! function_exists( 'espresso_venue_has_address' )) {
1068
+if ( ! function_exists('espresso_venue_has_address')) {
1069 1069
 	/**
1070 1070
 	 * espresso_venue_has_address
1071 1071
 	 * returns TRUE or FALSE if a Venue has address information
@@ -1073,13 +1073,13 @@  discard block
 block discarded – undo
1073 1073
 	 * @param int $VNU_ID
1074 1074
 	 * @return bool
1075 1075
 	 */
1076
-	function espresso_venue_has_address( $VNU_ID = 0 ) {
1077
-		return EEH_Venue_View::venue_has_address( $VNU_ID );
1076
+	function espresso_venue_has_address($VNU_ID = 0) {
1077
+		return EEH_Venue_View::venue_has_address($VNU_ID);
1078 1078
 	}
1079 1079
 }
1080 1080
 
1081 1081
 
1082
-if ( ! function_exists( 'espresso_venue_gmap' )) {
1082
+if ( ! function_exists('espresso_venue_gmap')) {
1083 1083
 	/**
1084 1084
 	 * espresso_venue_gmap
1085 1085
 	 * returns a google map for the venue address
@@ -1090,17 +1090,17 @@  discard block
 block discarded – undo
1090 1090
 	 * @param bool     $echo
1091 1091
 	 * @return string
1092 1092
 	 */
1093
-	function espresso_venue_gmap( $VNU_ID = 0, $map_ID = FALSE, $gmap = array(), $echo = TRUE  ) {
1094
-		if ( $echo ) {
1095
-			echo EEH_Venue_View::venue_gmap( $VNU_ID, $map_ID, $gmap );
1093
+	function espresso_venue_gmap($VNU_ID = 0, $map_ID = FALSE, $gmap = array(), $echo = TRUE) {
1094
+		if ($echo) {
1095
+			echo EEH_Venue_View::venue_gmap($VNU_ID, $map_ID, $gmap);
1096 1096
 			return '';
1097 1097
 		}
1098
-		return EEH_Venue_View::venue_gmap( $VNU_ID, $map_ID, $gmap );
1098
+		return EEH_Venue_View::venue_gmap($VNU_ID, $map_ID, $gmap);
1099 1099
 	}
1100 1100
 }
1101 1101
 
1102 1102
 
1103
-if ( ! function_exists( 'espresso_venue_phone' )) {
1103
+if ( ! function_exists('espresso_venue_phone')) {
1104 1104
 	/**
1105 1105
 	 * espresso_venue_phone
1106 1106
 	 *
@@ -1108,18 +1108,18 @@  discard block
 block discarded – undo
1108 1108
 	 * @param bool $echo
1109 1109
 	 * @return string
1110 1110
 	 */
1111
-	function espresso_venue_phone( $VNU_ID = 0, $echo = TRUE ) {
1112
-		if ( $echo ) {
1113
-			echo EEH_Venue_View::venue_phone( $VNU_ID );
1111
+	function espresso_venue_phone($VNU_ID = 0, $echo = TRUE) {
1112
+		if ($echo) {
1113
+			echo EEH_Venue_View::venue_phone($VNU_ID);
1114 1114
 			return '';
1115 1115
 		}
1116
-		return EEH_Venue_View::venue_phone( $VNU_ID );
1116
+		return EEH_Venue_View::venue_phone($VNU_ID);
1117 1117
 	}
1118 1118
 }
1119 1119
 
1120 1120
 
1121 1121
 
1122
-if ( ! function_exists( 'espresso_venue_website' )) {
1122
+if ( ! function_exists('espresso_venue_website')) {
1123 1123
 	/**
1124 1124
 	 * espresso_venue_website
1125 1125
 	 *
@@ -1127,18 +1127,18 @@  discard block
 block discarded – undo
1127 1127
 	 * @param bool $echo
1128 1128
 	 * @return string
1129 1129
 	 */
1130
-	function espresso_venue_website( $VNU_ID = 0, $echo = TRUE ) {
1131
-		if ( $echo ) {
1132
-			echo EEH_Venue_View::venue_website_link( $VNU_ID );
1130
+	function espresso_venue_website($VNU_ID = 0, $echo = TRUE) {
1131
+		if ($echo) {
1132
+			echo EEH_Venue_View::venue_website_link($VNU_ID);
1133 1133
 			return '';
1134 1134
 		}
1135
-		return EEH_Venue_View::venue_website_link( $VNU_ID );
1135
+		return EEH_Venue_View::venue_website_link($VNU_ID);
1136 1136
 	}
1137 1137
 }
1138 1138
 
1139 1139
 
1140 1140
 
1141
-if ( ! function_exists( 'espresso_edit_venue_link' )) {
1141
+if ( ! function_exists('espresso_edit_venue_link')) {
1142 1142
 	/**
1143 1143
 	 * espresso_edit_venue_link
1144 1144
 	 *
@@ -1146,12 +1146,12 @@  discard block
 block discarded – undo
1146 1146
 	 * @param bool $echo
1147 1147
 	 * @return string
1148 1148
 	 */
1149
-	function espresso_edit_venue_link( $VNU_ID = 0, $echo = TRUE ) {
1150
-		if($echo){
1151
-			echo EEH_Venue_View::edit_venue_link( $VNU_ID );
1149
+	function espresso_edit_venue_link($VNU_ID = 0, $echo = TRUE) {
1150
+		if ($echo) {
1151
+			echo EEH_Venue_View::edit_venue_link($VNU_ID);
1152 1152
 			return '';
1153 1153
 		}
1154
-		return EEH_Venue_View::edit_venue_link( $VNU_ID );
1154
+		return EEH_Venue_View::edit_venue_link($VNU_ID);
1155 1155
 	}
1156 1156
 }
1157 1157
 
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.
core/libraries/form_sections/inputs/EE_Year_Input.input.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if (!defined('EVENT_ESPRESSO_VERSION'))
2
+if ( ! defined('EVENT_ESPRESSO_VERSION'))
3 3
 	exit('No direct script access allowed');
4 4
 
5 5
 /**
@@ -24,18 +24,18 @@  discard block
 block discarded – undo
24 24
  *
25 25
  * ------------------------------------------------------------------------
26 26
  */
27
-class EE_Year_Input extends EE_Select_Input{
27
+class EE_Year_Input extends EE_Select_Input {
28 28
 
29
-	function __construct( $input_settings = array(), $four_digit_year = true, $years_behind = 100, $years_ahead = 0 ){
30
-		if($four_digit_year){
29
+	function __construct($input_settings = array(), $four_digit_year = true, $years_behind = 100, $years_ahead = 0) {
30
+		if ($four_digit_year) {
31 31
 			$current_year_int = intval(date('Y'));
32
-		}else{
32
+		} else {
33 33
 			$current_year_int = intval(date('y'));
34 34
 		}
35 35
 		$answer_options = array();
36
-		for( $start = $current_year_int - $years_behind; $start <= ($current_year_int + $years_ahead); $start++){
36
+		for ($start = $current_year_int - $years_behind; $start <= ($current_year_int + $years_ahead); $start++) {
37 37
 			$answer_options[$start] = $start;
38 38
 		}
39
-		parent::__construct( $answer_options, $input_settings );
39
+		parent::__construct($answer_options, $input_settings);
40 40
 	}
41 41
 }
Please login to merge, or discard this patch.
core/helpers/EEH_Venue_View.helper.php 2 patches
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.
Spacing   +110 added lines, -110 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,10 +300,10 @@  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
-			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
+			return EEH_Address::format($venue, $type, $use_schema, $add_wrapper);
307 307
 		}
308 308
 		return '';
309 309
 	}
@@ -317,10 +317,10 @@  discard block
 block discarded – undo
317 317
 	 * @param int $VNU_ID
318 318
 	 * @return bool|string
319 319
 	 */
320
-	public static function venue_has_address( $VNU_ID = 0 ) {
321
-		$venue = EEH_Venue_View::get_venue( $VNU_ID );
322
-		if ( $venue instanceof EE_Venue ) {
323
-			return EEH_Address::format( $venue, 'inline', FALSE, FALSE );
320
+	public static function venue_has_address($VNU_ID = 0) {
321
+		$venue = EEH_Venue_View::get_venue($VNU_ID);
322
+		if ($venue instanceof EE_Venue) {
323
+			return EEH_Address::format($venue, 'inline', FALSE, FALSE);
324 324
 		}
325 325
 		return false;
326 326
 	}
@@ -335,30 +335,30 @@  discard block
 block discarded – undo
335 335
 	 * @param int $VNU_ID
336 336
 	 * @return string
337 337
 	 */
338
-	public static function venue_name( $link_to = 'details', $VNU_ID = 0 ) {
339
-		$venue = EEH_Venue_View::get_venue( $VNU_ID );
340
-		if ( $venue instanceof EE_Venue ) {
338
+	public static function venue_name($link_to = 'details', $VNU_ID = 0) {
339
+		$venue = EEH_Venue_View::get_venue($VNU_ID);
340
+		if ($venue instanceof EE_Venue) {
341 341
 			$venue_name = apply_filters(
342 342
 				'FHEE__EEH_Venue__venue_name__append_private_venue_name',
343 343
 				EEH_Venue_View::is_venue_private()
344
-					? EEH_Venue_View::$_venue->name() . "&nbsp;" . __( '(Private)', 'event_espresso' )
344
+					? EEH_Venue_View::$_venue->name()."&nbsp;".__('(Private)', 'event_espresso')
345 345
 					: EEH_Venue_View::$_venue->name(),
346 346
 				EEH_Venue_View::$_venue
347 347
 			);
348
-			$venue_name = EEH_Schema::name( $venue_name );
348
+			$venue_name = EEH_Schema::name($venue_name);
349 349
 
350 350
 			//if venue is trashed then ignore the "link to" setting because the venue is trashed.
351
-			if ( $venue->get('status') == 'trash' ) {
351
+			if ($venue->get('status') == 'trash') {
352 352
 				$link_to = '';
353 353
 			}
354
-			switch( $link_to ) {
354
+			switch ($link_to) {
355 355
 
356 356
 				case 'details' :
357
-					return EEH_Venue_View::venue_details_link( $venue->ID(), $venue_name );
357
+					return EEH_Venue_View::venue_details_link($venue->ID(), $venue_name);
358 358
 				break;
359 359
 
360 360
 				case 'website' :
361
-					return EEH_Venue_View::venue_website_link( $venue->ID(), $venue_name );
361
+					return EEH_Venue_View::venue_website_link($venue->ID(), $venue_name);
362 362
 				break;
363 363
 
364 364
 				default :
@@ -378,10 +378,10 @@  discard block
 block discarded – undo
378 378
 	 * @param    string $text
379 379
 	 * @return string
380 380
 	 */
381
-	public static function venue_details_link( $VNU_ID = 0, $text = '' ) {
382
-		$venue = EEH_Venue_View::get_venue( $VNU_ID );
383
-		if ( $venue instanceof EE_Venue ) {
384
-			return EEH_Schema::url( get_permalink( $venue->ID() ), $text );
381
+	public static function venue_details_link($VNU_ID = 0, $text = '') {
382
+		$venue = EEH_Venue_View::get_venue($VNU_ID);
383
+		if ($venue instanceof EE_Venue) {
384
+			return EEH_Schema::url(get_permalink($venue->ID()), $text);
385 385
 		}
386 386
 		return '';
387 387
 	}
@@ -396,12 +396,12 @@  discard block
 block discarded – undo
396 396
 	 * @param    string $text
397 397
 	 * @return string
398 398
 	 */
399
-	public static function venue_website_link( $VNU_ID = 0, $text = '' ) {
400
-		$venue = EEH_Venue_View::get_venue( $VNU_ID );
401
-		if ( $venue instanceof EE_Venue ) {
399
+	public static function venue_website_link($VNU_ID = 0, $text = '') {
400
+		$venue = EEH_Venue_View::get_venue($VNU_ID);
401
+		if ($venue instanceof EE_Venue) {
402 402
 			$url = $venue->venue_url();
403
-			$text = ! empty( $text ) ? $text : $url;
404
-			return ! empty( $url ) ? EEH_Schema::url( $url, $text ) : '';
403
+			$text = ! empty($text) ? $text : $url;
404
+			return ! empty($url) ? EEH_Schema::url($url, $text) : '';
405 405
 		}
406 406
 		return '';
407 407
 	}
@@ -415,10 +415,10 @@  discard block
 block discarded – undo
415 415
 	 * @param int $VNU_ID
416 416
 	 * @return string
417 417
 	 */
418
-	public static function venue_phone( $VNU_ID = 0) {
419
-		$venue = EEH_Venue_View::get_venue( $VNU_ID );
420
-		if ( $venue instanceof EE_Venue ) {
421
-			return EEH_Schema::telephone( $venue->phone() );
418
+	public static function venue_phone($VNU_ID = 0) {
419
+		$venue = EEH_Venue_View::get_venue($VNU_ID);
420
+		if ($venue instanceof EE_Venue) {
421
+			return EEH_Schema::telephone($venue->phone());
422 422
 		}
423 423
 		return '';
424 424
 	}
@@ -434,48 +434,48 @@  discard block
 block discarded – undo
434 434
 	 * @param    array $gmap map options
435 435
 	 * @return string
436 436
 	 */
437
-	public static function venue_gmap( $VNU_ID = 0, $map_ID = FALSE, $gmap = array() ) {
437
+	public static function venue_gmap($VNU_ID = 0, $map_ID = FALSE, $gmap = array()) {
438 438
 
439
-		$venue = EEH_Venue_View::get_venue( $VNU_ID );
440
-		if ( $venue instanceof EE_Venue ) {
439
+		$venue = EEH_Venue_View::get_venue($VNU_ID);
440
+		if ($venue instanceof EE_Venue) {
441 441
 			// check for global espresso_events post and use it's ID if no map_ID is set
442 442
 			global $post;
443
-			$map_ID = empty( $map_ID ) && $post->post_type == 'espresso_events' ? $post->ID : $map_ID;
443
+			$map_ID = empty($map_ID) && $post->post_type == 'espresso_events' ? $post->ID : $map_ID;
444 444
 			// grab map settings
445 445
 			$map_cfg = EE_Registry::instance()->CFG->map_settings;
446 446
 			// are maps enabled ?
447
-			if ( $map_cfg->use_google_maps && $venue->enable_for_gmap() ) {
447
+			if ($map_cfg->use_google_maps && $venue->enable_for_gmap()) {
448 448
 
449 449
 				$details_page = is_single();
450 450
 				$options = array();
451
-				$options['map_ID'] = $map_ID && $map_ID != $venue->ID() ? $map_ID . '-' . $venue->ID()/* . '-' . $static_map_id*/ : $venue->ID()/* . '-' . $static_map_id*/;
451
+				$options['map_ID'] = $map_ID && $map_ID != $venue->ID() ? $map_ID.'-'.$venue->ID()/* . '-' . $static_map_id*/ : $venue->ID()/* . '-' . $static_map_id*/;
452 452
 
453
-				$options['location'] = EEH_Address::format( $venue, 'inline', FALSE, FALSE );
453
+				$options['location'] = EEH_Address::format($venue, 'inline', FALSE, FALSE);
454 454
 
455 455
 				$options['ee_map_width'] = $details_page ? $map_cfg->event_details_map_width : $map_cfg->event_list_map_width;
456
-				$options['ee_map_width'] = isset( $gmap['ee_map_width'] ) && ! empty( $gmap['ee_map_width'] ) ? $gmap['ee_map_width'] : $options['ee_map_width'];
456
+				$options['ee_map_width'] = isset($gmap['ee_map_width']) && ! empty($gmap['ee_map_width']) ? $gmap['ee_map_width'] : $options['ee_map_width'];
457 457
 
458 458
 				$options['ee_map_height'] = $details_page ? $map_cfg->event_details_map_height : $map_cfg->event_list_map_height;
459
-				$options['ee_map_height'] = isset( $gmap['ee_map_height'] ) && ! empty( $gmap['ee_map_height'] ) ? $gmap['ee_map_height'] : $options['ee_map_height'];
459
+				$options['ee_map_height'] = isset($gmap['ee_map_height']) && ! empty($gmap['ee_map_height']) ? $gmap['ee_map_height'] : $options['ee_map_height'];
460 460
 
461 461
 				$options['ee_map_zoom'] = $details_page ? $map_cfg->event_details_map_zoom : $map_cfg->event_list_map_zoom;
462
-				$options['ee_map_zoom'] = isset( $gmap['ee_map_zoom'] ) && ! empty( $gmap['ee_map_zoom'] ) ? $gmap['ee_map_zoom'] : $options['ee_map_zoom'];
462
+				$options['ee_map_zoom'] = isset($gmap['ee_map_zoom']) && ! empty($gmap['ee_map_zoom']) ? $gmap['ee_map_zoom'] : $options['ee_map_zoom'];
463 463
 
464 464
 				$options['ee_map_nav_display'] = $details_page ? $map_cfg->event_details_display_nav : $map_cfg->event_list_display_nav;
465
-				$options['ee_map_nav_display'] = isset( $gmap['ee_map_nav_display'] ) && ! empty( $gmap['ee_map_nav_display'] ) ? 'true' : $options['ee_map_nav_display'];;
465
+				$options['ee_map_nav_display'] = isset($gmap['ee_map_nav_display']) && ! empty($gmap['ee_map_nav_display']) ? 'true' : $options['ee_map_nav_display']; ;
466 466
 
467 467
 				$options['ee_map_nav_size'] = $details_page ? $map_cfg->event_details_nav_size : $map_cfg->event_list_nav_size;
468
-				$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'];
468
+				$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'];
469 469
 
470 470
 				$options['ee_map_type_control'] = $details_page ? $map_cfg->event_details_control_type : $map_cfg->event_list_control_type;
471
-				$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'];
471
+				$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'];
472 472
 
473 473
 				$options['ee_map_align'] = $details_page ? $map_cfg->event_details_map_align : $map_cfg->event_list_map_align;
474
-				$options['ee_map_align'] =  isset( $gmap['ee_map_align'] ) && ! empty( $gmap['ee_map_align'] )? $gmap['ee_map_align'] : $options['ee_map_align'];
474
+				$options['ee_map_align'] = isset($gmap['ee_map_align']) && ! empty($gmap['ee_map_align']) ? $gmap['ee_map_align'] : $options['ee_map_align'];
475 475
 
476
-				$options['ee_static_url'] =  isset( $gmap['ee_static_url'] ) && ! empty( $gmap['ee_static_url'] ) ? (bool)absint( $gmap['ee_static_url'] ) : $venue->google_map_link();
476
+				$options['ee_static_url'] = isset($gmap['ee_static_url']) && ! empty($gmap['ee_static_url']) ? (bool) absint($gmap['ee_static_url']) : $venue->google_map_link();
477 477
 
478
-				return EEH_Maps::google_map( $options );
478
+				return EEH_Maps::google_map($options);
479 479
 
480 480
 			}
481 481
 		}
@@ -490,7 +490,7 @@  discard block
 block discarded – undo
490 490
 	 * @param array $atts like EEH_Maps::google_map_link
491 491
 	 * @return string
492 492
 	 */
493
-	public static function espresso_google_static_map( EE_Venue $venue, $atts = array() ){
493
+	public static function espresso_google_static_map(EE_Venue $venue, $atts = array()) {
494 494
 		$state = $venue->state_obj();
495 495
 		$country = $venue->country_obj();
496 496
 		$atts = shortcode_atts(
@@ -521,23 +521,23 @@  discard block
 block discarded – undo
521 521
 	 * @param string $after
522 522
 	 * @return string
523 523
 	 */
524
-	public static function edit_venue_link( $VNU_ID = 0, $link = '', $before = '<p class="edit-venue-lnk small-txt">', $after = '</p>' ) {
525
-		$venue = EEH_Venue_View::get_venue( $VNU_ID );
526
-		if ( $venue instanceof EE_Venue ) {
524
+	public static function edit_venue_link($VNU_ID = 0, $link = '', $before = '<p class="edit-venue-lnk small-txt">', $after = '</p>') {
525
+		$venue = EEH_Venue_View::get_venue($VNU_ID);
526
+		if ($venue instanceof EE_Venue) {
527 527
 			// can the user edit this post ?
528
-			if ( current_user_can( 'edit_post', $venue->ID() )) {
528
+			if (current_user_can('edit_post', $venue->ID())) {
529 529
 				// set link text
530
-				$link = ! empty( $link ) ? $link : __('edit this venue');
530
+				$link = ! empty($link) ? $link : __('edit this venue');
531 531
 				// generate nonce
532
-				$nonce = wp_create_nonce( 'edit_nonce' );
532
+				$nonce = wp_create_nonce('edit_nonce');
533 533
 				// generate url to venue editor for this venue
534
-				$url = add_query_arg( array( 'page' => 'espresso_venues', 'action' => 'edit', 'post' => $venue->ID(), 'edit_nonce' => $nonce ), admin_url( 'admin.php' ) );
534
+				$url = add_query_arg(array('page' => 'espresso_venues', 'action' => 'edit', 'post' => $venue->ID(), 'edit_nonce' => $nonce), admin_url('admin.php'));
535 535
 				// get edit CPT text
536
-				$post_type_obj = get_post_type_object( 'espresso_venues' );
536
+				$post_type_obj = get_post_type_object('espresso_venues');
537 537
 				// build final link html
538
-				$link = '<a class="post-edit-link" href="' . $url . '" title="' . esc_attr( $post_type_obj->labels->edit_item ) . '">' . $link . '</a>';
538
+				$link = '<a class="post-edit-link" href="'.$url.'" title="'.esc_attr($post_type_obj->labels->edit_item).'">'.$link.'</a>';
539 539
 				// put it all together
540
-				return $before . apply_filters( 'edit_post_link', $link, $venue->ID() ) . $after;
540
+				return $before.apply_filters('edit_post_link', $link, $venue->ID()).$after;
541 541
 			}
542 542
 		}
543 543
 		return '';
Please login to merge, or discard this patch.
strategies/validation/EE_Full_HTML_Validation_Strategy.strategy.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -10,21 +10,21 @@  discard block
 block discarded – undo
10 10
  * @since 				4.6
11 11
  *
12 12
  */
13
-class EE_Full_HTML_Validation_Strategy extends EE_Validation_Strategy_Base{
13
+class EE_Full_HTML_Validation_Strategy extends EE_Validation_Strategy_Base {
14 14
 
15 15
 	/**
16 16
 	 * @param null $validation_error_message
17 17
 	 */
18
-	public function __construct( $validation_error_message = NULL ) {
19
-		if ( ! $validation_error_message ) {
18
+	public function __construct($validation_error_message = NULL) {
19
+		if ( ! $validation_error_message) {
20 20
 			global $allowedposttags;
21 21
 			$validation_error_message = sprintf(
22
-				__( 'Only the following HTML tags are allowed:%1$s%2$s', "event_espresso" ),
22
+				__('Only the following HTML tags are allowed:%1$s%2$s', "event_espresso"),
23 23
 				'<br />',
24
-				implode( ",", array_keys( $allowedposttags ) )
24
+				implode(",", array_keys($allowedposttags))
25 25
 			);
26 26
 		}
27
-		parent::__construct( $validation_error_message );
27
+		parent::__construct($validation_error_message);
28 28
 	}
29 29
 
30 30
 
@@ -38,8 +38,8 @@  discard block
 block discarded – undo
38 38
 	 */
39 39
 	public function get_list_of_allowed_tags() {
40 40
 		global $allowedposttags;
41
-		ksort( $allowedposttags );
42
-		return implode( ', ', array_keys( $allowedposttags ) );
41
+		ksort($allowedposttags);
42
+		return implode(', ', array_keys($allowedposttags));
43 43
 	}
44 44
 
45 45
 
@@ -50,10 +50,10 @@  discard block
 block discarded – undo
50 50
 	 */
51 51
 	public function validate($normalized_value) {
52 52
 		global $allowedposttags;
53
-		parent::validate( $normalized_value );
54
-		$normalized_value_sans_tags =  wp_kses( "$normalized_value", $allowedposttags );
55
-		if ( strlen( $normalized_value ) > strlen( $normalized_value_sans_tags ) ) {
56
-			throw new EE_Validation_Error( $this->get_validation_error_message(), 'complex_html_tags' );
53
+		parent::validate($normalized_value);
54
+		$normalized_value_sans_tags = wp_kses("$normalized_value", $allowedposttags);
55
+		if (strlen($normalized_value) > strlen($normalized_value_sans_tags)) {
56
+			throw new EE_Validation_Error($this->get_validation_error_message(), 'complex_html_tags');
57 57
 		}
58 58
 	}
59 59
 }
60 60
\ No newline at end of file
Please login to merge, or discard this patch.
form_sections/strategies/display/EE_Text_Area_Display_Strategy.strategy.php 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -4,9 +4,9 @@
 block discarded – undo
4 4
 
5 5
 
6 6
 	/**
7
-	*
8
-	* @return string of html to display the field
9
-	*/
7
+	 *
8
+	 * @return string of html to display the field
9
+	 */
10 10
 	function display(){
11 11
 		$input = $this->_input;
12 12
 		$raw_value = maybe_serialize($input->raw_value());
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-class EE_Text_Area_Display_Strategy extends EE_Display_Strategy_Base{
2
+class EE_Text_Area_Display_Strategy extends EE_Display_Strategy_Base {
3 3
 
4 4
 
5 5
 
@@ -7,32 +7,32 @@  discard block
 block discarded – undo
7 7
 	*
8 8
 	* @return string of html to display the field
9 9
 	*/
10
-	function display(){
10
+	function display() {
11 11
 		$input = $this->_input;
12 12
 		$raw_value = maybe_serialize($input->raw_value());
13
-		if( $input instanceof EE_Text_Area_Input ) {
13
+		if ($input instanceof EE_Text_Area_Input) {
14 14
 			$rows = $input->get_rows();
15 15
 			$cols = $input->get_cols();
16
-		}else{
16
+		} else {
17 17
 			$rows = 4;
18 18
 			$cols = 20;
19 19
 		}
20 20
 		$html = '<textarea';
21
-		$html .= ' id="' . $input->html_id() . '"';
22
-		$html .= ' name="' . $input->html_name() . '"';
23
-		$html .= ' class="' . $input->html_class() . '"' ;
24
-		$html .= ' style="' . $input->html_style() . '"';
21
+		$html .= ' id="'.$input->html_id().'"';
22
+		$html .= ' name="'.$input->html_name().'"';
23
+		$html .= ' class="'.$input->html_class().'"';
24
+		$html .= ' style="'.$input->html_style().'"';
25 25
 		$html .= $input->other_html_attributes();
26
-		$html .= ' rows= "' . $rows . '" cols="' . $cols . '">';
26
+		$html .= ' rows= "'.$rows.'" cols="'.$cols.'">';
27 27
 		$html .= $raw_value;
28 28
 		$html .= '</textarea>';
29
-		foreach ( $this->_input->get_validation_strategies() as $validation_strategy ) {
29
+		foreach ($this->_input->get_validation_strategies() as $validation_strategy) {
30 30
 			if (
31 31
 				$validation_strategy instanceof EE_Simple_HTML_Validation_Strategy
32 32
 				|| $validation_strategy instanceof EE_Full_HTML_Validation_Strategy
33 33
 			) {
34 34
 				$html .= sprintf(
35
-					__( '%1$s(allowed tags: %2$s)%3$s', 'event_espresso' ),
35
+					__('%1$s(allowed tags: %2$s)%3$s', 'event_espresso'),
36 36
 					'<p class="ee-question-desc">',
37 37
 					$validation_strategy->get_list_of_allowed_tags(),
38 38
 					'</p>'
Please login to merge, or discard this patch.
admin_pages/messages/qtips/EE_Message_List_Table_Tips.lib.php 1 patch
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -18,9 +18,9 @@  discard block
 block discarded – undo
18 18
 	protected function _set_tips_array() {
19 19
 		$this->_qtipsa = array(
20 20
 			0 => array(
21
-				'content_id' => 'message_status-' . EEM_Message::status_sent,
22
-				'target' => '.msg-status-' . EEM_Message::status_sent,
23
-				'content' => $this->_message_status_legend( EEM_Message::status_sent ),
21
+				'content_id' => 'message_status-'.EEM_Message::status_sent,
22
+				'target' => '.msg-status-'.EEM_Message::status_sent,
23
+				'content' => $this->_message_status_legend(EEM_Message::status_sent),
24 24
 				'options' => array(
25 25
 					'position' => array(
26 26
 						'target' => 'mouse',
@@ -28,9 +28,9 @@  discard block
 block discarded – undo
28 28
 					)
29 29
 				),
30 30
 			1 => array(
31
-				'content_id' => 'message_status-' . EEM_Message::status_idle,
32
-				'target' => '.msg-status-' . EEM_Message::status_idle,
33
-				'content' => $this->_message_status_legend( EEM_Message::status_idle ),
31
+				'content_id' => 'message_status-'.EEM_Message::status_idle,
32
+				'target' => '.msg-status-'.EEM_Message::status_idle,
33
+				'content' => $this->_message_status_legend(EEM_Message::status_idle),
34 34
 				'options' => array(
35 35
 					'position' => array(
36 36
 						'target' => 'mouse',
@@ -38,9 +38,9 @@  discard block
 block discarded – undo
38 38
 					)
39 39
 				),
40 40
 			2 => array(
41
-				'content_id' => 'message_status-' . EEM_Message::status_failed,
42
-				'target' => '.msg-status-' . EEM_Message::status_failed,
43
-				'content' => $this->_message_status_legend( EEM_Message::status_failed ),
41
+				'content_id' => 'message_status-'.EEM_Message::status_failed,
42
+				'target' => '.msg-status-'.EEM_Message::status_failed,
43
+				'content' => $this->_message_status_legend(EEM_Message::status_failed),
44 44
 				'options' => array(
45 45
 					'position' => array(
46 46
 						'target' => 'mouse',
@@ -48,9 +48,9 @@  discard block
 block discarded – undo
48 48
 					)
49 49
 				),
50 50
 			3 => array(
51
-				'content_id' => 'message_status-' . EEM_Message::status_resend,
52
-				'target' => '.msg-status-' . EEM_Message::status_resend,
53
-				'content' => $this->_message_status_legend( EEM_Message::status_resend ),
51
+				'content_id' => 'message_status-'.EEM_Message::status_resend,
52
+				'target' => '.msg-status-'.EEM_Message::status_resend,
53
+				'content' => $this->_message_status_legend(EEM_Message::status_resend),
54 54
 				'options' => array(
55 55
 					'position' => array(
56 56
 						'target' => 'mouse',
@@ -58,9 +58,9 @@  discard block
 block discarded – undo
58 58
 					)
59 59
 				),
60 60
 			4 => array(
61
-				'content_id' => 'message_status-' . EEM_Message::status_incomplete,
62
-				'target' => '.msg-status-' . EEM_Message::status_incomplete,
63
-				'content' => $this->_message_status_legend( EEM_Message::status_incomplete ),
61
+				'content_id' => 'message_status-'.EEM_Message::status_incomplete,
62
+				'target' => '.msg-status-'.EEM_Message::status_incomplete,
63
+				'content' => $this->_message_status_legend(EEM_Message::status_incomplete),
64 64
 				'options' => array(
65 65
 					'position' => array(
66 66
 						'target' => 'mouse',
@@ -68,9 +68,9 @@  discard block
 block discarded – undo
68 68
 					)
69 69
 				),
70 70
 			5 => array(
71
-				'content_id' => 'message_status-' . EEM_Message::status_retry,
72
-				'target' => '.msg-status-' . EEM_Message::status_retry,
73
-				'content' => $this->_message_status_legend( EEM_Message::status_retry ),
71
+				'content_id' => 'message_status-'.EEM_Message::status_retry,
72
+				'target' => '.msg-status-'.EEM_Message::status_retry,
73
+				'content' => $this->_message_status_legend(EEM_Message::status_retry),
74 74
 				'options' => array(
75 75
 					'position' => array(
76 76
 						'target' => 'mouse',
@@ -78,9 +78,9 @@  discard block
 block discarded – undo
78 78
 					)
79 79
 				),
80 80
 			6 => array(
81
-				'content_id' => 'message_status-' . EEM_Message::status_debug_only,
82
-				'target' => '.msg-status-' . EEM_Message::status_debug_only,
83
-				'content' => $this->_message_status_legend( EEM_Message::status_debug_only ),
81
+				'content_id' => 'message_status-'.EEM_Message::status_debug_only,
82
+				'target' => '.msg-status-'.EEM_Message::status_debug_only,
83
+				'content' => $this->_message_status_legend(EEM_Message::status_debug_only),
84 84
 				'options' => array(
85 85
 					'position' => array(
86 86
 						'target' => 'mouse',
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
 	 * @param  EEM_Message constant $status What status is set (by class)
100 100
 	 * @return string         The status legend with the related status highlighted
101 101
 	 */
102
-	private function _message_status_legend( $status ) {
102
+	private function _message_status_legend($status) {
103 103
 
104 104
 		$status_array = array(
105 105
 			'sent_status' => EEM_Message::status_sent,
@@ -110,10 +110,10 @@  discard block
 block discarded – undo
110 110
 			'retry_status' => EEM_Message::status_retry,
111 111
 			);
112 112
 
113
-		if ( defined( 'WP_DEBUG' ) && WP_DEBUG ) {
113
+		if (defined('WP_DEBUG') && WP_DEBUG) {
114 114
 			$status_array['debug_only_status'] = EEM_Message::status_debug_only;
115 115
 		}
116 116
 
117
-		return EEH_Template::status_legend( $status_array, $status );
117
+		return EEH_Template::status_legend($status_array, $status);
118 118
 	}
119 119
 }
120 120
\ No newline at end of file
Please login to merge, or discard this patch.
core/db_models/EEM_Status.model.php 2 patches
Indentation   +35 added lines, -35 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
 	public function localized_status(  $statuses, $plural = FALSE, $schema = 'upper' ) {
84 84
 		//note these are all in lower case because ucwords() on upper case will NOT convert.
85 85
 		$translation_array = array(
86
-	     	EEM_Registration::status_id_pending_payment => array(
86
+		 	EEM_Registration::status_id_pending_payment => array(
87 87
 				__('pending payment', 'event_espresso'), //singular
88 88
 				__('pending payments', 'event_espresso') //plural
89 89
 			),
@@ -217,22 +217,22 @@  discard block
 block discarded – undo
217 217
 				__('queued for sending', 'event_espresso'),
218 218
 				__('queued for sending', 'event_espresso'),
219 219
 			),
220
-	        EEM_Message::status_failed => array(
221
-		        __('failed', 'event_espresso'),
222
-		        __('failed', 'event_espresso'),
223
-	        ),
220
+			EEM_Message::status_failed => array(
221
+				__('failed', 'event_espresso'),
222
+				__('failed', 'event_espresso'),
223
+			),
224 224
 			EEM_Message::status_debug_only => array(
225 225
 				__( 'debug only', 'event_espresso' ),
226 226
 				__( 'debug only', 'event_espresso' )
227 227
 			),
228
-	        EEM_Message::status_resend => array(
229
-		        __('queued for resending', 'event_espresso'),
230
-		        __('queued for resending', 'event_espresso'),
231
-	        ),
232
-	        EEM_Message::status_incomplete => array(
233
-		        __('queued for generating', 'event_espresso'),
234
-		        __('queued for generating', 'event_espresso'),
235
-	        ),
228
+			EEM_Message::status_resend => array(
229
+				__('queued for resending', 'event_espresso'),
230
+				__('queued for resending', 'event_espresso'),
231
+			),
232
+			EEM_Message::status_incomplete => array(
233
+				__('queued for generating', 'event_espresso'),
234
+				__('queued for generating', 'event_espresso'),
235
+			),
236 236
 			EEM_Message::status_retry => array(
237 237
 				__('failed sending, can be retried', 'event_espresso'),
238 238
 				__('failed sending, can be retried', 'event_espresso'),
@@ -261,37 +261,37 @@  discard block
 block discarded – undo
261 261
 	  			__('trashed', 'event_espresso'),
262 262
 	  			__('trashed', 'event_espresso')
263 263
   			),
264
-	    );
264
+		);
265 265
 
266 266
 		$translation_array = apply_filters( 'FHEE__EEM_Status__localized_status__translation_array', $translation_array );
267 267
 
268 268
 		if ( !is_array($statuses) )
269 269
 			throw new EE_Error( __('The incoming statuses argument must be an array with keys as the $status_id and values as the $status_code', 'event_espresso') );
270 270
 
271
-	    $translation = array();
271
+		$translation = array();
272 272
 
273
-	    foreach ( $statuses as $id => $code ) {
274
-	    	if ( isset( $translation_array[$id] ) ) {
275
-	    		$translation[$id] = $plural ? $translation_array[$id][1] : $translation_array[$id][0];
276
-	    	} else {
277
-	    		$translation[$id] = $code;
278
-	    	}
273
+		foreach ( $statuses as $id => $code ) {
274
+			if ( isset( $translation_array[$id] ) ) {
275
+				$translation[$id] = $plural ? $translation_array[$id][1] : $translation_array[$id][0];
276
+			} else {
277
+				$translation[$id] = $code;
278
+			}
279 279
 
280
-	    	//schema
281
-	    	switch ( $schema ) {
282
-	    		case 'lower' :
283
-	    			$translation[$id] = strtolower( $translation[$id] ); //even though these start in lower case, this will catch any statuses added via filter.
284
-	    			break;
285
-	    		case 'sentence' :
286
-	    			$translation[$id] = ucwords( $translation[$id] );
287
-	    			break;
288
-	    		case 'upper' :
289
-	    			$translation[$id] = strtoupper( $translation[$id] );
290
-	    			break;
291
-	    	}
292
-	    }
280
+			//schema
281
+			switch ( $schema ) {
282
+				case 'lower' :
283
+					$translation[$id] = strtolower( $translation[$id] ); //even though these start in lower case, this will catch any statuses added via filter.
284
+					break;
285
+				case 'sentence' :
286
+					$translation[$id] = ucwords( $translation[$id] );
287
+					break;
288
+				case 'upper' :
289
+					$translation[$id] = strtoupper( $translation[$id] );
290
+					break;
291
+			}
292
+		}
293 293
 
294
-	    return $translation;
294
+		return $translation;
295 295
 	}
296 296
 
297 297
 
Please login to merge, or discard this patch.
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
  *
14 14
  * ------------------------------------------------------------------------
15 15
  */
16
-require_once ( EE_MODELS . 'EEM_Base.model.php' );
16
+require_once (EE_MODELS.'EEM_Base.model.php');
17 17
 /**
18 18
  *
19 19
  * Class EEM_Status
@@ -32,32 +32,32 @@  discard block
 block discarded – undo
32 32
 	/**
33 33
 	 * @return EEM_Status
34 34
 	 */
35
-	protected function __construct( $timezone = NULL ) {
36
-		$this->singular_item = __('Status','event_espresso');
37
-		$this->plural_item = __('Stati','event_espresso');
35
+	protected function __construct($timezone = NULL) {
36
+		$this->singular_item = __('Status', 'event_espresso');
37
+		$this->plural_item = __('Stati', 'event_espresso');
38 38
 		$this->_tables = array(
39 39
 			'Status'=> new EE_Primary_Table('esp_status', 'STS_ID')
40 40
 		);
41 41
 		$this->_fields = array(
42 42
 			'Status'=>array(
43
-				'STS_ID'=> new EE_Primary_Key_String_Field('STS_ID', __('Status ID','event_espresso')),
44
-				'STS_code'=>new EE_Plain_Text_Field('STS_code',__('Status Code','event_espresso'),false, ''),
43
+				'STS_ID'=> new EE_Primary_Key_String_Field('STS_ID', __('Status ID', 'event_espresso')),
44
+				'STS_code'=>new EE_Plain_Text_Field('STS_code', __('Status Code', 'event_espresso'), false, ''),
45 45
 				'STS_type'=>new EE_Enum_Text_Field(
46 46
 					'STS_type',
47 47
 					__("Type", "event_espresso"),
48 48
 					false,
49 49
 					'event',
50 50
 						array(
51
-							'event'=> __("Event", "event_espresso"),//deprecated
51
+							'event'=> __("Event", "event_espresso"), //deprecated
52 52
 							'registration'=>  __("Registration", "event_espresso"),
53 53
 							'transaction'=>  __("Transaction", "event_espresso"),
54 54
 							'payment'=>  __("Payment", "event_espresso"),
55 55
 							'email'=>  __("Email", "event_espresso"),
56 56
 							'message' => __("Message", "event_espresso")
57 57
 						)),
58
-				'STS_can_edit'=>new EE_Boolean_Field('STS_can_edit', __('Editable?','event_espresso'), false),
58
+				'STS_can_edit'=>new EE_Boolean_Field('STS_can_edit', __('Editable?', 'event_espresso'), false),
59 59
 				'STS_desc'=>new EE_Simple_HTML_Field('STS_desc', __("Description", "event_espresso"), false, ''),
60
-				'STS_open'=>new EE_Boolean_Field('STS_open', __("Open?", "event_espresso"), false,false)
60
+				'STS_open'=>new EE_Boolean_Field('STS_open', __("Open?", "event_espresso"), false, false)
61 61
 			));
62 62
 		$this->_model_relations = array(
63 63
 			'Registration'=>new EE_Has_Many_Relation(),
@@ -65,9 +65,9 @@  discard block
 block discarded – undo
65 65
 			'Payment'=>new EE_Has_Many_Relation()
66 66
 		);
67 67
 		//this model is generally available for reading
68
-		$this->_cap_restriction_generators[ EEM_Base::caps_read ] = new EE_Restriction_Generator_Public();
68
+		$this->_cap_restriction_generators[EEM_Base::caps_read] = new EE_Restriction_Generator_Public();
69 69
 
70
-		parent::__construct( $timezone );
70
+		parent::__construct($timezone);
71 71
 	}
72 72
 
73 73
 
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
 	 * @throws EE_Error
81 81
 	 * @return array             an array of translated strings for the incoming status id.
82 82
 	 */
83
-	public function localized_status(  $statuses, $plural = FALSE, $schema = 'upper' ) {
83
+	public function localized_status($statuses, $plural = FALSE, $schema = 'upper') {
84 84
 		//note these are all in lower case because ucwords() on upper case will NOT convert.
85 85
 		$translation_array = array(
86 86
 	     	EEM_Registration::status_id_pending_payment => array(
@@ -222,8 +222,8 @@  discard block
 block discarded – undo
222 222
 		        __('failed', 'event_espresso'),
223 223
 	        ),
224 224
 			EEM_Message::status_debug_only => array(
225
-				__( 'debug only', 'event_espresso' ),
226
-				__( 'debug only', 'event_espresso' )
225
+				__('debug only', 'event_espresso'),
226
+				__('debug only', 'event_espresso')
227 227
 			),
228 228
 	        EEM_Message::status_resend => array(
229 229
 		        __('queued for resending', 'event_espresso'),
@@ -263,30 +263,30 @@  discard block
 block discarded – undo
263 263
   			),
264 264
 	    );
265 265
 
266
-		$translation_array = apply_filters( 'FHEE__EEM_Status__localized_status__translation_array', $translation_array );
266
+		$translation_array = apply_filters('FHEE__EEM_Status__localized_status__translation_array', $translation_array);
267 267
 
268
-		if ( !is_array($statuses) )
269
-			throw new EE_Error( __('The incoming statuses argument must be an array with keys as the $status_id and values as the $status_code', 'event_espresso') );
268
+		if ( ! is_array($statuses))
269
+			throw new EE_Error(__('The incoming statuses argument must be an array with keys as the $status_id and values as the $status_code', 'event_espresso'));
270 270
 
271 271
 	    $translation = array();
272 272
 
273
-	    foreach ( $statuses as $id => $code ) {
274
-	    	if ( isset( $translation_array[$id] ) ) {
273
+	    foreach ($statuses as $id => $code) {
274
+	    	if (isset($translation_array[$id])) {
275 275
 	    		$translation[$id] = $plural ? $translation_array[$id][1] : $translation_array[$id][0];
276 276
 	    	} else {
277 277
 	    		$translation[$id] = $code;
278 278
 	    	}
279 279
 
280 280
 	    	//schema
281
-	    	switch ( $schema ) {
281
+	    	switch ($schema) {
282 282
 	    		case 'lower' :
283
-	    			$translation[$id] = strtolower( $translation[$id] ); //even though these start in lower case, this will catch any statuses added via filter.
283
+	    			$translation[$id] = strtolower($translation[$id]); //even though these start in lower case, this will catch any statuses added via filter.
284 284
 	    			break;
285 285
 	    		case 'sentence' :
286
-	    			$translation[$id] = ucwords( $translation[$id] );
286
+	    			$translation[$id] = ucwords($translation[$id]);
287 287
 	    			break;
288 288
 	    		case 'upper' :
289
-	    			$translation[$id] = strtoupper( $translation[$id] );
289
+	    			$translation[$id] = strtoupper($translation[$id]);
290 290
 	    			break;
291 291
 	    	}
292 292
 	    }
Please login to merge, or discard this patch.