Completed
Branch BUG-9518-remove-recommend-wp-v... (799da8)
by
unknown
480:10 queued 465:05
created
core/libraries/messages/messenger/EE_Email_messenger.class.php 3 patches
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,8 +6,9 @@
 block discarded – undo
6 6
  * @package Event Espresso
7 7
  * @subpackage messages
8 8
  */
9
-if (!defined('EVENT_ESPRESSO_VERSION') )
9
+if (!defined('EVENT_ESPRESSO_VERSION') ) {
10 10
 	exit('NO direct script access allowed');
11
+}
11 12
 
12 13
 /**
13 14
  *
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -93,7 +93,7 @@
 block discarded – undo
93 93
 	 *
94 94
 	 * @abstract
95 95
 	 * @access protected
96
-	 * @return array
96
+	 * @return string[]
97 97
 	 */
98 98
 	protected function _get_table_filters() {
99 99
 		$filters = array();
Please login to merge, or discard this patch.
Spacing   +49 added lines, -49 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-if (!defined('EVENT_ESPRESSO_VERSION') )
3
+if ( ! defined('EVENT_ESPRESSO_VERSION'))
4 4
 	exit('NO direct script access allowed');
5 5
 
6 6
 /**
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 /**
30 30
  * This sets up the email messenger for the EE_messages (notifications) subsystem in EE.
31 31
  */
32
-class EE_Email_messenger extends EE_messenger  {
32
+class EE_Email_messenger extends EE_messenger {
33 33
 
34 34
 	/**
35 35
 	 * The following are the properties that email requires for the message going out.
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
 	protected function _set_valid_shortcodes() {
76 76
 		//remember by leaving the other fields not set, those fields will inherit the valid shortcodes from the message type.
77 77
 		$this->_valid_shortcodes = array(
78
-			'to' => array('email','event_author', 'primary_registration_details', 'recipient_details'),
78
+			'to' => array('email', 'event_author', 'primary_registration_details', 'recipient_details'),
79 79
 			'from' => array('email', 'event_author', 'primary_registration_details', 'recipient_details')
80 80
 			);
81 81
 	}
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
 				'shortcodes' => array('organization', 'primary_registration_details', 'event_author', 'primary_registration_details', 'recipient_details')
110 110
 				),
111 111
 			'content' => array(
112
-				'shortcodes' => array('event_list','attendee_list', 'ticket_list', 'organization', 'primary_registration_details', 'primary_registration_list', 'event_author', 'recipient_details', 'recipient_list', 'transaction', 'messenger')
112
+				'shortcodes' => array('event_list', 'attendee_list', 'ticket_list', 'organization', 'primary_registration_details', 'primary_registration_list', 'event_author', 'recipient_details', 'recipient_list', 'transaction', 'messenger')
113 113
 				),
114 114
 			'attendee_list' => array(
115 115
 				'shortcodes' => array('attendee', 'event_list', 'ticket_list'),
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
 				'required' => array('[EVENT_LIST]')
121 121
 				),
122 122
 			'ticket_list' => array(
123
-				'shortcodes' => array('event_list', 'attendee_list', 'ticket', 'datetime_list','primary_registration_details', 'recipient_details'),
123
+				'shortcodes' => array('event_list', 'attendee_list', 'ticket', 'datetime_list', 'primary_registration_details', 'recipient_details'),
124 124
 				'required' => array('[TICKET_LIST]')
125 125
 				),
126 126
 			'datetime_list' => array(
@@ -139,21 +139,21 @@  discard block
 block discarded – undo
139 139
 	 *
140 140
 	 * @since 4.5.0
141 141
 	 */
142
-	public function do_secondary_messenger_hooks( $sending_messenger_name ) {
143
-		if ( $sending_messenger_name = 'html' ) {
144
-			add_filter( 'FHEE__EE_Messages_Template_Pack__get_variation', array( $this, 'add_email_css' ), 10, 8 );
142
+	public function do_secondary_messenger_hooks($sending_messenger_name) {
143
+		if ($sending_messenger_name = 'html') {
144
+			add_filter('FHEE__EE_Messages_Template_Pack__get_variation', array($this, 'add_email_css'), 10, 8);
145 145
 		}
146 146
 	}
147 147
 
148 148
 
149 149
 
150 150
 
151
-	public function add_email_css( $variation_path, $messenger, $message_type, $type, $variation, $file_extension, $url, EE_Messages_Template_Pack $template_pack ) {
151
+	public function add_email_css($variation_path, $messenger, $message_type, $type, $variation, $file_extension, $url, EE_Messages_Template_Pack $template_pack) {
152 152
 		//prevent recursion on this callback.
153
-		remove_filter( 'FHEE__EE_Messages_Template_Pack__get_variation', array( $this, 'add_email_css' ), 10 );
154
-		$variation = $this->get_variation( $template_pack, $message_type, $url, 'main', $variation, FALSE  );
153
+		remove_filter('FHEE__EE_Messages_Template_Pack__get_variation', array($this, 'add_email_css'), 10);
154
+		$variation = $this->get_variation($template_pack, $message_type, $url, 'main', $variation, FALSE);
155 155
 
156
-		add_filter( 'FHEE__EE_Messages_Template_Pack__get_variation', array( $this, 'add_email_css' ), 10, 8 );
156
+		add_filter('FHEE__EE_Messages_Template_Pack__get_variation', array($this, 'add_email_css'), 10, 8);
157 157
 		return $variation;
158 158
 	}
159 159
 
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
 				'required' => FALSE,
186 186
 				'validation' => FALSE,
187 187
 				'format' => '%s',
188
-				'value' => sprintf( __('Test email sent from %s', 'event_espresso'), get_bloginfo('name') ),
188
+				'value' => sprintf(__('Test email sent from %s', 'event_espresso'), get_bloginfo('name')),
189 189
 				'default'=> '',
190 190
 				'css_class' => ''
191 191
 				)
@@ -348,8 +348,8 @@  discard block
 block discarded – undo
348 348
 	 */
349 349
 	protected function _send_message() {
350 350
 		return wp_mail(
351
-			html_entity_decode( $this->_to, ENT_QUOTES, "UTF-8" ),
352
-			stripslashes( html_entity_decode( $this->_subject, ENT_QUOTES, "UTF-8" )),
351
+			html_entity_decode($this->_to, ENT_QUOTES, "UTF-8"),
352
+			stripslashes(html_entity_decode($this->_subject, ENT_QUOTES, "UTF-8")),
353 353
 			$this->_body(),
354 354
 			$this->_headers()
355 355
 		);
@@ -363,7 +363,7 @@  discard block
 block discarded – undo
363 363
 	 * @return string html body of the message content and the related css.
364 364
 	 */
365 365
 	protected function _preview() {
366
-		return $this->_body( TRUE );
366
+		return $this->_body(TRUE);
367 367
 	}
368 368
 
369 369
 
@@ -377,18 +377,18 @@  discard block
 block discarded – undo
377 377
 	 * @return string formatted header for email
378 378
 	 */
379 379
 	protected function _headers() {
380
-		$from = stripslashes_deep( html_entity_decode($this->_from,  ENT_QUOTES,"UTF-8" ) );
380
+		$from = stripslashes_deep(html_entity_decode($this->_from, ENT_QUOTES, "UTF-8"));
381 381
 		$headers = array(
382 382
 			'MIME-Version: 1.0',
383
-			'From:' . $from,
384
-			'Reply-To:' . $from,
383
+			'From:'.$from,
384
+			'Reply-To:'.$from,
385 385
 			'Content-Type:text/html; charset=utf-8'
386 386
 			);
387 387
 
388 388
 		//but wait!  Header's for the from is NOT reliable because some plugins don't respect From: as set in the header.
389
-		add_filter( 'wp_mail_from',  array( $this, 'set_from_address' ), 100 );
390
-		add_filter( 'wp_mail_from_name', array( $this, 'set_from_name' ), 100 );
391
-		return apply_filters( 'FHEE__EE_Email_messenger___headers', $headers, $this->_incoming_message_type, $this );
389
+		add_filter('wp_mail_from', array($this, 'set_from_address'), 100);
390
+		add_filter('wp_mail_from_name', array($this, 'set_from_name'), 100);
391
+		return apply_filters('FHEE__EE_Email_messenger___headers', $headers, $this->_incoming_message_type, $this);
392 392
 	}
393 393
 
394 394
 
@@ -404,19 +404,19 @@  discard block
 block discarded – undo
404 404
 	 * @return array
405 405
 	 */
406 406
 	private function _parse_from() {
407
-		if ( strpos( $this->_from, '<' ) !== false ) {
408
-			$from_name = substr( $this->_from, 0, strpos( $this->_from, '<' ) - 1 );
409
-			$from_name = str_replace( '"', '', $from_name );
410
-			$from_name = trim( $from_name );
411
-
412
-			$from_email = substr( $this->_from, strpos( $this->_from, '<' ) + 1 );
413
-			$from_email = str_replace( '>', '', $from_email );
414
-			$from_email = trim( $from_email );
407
+		if (strpos($this->_from, '<') !== false) {
408
+			$from_name = substr($this->_from, 0, strpos($this->_from, '<') - 1);
409
+			$from_name = str_replace('"', '', $from_name);
410
+			$from_name = trim($from_name);
411
+
412
+			$from_email = substr($this->_from, strpos($this->_from, '<') + 1);
413
+			$from_email = str_replace('>', '', $from_email);
414
+			$from_email = trim($from_email);
415 415
 		} else {
416 416
 			$from_name = '';
417
-			$from_email = trim( $this->_from );
417
+			$from_email = trim($this->_from);
418 418
 		}
419
-		return array( $from_name, $from_email );
419
+		return array($from_name, $from_email);
420 420
 	}
421 421
 
422 422
 
@@ -429,7 +429,7 @@  discard block
 block discarded – undo
429 429
 	 *
430 430
 	 * @param string $from_email What the original from_email is.
431 431
 	 */
432
-	public function set_from_address( $from_email ) {
432
+	public function set_from_address($from_email) {
433 433
 		$parsed_from = $this->_parse_from();
434 434
 		return $parsed_from[1];
435 435
 	}
@@ -444,13 +444,13 @@  discard block
 block discarded – undo
444 444
 	 *
445 445
 	 * @param string $from_name The original from_name.
446 446
 	 */
447
-	public function set_from_name( $from_name ) {
447
+	public function set_from_name($from_name) {
448 448
 		$parsed_from = $this->_parse_from();
449
-		if ( is_array( $parsed_from) && ! empty( $parsed_from[0] ) ) {
450
-			$from_name =  $parsed_from[0];
449
+		if (is_array($parsed_from) && ! empty($parsed_from[0])) {
450
+			$from_name = $parsed_from[0];
451 451
 		}
452 452
 
453
-		return stripslashes_deep( html_entity_decode($from_name,  ENT_QUOTES,"UTF-8" ) );
453
+		return stripslashes_deep(html_entity_decode($from_name, ENT_QUOTES, "UTF-8"));
454 454
 	}
455 455
 
456 456
 
@@ -461,14 +461,14 @@  discard block
 block discarded – undo
461 461
 	 * @param bool $preview will determine whether this is preview template or not.
462 462
 	 * @return string formatted body for email.
463 463
 	 */
464
-	protected function _body( $preview = FALSE ) {
464
+	protected function _body($preview = FALSE) {
465 465
 		//setup template args!
466 466
 		$this->_template_args = array(
467 467
 			'subject' => $this->_subject,
468 468
 			'from' => $this->_from,
469
-			'main_body' => wpautop(stripslashes_deep( html_entity_decode($this->_content,  ENT_QUOTES,"UTF-8" ) ))
469
+			'main_body' => wpautop(stripslashes_deep(html_entity_decode($this->_content, ENT_QUOTES, "UTF-8")))
470 470
 			);
471
-		$body =  $this->_get_main_template( $preview );
471
+		$body = $this->_get_main_template($preview);
472 472
 
473 473
 		/**
474 474
 		 * This filter allows one to bypass the CSSToInlineStyles tool and leave the body untouched.
@@ -476,17 +476,17 @@  discard block
 block discarded – undo
476 476
 		 * @type    bool    $preview    Indicates whether a preview is being generated or not.
477 477
 		 * @return  bool    true  indicates to use the inliner, false bypasses it.
478 478
 		 */
479
-		if ( apply_filters( 'FHEE__EE_Email_messenger__apply_CSSInliner ', true, $preview ) ) {
479
+		if (apply_filters('FHEE__EE_Email_messenger__apply_CSSInliner ', true, $preview)) {
480 480
 
481 481
 			//require CssToInlineStyles library and its dependencies via composer autoloader
482
-			require_once EE_THIRD_PARTY . 'cssinliner/vendor/autoload.php';
482
+			require_once EE_THIRD_PARTY.'cssinliner/vendor/autoload.php';
483 483
 
484 484
 			//now if this isn't a preview, let's setup the body so it has inline styles
485
-			if ( ! $preview || ( $preview && defined( 'DOING_AJAX' ) ) ) {
486
-				$style = file_get_contents( $this->get_variation( $this->_tmp_pack, $this->_incoming_message_type->name, FALSE, 'main', $this->_variation ), TRUE );
487
-				$CSS = new TijsVerkoyen\CssToInlineStyles\CssToInlineStyles( $body, $style );
488
-				$body = ltrim( $CSS->convert( true ), ">\n" ); //for some reason the library has a bracket and new line at the beginning.  This takes care of that.
489
-				$body = ltrim( $body, "<?" ); //see https://events.codebasehq.com/projects/event-espresso/tickets/8609
485
+			if ( ! $preview || ($preview && defined('DOING_AJAX'))) {
486
+				$style = file_get_contents($this->get_variation($this->_tmp_pack, $this->_incoming_message_type->name, FALSE, 'main', $this->_variation), TRUE);
487
+				$CSS = new TijsVerkoyen\CssToInlineStyles\CssToInlineStyles($body, $style);
488
+				$body = ltrim($CSS->convert(true), ">\n"); //for some reason the library has a bracket and new line at the beginning.  This takes care of that.
489
+				$body = ltrim($body, "<?"); //see https://events.codebasehq.com/projects/event-espresso/tickets/8609
490 490
 			}
491 491
 
492 492
 		}
@@ -505,8 +505,8 @@  discard block
 block discarded – undo
505 505
 	public function get_existing_test_settings() {
506 506
 		$settings = parent::get_existing_test_settings();
507 507
 		//override subject if present because we always want it to be fresh.
508
-		if ( is_array( $settings ) && ! empty( $settings['subject'] ) ) {
509
-			$settings['subject'] = sprintf( __('Test email sent from %s', 'event_espresso'), get_bloginfo('name') );
508
+		if (is_array($settings) && ! empty($settings['subject'])) {
509
+			$settings['subject'] = sprintf(__('Test email sent from %s', 'event_espresso'), get_bloginfo('name'));
510 510
 		}
511 511
 		return $settings;
512 512
 	}
Please login to merge, or discard this patch.
email/EE_Messages_Email_Not_Approved_Registration_Validator.class.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-if (!defined('EVENT_ESPRESSO_VERSION') )
3
+if ( ! defined('EVENT_ESPRESSO_VERSION'))
4 4
 	exit('NO direct script access allowed');
5 5
 
6 6
 /**
@@ -30,11 +30,11 @@  discard block
 block discarded – undo
30 30
 class EE_Messages_Email_Registration_Validator extends EE_Messages_Validator {
31 31
 
32 32
 
33
-	public function __construct( $fields, $context ) {
33
+	public function __construct($fields, $context) {
34 34
 		$this->_m_name = 'email';
35 35
 		$this->_mt_name = 'registration';
36 36
 
37
-		parent::__construct( $fields, $context );
37
+		parent::__construct($fields, $context);
38 38
 	}
39 39
 
40 40
 	/**
@@ -47,9 +47,9 @@  discard block
 block discarded – undo
47 47
 			'shortcodes' => array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list'),
48 48
 			'required' => array('[EVENT_LIST]')
49 49
 			);
50
-		$this->_MSGR->set_validator_config( $new_config );
50
+		$this->_MSGR->set_validator_config($new_config);
51 51
 
52
-		if ( $this->_context != 'admin' )
52
+		if ($this->_context != 'admin')
53 53
 			$this->_valid_shortcodes_modifier[$this->_context]['event_list'] = array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list');
54 54
 
55 55
 		$this->_specific_shortcode_excludes['content'] = array('[DISPLAY_PDF_URL]', '[DISPLAY_PDF_BUTTON]');
Please login to merge, or discard this patch.
Braces   +5 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,7 +1,8 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-if (!defined('EVENT_ESPRESSO_VERSION') )
3
+if (!defined('EVENT_ESPRESSO_VERSION') ) {
4 4
 	exit('NO direct script access allowed');
5
+}
5 6
 
6 7
 /**
7 8
  * Event Espresso
@@ -49,8 +50,9 @@  discard block
 block discarded – undo
49 50
 			);
50 51
 		$this->_MSGR->set_validator_config( $new_config );
51 52
 
52
-		if ( $this->_context != 'admin' )
53
-			$this->_valid_shortcodes_modifier[$this->_context]['event_list'] = array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list');
53
+		if ( $this->_context != 'admin' ) {
54
+					$this->_valid_shortcodes_modifier[$this->_context]['event_list'] = array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list');
55
+		}
54 56
 
55 57
 		$this->_specific_shortcode_excludes['content'] = array('[DISPLAY_PDF_URL]', '[DISPLAY_PDF_BUTTON]');
56 58
 	}
Please login to merge, or discard this patch.
validators/email/EE_Messages_Email_Payment_Refund_Validator.class.php 2 patches
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-if (!defined('EVENT_ESPRESSO_VERSION') )
3
+if ( ! defined('EVENT_ESPRESSO_VERSION'))
4 4
 	exit('NO direct script access allowed');
5 5
 
6 6
 /**
@@ -30,11 +30,11 @@  discard block
 block discarded – undo
30 30
 class EE_Messages_Email_Payment_Validator extends EE_Messages_Validator {
31 31
 
32 32
 
33
-	public function __construct( $fields, $context ) {
33
+	public function __construct($fields, $context) {
34 34
 		$this->_m_name = 'email';
35 35
 		$this->_mt_name = 'payment';
36 36
 
37
-		parent::__construct( $fields, $context );
37
+		parent::__construct($fields, $context);
38 38
 	}
39 39
 
40 40
 	/**
@@ -45,17 +45,17 @@  discard block
 block discarded – undo
45 45
 
46 46
 		//modify just event_list
47 47
 		$new_config['event_list'] = array(
48
-			'shortcodes' => array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization','recipient_details', 'recipient_list', 'event_author', 'primary_registration_details', 'primary_registration_list')
48
+			'shortcodes' => array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'recipient_details', 'recipient_list', 'event_author', 'primary_registration_details', 'primary_registration_list')
49 49
 			);
50 50
 		$new_config['ticket_list'] = array(
51 51
 			'shortcodes' => array('event_list', 'attendee_list', 'ticket', 'datetime_list', 'recipient_details', 'transaction')
52 52
 			);
53 53
 		$new_config['content'] = array(
54
-			'shortcodes' => array('event_list','attendee_list', 'ticket_list', 'organization', 'recipient_details', 'recipient_list', 'transaction', 'primary_registration_details', 'primary_registration_list', 'messenger')
54
+			'shortcodes' => array('event_list', 'attendee_list', 'ticket_list', 'organization', 'recipient_details', 'recipient_list', 'transaction', 'primary_registration_details', 'primary_registration_list', 'messenger')
55 55
 			);
56
-		$this->_MSGR->set_validator_config( $new_config );
56
+		$this->_MSGR->set_validator_config($new_config);
57 57
 
58
-		if ( $this->_context != 'admin' )
58
+		if ($this->_context != 'admin')
59 59
 			$this->_valid_shortcodes_modifier[$this->_context]['event_list'] = array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list');
60 60
 
61 61
 		$this->_specific_shortcode_excludes['content'] = array('[DISPLAY_PDF_URL]', '[DISPLAY_PDF_BUTTON]');
Please login to merge, or discard this patch.
Braces   +5 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,7 +1,8 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-if (!defined('EVENT_ESPRESSO_VERSION') )
3
+if (!defined('EVENT_ESPRESSO_VERSION') ) {
4 4
 	exit('NO direct script access allowed');
5
+}
5 6
 
6 7
 /**
7 8
  * Event Espresso
@@ -49,8 +50,9 @@  discard block
 block discarded – undo
49 50
 			);
50 51
 		$this->_MSGR->set_validator_config( $new_config );
51 52
 
52
-		if ( $this->_context != 'admin' )
53
-			$this->_valid_shortcodes_modifier[$this->_context]['event_list'] = array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list');
53
+		if ( $this->_context != 'admin' ) {
54
+					$this->_valid_shortcodes_modifier[$this->_context]['event_list'] = array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list');
55
+		}
54 56
 
55 57
 		$this->_specific_shortcode_excludes['content'] = array('[DISPLAY_PDF_URL]', '[DISPLAY_PDF_BUTTON]');
56 58
 	}
Please login to merge, or discard this patch.
validators/email/EE_Messages_Email_Pending_Approval_Validator.class.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-if (!defined('EVENT_ESPRESSO_VERSION') )
3
+if ( ! defined('EVENT_ESPRESSO_VERSION'))
4 4
 	exit('NO direct script access allowed');
5 5
 
6 6
 /**
@@ -30,11 +30,11 @@  discard block
 block discarded – undo
30 30
 class EE_Messages_Email_Registration_Validator extends EE_Messages_Validator {
31 31
 
32 32
 
33
-	public function __construct( $fields, $context ) {
33
+	public function __construct($fields, $context) {
34 34
 		$this->_m_name = 'email';
35 35
 		$this->_mt_name = 'registration';
36 36
 
37
-		parent::__construct( $fields, $context );
37
+		parent::__construct($fields, $context);
38 38
 	}
39 39
 
40 40
 	/**
@@ -47,9 +47,9 @@  discard block
 block discarded – undo
47 47
 			'shortcodes' => array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list'),
48 48
 			'required' => array('[EVENT_LIST]')
49 49
 			);
50
-		$this->_MSGR->set_validator_config( $new_config );
50
+		$this->_MSGR->set_validator_config($new_config);
51 51
 
52
-		if ( $this->_context != 'admin' )
52
+		if ($this->_context != 'admin')
53 53
 			$this->_valid_shortcodes_modifier[$this->_context]['event_list'] = array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list');
54 54
 
55 55
 		$this->_specific_shortcode_excludes['content'] = array('[DISPLAY_PDF_URL]', '[DISPLAY_PDF_BUTTON]');
Please login to merge, or discard this patch.
Braces   +5 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,7 +1,8 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-if (!defined('EVENT_ESPRESSO_VERSION') )
3
+if (!defined('EVENT_ESPRESSO_VERSION') ) {
4 4
 	exit('NO direct script access allowed');
5
+}
5 6
 
6 7
 /**
7 8
  * Event Espresso
@@ -49,8 +50,9 @@  discard block
 block discarded – undo
49 50
 			);
50 51
 		$this->_MSGR->set_validator_config( $new_config );
51 52
 
52
-		if ( $this->_context != 'admin' )
53
-			$this->_valid_shortcodes_modifier[$this->_context]['event_list'] = array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list');
53
+		if ( $this->_context != 'admin' ) {
54
+					$this->_valid_shortcodes_modifier[$this->_context]['event_list'] = array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list');
55
+		}
54 56
 
55 57
 		$this->_specific_shortcode_excludes['content'] = array('[DISPLAY_PDF_URL]', '[DISPLAY_PDF_BUTTON]');
56 58
 	}
Please login to merge, or discard this patch.
validators/email/EE_Messages_Email_Registration_Summary_Validator.class.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-if (!defined('EVENT_ESPRESSO_VERSION') )
3
+if ( ! defined('EVENT_ESPRESSO_VERSION'))
4 4
 	exit('NO direct script access allowed');
5 5
 
6 6
 /**
@@ -30,11 +30,11 @@  discard block
 block discarded – undo
30 30
 class EE_Messages_Email_Registration_Validator extends EE_Messages_Validator {
31 31
 
32 32
 
33
-	public function __construct( $fields, $context ) {
33
+	public function __construct($fields, $context) {
34 34
 		$this->_m_name = 'email';
35 35
 		$this->_mt_name = 'registration';
36 36
 
37
-		parent::__construct( $fields, $context );
37
+		parent::__construct($fields, $context);
38 38
 	}
39 39
 
40 40
 	/**
@@ -47,9 +47,9 @@  discard block
 block discarded – undo
47 47
 			'shortcodes' => array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list'),
48 48
 			'required' => array('[EVENT_LIST]')
49 49
 			);
50
-		$this->_MSGR->set_validator_config( $new_config );
50
+		$this->_MSGR->set_validator_config($new_config);
51 51
 
52
-		if ( $this->_context != 'admin' )
52
+		if ($this->_context != 'admin')
53 53
 			$this->_valid_shortcodes_modifier[$this->_context]['event_list'] = array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list');
54 54
 
55 55
 		$this->_specific_shortcode_excludes['content'] = array('[DISPLAY_PDF_URL]', '[DISPLAY_PDF_BUTTON]');
Please login to merge, or discard this patch.
Braces   +5 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,7 +1,8 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-if (!defined('EVENT_ESPRESSO_VERSION') )
3
+if (!defined('EVENT_ESPRESSO_VERSION') ) {
4 4
 	exit('NO direct script access allowed');
5
+}
5 6
 
6 7
 /**
7 8
  * Event Espresso
@@ -49,8 +50,9 @@  discard block
 block discarded – undo
49 50
 			);
50 51
 		$this->_MSGR->set_validator_config( $new_config );
51 52
 
52
-		if ( $this->_context != 'admin' )
53
-			$this->_valid_shortcodes_modifier[$this->_context]['event_list'] = array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list');
53
+		if ( $this->_context != 'admin' ) {
54
+					$this->_valid_shortcodes_modifier[$this->_context]['event_list'] = array('event', 'attendee_list', 'ticket_list', 'datetime_list', 'venue', 'organization', 'event_author', 'primary_registration_details', 'primary_registration_list', 'recipient_details', 'recipient_list');
55
+		}
54 56
 
55 57
 		$this->_specific_shortcode_excludes['content'] = array('[DISPLAY_PDF_URL]', '[DISPLAY_PDF_BUTTON]');
56 58
 	}
Please login to merge, or discard this patch.
messages/validators/html/EE_Messages_Html_Invoice_Validator.class.php 3 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@  discard block
 block discarded – undo
6 6
  * @package Event Espresso
7 7
  * @subpackage messages
8 8
  */
9
-if (!defined('EVENT_ESPRESSO_VERSION') )
9
+if ( ! defined('EVENT_ESPRESSO_VERSION'))
10 10
 	exit('NO direct script access allowed');
11 11
 
12 12
 /**
@@ -24,11 +24,11 @@  discard block
 block discarded – undo
24 24
  */
25 25
 class EE_Messages_Html_Receipt_Validator extends EE_Messages_Validator {
26 26
 
27
-	public function __construct( $fields, $context ) {
27
+	public function __construct($fields, $context) {
28 28
 		$this->_m_name = 'html';
29 29
 		$this->_mt_name = 'receipt';
30 30
 
31
-		parent::__construct( $fields, $context );
31
+		parent::__construct($fields, $context);
32 32
 	}
33 33
 
34 34
 	/**
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,8 +6,9 @@
 block discarded – undo
6 6
  * @package Event Espresso
7 7
  * @subpackage messages
8 8
  */
9
-if (!defined('EVENT_ESPRESSO_VERSION') )
9
+if (!defined('EVENT_ESPRESSO_VERSION') ) {
10 10
 	exit('NO direct script access allowed');
11
+}
11 12
 
12 13
 /**
13 14
  *
Please login to merge, or discard this patch.
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,11 +1,11 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * This contains the class for the Html+Invoice Message Template Validator.
4
- *
5
- * @since 4.5.0
6
- * @package Event Espresso
7
- * @subpackage messages
8
- */
3
+	 * This contains the class for the Html+Invoice Message Template Validator.
4
+	 *
5
+	 * @since 4.5.0
6
+	 * @package Event Espresso
7
+	 * @subpackage messages
8
+	 */
9 9
 if (!defined('EVENT_ESPRESSO_VERSION') )
10 10
 	exit('NO direct script access allowed');
11 11
 
Please login to merge, or discard this patch.
core/libraries/shortcodes/EE_Datetime_Shortcodes.lib.php 2 patches
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,8 +6,9 @@
 block discarded – undo
6 6
  * @package Event Espresso
7 7
  * @subpackage messages
8 8
  */
9
-if (!defined('EVENT_ESPRESSO_VERSION') )
9
+if (!defined('EVENT_ESPRESSO_VERSION') ) {
10 10
 	exit('NO direct script access allowed');
11
+}
11 12
 
12 13
 /**
13 14
  *
Please login to merge, or discard this patch.
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-if (!defined('EVENT_ESPRESSO_VERSION') )
3
+if ( ! defined('EVENT_ESPRESSO_VERSION'))
4 4
 	exit('NO direct script access allowed');
5 5
 
6 6
 /**
@@ -61,13 +61,13 @@  discard block
 block discarded – undo
61 61
 	 * @param string $shortcode
62 62
 	 * @return string
63 63
 	 */
64
-	protected function _parser( $shortcode ) {
64
+	protected function _parser($shortcode) {
65 65
 
66
-		if ( ! $this->_data instanceof EE_Datetime ) {
66
+		if ( ! $this->_data instanceof EE_Datetime) {
67 67
 			return ''; //get out cause we can only parse with the datetime object.
68 68
 		}
69 69
 
70
-		switch ( $shortcode ) {
70
+		switch ($shortcode) {
71 71
 
72 72
 			case '[DATETIME_START]' :
73 73
 				return $this->_data->get_i18n_datetime('DTT_EVT_start');
@@ -81,27 +81,27 @@  discard block
 block discarded – undo
81 81
 				return $this->_data->get_timezone();
82 82
 				break;
83 83
 			case '[DATE_START]' :
84
-				return $this->_data->get_i18n_datetime( 'DTT_EVT_start', get_option( 'date_format' ) );
84
+				return $this->_data->get_i18n_datetime('DTT_EVT_start', get_option('date_format'));
85 85
 				break;
86 86
 			case '[DATE_END]' :
87
-				return $this->_data->get_i18n_datetime( 'DTT_EVT_end', get_option( 'date_format' ) );
87
+				return $this->_data->get_i18n_datetime('DTT_EVT_end', get_option('date_format'));
88 88
 				break;
89 89
 			case '[TIME_START]' :
90
-				return $this->_data->get_i18n_datetime( 'DTT_EVT_start', get_option( 'time_format' ) );
90
+				return $this->_data->get_i18n_datetime('DTT_EVT_start', get_option('time_format'));
91 91
 				break;
92 92
 			case '[TIME_END]' :
93
-				return $this->_data->get_i18n_datetime( 'DTT_EVT_end', get_option( 'time_format' ) );
93
+				return $this->_data->get_i18n_datetime('DTT_EVT_end', get_option('time_format'));
94 94
 				break;
95 95
 		}
96 96
 
97
-		if ( strpos( $shortcode, '[ICAL_LINK_*') !== FALSE  ) {
98
-			$attrs = $this->_get_shortcode_attrs( $shortcode );
97
+		if (strpos($shortcode, '[ICAL_LINK_*') !== FALSE) {
98
+			$attrs = $this->_get_shortcode_attrs($shortcode);
99 99
 			
100
-			$link_text = empty( $attrs['link_text'] ) ?  __( 'Add to iCal Calendar', 'event_espresso' ) : $attrs['link_text'];
100
+			$link_text = empty($attrs['link_text']) ? __('Add to iCal Calendar', 'event_espresso') : $attrs['link_text'];
101 101
 			
102
-			$URL = add_query_arg( array( 'ee' => 'download_ics_file', 'ics_id' => $this->_data->ID() ), site_url() );
102
+			$URL = add_query_arg(array('ee' => 'download_ics_file', 'ics_id' => $this->_data->ID()), site_url());
103 103
 		
104
-			return '<a class="ee-ical" href="' . $URL . '">' . $link_text . '</a>';
104
+			return '<a class="ee-ical" href="'.$URL.'">'.$link_text.'</a>';
105 105
 			
106 106
 		}
107 107
 
Please login to merge, or discard this patch.
modules/event_single/EED_Event_Single.module.php 2 patches
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,6 @@
 block discarded – undo
1
-<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) exit('No direct script access allowed');
1
+<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) {
2
+	exit('No direct script access allowed');
3
+}
2 4
 /**
3 5
  * Event Espresso
4 6
  *
Please login to merge, or discard this patch.
Spacing   +78 added lines, -78 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
 	 * @return EED_Event_Single
41 41
 	 */
42 42
 	public static function instance() {
43
-		return parent::get_instance( __CLASS__ );
43
+		return parent::get_instance(__CLASS__);
44 44
 	}
45 45
 
46 46
 
@@ -52,9 +52,9 @@  discard block
 block discarded – undo
52 52
 	 *  @return 	void
53 53
 	 */
54 54
 	public static function set_hooks() {
55
-		add_filter( 'FHEE_run_EE_wp', '__return_true' );
56
-		add_action( 'wp_loaded', array( 'EED_Event_Single', 'set_definitions' ), 2 );
57
-		EE_Config::register_route( __( 'event', 'event_espresso' ), 'Event_Single', 'run' );
55
+		add_filter('FHEE_run_EE_wp', '__return_true');
56
+		add_action('wp_loaded', array('EED_Event_Single', 'set_definitions'), 2);
57
+		EE_Config::register_route(__('event', 'event_espresso'), 'Event_Single', 'run');
58 58
 	}
59 59
 
60 60
 	/**
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
 	 *  @return 	void
65 65
 	 */
66 66
 	public static function set_hooks_admin() {
67
-		add_action( 'wp_loaded', array( 'EED_Event_Single', 'set_definitions' ), 2 );
67
+		add_action('wp_loaded', array('EED_Event_Single', 'set_definitions'), 2);
68 68
 	}
69 69
 
70 70
 
@@ -78,8 +78,8 @@  discard block
 block discarded – undo
78 78
 	 * @return void
79 79
 	 */
80 80
 	public static function set_definitions() {
81
-		define( 'EVENT_SINGLE_ASSETS_URL', plugin_dir_url( __FILE__ ) . 'assets' . DS );
82
-		define( 'EVENT_SINGLE_TEMPLATES_PATH', plugin_dir_path( __FILE__ ) . 'templates' . DS );
81
+		define('EVENT_SINGLE_ASSETS_URL', plugin_dir_url(__FILE__).'assets'.DS);
82
+		define('EVENT_SINGLE_TEMPLATES_PATH', plugin_dir_path(__FILE__).'templates'.DS);
83 83
 	}
84 84
 
85 85
 
@@ -89,10 +89,10 @@  discard block
 block discarded – undo
89 89
 	 *
90 90
 	 * @void
91 91
 	 */
92
-	protected function set_config(){
93
-		$this->set_config_section( 'template_settings' );
94
-		$this->set_config_class( 'EE_Event_Single_Config' );
95
-		$this->set_config_name( 'EED_Event_Single' );
92
+	protected function set_config() {
93
+		$this->set_config_section('template_settings');
94
+		$this->set_config_class('EE_Event_Single_Config');
95
+		$this->set_config_name('EED_Event_Single');
96 96
 	}
97 97
 
98 98
 
@@ -105,35 +105,35 @@  discard block
 block discarded – undo
105 105
 	 * @param \EE_Event_Single_Config $config
106 106
 	 * @return \EE_Template_Part_Manager
107 107
 	 */
108
-	public function initialize_template_parts( EE_Event_Single_Config $config = null ) {
108
+	public function initialize_template_parts(EE_Event_Single_Config $config = null) {
109 109
 		$config = $config instanceof EE_Event_Single_Config ? $config : $this->config();
110 110
 		EEH_Autoloader::instance()->register_template_part_autoloaders();
111 111
 		$template_parts = new EE_Template_Part_Manager();
112 112
 		$template_parts->add_template_part(
113 113
 			'tickets',
114
-			__( 'Ticket Selector', 'event_espresso' ),
114
+			__('Ticket Selector', 'event_espresso'),
115 115
 			'content-espresso_events-tickets.php',
116 116
 			$config->display_order_tickets
117 117
 		);
118 118
 		$template_parts->add_template_part(
119 119
 			'datetimes',
120
-			__( 'Dates and Times', 'event_espresso' ),
120
+			__('Dates and Times', 'event_espresso'),
121 121
 			'content-espresso_events-datetimes.php',
122 122
 			$config->display_order_datetimes
123 123
 		);
124 124
 		$template_parts->add_template_part(
125 125
 			'event',
126
-			__( 'Event Description', 'event_espresso' ),
126
+			__('Event Description', 'event_espresso'),
127 127
 			'content-espresso_events-details.php',
128 128
 			$config->display_order_event
129 129
 		);
130 130
 		$template_parts->add_template_part(
131 131
 			'venue',
132
-			__( 'Venue Information', 'event_espresso' ),
132
+			__('Venue Information', 'event_espresso'),
133 133
 			'content-espresso_events-venues.php',
134 134
 			$config->display_order_venue
135 135
 		);
136
-		do_action( 'AHEE__EED_Event_Single__initialize_template_parts', $template_parts );
136
+		do_action('AHEE__EED_Event_Single__initialize_template_parts', $template_parts);
137 137
 		return $template_parts;
138 138
 	}
139 139
 
@@ -147,15 +147,15 @@  discard block
 block discarded – undo
147 147
 	 * @param WP $WP
148 148
 	 * @return    void
149 149
 	 */
150
-	public function run( $WP ) {
150
+	public function run($WP) {
151 151
 		// ensure valid EE_Events_Single_Config() object exists
152 152
 		$this->set_config();
153 153
 		// check what template is loaded
154
-		add_filter( 'template_include',  array( $this, 'template_include' ), 999, 1 );
155
-		add_filter( 'FHEE__EED_Ticket_Selector__load_tckt_slctr_assets', '__return_true' );
154
+		add_filter('template_include', array($this, 'template_include'), 999, 1);
155
+		add_filter('FHEE__EED_Ticket_Selector__load_tckt_slctr_assets', '__return_true');
156 156
 		// load css
157
-		add_action('wp_enqueue_scripts', array( $this, 'wp_enqueue_scripts' ), 10 );
158
-		EE_Registry::instance()->load_helper( 'Venue_View' );
157
+		add_action('wp_enqueue_scripts', array($this, 'wp_enqueue_scripts'), 10);
158
+		EE_Registry::instance()->load_helper('Venue_View');
159 159
 	}
160 160
 
161 161
 
@@ -167,27 +167,27 @@  discard block
 block discarded – undo
167 167
 	 * @param 	string $template
168 168
 	 * @return 	string
169 169
 	 */
170
-	public function template_include( $template ) {
170
+	public function template_include($template) {
171 171
 		global $post;
172 172
 		/** @type EE_Event_Single_Config $config */
173 173
 		$config = $this->config();
174
-		if ( $config->display_status_banner_single ) {
175
-			add_filter( 'the_title', array( 'EED_Event_Single', 'the_title' ), 100, 2 );
174
+		if ($config->display_status_banner_single) {
175
+			add_filter('the_title', array('EED_Event_Single', 'the_title'), 100, 2);
176 176
 		}
177 177
 		// not a custom template?
178 178
 		if (
179 179
 			EE_Front_Controller::instance()->get_selected_template() != 'single-espresso_events.php'
180
-			|| apply_filters( 'FHEE__EED_Event_Single__template_include__allow_custom_selected_template', FALSE )
181
-			&& ! post_password_required( $post )
180
+			|| apply_filters('FHEE__EED_Event_Single__template_include__allow_custom_selected_template', FALSE)
181
+			&& ! post_password_required($post)
182 182
 		) {
183 183
 			EEH_Template::load_espresso_theme_functions();
184 184
 			// then add extra event data via hooks
185
-			add_action( 'loop_start', array( 'EED_Event_Single', 'loop_start' ));
186
-			add_filter( 'get_the_excerpt', array( 'EED_Event_Single', 'get_the_excerpt' ), 1, 1 );
187
-			add_filter( 'the_content', array( 'EED_Event_Single', 'event_details' ), 100 );
188
-			add_action( 'loop_end', array( 'EED_Event_Single', 'loop_end' ));
185
+			add_action('loop_start', array('EED_Event_Single', 'loop_start'));
186
+			add_filter('get_the_excerpt', array('EED_Event_Single', 'get_the_excerpt'), 1, 1);
187
+			add_filter('the_content', array('EED_Event_Single', 'event_details'), 100);
188
+			add_action('loop_end', array('EED_Event_Single', 'loop_end'));
189 189
 			// don't display entry meta because the existing theme will take car of that
190
-			add_filter( 'FHEE__content_espresso_events_details_template__display_entry_meta', '__return_false' );
190
+			add_filter('FHEE__content_espresso_events_details_template__display_entry_meta', '__return_false');
191 191
 		}
192 192
 		return $template;
193 193
 	}
@@ -201,9 +201,9 @@  discard block
 block discarded – undo
201 201
 	 * @param 	array $wp_query_array an array containing the WP_Query object
202 202
 	 * @return 	void
203 203
 	 */
204
-	public static function loop_start( $wp_query_array ) {
204
+	public static function loop_start($wp_query_array) {
205 205
 		global $post;
206
-		do_action( 'AHEE_event_details_before_post', $post, $wp_query_array );
206
+		do_action('AHEE_event_details_before_post', $post, $wp_query_array);
207 207
 	}
208 208
 
209 209
 
@@ -216,9 +216,9 @@  discard block
 block discarded – undo
216 216
 	 * @param 	int 	$id
217 217
 	 * @return 	string
218 218
 	 */
219
-	public static function the_title( $title = '', $id = 0 ) {
219
+	public static function the_title($title = '', $id = 0) {
220 220
 		global $post;
221
-		return in_the_loop() && $post->ID == $id ? espresso_event_status_banner( $post->ID ) . $title :  $title;
221
+		return in_the_loop() && $post->ID == $id ? espresso_event_status_banner($post->ID).$title : $title;
222 222
 	}
223 223
 
224 224
 
@@ -230,9 +230,9 @@  discard block
 block discarded – undo
230 230
 	 * @param        string $excerpt
231 231
 	 * @return        string
232 232
 	 */
233
-	public static function get_the_excerpt( $excerpt = '' ) {
233
+	public static function get_the_excerpt($excerpt = '') {
234 234
 		EED_Event_Single::$using_get_the_excerpt = true;
235
-		add_filter( 'wp_trim_excerpt', array( 'EED_Event_Single', 'end_get_the_excerpt' ), 999, 1 );
235
+		add_filter('wp_trim_excerpt', array('EED_Event_Single', 'end_get_the_excerpt'), 999, 1);
236 236
 		return $excerpt;
237 237
 	}
238 238
 
@@ -245,7 +245,7 @@  discard block
 block discarded – undo
245 245
 	 * @param  string $text
246 246
 	 * @return string
247 247
 	 */
248
-	public static function end_get_the_excerpt( $text = '' ) {
248
+	public static function end_get_the_excerpt($text = '') {
249 249
 		EED_Event_Single::$using_get_the_excerpt = false;
250 250
 		return $text;
251 251
 	}
@@ -259,7 +259,7 @@  discard block
 block discarded – undo
259 259
 	 * @param 	string 	$content
260 260
 	 * @return 	string
261 261
 	 */
262
-	public static function event_details( $content ) {
262
+	public static function event_details($content) {
263 263
 		global $post;
264 264
 		static $current_post_ID = 0;
265 265
 		if (
@@ -274,15 +274,15 @@  discard block
 block discarded – undo
274 274
 			// We want to allow those plugins to still do their thing and have access to our content, but depending on
275 275
 			// how your event content is being displayed (shortcode, CPT route, etc), this filter can get applied twice,
276 276
 			// so the following allows this filter to be applied multiple times, but only once for real
277
-			$current_post_ID = did_action( 'loop_start' ) ? $post->ID : 0;
278
-			if ( EE_Registry::instance()->CFG->template_settings->EED_Event_Single->use_sortable_display_order ) {
277
+			$current_post_ID = did_action('loop_start') ? $post->ID : 0;
278
+			if (EE_Registry::instance()->CFG->template_settings->EED_Event_Single->use_sortable_display_order) {
279 279
 				// we need to first remove this callback from being applied to the_content()
280 280
 				// (otherwise it will recurse and blow up the interweb)
281
-				remove_filter( 'the_content', array( 'EED_Event_Single', 'event_details' ), 100 );
281
+				remove_filter('the_content', array('EED_Event_Single', 'event_details'), 100);
282 282
 				EED_Event_Single::instance()->template_parts = EED_Event_Single::instance()->initialize_template_parts();
283
-				$content = EEH_Template::locate_template( 'content-espresso_events-details.php' );
284
-				$content = EED_Event_Single::instance()->template_parts->apply_template_part_filters( $content );
285
-				add_filter( 'the_content', array( 'EED_Event_Single', 'event_details' ), 100 );
283
+				$content = EEH_Template::locate_template('content-espresso_events-details.php');
284
+				$content = EED_Event_Single::instance()->template_parts->apply_template_part_filters($content);
285
+				add_filter('the_content', array('EED_Event_Single', 'event_details'), 100);
286 286
 			} else {
287 287
 				$content = EED_Event_Single::use_filterable_display_order();
288 288
 			}
@@ -303,19 +303,19 @@  discard block
 block discarded – undo
303 303
 		// it uses the_content() for displaying the $post->post_content
304 304
 		// so in order to load a template that uses the_content() from within a callback being used to filter the_content(),
305 305
 		// we need to first remove this callback from being applied to the_content() (otherwise it will recurse and blow up the interweb)
306
-		remove_filter( 'the_content', array( 'EED_Event_Single', 'event_details' ), 100 );
306
+		remove_filter('the_content', array('EED_Event_Single', 'event_details'), 100);
307 307
 		//now add additional content
308
-		add_filter( 'the_content', array( 'EED_Event_Single', 'event_datetimes' ), 110, 1 );
309
-		add_filter( 'the_content', array( 'EED_Event_Single', 'event_tickets' ), 120, 1 );
310
-		add_filter( 'the_content', array( 'EED_Event_Single', 'event_venues' ), 130, 1 );
311
-		do_action( 'AHEE__EED_Event_Single__use_filterable_display_order__after_add_filters' );
308
+		add_filter('the_content', array('EED_Event_Single', 'event_datetimes'), 110, 1);
309
+		add_filter('the_content', array('EED_Event_Single', 'event_tickets'), 120, 1);
310
+		add_filter('the_content', array('EED_Event_Single', 'event_venues'), 130, 1);
311
+		do_action('AHEE__EED_Event_Single__use_filterable_display_order__after_add_filters');
312 312
 		// now load our template
313
-		$content = EEH_Template::locate_template( 'content-espresso_events-details.php' );
313
+		$content = EEH_Template::locate_template('content-espresso_events-details.php');
314 314
 		//now add our filter back in, plus some others
315
-		add_filter( 'the_content', array( 'EED_Event_Single', 'event_details' ), 100 );
316
-		remove_filter( 'the_content', array( 'EED_Event_Single', 'event_datetimes' ), 110 );
317
-		remove_filter( 'the_content', array( 'EED_Event_Single', 'event_tickets' ), 120 );
318
-		remove_filter( 'the_content', array( 'EED_Event_Single', 'event_venues' ), 130 );
315
+		add_filter('the_content', array('EED_Event_Single', 'event_details'), 100);
316
+		remove_filter('the_content', array('EED_Event_Single', 'event_datetimes'), 110);
317
+		remove_filter('the_content', array('EED_Event_Single', 'event_tickets'), 120);
318
+		remove_filter('the_content', array('EED_Event_Single', 'event_venues'), 130);
319 319
 		// we're not returning the $content directly because the template we are loading uses the_content (or the_excerpt)
320 320
 		return $content;
321 321
 	}
@@ -329,8 +329,8 @@  discard block
 block discarded – undo
329 329
 	 * @param        string $content
330 330
 	 * @return        string
331 331
 	 */
332
-	public static function event_datetimes( $content ) {
333
-		return EEH_Template::locate_template( 'content-espresso_events-datetimes.php' ) . $content;
332
+	public static function event_datetimes($content) {
333
+		return EEH_Template::locate_template('content-espresso_events-datetimes.php').$content;
334 334
 	}
335 335
 
336 336
 
@@ -342,8 +342,8 @@  discard block
 block discarded – undo
342 342
 	 * @param        string $content
343 343
 	 * @return        string
344 344
 	 */
345
-	public static function event_tickets( $content ) {
346
-		return EEH_Template::locate_template( 'content-espresso_events-tickets.php' ) . $content;
345
+	public static function event_tickets($content) {
346
+		return EEH_Template::locate_template('content-espresso_events-tickets.php').$content;
347 347
 	}
348 348
 
349 349
 
@@ -355,8 +355,8 @@  discard block
 block discarded – undo
355 355
 	 * @param 	string $content
356 356
 	 * @return 	string
357 357
 	 */
358
-	public static function event_venue( $content ) {
359
-		return EED_Event_Single::event_venues( $content );
358
+	public static function event_venue($content) {
359
+		return EED_Event_Single::event_venues($content);
360 360
 	}
361 361
 
362 362
 
@@ -368,8 +368,8 @@  discard block
 block discarded – undo
368 368
 	 * @param        string $content
369 369
 	 * @return        string
370 370
 	 */
371
-	public static function event_venues( $content ) {
372
-		return $content . EEH_Template::locate_template( 'content-espresso_events-venues.php' );
371
+	public static function event_venues($content) {
372
+		return $content.EEH_Template::locate_template('content-espresso_events-venues.php');
373 373
 	}
374 374
 
375 375
 
@@ -381,9 +381,9 @@  discard block
 block discarded – undo
381 381
 	 * 	@param		array 	$wp_query_array an array containing the WP_Query object
382 382
 	 *  	@return 		void
383 383
 	 */
384
-	public static function loop_end( $wp_query_array ) {
384
+	public static function loop_end($wp_query_array) {
385 385
 		global $post;
386
-		do_action( 'AHEE_event_details_after_post', $post, $wp_query_array );
386
+		do_action('AHEE_event_details_after_post', $post, $wp_query_array);
387 387
 	}
388 388
 
389 389
 
@@ -396,18 +396,18 @@  discard block
 block discarded – undo
396 396
 	 */
397 397
 	public function wp_enqueue_scripts() {
398 398
 		// get some style
399
-		if ( apply_filters( 'FHEE_enable_default_espresso_css', TRUE ) && apply_filters( 'FHEE__EED_Event_Single__wp_enqueue_scripts__enable_css', TRUE )) {
400
-			EE_Registry::instance()->load_helper( 'File' );
399
+		if (apply_filters('FHEE_enable_default_espresso_css', TRUE) && apply_filters('FHEE__EED_Event_Single__wp_enqueue_scripts__enable_css', TRUE)) {
400
+			EE_Registry::instance()->load_helper('File');
401 401
 			// first check uploads folder
402
-			if ( is_readable( get_stylesheet_directory() . $this->theme . DS . 'style.css' )) {
403
-				wp_register_style( $this->theme, get_stylesheet_directory_uri() . $this->theme . DS . 'style.css', array( 'dashicons', 'espresso_default' ));
402
+			if (is_readable(get_stylesheet_directory().$this->theme.DS.'style.css')) {
403
+				wp_register_style($this->theme, get_stylesheet_directory_uri().$this->theme.DS.'style.css', array('dashicons', 'espresso_default'));
404 404
 			} else {
405
-				wp_register_style( $this->theme, EE_TEMPLATES_URL . $this->theme . DS . 'style.css', array( 'dashicons', 'espresso_default' ));
405
+				wp_register_style($this->theme, EE_TEMPLATES_URL.$this->theme.DS.'style.css', array('dashicons', 'espresso_default'));
406 406
 			}
407
-			wp_enqueue_script( $this->theme );
408
-			if ( EE_Registry::instance()->CFG->map_settings->use_google_maps ) {
409
-				EE_Registry::instance()->load_helper( 'Maps' );
410
-				add_action('wp_enqueue_scripts', array( 'EEH_Maps', 'espresso_google_map_js' ), 11 );
407
+			wp_enqueue_script($this->theme);
408
+			if (EE_Registry::instance()->CFG->map_settings->use_google_maps) {
409
+				EE_Registry::instance()->load_helper('Maps');
410
+				add_action('wp_enqueue_scripts', array('EEH_Maps', 'espresso_google_map_js'), 11);
411 411
 			}
412 412
 		}
413 413
 	}
@@ -426,12 +426,12 @@  discard block
 block discarded – undo
426 426
 	 *  @return 	bool
427 427
 	 */
428 428
 	public static function display_venue() {
429
-		EE_Registry::instance()->load_helper( 'Venue_View' );
429
+		EE_Registry::instance()->load_helper('Venue_View');
430 430
 		/** @type EE_Event_Single_Config $config */
431 431
 		$config = EED_Event_Single::instance()->config();
432
-		$display_venue= isset( $config->display_venue ) ? $config->display_venue : TRUE;
432
+		$display_venue = isset($config->display_venue) ? $config->display_venue : TRUE;
433 433
 		$venue_name = EEH_Venue_View::venue_name();
434
-		return $display_venue && ! empty( $venue_name ) ? TRUE : FALSE;
434
+		return $display_venue && ! empty($venue_name) ? TRUE : FALSE;
435 435
 	}
436 436
 
437 437
 
Please login to merge, or discard this patch.
modules/ical/EED_Ical.module.php 3 patches
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,6 @@
 block discarded – undo
1
-<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) exit('No direct script access allowed');
1
+<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) {
2
+	exit('No direct script access allowed');
3
+}
2 4
 /**
3 5
  * Event Espresso
4 6
  *
Please login to merge, or discard this patch.
Spacing   +70 added lines, -70 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 	 * @return EED_Ical
33 33
 	 */
34 34
 	public static function instance() {
35
-		return parent::get_instance( __CLASS__ );
35
+		return parent::get_instance(__CLASS__);
36 36
 	}
37 37
 
38 38
 
@@ -45,9 +45,9 @@  discard block
 block discarded – undo
45 45
 	 */
46 46
 	public static function set_hooks() {
47 47
 		// create download buttons
48
-		add_filter( 'FHEE__espresso_list_of_event_dates__datetime_html', array( 'EED_Ical', 'generate_add_to_iCal_button' ), 10, 2 );
48
+		add_filter('FHEE__espresso_list_of_event_dates__datetime_html', array('EED_Ical', 'generate_add_to_iCal_button'), 10, 2);
49 49
 		 // process ics download request
50
-		EE_Config::register_route( 'download_ics_file', 'EED_Ical', 'download_ics_file' );
50
+		EE_Config::register_route('download_ics_file', 'EED_Ical', 'download_ics_file');
51 51
 	}
52 52
 
53 53
 
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
 	 * @param    WP $WP
71 71
 	 * @return    void
72 72
 	 */
73
-	public function run( $WP ) {}
73
+	public function run($WP) {}
74 74
 
75 75
 
76 76
 
@@ -82,30 +82,30 @@  discard block
 block discarded – undo
82 82
 	 * @param $datetime
83 83
 	 * @return    string
84 84
 	 */
85
-	public static function generate_add_to_iCal_button( $html, $datetime ) {
85
+	public static function generate_add_to_iCal_button($html, $datetime) {
86 86
 		// first verify a proper datetime object has been received
87
-		if ( $datetime instanceof EE_Datetime ) {
87
+		if ($datetime instanceof EE_Datetime) {
88 88
 			// set whether a link or submit button is shown
89
-			$iCal_type = apply_filters( 'FHEE__EED_Ical__generate_add_to_iCal_button__iCal_type', 'submit' );
89
+			$iCal_type = apply_filters('FHEE__EED_Ical__generate_add_to_iCal_button__iCal_type', 'submit');
90 90
 			// generate a link to the route we registered in set_hooks()
91
-			$URL = add_query_arg( array( 'ee' => 'download_ics_file', 'ics_id' => $datetime->ID() ), site_url() );
91
+			$URL = add_query_arg(array('ee' => 'download_ics_file', 'ics_id' => $datetime->ID()), site_url());
92 92
 			// what type ?
93
-			switch ( $iCal_type ) {
93
+			switch ($iCal_type) {
94 94
 				// submit buttons appear as buttons and are very compatible with a theme's style
95 95
 				case 'submit' :
96
-					$html .= '<form id="download-iCal-frm-' . $datetime->ID() . '" class="download-iCal-frm" action="' . $URL . '" method="post" >';
97
-					$html .= '<input type="submit" class="ee-ical-sbmt" value="&#xf145;" title="' . __( 'Add to iCal Calendar', 'event_espresso' ) . '"/>';
96
+					$html .= '<form id="download-iCal-frm-'.$datetime->ID().'" class="download-iCal-frm" action="'.$URL.'" method="post" >';
97
+					$html .= '<input type="submit" class="ee-ical-sbmt" value="&#xf145;" title="'.__('Add to iCal Calendar', 'event_espresso').'"/>';
98 98
 					$html .= '</form>';
99 99
 					break;
100 100
 				// buttons are just links that have been styled to appear as buttons, but may not be blend with a theme as well as submit buttons
101 101
 				case 'button' :
102
-					$html .= '<a class="ee-ical-btn small ee-button ee-roundish" href="' . $URL . '" title="' . __( 'Add to iCal Calendar', 'event_espresso' ) . '">';
102
+					$html .= '<a class="ee-ical-btn small ee-button ee-roundish" href="'.$URL.'" title="'.__('Add to iCal Calendar', 'event_espresso').'">';
103 103
 					$html .= ' <span class="dashicons dashicons-calendar"></span>';
104 104
 					$html .= '</a>';
105 105
 					break;
106 106
 				// links are just links that use the calendar dashicon
107 107
 				case 'icon' :
108
-					$html .= '<a class="ee-ical-lnk" href="' . $URL . '" title="' . __( 'Add to iCal Calendar', 'event_espresso' ) . '">';
108
+					$html .= '<a class="ee-ical-lnk" href="'.$URL.'" title="'.__('Add to iCal Calendar', 'event_espresso').'">';
109 109
 					$html .= ' <span class="dashicons dashicons-calendar"></span>';
110 110
 					$html .= '</a>';
111 111
 					break;
@@ -123,73 +123,73 @@  discard block
 block discarded – undo
123 123
 	 *  @return 	void
124 124
 	 */
125 125
 	public static function download_ics_file() {
126
-		if ( EE_Registry::instance()->REQ->is_set( 'ics_id' )) {
127
-			$DTT_ID = absint( EE_Registry::instance()->REQ->get( 'ics_id' ));
128
-			$datetime = EE_Registry::instance()->load_model( 'Datetime' )->get_one_by_ID( $DTT_ID );
129
-			if ( $datetime instanceof EE_Datetime ) {
126
+		if (EE_Registry::instance()->REQ->is_set('ics_id')) {
127
+			$DTT_ID = absint(EE_Registry::instance()->REQ->get('ics_id'));
128
+			$datetime = EE_Registry::instance()->load_model('Datetime')->get_one_by_ID($DTT_ID);
129
+			if ($datetime instanceof EE_Datetime) {
130 130
 				// get related event, venues, and event categories
131 131
 				$event = $datetime->event();
132 132
 				// get related category Term object and it's name
133 133
 				$category = $event->first_event_category();
134
-				if ( $category instanceof EE_Term ) {
134
+				if ($category instanceof EE_Term) {
135 135
 					$category = $category->name();
136 136
 				}
137 137
 				$location = '';
138 138
 				// get first related venue and convert to CSV string
139
-				$venue = $event->venues(array( 'limit'=>1 ));
140
-				if ( is_array( $venue ) && ! empty( $venue )) {
141
-					$venue = array_shift( $venue );
142
-					if ( $venue instanceof EE_Venue ) {
143
-						 EE_Registry::instance()->load_helper( 'Venue_View' );
144
-						$location = espresso_venue_raw_address( 'inline', $venue->ID(), FALSE );
139
+				$venue = $event->venues(array('limit'=>1));
140
+				if (is_array($venue) && ! empty($venue)) {
141
+					$venue = array_shift($venue);
142
+					if ($venue instanceof EE_Venue) {
143
+						 EE_Registry::instance()->load_helper('Venue_View');
144
+						$location = espresso_venue_raw_address('inline', $venue->ID(), FALSE);
145 145
 					}
146 146
 				}
147 147
 				// set variables, escape strings, convert timestamps to ics format, etc
148
-				$filename = $event->slug() . '-' . $datetime->start_date( 'Y-m-d' ) . '.ics';
149
-				$organizer = EED_Ical::_escape_ICal_data( EE_Registry::instance()->CFG->organization->name );
150
-				$UID = EED_Ical::_escape_ICal_data( md5( $event->name() . $event->ID() . $datetime->ID() ));
151
-				$org_email = EED_Ical::_escape_ICal_data( $datetime->ID() );
152
-				$timestamp = date( EED_Ical::iCal_datetime_format );
153
-				$location = EED_Ical::_escape_ICal_data( $location );
154
-				$summary = EED_Ical::_escape_ICal_data( $event->name() );
155
-				$description = EED_Ical::_escape_ICal_description( wp_strip_all_tags( $event->description() ));
148
+				$filename = $event->slug().'-'.$datetime->start_date('Y-m-d').'.ics';
149
+				$organizer = EED_Ical::_escape_ICal_data(EE_Registry::instance()->CFG->organization->name);
150
+				$UID = EED_Ical::_escape_ICal_data(md5($event->name().$event->ID().$datetime->ID()));
151
+				$org_email = EED_Ical::_escape_ICal_data($datetime->ID());
152
+				$timestamp = date(EED_Ical::iCal_datetime_format);
153
+				$location = EED_Ical::_escape_ICal_data($location);
154
+				$summary = EED_Ical::_escape_ICal_data($event->name());
155
+				$description = EED_Ical::_escape_ICal_description(wp_strip_all_tags($event->description()));
156 156
 				$status = $datetime->get_active_status();
157 157
 				$status = $status == EE_Datetime::cancelled ? 'Cancelled' : 'Confirmed';
158
-				$status = EED_Ical::_escape_ICal_data( $status );
159
-				$categories = EED_Ical::_escape_ICal_data( $category );
160
-				$url = EED_Ical::_escape_ICal_data( get_permalink( $event->ID() ));
161
-				$dtt_start = EED_Ical::_escape_ICal_data( date( EED_Ical::iCal_datetime_format, $datetime->start() ));
162
-				$dtt_end = EED_Ical::_escape_ICal_data( date( EED_Ical::iCal_datetime_format, $datetime->end() ));
158
+				$status = EED_Ical::_escape_ICal_data($status);
159
+				$categories = EED_Ical::_escape_ICal_data($category);
160
+				$url = EED_Ical::_escape_ICal_data(get_permalink($event->ID()));
161
+				$dtt_start = EED_Ical::_escape_ICal_data(date(EED_Ical::iCal_datetime_format, $datetime->start()));
162
+				$dtt_end = EED_Ical::_escape_ICal_data(date(EED_Ical::iCal_datetime_format, $datetime->end()));
163 163
 				// set headers
164
-				header( 'Content-type: text/calendar; charset=utf-8' );
165
-				header( 'Content-Disposition: attachment; filename="' . $filename . '"' );
166
-				header( 'Cache-Control: private, max-age=0, must-revalidate' );
167
-				header( 'Pragma: public' );
168
-				header( 'Content-Type: application/octet-stream' );
169
-				header( 'Content-Type: application/force-download' );
170
-				header( 'Cache-Control: no-cache, must-revalidate' );
171
-				header( 'Content-Transfer-Encoding: binary' );
172
-				header( 'Expires: Sat, 26 Jul 1997 05:00:00 GMT' ); // past date
173
-				ini_set( 'zlib.output_compression', '0' );
164
+				header('Content-type: text/calendar; charset=utf-8');
165
+				header('Content-Disposition: attachment; filename="'.$filename.'"');
166
+				header('Cache-Control: private, max-age=0, must-revalidate');
167
+				header('Pragma: public');
168
+				header('Content-Type: application/octet-stream');
169
+				header('Content-Type: application/force-download');
170
+				header('Cache-Control: no-cache, must-revalidate');
171
+				header('Content-Transfer-Encoding: binary');
172
+				header('Expires: Sat, 26 Jul 1997 05:00:00 GMT'); // past date
173
+				ini_set('zlib.output_compression', '0');
174 174
 				// echo the output
175
-				echo "BEGIN:VCALENDAR" . PHP_EOL;
176
-				echo "VERSION:2.0" . PHP_EOL;
177
-				echo "PRODID:-//{$organizer}//NONSGML PDA Calendar Version 1.0//EN" . PHP_EOL;
178
-				echo "CALSCALE:GREGORIAN" . PHP_EOL;
179
-				echo "BEGIN:VEVENT" . PHP_EOL;
180
-				echo "UID:{$UID}" . PHP_EOL;
181
-				echo "ORGANIZER:MAILTO:{$org_email}" . PHP_EOL;
182
-				echo "DTSTAMP:{$timestamp}" . PHP_EOL;
183
-				echo "LOCATION:{$location}" . PHP_EOL;
184
-				echo "SUMMARY:{$summary}" . PHP_EOL;
185
-				echo "DESCRIPTION:{$description}" . PHP_EOL;
186
-				echo "STATUS:{$status}" . PHP_EOL;
187
-				echo "CATEGORIES:{$categories}" . PHP_EOL;
188
-				echo "URL;VALUE=URI:{$url}" . PHP_EOL;
189
-				echo "DTSTART:{$dtt_start}" . PHP_EOL;
190
-				echo "DTEND:{$dtt_end}" . PHP_EOL;
191
-				echo "END:VEVENT" . PHP_EOL;
192
-				echo "END:VCALENDAR" . PHP_EOL;
175
+				echo "BEGIN:VCALENDAR".PHP_EOL;
176
+				echo "VERSION:2.0".PHP_EOL;
177
+				echo "PRODID:-//{$organizer}//NONSGML PDA Calendar Version 1.0//EN".PHP_EOL;
178
+				echo "CALSCALE:GREGORIAN".PHP_EOL;
179
+				echo "BEGIN:VEVENT".PHP_EOL;
180
+				echo "UID:{$UID}".PHP_EOL;
181
+				echo "ORGANIZER:MAILTO:{$org_email}".PHP_EOL;
182
+				echo "DTSTAMP:{$timestamp}".PHP_EOL;
183
+				echo "LOCATION:{$location}".PHP_EOL;
184
+				echo "SUMMARY:{$summary}".PHP_EOL;
185
+				echo "DESCRIPTION:{$description}".PHP_EOL;
186
+				echo "STATUS:{$status}".PHP_EOL;
187
+				echo "CATEGORIES:{$categories}".PHP_EOL;
188
+				echo "URL;VALUE=URI:{$url}".PHP_EOL;
189
+				echo "DTSTART:{$dtt_start}".PHP_EOL;
190
+				echo "DTEND:{$dtt_end}".PHP_EOL;
191
+				echo "END:VEVENT".PHP_EOL;
192
+				echo "END:VCALENDAR".PHP_EOL;
193 193
 			}
194 194
 		}
195 195
 		die();
@@ -204,8 +204,8 @@  discard block
 block discarded – undo
204 204
 	 *  	@param	string $string
205 205
 	 *  	@return	string
206 206
 	 */
207
-	private static function _escape_ICal_data( $string = '' ) {
208
-		return preg_replace( '/([\,;])/', '\\\$1', $string );
207
+	private static function _escape_ICal_data($string = '') {
208
+		return preg_replace('/([\,;])/', '\\\$1', $string);
209 209
 	}
210 210
 
211 211
 	/**
@@ -215,13 +215,13 @@  discard block
 block discarded – undo
215 215
 	 *  	@param	string $description
216 216
 	 *  	@return	string
217 217
 	 */
218
-	private static function _escape_ICal_description( $description = '' ) {
218
+	private static function _escape_ICal_description($description = '') {
219 219
 			
220 220
 			//Escape spcial chars within the decription
221
-			$description = EED_Ical::_escape_ICal_data( $description );
221
+			$description = EED_Ical::_escape_ICal_data($description);
222 222
 
223 223
 		    //Remove line breaks and output in iCal format
224
-		    $description = str_replace( array( "\r\n", "\n"), '\n', $description );
224
+		    $description = str_replace(array("\r\n", "\n"), '\n', $description);
225 225
 
226 226
 		return $description;
227 227
 	}
Please login to merge, or discard this patch.
Indentation   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -1,27 +1,27 @@  discard block
 block discarded – undo
1 1
 <?php if ( ! defined('EVENT_ESPRESSO_VERSION')) exit('No direct script access allowed');
2 2
 /**
3
- * Event Espresso
4
- *
5
- * Event Registration and Management Plugin for WordPress
6
- *
7
- * @ package		Event Espresso
8
- * @ author			Event Espresso
9
- * @ copyright	(c) 2008-2011 Event Espresso  All Rights Reserved.
10
- * @ license		http://eventespresso.com/support/terms-conditions/   * see Plugin Licensing *
11
- * @ link				http://www.eventespresso.com
12
- * @ version		 	EE4
13
- *
14
- * ------------------------------------------------------------------------
15
- */
3
+	 * Event Espresso
4
+	 *
5
+	 * Event Registration and Management Plugin for WordPress
6
+	 *
7
+	 * @ package		Event Espresso
8
+	 * @ author			Event Espresso
9
+	 * @ copyright	(c) 2008-2011 Event Espresso  All Rights Reserved.
10
+	 * @ license		http://eventespresso.com/support/terms-conditions/   * see Plugin Licensing *
11
+	 * @ link				http://www.eventespresso.com
12
+	 * @ version		 	EE4
13
+	 *
14
+	 * ------------------------------------------------------------------------
15
+	 */
16 16
 /**
17
- * EED_Ical Class
18
- *
19
- * 	adds a link that will import an event's details into any calendar that supports the iCal format
20
- *
21
- * @package 			Event Espresso
22
- * @subpackage 	/modules/ical/
23
- * @author 				Brent Christensen
24
- */
17
+	 * EED_Ical Class
18
+	 *
19
+	 * 	adds a link that will import an event's details into any calendar that supports the iCal format
20
+	 *
21
+	 * @package 			Event Espresso
22
+	 * @subpackage 	/modules/ical/
23
+	 * @author 				Brent Christensen
24
+	 */
25 25
 class EED_Ical  extends EED_Module {
26 26
 
27 27
 	const iCal_datetime_format = 'Ymd\THis\Z';
@@ -220,8 +220,8 @@  discard block
 block discarded – undo
220 220
 			//Escape spcial chars within the decription
221 221
 			$description = EED_Ical::_escape_ICal_data( $description );
222 222
 
223
-		    //Remove line breaks and output in iCal format
224
-		    $description = str_replace( array( "\r\n", "\n"), '\n', $description );
223
+			//Remove line breaks and output in iCal format
224
+			$description = str_replace( array( "\r\n", "\n"), '\n', $description );
225 225
 
226 226
 		return $description;
227 227
 	}
Please login to merge, or discard this patch.