Completed
Branch FET-5580-registration-cancella... (d3ffee)
by
unknown
1266:34 queued 1253:32
created
public/Espresso_Arabica_2014/single-espresso_venues.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -18,11 +18,11 @@  discard block
 block discarded – undo
18 18
 				<div id="espresso-venue-details-dv" class="" >				
19 19
 			<?php
20 20
 				// Start the Loop.
21
-				while ( have_posts() ) : the_post();
21
+				while (have_posts()) : the_post();
22 22
 					//  Include the post TYPE-specific template for the content.
23
-					espresso_get_template_part( 'content', 'espresso_venues' );
23
+					espresso_get_template_part('content', 'espresso_venues');
24 24
 					// If comments are open or we have at least one comment, load up the comment template.
25
-					if ( comments_open() || get_comments_number() ) {
25
+					if (comments_open() || get_comments_number()) {
26 26
 						comments_template();
27 27
 					}
28 28
 				endwhile;
@@ -34,6 +34,6 @@  discard block
 block discarded – undo
34 34
 	</div><!-- #primary -->
35 35
 
36 36
 <?php
37
-get_sidebar( 'content' );
37
+get_sidebar('content');
38 38
 get_sidebar();
39 39
 get_footer();
40 40
\ No newline at end of file
Please login to merge, or discard this patch.
shortcodes/espresso_cancelled/EES_Espresso_Cancelled.shortcode.php 2 patches
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 	 * @param WP $WP
52 52
 	 * @return    void
53 53
 	 */
54
-	public function run( WP $WP ) {
54
+	public function run(WP $WP) {
55 55
 	}
56 56
 
57 57
 	/**
@@ -61,28 +61,28 @@  discard block
 block discarded – undo
61 61
 	 *  @param		array 	$attributes
62 62
 	 *  @return 	string
63 63
 	 */
64
-	public function process_shortcode( $attributes = array() ) {
65
-		EE_Registry::instance()->load_core( 'Session' );
66
-		$transaction = EE_Registry::instance()->SSN->get_session_data( 'transaction' );
67
-		if ( $transaction instanceof EE_Transaction ) {
68
-			do_action( 'AHEE__EES_Espresso_Cancelled__process_shortcode__transaction', $transaction );
64
+	public function process_shortcode($attributes = array()) {
65
+		EE_Registry::instance()->load_core('Session');
66
+		$transaction = EE_Registry::instance()->SSN->get_session_data('transaction');
67
+		if ($transaction instanceof EE_Transaction) {
68
+			do_action('AHEE__EES_Espresso_Cancelled__process_shortcode__transaction', $transaction);
69 69
 			$registrations = $transaction->registrations();
70
-			foreach( $registrations as $registration ) {
71
-				if ( $registration instanceof EE_Registration ) {
72
-					do_action( 'AHEE__EES_Espresso_Cancelled__process_shortcode__registration', $registration );
70
+			foreach ($registrations as $registration) {
71
+				if ($registration instanceof EE_Registration) {
72
+					do_action('AHEE__EES_Espresso_Cancelled__process_shortcode__registration', $registration);
73 73
 				}
74 74
 			}
75 75
 		}
76
-		do_action( 'AHEE__EES_Espresso_Cancelled__process_shortcode__clear_session' );
76
+		do_action('AHEE__EES_Espresso_Cancelled__process_shortcode__clear_session');
77 77
 		// remove all unwanted records from the db
78
-		if ( EE_Registry::instance()->CART instanceof EE_Cart ) {
78
+		if (EE_Registry::instance()->CART instanceof EE_Cart) {
79 79
 			EE_Registry::instance()->CART->delete_cart();
80 80
 		}
81 81
 		EE_Registry::instance()->SSN->reset_cart();
82 82
 		EE_Registry::instance()->SSN->reset_checkout();
83 83
 		EE_Registry::instance()->SSN->reset_transaction();
84
-		EE_Registry::instance()->SSN->clear_session( __CLASS__, __FUNCTION__ );
85
-		return sprintf( __( '%sAll unsaved registration information entered during this session has been deleted.%s', 'event_espresso' ) , '<p class="ee-registrations-cancelled-pg ee-attention">', '</p>' );
84
+		EE_Registry::instance()->SSN->clear_session(__CLASS__, __FUNCTION__);
85
+		return sprintf(__('%sAll unsaved registration information entered during this session has been deleted.%s', 'event_espresso'), '<p class="ee-registrations-cancelled-pg ee-attention">', '</p>');
86 86
 	}
87 87
 
88 88
 }
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,6 @@
 block discarded – undo
1
-<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) exit('No direct script access allowed');
1
+<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) {
2
+	exit('No direct script access allowed');
3
+}
2 4
 /**
3 5
  * Event Espresso
4 6
  *
Please login to merge, or discard this patch.
shortcodes/espresso_checkout/EES_Espresso_Checkout.shortcode.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -51,17 +51,17 @@  discard block
 block discarded – undo
51 51
 	 * @param WP $WP
52 52
 	 * @return    void
53 53
 	 */
54
-	public function run( WP $WP ) {
55
-		if ( ! did_action( 'pre_get_posts' )) {
54
+	public function run(WP $WP) {
55
+		if ( ! did_action('pre_get_posts')) {
56 56
 			// hook into the top of pre_get_posts to set the reg step routing, which gives other modules or plugins a chance to modify the reg steps, but just before the routes get called
57
-			add_action( 'pre_get_posts', array( 'EED_Single_Page_Checkout', 'load_reg_steps' ), 1 );
57
+			add_action('pre_get_posts', array('EED_Single_Page_Checkout', 'load_reg_steps'), 1);
58 58
 			// this will trigger the EED_Single_Page_Checkout module's run() method during the pre_get_posts hook point,
59 59
 			// this allows us to initialize things, enqueue assets, etc,
60
-			add_action( 'pre_get_posts', array( 'EED_Single_Page_Checkout', 'init' ), 10, 1 );
60
+			add_action('pre_get_posts', array('EED_Single_Page_Checkout', 'init'), 10, 1);
61 61
 		} else {
62 62
 			global $wp_query;
63 63
 			EED_Single_Page_Checkout::load_reg_steps();
64
-			EED_Single_Page_Checkout::init( $wp_query );
64
+			EED_Single_Page_Checkout::init($wp_query);
65 65
 		}
66 66
 	}
67 67
 
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
 	 *  @param		array 	$attributes
75 75
 	 *  @return 	string
76 76
 	 */
77
-	public function process_shortcode( $attributes = array() ) {
77
+	public function process_shortcode($attributes = array()) {
78 78
 		return EE_Registry::instance()->REQ->get_output();
79 79
 	}
80 80
 
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,6 @@
 block discarded – undo
1
-<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) exit('No direct script access allowed');
1
+<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) {
2
+	exit('No direct script access allowed');
3
+}
2 4
 /**
3 5
  * Event Espresso
4 6
  *
Please login to merge, or discard this patch.
espresso_event_attendees/EES_Espresso_Event_Attendees.shortcode.php 3 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -117,10 +117,10 @@
 block discarded – undo
117 117
 			} else {
118 118
 				//try getting the earliest active event if none then get the
119 119
 				$events = EEM_Event::instance()->get_active_events( array( 'limit'    => 1,
120
-				                                                          'order_by' => array( 'Datetime.DTT_EVT_start' => 'ASC' )
120
+																		  'order_by' => array( 'Datetime.DTT_EVT_start' => 'ASC' )
121 121
 				) );
122 122
 				$events = empty( $events ) ? EEM_Event::instance()->get_upcoming_events( array( 'limit'    => 1,
123
-				                                                                              'order_by' => array( 'Datetime.DTT_EVT_start' => 'ASC' )
123
+																							  'order_by' => array( 'Datetime.DTT_EVT_start' => 'ASC' )
124 124
 				) ) : array();
125 125
 				$event = reset( $events );
126 126
 				if ( $event instanceof EE_Event ) {
Please login to merge, or discard this patch.
Spacing   +35 added lines, -35 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
 	 * @param       WP $WP
20 20
 	 * @return    void
21 21
 	 */
22
-	public function run( WP $WP ) {}
22
+	public function run(WP $WP) {}
23 23
 
24 24
 
25 25
 	/**
@@ -69,14 +69,14 @@  discard block
 block discarded – undo
69 69
 	 *  @param 	    array 	$attributes
70 70
 	 *  @return 	string
71 71
 	 */
72
-	public function process_shortcode( $attributes = array() ) {
72
+	public function process_shortcode($attributes = array()) {
73 73
 
74 74
 		//load helpers
75
-		EE_Registry::instance()->load_helper( 'Event_View' );
76
-		EE_Registry::instance()->load_helper( 'Template' );
75
+		EE_Registry::instance()->load_helper('Event_View');
76
+		EE_Registry::instance()->load_helper('Template');
77 77
 
78 78
 		// merge in any attributes passed via fallback shortcode processor
79
-		$attributes = array_merge( (array) $attributes, (array) $this->_attributes );
79
+		$attributes = array_merge((array) $attributes, (array) $this->_attributes);
80 80
 
81 81
 		//set default attributes
82 82
 		$default_shortcode_attributes = array(
@@ -88,9 +88,9 @@  discard block
 block discarded – undo
88 88
 		);
89 89
 
90 90
 		// allow the defaults to be filtered
91
-		$default_shortcode_attributes = apply_filters( 'EES_Espresso_Event_Attendees__process_shortcode__default_shortcode_atts', $default_shortcode_attributes );
91
+		$default_shortcode_attributes = apply_filters('EES_Espresso_Event_Attendees__process_shortcode__default_shortcode_atts', $default_shortcode_attributes);
92 92
 		// grab attributes and merge with defaults, then extract
93
-		$attributes = array_merge( $default_shortcode_attributes, $attributes );
93
+		$attributes = array_merge($default_shortcode_attributes, $attributes);
94 94
 
95 95
 		$template_args = array(
96 96
 			'contacts'      => array(),
@@ -106,31 +106,31 @@  discard block
 block discarded – undo
106 106
 		$error = false;
107 107
 
108 108
 		//what event?
109
-		if ( empty( $attributes['event_id'] ) && empty( $attributes['datetime_id'] ) && empty( $attributes['ticket_id'] ) ) {
109
+		if (empty($attributes['event_id']) && empty($attributes['datetime_id']) && empty($attributes['ticket_id'])) {
110 110
 			//seems like is_espresso_event_single() isn't working as expected. So using alternate method.
111
-			if ( is_single() && is_espresso_event() ) {
111
+			if (is_single() && is_espresso_event()) {
112 112
 				$event = EEH_Event_View::get_event();
113
-				if ( $event instanceof EE_Event ) {
113
+				if ($event instanceof EE_Event) {
114 114
 					$template_args['event']          = $event;
115 115
 					$query[0]['Registration.EVT_ID'] = $event->ID();
116 116
 				}
117 117
 			} else {
118 118
 				//try getting the earliest active event if none then get the
119
-				$events = EEM_Event::instance()->get_active_events( array( 'limit'    => 1,
120
-				                                                          'order_by' => array( 'Datetime.DTT_EVT_start' => 'ASC' )
121
-				) );
122
-				$events = empty( $events ) ? EEM_Event::instance()->get_upcoming_events( array( 'limit'    => 1,
123
-				                                                                              'order_by' => array( 'Datetime.DTT_EVT_start' => 'ASC' )
124
-				) ) : array();
125
-				$event = reset( $events );
126
-				if ( $event instanceof EE_Event ) {
119
+				$events = EEM_Event::instance()->get_active_events(array('limit'    => 1,
120
+				                                                          'order_by' => array('Datetime.DTT_EVT_start' => 'ASC')
121
+				));
122
+				$events = empty($events) ? EEM_Event::instance()->get_upcoming_events(array('limit'    => 1,
123
+				                                                                              'order_by' => array('Datetime.DTT_EVT_start' => 'ASC')
124
+				)) : array();
125
+				$event = reset($events);
126
+				if ($event instanceof EE_Event) {
127 127
 					$query[0]['Registration.EVT_ID'] = $event->ID();
128 128
 					$template_args['event']          = $event;
129 129
 				}
130 130
 			}
131
-		} elseif ( ! empty( $attributes['event_id'] ) ) {
132
-			$event = EEM_Event::instance()->get_one_by_ID( $attributes['event_id'] );
133
-			if ( $event instanceof EE_Event ) {
131
+		} elseif ( ! empty($attributes['event_id'])) {
132
+			$event = EEM_Event::instance()->get_one_by_ID($attributes['event_id']);
133
+			if ($event instanceof EE_Event) {
134 134
 				$query[0]['Registration.EVT_ID'] = $attributes['event_id'];
135 135
 				$template_args['event']          = $event;
136 136
 			} else {
@@ -139,9 +139,9 @@  discard block
 block discarded – undo
139 139
 		}
140 140
 
141 141
 		//datetime?
142
-		if ( ! empty( $attributes['datetime_id'] ) && empty( $attributes['event_id'] ) ) {
143
-			$datetime = EEM_Datetime::instance()->get_one_by_ID( $attributes['datetime_id'] );
144
-			if ( $datetime instanceof EE_Datetime ) {
142
+		if ( ! empty($attributes['datetime_id']) && empty($attributes['event_id'])) {
143
+			$datetime = EEM_Datetime::instance()->get_one_by_ID($attributes['datetime_id']);
144
+			if ($datetime instanceof EE_Datetime) {
145 145
 				$query[0]['Registration.Ticket.Datetime.DTT_ID'] = $attributes['datetime_id'];
146 146
 				$query['default_where_conditions'] = 'this_model_only';
147 147
 				$template_args['datetime']                      = $datetime;
@@ -152,9 +152,9 @@  discard block
 block discarded – undo
152 152
 		}
153 153
 
154 154
 		//ticket?just
155
-		if ( ! empty( $attributes['ticket_id'] ) && empty( $attributes['event_id'] ) && empty( $attributes['datetime_id'] ) ) {
156
-			$ticket = EEM_Ticket::instance()->get_one_by_ID( $attributes['ticket_id'] );
157
-			if ( $ticket instanceof EE_Ticket ) {
155
+		if ( ! empty($attributes['ticket_id']) && empty($attributes['event_id']) && empty($attributes['datetime_id'])) {
156
+			$ticket = EEM_Ticket::instance()->get_one_by_ID($attributes['ticket_id']);
157
+			if ($ticket instanceof EE_Ticket) {
158 158
 				$query[0]['Registration.TKT_ID'] = $attributes['ticket_id'];
159 159
 				$template_args['ticket']         = $ticket;
160 160
 				$template_args['event']          = $ticket->first_datetime() instanceof EE_Datetime ? $ticket->first_datetime()->event() : null;
@@ -165,17 +165,17 @@  discard block
 block discarded – undo
165 165
 
166 166
 		//status
167 167
 		$reg_status_array = EEM_Registration::reg_status_array();
168
-		if ( $attributes['status'] != 'all' && isset( $reg_status_array[$attributes['status']] ) ) {
168
+		if ($attributes['status'] != 'all' && isset($reg_status_array[$attributes['status']])) {
169 169
 			$query[0]['Registration.STS_ID'] = $attributes['status'];
170 170
 		}
171
-		$query['group_by'] = array( 'ATT_ID' );
172
-		$query['order_by'] = apply_filters( 'FHEE__EES_Espresso_Event_Attendees__process_shortcode__order_by', array( 'ATT_lname' => 'ASC', 'ATT_fname' => 'ASC' ) );
171
+		$query['group_by'] = array('ATT_ID');
172
+		$query['order_by'] = apply_filters('FHEE__EES_Espresso_Event_Attendees__process_shortcode__order_by', array('ATT_lname' => 'ASC', 'ATT_fname' => 'ASC'));
173 173
 
174 174
 		//if we have NO query where conditions, then there was an invalid parameter or the shortcode was used incorrectly
175 175
 		//so when WP_DEBUG is set and true, we'll show a message, otherwise we'll just return an empty string.
176
-		if ( ( ! isset( $query[0] ) || ! is_array( $query[0] ) ) || $error ) {
177
-			if ( WP_DEBUG ) {
178
-				return '<div class="important-notice ee-attention">' . __( 'The [ESPRESSO_EVENT_ATTENDEES] shortcode has been used incorrectly.  Please double check the arguments you used for any typos.  In the case of ID type arguments, its possible the given ID does not correspond to existing data in the database.', 'event_espresso' ) . '</div>';
176
+		if (( ! isset($query[0]) || ! is_array($query[0])) || $error) {
177
+			if (WP_DEBUG) {
178
+				return '<div class="important-notice ee-attention">'.__('The [ESPRESSO_EVENT_ATTENDEES] shortcode has been used incorrectly.  Please double check the arguments you used for any typos.  In the case of ID type arguments, its possible the given ID does not correspond to existing data in the database.', 'event_espresso').'</div>';
179 179
 			} else {
180 180
 				return '';
181 181
 			}
@@ -183,11 +183,11 @@  discard block
 block discarded – undo
183 183
 
184 184
 
185 185
 		//get contacts!
186
-		$template_args['contacts'] = EEM_Attendee::instance()->get_all( $query );
186
+		$template_args['contacts'] = EEM_Attendee::instance()->get_all($query);
187 187
 
188 188
 
189 189
 		//all set let's load up the template and return.
190
-		return EEH_Template::locate_template( 'loop-espresso_event_attendees.php', $template_args, true, true );
190
+		return EEH_Template::locate_template('loop-espresso_event_attendees.php', $template_args, true, true);
191 191
 
192 192
 	}
193 193
 
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,6 @@
 block discarded – undo
1
-<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) exit('No direct script access allowed');
1
+<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) {
2
+	exit('No direct script access allowed');
3
+}
2 4
 /**
3 5
  * Event Espresso
4 6
  *
Please login to merge, or discard this patch.
espresso_thank_you/templates/thank-you-page-overview.template.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@  discard block
 block discarded – undo
1
-<?php  do_action( 'AHEE__thank_you_page_overview_template__top', $transaction ); ?>
1
+<?php  do_action('AHEE__thank_you_page_overview_template__top', $transaction); ?>
2 2
 
3 3
 <div id="espresso-thank-you-page-overview-dv" class="width-100" >
4 4
 
5
-	<?php if ( ! $revisit ) : ?>
5
+	<?php if ( ! $revisit) : ?>
6 6
 	<div class="ee-attention">
7 7
 		<div class="extra-padding-sides">
8 8
 			<p class="bigger-text">
@@ -18,9 +18,9 @@  discard block
 block discarded – undo
18 18
 			);
19 19
 			?>
20 20
 			</p>
21
-			<?php if ( ! empty( $TXN_receipt_url )) : ?>
21
+			<?php if ( ! empty($TXN_receipt_url)) : ?>
22 22
 			<div class="jst-rght">
23
-				<a class="ee-button ee-roundish indented-text big-text" href="<?php echo $TXN_receipt_url;?>"><span class="ee-icon ee-icon-PDF-file-type"></span><?php echo apply_filters( 'FHEE__thank_you_page_overview_template__order_conf_button_text', __( 'View Full Order Confirmation Receipt', 'event_espresso' )); ?></a>
23
+				<a class="ee-button ee-roundish indented-text big-text" href="<?php echo $TXN_receipt_url; ?>"><span class="ee-icon ee-icon-PDF-file-type"></span><?php echo apply_filters('FHEE__thank_you_page_overview_template__order_conf_button_text', __('View Full Order Confirmation Receipt', 'event_espresso')); ?></a>
24 24
 			</div>
25 25
 			<?php endif; ?>
26 26
 		</div>
@@ -29,9 +29,9 @@  discard block
 block discarded – undo
29 29
 	<?php endif; ?>
30 30
 	<br/>
31 31
 
32
-	<?php  do_action( 'AHEE__thank_you_page_overview_template__content', $transaction ); ?>
32
+	<?php  do_action('AHEE__thank_you_page_overview_template__content', $transaction); ?>
33 33
 
34 34
 </div>
35 35
 <!-- end of espresso-thank-you-page-overview-dv -->
36 36
 
37
-<?php  do_action( 'AHEE__thank_you_page_overview_template__bottom', $transaction ); ?>
37
+<?php  do_action('AHEE__thank_you_page_overview_template__bottom', $transaction); ?>
Please login to merge, or discard this patch.
espresso_thank_you/templates/thank-you-page-payment-details.template.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -1,30 +1,30 @@  discard block
 block discarded – undo
1 1
 <h2 class="section-heading display-box-heading">
2 2
 	<?php _e('Payment Overview', 'event_espresso'); ?>
3 3
 </h2>
4
-<?php  do_action( 'AHEE__thank_you_page_payment_details_template__after_heading' ); ?>
4
+<?php  do_action('AHEE__thank_you_page_payment_details_template__after_heading'); ?>
5 5
 
6 6
 <div id="espresso-thank-you-page-payment-details-dv">
7
-<?php if ( ! empty( $payments )){	 ?>
7
+<?php if ( ! empty($payments)) {	 ?>
8 8
 	<table class="ee-table">
9 9
 		<thead>
10 10
 			<tr>
11 11
 				<th width="35%" class="jst-left">
12
-					<?php _e('Payment Date','event_espresso')?>
12
+					<?php _e('Payment Date', 'event_espresso')?>
13 13
 				</th>
14 14
 				<th width="17.5%" class="jst-left">
15
-					<?php _e('Type','event_espresso');?>
15
+					<?php _e('Type', 'event_espresso'); ?>
16 16
 				</th>
17 17
 				<th width="17.5%" class="jst-rght">
18
-					<?php _e('Amount','event_espresso');?>
18
+					<?php _e('Amount', 'event_espresso'); ?>
19 19
 				</th>
20 20
 				<th width="30%" class="jst-rght">
21
-					<?php _e('Status','event_espresso');?>
21
+					<?php _e('Status', 'event_espresso'); ?>
22 22
 				</th>
23 23
 			</tr>
24 24
 		</thead>
25 25
 		<tbody>
26 26
 		<?php
27
-			foreach ( $payments as $payment ) {
27
+			foreach ($payments as $payment) {
28 28
 				echo $payment;
29 29
 			}
30 30
 		?>
@@ -33,38 +33,38 @@  discard block
 block discarded – undo
33 33
 <?php
34 34
 	} else {
35 35
 
36
-		if ( $transaction->total() ){
36
+		if ($transaction->total()) {
37 37
 
38 38
 			echo apply_filters(
39 39
 				'FHEE__payment_overview_template__no_payments_made',
40
-				sprintf (
41
-					__('%sNo payments towards this transaction have been received.%s', 'event_espresso' ),
40
+				sprintf(
41
+					__('%sNo payments towards this transaction have been received.%s', 'event_espresso'),
42 42
 					'<p class="important-notice">',
43 43
 					'</p>'
44 44
 				)
45 45
 			);
46
-			do_action( 'AHEE__thank_you_page_payment_details_template__no_payments_made', $transaction );
46
+			do_action('AHEE__thank_you_page_payment_details_template__no_payments_made', $transaction);
47 47
 
48 48
 		} else {
49 49
 
50 50
 			echo apply_filters(
51 51
 				'FHEE__payment_overview_template__no_payment_required',
52
-				sprintf (
53
-					__('%sNo payment is required for this transaction.%s', 'event_espresso' ),
52
+				sprintf(
53
+					__('%sNo payment is required for this transaction.%s', 'event_espresso'),
54 54
 					'<p>',
55 55
 					'</p>'
56 56
 				)
57 57
 			);
58
-			do_action( 'AHEE__thank_you_page_payment_details_template__no_payment_required' );
58
+			do_action('AHEE__thank_you_page_payment_details_template__no_payment_required');
59 59
 
60 60
 		 }
61 61
 
62 62
 	}
63 63
 	echo $gateway_content;
64
-	do_action( 'AHEE__thank_you_page_payment_details_template__after_gateway_content', $gateway_content );
64
+	do_action('AHEE__thank_you_page_payment_details_template__after_gateway_content', $gateway_content);
65 65
 
66 66
 ?>
67 67
 
68 68
 	<br/>
69
-	<?php  do_action( 'AHEE__thank_you_page_payment_details_template__after_payment_details' ); ?>
69
+	<?php  do_action('AHEE__thank_you_page_payment_details_template__after_payment_details'); ?>
70 70
 
Please login to merge, or discard this patch.
templates/thank-you-page-transaction-details.template.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <h3><?php _e('Transaction Details', 'event_espresso'); ?></h3>
2
-<?php  do_action( 'AHEE__thank_you_page_transaction_details_template__after_heading' ); ?>
2
+<?php  do_action('AHEE__thank_you_page_transaction_details_template__after_heading'); ?>
3 3
 
4 4
 <div id="espresso-thank-you-page-transaction-details-dv">
5 5
 	<table class='ee-table'>
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
 					<label><?php _e('Total Cost: ', 'event_espresso'); ?></label>
10 10
 				</td>
11 11
 				<td>
12
-					<?php echo EEH_Template::format_currency( $transaction->total() ); ?>
12
+					<?php echo EEH_Template::format_currency($transaction->total()); ?>
13 13
 				</td>
14 14
 			</tr>
15 15
 			<tr>
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
 					<label><?php _e('Amount Owing: ', 'event_espresso'); ?></label>
18 18
 				</td>
19 19
 				<td class="<?php echo ($transaction->paid() == $transaction->total()) ? 'ee-transaction-paid' : 'ee-transaction-unpaid' ?>">
20
-					<?php echo EEH_Template::format_currency( $transaction->remaining() ); ?>
20
+					<?php echo EEH_Template::format_currency($transaction->remaining()); ?>
21 21
 				</td>
22 22
 			</tr>
23 23
 			<tr>
@@ -25,8 +25,8 @@  discard block
 block discarded – undo
25 25
 					<label><?php _e('Transaction Status: ', 'event_espresso'); ?></label>
26 26
 				</td>
27 27
 				<td>
28
-					<?php $transaction->e_pretty_status( TRUE );
29
-					if ( $show_try_pay_again_link && ! $transaction->is_completed() ) { ?>
28
+					<?php $transaction->e_pretty_status(TRUE);
29
+					if ($show_try_pay_again_link && ! $transaction->is_completed()) { ?>
30 30
 					 &nbsp; <span class="small-text"><a href='<?php echo $SPCO_payment_options_url?>'><?php _e('View Payment Options', 'event_espresso'); ?></a></span>
31 31
 					<?php } ?>
32 32
 				</td>
@@ -39,11 +39,11 @@  discard block
 block discarded – undo
39 39
 					<?php  echo $primary_registrant_name; ?>
40 40
 				</td>
41 41
 			</tr>
42
-            <?php  do_action( 'AHEE__thank_you_page_transaction_details_template__after_transaction_table_row', $transaction ); ?>
42
+            <?php  do_action('AHEE__thank_you_page_transaction_details_template__after_transaction_table_row', $transaction); ?>
43 43
 		</tbody>
44 44
 	</table>
45 45
 
46
-<?php if ( $show_try_pay_again_link && ! $transaction->is_completed() ) { ?>
46
+<?php if ($show_try_pay_again_link && ! $transaction->is_completed()) { ?>
47 47
 	<p class="small-text jst-rght">
48 48
 		<a href='<?php echo $SPCO_payment_options_url?>'><?php _e("Click here to view Payment Options", 'event_espresso'); ?></a>
49 49
 	</p>
@@ -52,6 +52,6 @@  discard block
 block discarded – undo
52 52
 
53 53
 <?php }?>
54 54
 
55
-    <?php  do_action( 'AHEE__thank_you_page_transaction_details_template__after_transaction_details' ); ?>
55
+    <?php  do_action('AHEE__thank_you_page_transaction_details_template__after_transaction_details'); ?>
56 56
 
57 57
 </div>
Please login to merge, or discard this patch.
shortcodes/espresso_txn_page/EES_Espresso_Txn_Page.shortcode.php 2 patches
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
 	 *  @return 	void
43 43
 	 */
44 44
 	public static function set_hooks() {
45
-		add_action( 'wp_loaded', array( 'EES_Espresso_Txn_Page', 'set_definitions' ), 2 );
45
+		add_action('wp_loaded', array('EES_Espresso_Txn_Page', 'set_definitions'), 2);
46 46
 	}
47 47
 
48 48
 	/**
@@ -63,8 +63,8 @@  discard block
 block discarded – undo
63 63
 	 *  @return 	void
64 64
 	 */
65 65
 	public static function set_definitions() {
66
-		define( 'TXN_PAGE_ASSETS_URL', plugin_dir_url( __FILE__ ) . 'assets' . DS );
67
-		define( 'TXN_PAGE_TEMPLATES_PATH', str_replace( '\\', DS, plugin_dir_path( __FILE__ )) . 'templates' . DS );
66
+		define('TXN_PAGE_ASSETS_URL', plugin_dir_url(__FILE__).'assets'.DS);
67
+		define('TXN_PAGE_TEMPLATES_PATH', str_replace('\\', DS, plugin_dir_path(__FILE__)).'templates'.DS);
68 68
 	}
69 69
 
70 70
 
@@ -77,26 +77,26 @@  discard block
 block discarded – undo
77 77
 	 *  @param 	 WP $WP
78 78
 	 *  @return 	void
79 79
 	 */
80
-	public function run( WP $WP ) {
81
-		if ( EE_Registry::instance()->REQ->is_set('e_reg_url_link' )){
82
-			$this->_current_txn = EE_Registry::instance()->load_model( 'Transaction' )->get_transaction_from_reg_url_link();
80
+	public function run(WP $WP) {
81
+		if (EE_Registry::instance()->REQ->is_set('e_reg_url_link')) {
82
+			$this->_current_txn = EE_Registry::instance()->load_model('Transaction')->get_transaction_from_reg_url_link();
83 83
 		} else {
84 84
 			$this->_current_txn = null;
85 85
 		}
86
-		if ( $this->_current_txn instanceof EE_Transaction ) {
86
+		if ($this->_current_txn instanceof EE_Transaction) {
87 87
 			//EE_Registry::instance()->load_helper( 'Debug_Tools' );
88 88
 			//EEH_Debug_Tools::log( __CLASS__, __FUNCTION__, __LINE__, array( $this->_current_txn ), true, 	'EE_Transaction: ' . $this->_current_txn->ID() );
89
-			$payment_method_slug = EE_Registry::instance()->REQ->get( 'ee_payment_method', NULL );
90
-			if( $payment_method_slug ) {
91
-				$payment_method = EEM_Payment_Method::instance()->get_one_by_slug( $payment_method_slug );
92
-			}else{
89
+			$payment_method_slug = EE_Registry::instance()->REQ->get('ee_payment_method', NULL);
90
+			if ($payment_method_slug) {
91
+				$payment_method = EEM_Payment_Method::instance()->get_one_by_slug($payment_method_slug);
92
+			} else {
93 93
 				$payment_method = null;
94 94
 			}
95 95
 			/** @type EE_Payment_Processor $payment_processor */
96 96
 			$payment_processor = EE_Registry::instance()->load_core('Payment_Processor');
97
-			$payment_processor->process_ipn( $_REQUEST, $this->_current_txn, $payment_method );
97
+			$payment_processor->process_ipn($_REQUEST, $this->_current_txn, $payment_method);
98 98
 			//allow gateways to add a filter to stop rendering the page
99
-			if( apply_filters( 'FHEE__EES_Espresso_Txn_Page__run__exit', FALSE ) ){
99
+			if (apply_filters('FHEE__EES_Espresso_Txn_Page__run__exit', FALSE)) {
100 100
 				exit;
101 101
 			}
102 102
 		}
@@ -113,8 +113,8 @@  discard block
 block discarded – undo
113 113
 	 *  @param		array 	$attributes
114 114
 	 *  @return 	string
115 115
 	 */
116
-	public function process_shortcode( $attributes = array() ) {
117
-		return __( 'This is the Event Espresso Transactions page. This page receives instant payment notification (IPN) requests and should have a status of published, but should not be easily accessible by site visitors. Do not add it to your website\'s navigation menu or link to it from another page. Also, do not delete it or change its status to private.', 'event_espresso' );
116
+	public function process_shortcode($attributes = array()) {
117
+		return __('This is the Event Espresso Transactions page. This page receives instant payment notification (IPN) requests and should have a status of published, but should not be easily accessible by site visitors. Do not add it to your website\'s navigation menu or link to it from another page. Also, do not delete it or change its status to private.', 'event_espresso');
118 118
 	}
119 119
 
120 120
 
Please login to merge, or discard this patch.
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,4 +1,6 @@  discard block
 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
  *
@@ -89,7 +91,7 @@  discard block
 block discarded – undo
89 91
 			$payment_method_slug = EE_Registry::instance()->REQ->get( 'ee_payment_method', NULL );
90 92
 			if( $payment_method_slug ) {
91 93
 				$payment_method = EEM_Payment_Method::instance()->get_one_by_slug( $payment_method_slug );
92
-			}else{
94
+			} else{
93 95
 				$payment_method = null;
94 96
 			}
95 97
 			/** @type EE_Payment_Processor $payment_processor */
Please login to merge, or discard this patch.
widgets/upcoming_events/EEW_Upcoming_Events.widget.php 3 patches
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -192,14 +192,14 @@  discard block
 block discarded – undo
192 192
 		        <?php _e('Show on all Pages:', 'event_espresso'); ?>
193 193
 			</label>
194 194
 	 	    <?php
195
-	 	    echo EEH_Form_Fields::select(
196
-	 	        __('Show on all Pages:', 'event_espresso'),
197
-	 	        $instance['show_everywhere'],
198
-	 	        $yes_no_values,
199
-	 	        $this->get_field_name('show_everywhere'),
200
-	 	        $this->get_field_id('show_everywhere')
201
-	 	    );
202
-	 	    ?>
195
+	 		echo EEH_Form_Fields::select(
196
+	 			__('Show on all Pages:', 'event_espresso'),
197
+	 			$instance['show_everywhere'],
198
+	 			$yes_no_values,
199
+	 			$this->get_field_name('show_everywhere'),
200
+	 			$this->get_field_id('show_everywhere')
201
+	 		);
202
+	 		?>
203 203
 	 	</p>
204 204
 		<p>
205 205
 			<label for="<?php echo $this->get_field_id('date_limit'); ?>">
@@ -282,13 +282,13 @@  discard block
 block discarded – undo
282 282
 				extract($args);
283 283
 
284 284
 				// add function to make the title a link
285
-	            add_filter('widget_title', array($this, 'make_the_title_a_link'), 15);
285
+				add_filter('widget_title', array($this, 'make_the_title_a_link'), 15);
286 286
 
287 287
 				// filter the title
288 288
 				$title = apply_filters('widget_title', $instance['title']);
289 289
 
290 290
 				// remove the function from the filter, so it does not affect other widgets
291
-	            remove_filter('widget_title', array($this, 'make_the_title_a_link'), 15);
291
+				remove_filter('widget_title', array($this, 'make_the_title_a_link'), 15);
292 292
 
293 293
 				// Before widget (defined by themes).
294 294
 				echo $before_widget;
@@ -385,7 +385,7 @@  discard block
 block discarded – undo
385 385
 	 * @return string
386 386
 	 */
387 387
 	public function make_the_title_a_link($title) {
388
-	    return '<a href="' . EEH_Event_View::event_archive_url() . '">' . $title . '</a>';
388
+		return '<a href="' . EEH_Event_View::event_archive_url() . '">' . $title . '</a>';
389 389
 	}
390 390
 
391 391
 }
Please login to merge, or discard this patch.
Spacing   +70 added lines, -70 removed lines patch added patch discarded remove patch
@@ -30,8 +30,8 @@  discard block
 block discarded – undo
30 30
 	function __construct() {
31 31
 		parent::__construct(
32 32
 			'ee-upcoming-events-widget',
33
-			__( 'Event Espresso Upcoming Events', 'event_espresso' ),
34
-			 array( 'description' => __( 'A widget to display your upcoming events.', 'event_espresso' )),
33
+			__('Event Espresso Upcoming Events', 'event_espresso'),
34
+			 array('description' => __('A widget to display your upcoming events.', 'event_espresso')),
35 35
 			array(
36 36
 				'width' => 300,
37 37
 				'height' => 350,
@@ -49,10 +49,10 @@  discard block
 block discarded – undo
49 49
 	 * @param array $instance Previously saved values from database.
50 50
 	 * @return string|void
51 51
 	 */
52
-	public function form( $instance ) {
52
+	public function form($instance) {
53 53
 
54
-		EE_Registry::instance()->load_helper( 'Form_Fields' );
55
-		EE_Registry::instance()->load_class( 'Question_Option', array(), FALSE, FALSE, TRUE );
54
+		EE_Registry::instance()->load_helper('Form_Fields');
55
+		EE_Registry::instance()->load_class('Question_Option', array(), FALSE, FALSE, TRUE);
56 56
 		// Set up some default widget settings.
57 57
 		$defaults = array(
58 58
 			'title' => __('Upcoming Events', 'event_espresso'),
@@ -67,12 +67,12 @@  discard block
 block discarded – undo
67 67
 			'image_size' => 'medium'
68 68
 		);
69 69
 
70
-		$instance = wp_parse_args( (array) $instance, $defaults );
70
+		$instance = wp_parse_args((array) $instance, $defaults);
71 71
 		// don't add HTML labels for EE_Form_Fields generated inputs
72
-		add_filter( 'FHEE__EEH_Form_Fields__label_html', '__return_empty_string' );
72
+		add_filter('FHEE__EEH_Form_Fields__label_html', '__return_empty_string');
73 73
 		$yes_no_values = array(
74
-			EE_Question_Option::new_instance( array( 'QSO_value' => FALSE, 'QSO_desc' => __('No', 'event_espresso'))),
75
-			EE_Question_Option::new_instance( array( 'QSO_value' => TRUE, 'QSO_desc' => __('Yes', 'event_espresso')))
74
+			EE_Question_Option::new_instance(array('QSO_value' => FALSE, 'QSO_desc' => __('No', 'event_espresso'))),
75
+			EE_Question_Option::new_instance(array('QSO_value' => TRUE, 'QSO_desc' => __('Yes', 'event_espresso')))
76 76
 		);
77 77
 
78 78
 	?>
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
 			<label for="<?php echo $this->get_field_id('title'); ?>">
84 84
 				<?php _e('Title:', 'event_espresso'); ?>
85 85
 			</label>
86
-			<input id="<?php echo $this->get_field_id('title'); ?>" class="widefat" name="<?php echo $this->get_field_name('title'); ?>" value="<?php echo esc_attr( $instance['title'] ); ?>" type="text" />
86
+			<input id="<?php echo $this->get_field_id('title'); ?>" class="widefat" name="<?php echo $this->get_field_name('title'); ?>" value="<?php echo esc_attr($instance['title']); ?>" type="text" />
87 87
 		</p>
88 88
 		<p>
89 89
 			<label for="<?php echo $this->get_field_id('category_name'); ?>">
@@ -92,16 +92,16 @@  discard block
 block discarded – undo
92 92
 			<?php
93 93
 			$event_categories = array();
94 94
 			/** @type EEM_Term $EEM_Term */
95
-			$EEM_Term = EE_Registry::instance()->load_model( 'Term' );
96
-			$categories = $EEM_Term->get_all_ee_categories( TRUE );
97
-			if ( $categories ) {
98
-				foreach ( $categories as $category ) {
99
-					if ( $category instanceof EE_Term ) {
100
-						$event_categories[] = EE_Question_Option::new_instance( array( 'QSO_value' => $category->get( 'slug' ), 'QSO_desc' => $category->get( 'name' )));
95
+			$EEM_Term = EE_Registry::instance()->load_model('Term');
96
+			$categories = $EEM_Term->get_all_ee_categories(TRUE);
97
+			if ($categories) {
98
+				foreach ($categories as $category) {
99
+					if ($category instanceof EE_Term) {
100
+						$event_categories[] = EE_Question_Option::new_instance(array('QSO_value' => $category->get('slug'), 'QSO_desc' => $category->get('name')));
101 101
 					}
102 102
 				}
103 103
 			}
104
-			array_unshift( $event_categories, EE_Question_Option::new_instance( array( 'QSO_value' => '', 'QSO_desc' => __(' - display all - ', 'event_espresso'))));
104
+			array_unshift($event_categories, EE_Question_Option::new_instance(array('QSO_value' => '', 'QSO_desc' => __(' - display all - ', 'event_espresso'))));
105 105
 			echo EEH_Form_Fields::select(
106 106
 				 __('Event Category:', 'event_espresso'),
107 107
 				$instance['category_name'],
@@ -138,16 +138,16 @@  discard block
 block discarded – undo
138 138
 			<?php
139 139
 			$image_sizes = array();
140 140
 			$sizes = get_intermediate_image_sizes();
141
-			if ( $sizes ) {
141
+			if ($sizes) {
142 142
 				// loop thru images and create option objects out of them
143
-				foreach ( $sizes as $image_size ) {
144
-					$image_size = trim( $image_size );
143
+				foreach ($sizes as $image_size) {
144
+					$image_size = trim($image_size);
145 145
 					// no big images plz
146
-					if ( ! in_array( $image_size, array( 'large', 'post-thumbnail' ))) {
147
-						$image_sizes[] = EE_Question_Option::new_instance( array( 'QSO_value' => $image_size, 'QSO_desc' => $image_size ));
146
+					if ( ! in_array($image_size, array('large', 'post-thumbnail'))) {
147
+						$image_sizes[] = EE_Question_Option::new_instance(array('QSO_value' => $image_size, 'QSO_desc' => $image_size));
148 148
 					}
149 149
 				}
150
-				$image_sizes[] = EE_Question_Option::new_instance( array( 'QSO_value' => 'none', 'QSO_desc' =>  __('don\'t show images', 'event_espresso') ));
150
+				$image_sizes[] = EE_Question_Option::new_instance(array('QSO_value' => 'none', 'QSO_desc' =>  __('don\'t show images', 'event_espresso')));
151 151
 			}
152 152
 			echo EEH_Form_Fields::select(
153 153
 				 __('Image Size:', 'event_espresso'),
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
 			<label for="<?php echo $this->get_field_id('date_limit'); ?>">
206 206
 				<?php _e('Number of Dates to Display:', 'event_espresso'); ?>
207 207
 			</label>
208
-			<input id="<?php echo $this->get_field_id('date_limit'); ?>" name="<?php echo $this->get_field_name('date_limit'); ?>" value="<?php echo esc_attr( $instance['date_limit'] ); ?>" size="3" type="text" />
208
+			<input id="<?php echo $this->get_field_id('date_limit'); ?>" name="<?php echo $this->get_field_name('date_limit'); ?>" value="<?php echo esc_attr($instance['date_limit']); ?>" size="3" type="text" />
209 209
 		</p>
210 210
 		<p>
211 211
 			<label for="<?php echo $this->get_field_id('date_range'); ?>">
@@ -237,9 +237,9 @@  discard block
 block discarded – undo
237 237
 	 *
238 238
 	 * @return array Updated safe values to be saved.
239 239
 	 */
240
-	public function update( $new_instance, $old_instance ) {
240
+	public function update($new_instance, $old_instance) {
241 241
 		$instance = $old_instance;
242
-		$instance['title'] = ! empty( $new_instance['title'] ) ? strip_tags( $new_instance['title'] ) : '';
242
+		$instance['title'] = ! empty($new_instance['title']) ? strip_tags($new_instance['title']) : '';
243 243
 		$instance['category_name'] = $new_instance['category_name'];
244 244
 		$instance['show_expired'] = $new_instance['show_expired'];
245 245
 		$instance['limit'] = $new_instance['limit'];
@@ -262,20 +262,20 @@  discard block
 block discarded – undo
262 262
 	 * @param array $args     Widget arguments.
263 263
 	 * @param array $instance Saved values from database.
264 264
 	 */
265
-	public function widget( $args, $instance ) {
265
+	public function widget($args, $instance) {
266 266
 
267 267
 		global $post;
268 268
 		// make sure there is some kinda post object
269
-		if ( $post instanceof WP_Post ) {
269
+		if ($post instanceof WP_Post) {
270 270
 			$before_widget = '';
271 271
 			$before_title = '';
272 272
 			$after_title = '';
273 273
 			$after_widget = '';
274 274
 			// but NOT an events archives page, cuz that would be like two event lists on the same page
275
-			$show_everywhere = isset( $instance['show_everywhere'] ) ? (bool) absint( $instance['show_everywhere'] ) : TRUE;
276
-			if ( $show_everywhere || ! ( $post->post_type == 'espresso_events' && is_archive() )) {	
275
+			$show_everywhere = isset($instance['show_everywhere']) ? (bool) absint($instance['show_everywhere']) : TRUE;
276
+			if ($show_everywhere || ! ($post->post_type == 'espresso_events' && is_archive())) {	
277 277
 				// let's use some of the event helper functions'
278
-				EE_Registry::instance()->load_helper( 'Event_View' );
278
+				EE_Registry::instance()->load_helper('Event_View');
279 279
 				// make separate vars out of attributes
280 280
 
281 281
 
@@ -293,76 +293,76 @@  discard block
 block discarded – undo
293 293
 				// Before widget (defined by themes).
294 294
 				echo $before_widget;
295 295
 				// Display the widget title if one was input (before and after defined by themes).
296
-				if ( ! empty( $title )) {
297
-					echo $before_title . $title . $after_title;
296
+				if ( ! empty($title)) {
297
+					echo $before_title.$title.$after_title;
298 298
 				}
299 299
 				// grab widget settings
300
-				$category = isset( $instance['category_name'] ) && ! empty( $instance['category_name'] ) ? $instance['category_name'] : FALSE;
301
-				$show_expired = isset( $instance['show_expired'] ) ? (bool) absint( $instance['show_expired'] ) : FALSE;
302
-				$image_size = isset( $instance['image_size'] ) && ! empty( $instance['image_size'] ) ? $instance['image_size'] : 'medium';
303
-				$show_desc = isset( $instance['show_desc'] ) ? (bool) absint( $instance['show_desc'] ) : TRUE;
304
-				$show_dates = isset( $instance['show_dates'] ) ? (bool) absint( $instance['show_dates'] ) : TRUE;
305
-				$date_limit = isset( $instance['date_limit'] ) && ! empty( $instance['date_limit'] ) ? $instance['date_limit'] : NULL;
306
-				$date_range = isset( $instance['date_range'] ) && ! empty( $instance['date_range'] ) ? $instance['date_range'] : FALSE;
300
+				$category = isset($instance['category_name']) && ! empty($instance['category_name']) ? $instance['category_name'] : FALSE;
301
+				$show_expired = isset($instance['show_expired']) ? (bool) absint($instance['show_expired']) : FALSE;
302
+				$image_size = isset($instance['image_size']) && ! empty($instance['image_size']) ? $instance['image_size'] : 'medium';
303
+				$show_desc = isset($instance['show_desc']) ? (bool) absint($instance['show_desc']) : TRUE;
304
+				$show_dates = isset($instance['show_dates']) ? (bool) absint($instance['show_dates']) : TRUE;
305
+				$date_limit = isset($instance['date_limit']) && ! empty($instance['date_limit']) ? $instance['date_limit'] : NULL;
306
+				$date_range = isset($instance['date_range']) && ! empty($instance['date_range']) ? $instance['date_range'] : FALSE;
307 307
 				// start to build our where clause
308 308
 				$where = array(
309 309
 //					'Datetime.DTT_is_primary' => 1,
310 310
 					'status' => 'publish'
311 311
 				);
312 312
 				// add category
313
-				if ( $category ) {
313
+				if ($category) {
314 314
 					$where['Term_Taxonomy.taxonomy'] = 'espresso_event_categories';
315 315
 					$where['Term_Taxonomy.Term.slug'] = $category;
316 316
 				}
317 317
 				// if NOT expired then we want events that start today or in the future
318
-				if ( ! $show_expired ) {
319
-					$where['Datetime.DTT_EVT_end'] = array( '>=', EEM_Datetime::instance()->current_time_for_query( 'DTT_EVT_end' ) );
318
+				if ( ! $show_expired) {
319
+					$where['Datetime.DTT_EVT_end'] = array('>=', EEM_Datetime::instance()->current_time_for_query('DTT_EVT_end'));
320 320
 				}
321 321
 				// run the query
322
-				$events = EE_Registry::instance()->load_model( 'Event' )->get_all( array(
322
+				$events = EE_Registry::instance()->load_model('Event')->get_all(array(
323 323
 					$where,
324
-					'limit' => $instance['limit'] > 0 ? '0,' . $instance['limit'] : '0,10',
324
+					'limit' => $instance['limit'] > 0 ? '0,'.$instance['limit'] : '0,10',
325 325
 					'order_by' => 'Datetime.DTT_EVT_start',
326 326
 					'order' => 'ASC',
327 327
 					'group_by' => 'EVT_ID'
328 328
 				));
329 329
 
330
-				if ( ! empty( $events )) {
330
+				if ( ! empty($events)) {
331 331
 					echo '<ul class="ee-upcoming-events-widget-ul">';
332
-					foreach ( $events as $event ) {
333
-						if ( $event instanceof EE_Event && ( !is_single() || $post->ID != $event->ID() ) ) {
332
+					foreach ($events as $event) {
333
+						if ($event instanceof EE_Event && ( ! is_single() || $post->ID != $event->ID())) {
334 334
 							//printr( $event, '$event  <br /><span style="font-size:10px;font-weight:normal;">' . __FILE__ . '<br />line no: ' . __LINE__ . '</span>', 'auto' );
335
-							echo '<li id="ee-upcoming-events-widget-li-' . $event->ID() . '" class="ee-upcoming-events-widget-li">';
335
+							echo '<li id="ee-upcoming-events-widget-li-'.$event->ID().'" class="ee-upcoming-events-widget-li">';
336 336
 							// how big is the event name ?
337
-							$name_length = strlen( $event->name() );
338
-							switch( $name_length ) {
337
+							$name_length = strlen($event->name());
338
+							switch ($name_length) {
339 339
 								case $name_length > 70 :
340
-									$len_class =  ' three-line';
340
+									$len_class = ' three-line';
341 341
 									break;
342 342
 								case $name_length > 35 :
343
-									$len_class =  ' two-line';
343
+									$len_class = ' two-line';
344 344
 									break;
345 345
 								default :
346
-									$len_class =  ' one-line';
346
+									$len_class = ' one-line';
347 347
 							}
348
-							echo '<h5 class="ee-upcoming-events-widget-title-h5"><a class="ee-widget-event-name-a' . $len_class . '" href="' . get_permalink( $event->ID() ) . '">' . $event->name() . '</a></h5>';
349
-							if ( has_post_thumbnail( $event->ID() ) && $image_size != 'none' ) {
350
-								echo '<div class="ee-upcoming-events-widget-img-dv"><a class="ee-upcoming-events-widget-img" href="' . get_permalink( $event->ID() ) . '">' . get_the_post_thumbnail( $event->ID(), $image_size ) . '</a></div>';
348
+							echo '<h5 class="ee-upcoming-events-widget-title-h5"><a class="ee-widget-event-name-a'.$len_class.'" href="'.get_permalink($event->ID()).'">'.$event->name().'</a></h5>';
349
+							if (has_post_thumbnail($event->ID()) && $image_size != 'none') {
350
+								echo '<div class="ee-upcoming-events-widget-img-dv"><a class="ee-upcoming-events-widget-img" href="'.get_permalink($event->ID()).'">'.get_the_post_thumbnail($event->ID(), $image_size).'</a></div>';
351 351
 							}
352
-							$desc = $event->short_description( 25 );
353
-							if ( $show_dates ) {
354
-								$date_format = apply_filters( 'FHEE__espresso_event_date_range__date_format', get_option( 'date_format' ));
355
-								$time_format = apply_filters( 'FHEE__espresso_event_date_range__time_format', get_option( 'time_format' ));
356
-								$single_date_format = apply_filters( 'FHEE__espresso_event_date_range__single_date_format', get_option( 'date_format' ));
357
-								$single_time_format = apply_filters( 'FHEE__espresso_event_date_range__single_time_format', get_option( 'time_format' ));
358
-								if ( $date_range == TRUE ) {
359
-									echo espresso_event_date_range( $date_format, $time_format, $single_date_format, $single_time_format, $event->ID() );
360
-								}else{
361
-									echo espresso_list_of_event_dates( $event->ID(), $date_format, $time_format, FALSE, NULL, TRUE, TRUE, $date_limit );
352
+							$desc = $event->short_description(25);
353
+							if ($show_dates) {
354
+								$date_format = apply_filters('FHEE__espresso_event_date_range__date_format', get_option('date_format'));
355
+								$time_format = apply_filters('FHEE__espresso_event_date_range__time_format', get_option('time_format'));
356
+								$single_date_format = apply_filters('FHEE__espresso_event_date_range__single_date_format', get_option('date_format'));
357
+								$single_time_format = apply_filters('FHEE__espresso_event_date_range__single_time_format', get_option('time_format'));
358
+								if ($date_range == TRUE) {
359
+									echo espresso_event_date_range($date_format, $time_format, $single_date_format, $single_time_format, $event->ID());
360
+								} else {
361
+									echo espresso_list_of_event_dates($event->ID(), $date_format, $time_format, FALSE, NULL, TRUE, TRUE, $date_limit);
362 362
 								}
363 363
 							}
364
-							if ( $show_desc && $desc ) {
365
-								echo '<p style="margin-top: .5em">' . $desc . '</p>';
364
+							if ($show_desc && $desc) {
365
+								echo '<p style="margin-top: .5em">'.$desc.'</p>';
366 366
 							}
367 367
 							echo '</li>';
368 368
 						}
@@ -385,7 +385,7 @@  discard block
 block discarded – undo
385 385
 	 * @return string
386 386
 	 */
387 387
 	public function make_the_title_a_link($title) {
388
-	    return '<a href="' . EEH_Event_View::event_archive_url() . '">' . $title . '</a>';
388
+	    return '<a href="'.EEH_Event_View::event_archive_url().'">'.$title.'</a>';
389 389
 	}
390 390
 
391 391
 }
Please login to merge, or discard this patch.
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,4 +1,6 @@  discard block
 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
  *
@@ -357,7 +359,7 @@  discard block
 block discarded – undo
357 359
 								$single_time_format = apply_filters( 'FHEE__espresso_event_date_range__single_time_format', get_option( 'time_format' ));
358 360
 								if ( $date_range == TRUE ) {
359 361
 									echo espresso_event_date_range( $date_format, $time_format, $single_date_format, $single_time_format, $event->ID() );
360
-								}else{
362
+								} else{
361 363
 									echo espresso_list_of_event_dates( $event->ID(), $date_format, $time_format, FALSE, NULL, TRUE, TRUE, $date_limit );
362 364
 								}
363 365
 							}
Please login to merge, or discard this patch.