Completed
Branch BUG-9548-transaction-completio... (f1723a)
by
unknown
592:31 queued 571:19
created
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.
espresso_ticket_selector/EES_Espresso_Ticket_Selector.shortcode.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   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
 	 * @access    public
51 51
 	 * @param \WP $WP
52 52
 	 */
53
-	public function run( WP $WP ) {
53
+	public function run(WP $WP) {
54 54
 	}
55 55
 
56 56
 	/**
@@ -60,14 +60,14 @@  discard block
 block discarded – undo
60 60
 	 *  @param		array 	$attributes
61 61
 	 *  @return 	string
62 62
 	 */
63
-	public function process_shortcode( $attributes = array() ) {
64
-		extract( $attributes );
65
-		$event_id = isset( $event_id ) ? $event_id : 0;
66
-		$event = EE_Registry::instance()->load_model( 'Event' )->get_one_by_ID( $event_id );
63
+	public function process_shortcode($attributes = array()) {
64
+		extract($attributes);
65
+		$event_id = isset($event_id) ? $event_id : 0;
66
+		$event = EE_Registry::instance()->load_model('Event')->get_one_by_ID($event_id);
67 67
 		ob_start();
68
-		do_action( 'AHEE_event_details_before_post', $event_id );
69
-		espresso_ticket_selector( $event );
70
-		do_action( 'AHEE_event_details_after_post' );
68
+		do_action('AHEE_event_details_before_post', $event_id);
69
+		espresso_ticket_selector($event);
70
+		do_action('AHEE_event_details_after_post');
71 71
 		return ob_get_clean();
72 72
 	}
73 73
 
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.
admin_pages/events/Event_Categories_Admin_List_Table.class.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   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if (!defined('EVENT_ESPRESSO_VERSION') )
2
+if ( ! defined('EVENT_ESPRESSO_VERSION'))
3 3
 	exit('NO direct script access allowed');
4 4
 
5 5
 /**
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
 
32 32
 class Event_Categories_Admin_List_Table extends EE_Admin_List_Table {
33 33
 
34
-	public function __construct( $admin_page ) {
34
+	public function __construct($admin_page) {
35 35
 		parent::__construct($admin_page);
36 36
 	}
37 37
 
@@ -39,8 +39,8 @@  discard block
 block discarded – undo
39 39
 
40 40
 
41 41
 	protected function _setup_data() {
42
-		$this->_data = $this->_admin_page->get_categories( $this->_per_page, $this->_current_page);
43
-		$this->_all_data_count = EEM_Term_Taxonomy::instance()->count( array( array( 'taxonomy' => 'espresso_event_categories' ) ) );
42
+		$this->_data = $this->_admin_page->get_categories($this->_per_page, $this->_current_page);
43
+		$this->_all_data_count = EEM_Term_Taxonomy::instance()->count(array(array('taxonomy' => 'espresso_event_categories')));
44 44
 	}
45 45
 
46 46
 
@@ -49,8 +49,8 @@  discard block
 block discarded – undo
49 49
 
50 50
 	protected function _set_properties() {
51 51
 		$this->_wp_list_args = array(
52
-			'singular' => __('event category', 'event_espresso' ),
53
-			'plural' => __('event categories', 'event_espresso' ),
52
+			'singular' => __('event category', 'event_espresso'),
53
+			'plural' => __('event categories', 'event_espresso'),
54 54
 			'ajax' => TRUE, //for now,
55 55
 			'screen' => $this->_admin_page->get_current_screen()->id
56 56
 			);
@@ -64,9 +64,9 @@  discard block
 block discarded – undo
64 64
 			);
65 65
 
66 66
 		$this->_sortable_columns = array(
67
-			'id' => array( 'Term.term_id' => true ),
68
-			'name' => array( 'Term.slug' => false ),
69
-			'count' => array( 'term_count' => false )
67
+			'id' => array('Term.term_id' => true),
68
+			'name' => array('Term.slug' => false),
69
+			'count' => array('term_count' => false)
70 70
 			);
71 71
 
72 72
 		$this->_primary_column = 'id';
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
 
99 99
 
100 100
 	public function column_cb($item) {
101
-		return sprintf( '<input type="checkbox" name="EVT_CAT_ID[]" value="%s" />', $item->get('term_id') );
101
+		return sprintf('<input type="checkbox" name="EVT_CAT_ID[]" value="%s" />', $item->get('term_id'));
102 102
 	}
103 103
 
104 104
 
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
 
108 108
 	public function column_id($item) {
109 109
 		$content = $item->get('term_id');
110
-		$content .= '  <span class="show-on-mobile-view-only">' . $item->get_first_related('Term')->get('name') . '</span>';
110
+		$content .= '  <span class="show-on-mobile-view-only">'.$item->get_first_related('Term')->get('name').'</span>';
111 111
 		return $content;
112 112
 	}
113 113
 
@@ -127,17 +127,17 @@  discard block
 block discarded – undo
127 127
 			'EVT_CAT_ID' => $item->get('term_id')
128 128
 		);
129 129
 
130
-		$edit_link = EE_Admin_Page::add_query_args_and_nonce( $edit_query_args, EVENTS_ADMIN_URL );
131
-		$delete_link = EE_Admin_Page::add_query_args_and_nonce( $delete_query_args, EVENTS_ADMIN_URL );
130
+		$edit_link = EE_Admin_Page::add_query_args_and_nonce($edit_query_args, EVENTS_ADMIN_URL);
131
+		$delete_link = EE_Admin_Page::add_query_args_and_nonce($delete_query_args, EVENTS_ADMIN_URL);
132 132
 
133 133
 		$actions = array(
134
-			'edit' => '<a href="' . $edit_link . '" title="' . esc_attr__('Edit Category', 'event_espresso') . '">' . __('Edit', 'event_espresso') . '</a>'
134
+			'edit' => '<a href="'.$edit_link.'" title="'.esc_attr__('Edit Category', 'event_espresso').'">'.__('Edit', 'event_espresso').'</a>'
135 135
 			);
136 136
 
137 137
 
138
-		$actions['delete'] = '<a href="' . $delete_link . '" title="' . esc_attr__('Delete Category', 'event_espresso') . '">' . __('Delete', 'event_espresso') . '</a>';
138
+		$actions['delete'] = '<a href="'.$delete_link.'" title="'.esc_attr__('Delete Category', 'event_espresso').'">'.__('Delete', 'event_espresso').'</a>';
139 139
 
140
-		$content = '<strong><a class="row-title" href="' . $edit_link . '">' . $item->get_first_related('Term')->get('name') . '</a></strong>';
140
+		$content = '<strong><a class="row-title" href="'.$edit_link.'">'.$item->get_first_related('Term')->get('name').'</a></strong>';
141 141
 		$content .= $this->row_actions($actions);
142 142
 		return $content;
143 143
 	}
@@ -146,20 +146,20 @@  discard block
 block discarded – undo
146 146
 
147 147
 
148 148
 	public function column_shortcode($item) {
149
-		$content = '[ESPRESSO_EVENTS category_slug=' . $item->get_first_related('Term')->get('slug') . ']';
149
+		$content = '[ESPRESSO_EVENTS category_slug='.$item->get_first_related('Term')->get('slug').']';
150 150
 		return $content;
151 151
 	}
152 152
 
153 153
 
154 154
 
155 155
 
156
-	public function column_count( $item ) {
156
+	public function column_count($item) {
157 157
 		$e_args = array(
158 158
 			'action' => 'default',
159 159
 			'EVT_CAT' => $item->get_first_related('Term')->ID()
160 160
 			);
161
-		$e_link = EE_Admin_Page::add_query_args_and_nonce( $e_args, EVENTS_ADMIN_URL );
162
-		$content = '<a href="' . $e_link . '">' . $item->get('term_count') . '</a>';
161
+		$e_link = EE_Admin_Page::add_query_args_and_nonce($e_args, EVENTS_ADMIN_URL);
162
+		$content = '<a href="'.$e_link.'">'.$item->get('term_count').'</a>';
163 163
 		return $content;
164 164
 	}
165 165
 }
Please login to merge, or discard this patch.
admin_pages/events/help_tours/Event_Edit_Help_Tour.class.php 3 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -123,14 +123,14 @@  discard block
 block discarded – undo
123 123
 					'tipLocation' => 'left'
124 124
 					)
125 125
 				),
126
-            110 => array(
126
+			110 => array(
127 127
 				'id' => 'espresso_event_editor_event_options',
128 128
 				'content' => $this->_event_registration_options_stop(),
129 129
 				'options' => array(
130 130
 					'tipLocation' => 'left'
131 131
 					)
132 132
 				),
133
-            120 => array(
133
+			120 => array(
134 134
 				'id' => 'submitpost',
135 135
 				'content' => $this->_publish_event_stop(),
136 136
 				'options' => array(
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
 		return '<p>' . __('Set a feature image for your event here.', 'event_espresso') . '</p>';
197 197
 	}
198 198
     
199
-    protected function _publish_event_stop() {
199
+	protected function _publish_event_stop() {
200 200
 		return '<p>' . __('Easily control the state of your event. The main states are Published, Pending Review, and Draft. Additional states are Cancelled, Postponed, and Sold Out.', 'event_espresso') . '</p>';
201 201
 	}
202 202
 	
Please login to merge, or discard this patch.
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if (!defined('EVENT_ESPRESSO_VERSION') )
2
+if ( ! defined('EVENT_ESPRESSO_VERSION'))
3 3
 	exit('NO direct script access allowed');
4 4
 
5 5
 /**
@@ -143,8 +143,8 @@  discard block
 block discarded – undo
143 143
 
144 144
 
145 145
 	protected function _start() {
146
-		$content = '<h3>' . __('Event Editor', 'event_espresso') . '</h3>';
147
-		$content .= '<p>' . __('This tour of the Event Editor will provide an overview of the different areas of the screen to help you understand what they are used for. Let\'s get started on setting up your first event with Event Espresso!', 'event_espresso') . '</p>';
146
+		$content = '<h3>'.__('Event Editor', 'event_espresso').'</h3>';
147
+		$content .= '<p>'.__('This tour of the Event Editor will provide an overview of the different areas of the screen to help you understand what they are used for. Let\'s get started on setting up your first event with Event Espresso!', 'event_espresso').'</p>';
148 148
 		return $content;
149 149
 	}
150 150
 
@@ -153,51 +153,51 @@  discard block
 block discarded – undo
153 153
 	}
154 154
 
155 155
 	protected function _event_description_stop() {
156
-		return '<p>' . __('The rich text editor can be used to add information about your event. Images and links can also be added along with your text.', 'event_espresso') . '</p>';
156
+		return '<p>'.__('The rich text editor can be used to add information about your event. Images and links can also be added along with your text.', 'event_espresso').'</p>';
157 157
 	}
158 158
 
159 159
 	protected function _event_venues_caf() {
160
-		return '<p>' . __('In this section, you can select the venue that is hosting your event.', 'event_espresso') . '</p>';
160
+		return '<p>'.__('In this section, you can select the venue that is hosting your event.', 'event_espresso').'</p>';
161 161
 	}
162 162
 
163 163
 	protected function _event_venues_stop() {
164
-		return '<p>' . __('In this section, you can enter information about the venue that is hosting your event.', 'event_espresso') . '</p>';
164
+		return '<p>'.__('In this section, you can enter information about the venue that is hosting your event.', 'event_espresso').'</p>';
165 165
 	}
166 166
 
167 167
 	protected function _event_pricing_stop() {
168
-		return '<p>' . __('Use the Event Datetime & Ticket section to enter details about when the event is happening and what tickets you want to offer for access to the event.', 'event_espresso') . '</p>';
168
+		return '<p>'.__('Use the Event Datetime & Ticket section to enter details about when the event is happening and what tickets you want to offer for access to the event.', 'event_espresso').'</p>';
169 169
 	}
170 170
 
171 171
 	protected function _event_pricing_caf() {
172
-		return '<p>' . __('Use the Event Datetimes & Ticket section to enter details about when the event is happening and what tickets you want to offer for access to the event.', 'event_espresso') . '</p>';
172
+		return '<p>'.__('Use the Event Datetimes & Ticket section to enter details about when the event is happening and what tickets you want to offer for access to the event.', 'event_espresso').'</p>';
173 173
 	}
174 174
 	
175 175
 	protected function _event_registration_options_stop() {
176
-		return '<p>' . __('Setup custom options for your event registration.', 'event_espresso') . '</p>';
176
+		return '<p>'.__('Setup custom options for your event registration.', 'event_espresso').'</p>';
177 177
 	}
178 178
 	
179 179
 	protected function _event_post_tag_stop() {
180
-		return '<p>' . __('Quickly add tags to your event.', 'event_espresso') . '</p>';
180
+		return '<p>'.__('Quickly add tags to your event.', 'event_espresso').'</p>';
181 181
 	}
182 182
 
183 183
 	protected function _event_categories_stop() {
184
-		return '<p>' . __('Events can also be categorized if you wish.', 'event_espresso') . '</p>';
184
+		return '<p>'.__('Events can also be categorized if you wish.', 'event_espresso').'</p>';
185 185
 	}
186 186
 
187 187
 	protected function _primary_question_stop_caf() {
188
-		return '<p>' . __('Use the questions group to request information from your primary registrant.', 'event_espresso') . '</p>';
188
+		return '<p>'.__('Use the questions group to request information from your primary registrant.', 'event_espresso').'</p>';
189 189
 	}
190 190
 
191 191
 	protected function _additional_questions_stop_caf() {
192
-		return '<p>' . __('Use the questions group to request information from your additional registrant.', 'event_espresso') . '</p>';
192
+		return '<p>'.__('Use the questions group to request information from your additional registrant.', 'event_espresso').'</p>';
193 193
 	}
194 194
 	
195 195
 	protected function _featured_image_stop() {
196
-		return '<p>' . __('Set a feature image for your event here.', 'event_espresso') . '</p>';
196
+		return '<p>'.__('Set a feature image for your event here.', 'event_espresso').'</p>';
197 197
 	}
198 198
     
199 199
     protected function _publish_event_stop() {
200
-		return '<p>' . __('Easily control the state of your event. The main states are Published, Pending Review, and Draft. Additional states are Cancelled, Postponed, and Sold Out.', 'event_espresso') . '</p>';
200
+		return '<p>'.__('Easily control the state of your event. The main states are Published, Pending Review, and Draft. Additional states are Cancelled, Postponed, and Sold Out.', 'event_espresso').'</p>';
201 201
 	}
202 202
 	
203 203
 }
204 204
\ No newline at end of file
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -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.
admin_pages/maintenance/Maintenance_Admin_Page_Init.core.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   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if (!defined('EVENT_ESPRESSO_VERSION') )
2
+if ( ! defined('EVENT_ESPRESSO_VERSION'))
3 3
 	exit('NO direct script access allowed');
4 4
 
5 5
 /**
@@ -34,14 +34,14 @@  discard block
 block discarded – undo
34 34
 
35 35
 	public function __construct() {
36 36
 		//define some page related constants
37
-		define( 'EE_MAINTENANCE_LABEL', __('Maintenance', 'event_espresso'));
38
-		define( 'EE_MAINTENANCE_PG_SLUG', 'espresso_maintenance_settings' );
39
-		define( 'EE_MAINTENANCE_ADMIN_URL', admin_url( 'admin.php?page=' . EE_MAINTENANCE_PG_SLUG ));
40
-		define( 'EE_MAINTENANCE_ADMIN', EE_ADMIN_PAGES . 'maintenance' . DS );
41
-		define( 'EE_MAINTENANCE_TEMPLATE_PATH', EE_MAINTENANCE_ADMIN . 'templates' . DS );
42
-		define( 'EE_MAINTENANCE_ASSETS_URL', EE_ADMIN_PAGES_URL . 'maintenance/assets/' );
37
+		define('EE_MAINTENANCE_LABEL', __('Maintenance', 'event_espresso'));
38
+		define('EE_MAINTENANCE_PG_SLUG', 'espresso_maintenance_settings');
39
+		define('EE_MAINTENANCE_ADMIN_URL', admin_url('admin.php?page='.EE_MAINTENANCE_PG_SLUG));
40
+		define('EE_MAINTENANCE_ADMIN', EE_ADMIN_PAGES.'maintenance'.DS);
41
+		define('EE_MAINTENANCE_TEMPLATE_PATH', EE_MAINTENANCE_ADMIN.'templates'.DS);
42
+		define('EE_MAINTENANCE_ASSETS_URL', EE_ADMIN_PAGES_URL.'maintenance/assets/');
43 43
 		//check that if we're in maintenance mode that we tell the admin that
44
-		add_action('admin_notices',array($this,'check_maintenance_mode'));
44
+		add_action('admin_notices', array($this, 'check_maintenance_mode'));
45 45
 		parent::__construct();
46 46
 	}
47 47
 
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
 	protected function _set_menu_map() {
53 53
 		$menu_map = $this->_menu_map();
54 54
 
55
-		$this->_menu_map = EE_Maintenance_Mode::instance()->level() == EE_Maintenance_Mode::level_2_complete_maintenance ? new EE_Admin_Page_Main_Menu( $menu_map) : new EE_Admin_Page_Sub_Menu( $menu_map );
55
+		$this->_menu_map = EE_Maintenance_Mode::instance()->level() == EE_Maintenance_Mode::level_2_complete_maintenance ? new EE_Admin_Page_Main_Menu($menu_map) : new EE_Admin_Page_Sub_Menu($menu_map);
56 56
 	}
57 57
 
58 58
 	protected function _menu_map() {
@@ -67,10 +67,10 @@  discard block
 block discarded – undo
67 67
 			'maintenance_mode_parent' => EE_MAINTENANCE_PG_SLUG,
68 68
 			'admin_init_page' => $this
69 69
 		);
70
-		if( EE_Maintenance_Mode::instance()->level() == EE_Maintenance_Mode::level_2_complete_maintenance ){
71
-			$map['menu_group']='main';
70
+		if (EE_Maintenance_Mode::instance()->level() == EE_Maintenance_Mode::level_2_complete_maintenance) {
71
+			$map['menu_group'] = 'main';
72 72
 			$map['subtitle'] = EE_MAINTENANCE_LABEL;
73
-			$map['menu_label'] = __( 'Event Espresso', 'event_espresso' );
73
+			$map['menu_label'] = __('Event Espresso', 'event_espresso');
74 74
 		}
75 75
 		return $map;
76 76
 	}
@@ -78,26 +78,26 @@  discard block
 block discarded – undo
78 78
 	/**
79 79
 	 * Checks if we're in maintenance mode, and if so we notify the admin adn tell them how to take the site OUT of maintenance mode
80 80
 	 */
81
-	public function check_maintenance_mode(){
81
+	public function check_maintenance_mode() {
82 82
 		$notice = '';
83 83
 		$maintenance_page_url = '';
84
-		if(EE_Maintenance_Mode::instance()->level()){
84
+		if (EE_Maintenance_Mode::instance()->level()) {
85 85
 			$maintenance_page_url = EE_Admin_Page::add_query_args_and_nonce(array(), EE_MAINTENANCE_ADMIN_URL);
86
-			switch(EE_Maintenance_Mode::instance()->level()){
86
+			switch (EE_Maintenance_Mode::instance()->level()) {
87 87
 				case EE_Maintenance_Mode::level_1_frontend_only_maintenance:
88 88
 					$notice = '<div class="update-nag">
89
-						' . sprintf(__("Event Espresso is in Frontend-Only MAINTENANCE MODE. This means the front-end (ie, non-wp-admin pages) is disabled for ALL users except site admins. Visit the %s Maintenance Page %s to disable maintenance mode.", "event_espresso"),"<a href='$maintenance_page_url'>","</a>").
89
+						' . sprintf(__("Event Espresso is in Frontend-Only MAINTENANCE MODE. This means the front-end (ie, non-wp-admin pages) is disabled for ALL users except site admins. Visit the %s Maintenance Page %s to disable maintenance mode.", "event_espresso"), "<a href='$maintenance_page_url'>", "</a>").
90 90
 					'</div>';
91 91
 					break;
92 92
 				case EE_Maintenance_Mode::level_2_complete_maintenance:
93
-						$notice =  '<div class="error">
93
+						$notice = '<div class="error">
94 94
 						<p>'. sprintf(__("As part of the process for updating Event Espresso, your database also
95
-needs to be updated. Event Espresso is in COMPLETE MAINTENANCE MODE (both WordPress admin pages and front-end event registration pages are disabled) until you run the database update script. %s Visit the Maintenance Page to get started,%s it only takes a moment.", "event_espresso"),"<a href='$maintenance_page_url'>","</a>").
95
+needs to be updated. Event Espresso is in COMPLETE MAINTENANCE MODE (both WordPress admin pages and front-end event registration pages are disabled) until you run the database update script. %s Visit the Maintenance Page to get started,%s it only takes a moment.", "event_espresso"), "<a href='$maintenance_page_url'>", "</a>").
96 96
 					'</div>';
97 97
 					break;
98 98
 			}
99 99
 		}
100
-		echo  apply_filters( 'FHEE__Maintenance_Admin_Page_Init__check_maintenance_mode__notice', $notice, $maintenance_page_url );
100
+		echo  apply_filters('FHEE__Maintenance_Admin_Page_Init__check_maintenance_mode__notice', $notice, $maintenance_page_url);
101 101
 	}
102 102
 
103 103
 } //end class Payments_Admin_Page_Init
Please login to merge, or discard this patch.
admin_pages/messages/templates/ee_msg_m_settings_content.template.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@
 block discarded – undo
5 5
 	<div class"mt-settings">
6 6
 		<form method="POST" action="" class="mt-settings-form<?php echo $show_form; ?>">
7 7
 			<?php echo $template_form_fields; ?>
8
-			<?php foreach ( $hidden_fields as $name => $field ) {
8
+			<?php foreach ($hidden_fields as $name => $field) {
9 9
 				echo $field['field'];
10 10
 			} ?> 
11 11
 			<input type="submit" value="<?php _e('Submit', 'event_espresso'); ?>" class="button-secondary mt-settings-submit no-drag" />
Please login to merge, or discard this patch.
admin_pages/registrations/EE_Attendee_Contact_List_Table.class.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   +36 added lines, -36 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@  discard block
 block discarded – undo
4 4
 class EE_Attendee_Contact_List_Table extends EE_Admin_List_Table {
5 5
 
6 6
 
7
-	public function __construct( $admin_page ) {
7
+	public function __construct($admin_page) {
8 8
 		parent::__construct($admin_page);
9 9
 	}
10 10
 
@@ -12,8 +12,8 @@  discard block
 block discarded – undo
12 12
 
13 13
 
14 14
 	protected function _setup_data() {
15
-		$this->_data = $this->_view != 'trash' ? $this->_admin_page->get_attendees( $this->_per_page ) : $this->_admin_page->get_attendees( $this->_per_page, FALSE, TRUE );
16
-		$this->_all_data_count = $this->_view != 'trash' ? $this->_admin_page->get_attendees( $this->_per_page, TRUE ) : $this->_admin_page->get_attendees( $this->_per_page,TRUE, TRUE );
15
+		$this->_data = $this->_view != 'trash' ? $this->_admin_page->get_attendees($this->_per_page) : $this->_admin_page->get_attendees($this->_per_page, FALSE, TRUE);
16
+		$this->_all_data_count = $this->_view != 'trash' ? $this->_admin_page->get_attendees($this->_per_page, TRUE) : $this->_admin_page->get_attendees($this->_per_page, TRUE, TRUE);
17 17
 	}
18 18
 
19 19
 
@@ -41,13 +41,13 @@  discard block
 block discarded – undo
41 41
 			);
42 42
 
43 43
 		$this->_sortable_columns = array(
44
-			'ATT_ID' => array( 'ATT_ID' => FALSE ),
45
-			'ATT_lname' => array( 'ATT_lname' => TRUE ), //true means its already sorted
46
-			'ATT_fname' => array( 'ATT_fname' => FALSE ),
47
-			'ATT_email' => array( 'ATT_email' => FALSE ),
48
-			'ATT_city' => array( 'ATT_city' => FALSE ),
49
-			'STA_ID' => array( 'STA_ID' => FALSE ),
50
-			'CNT_ISO' => array( 'CNT_ISO' => FALSE )
44
+			'ATT_ID' => array('ATT_ID' => FALSE),
45
+			'ATT_lname' => array('ATT_lname' => TRUE), //true means its already sorted
46
+			'ATT_fname' => array('ATT_fname' => FALSE),
47
+			'ATT_email' => array('ATT_email' => FALSE),
48
+			'ATT_city' => array('ATT_city' => FALSE),
49
+			'STA_ID' => array('STA_ID' => FALSE),
50
+			'CNT_ISO' => array('CNT_ISO' => FALSE)
51 51
 		);
52 52
 
53 53
 		$this->_hidden_columns = array();
@@ -64,9 +64,9 @@  discard block
 block discarded – undo
64 64
 
65 65
 
66 66
 	protected function _add_view_counts() {
67
-		$this->_views['in_use']['count'] = $this->_admin_page->get_attendees( $this->_per_page, TRUE );
68
-		if ( EE_Registry::instance()->CAP->current_user_can( 'ee_delete_contacts', 'espresso_registrations_delete_registration' ) ) {
69
-			$this->_views['trash']['count'] = $this->_admin_page->get_attendees( $this->_per_page,TRUE, TRUE );
67
+		$this->_views['in_use']['count'] = $this->_admin_page->get_attendees($this->_per_page, TRUE);
68
+		if (EE_Registry::instance()->CAP->current_user_can('ee_delete_contacts', 'espresso_registrations_delete_registration')) {
69
+			$this->_views['trash']['count'] = $this->_admin_page->get_attendees($this->_per_page, TRUE, TRUE);
70 70
 		}
71 71
 	}
72 72
 
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
 
90 90
 
91 91
 	function column_cb($item) {
92
-		return sprintf( '<input type="checkbox" name="checkbox[%1$s]" value="%1$s" />', /* $1%s */ $item->ID() );
92
+		return sprintf('<input type="checkbox" name="checkbox[%1$s]" value="%1$s" />', /* $1%s */ $item->ID());
93 93
 	}
94 94
 
95 95
 
@@ -97,9 +97,9 @@  discard block
 block discarded – undo
97 97
 
98 98
 
99 99
 	function column_ATT_ID($item) {
100
-		$content =  $item->ID();
100
+		$content = $item->ID();
101 101
 		$attendee_name = $item instanceof EE_Attendee ? $item->full_name() : '';
102
-		$content .= '  <span class="show-on-mobile-view-only">' . $attendee_name . '</span>';
102
+		$content .= '  <span class="show-on-mobile-view-only">'.$attendee_name.'</span>';
103 103
 		return $content;
104 104
 	}
105 105
 
@@ -110,8 +110,8 @@  discard block
 block discarded – undo
110 110
 	function column_ATT_lname($item) {
111 111
 
112 112
 		// edit attendee link
113
-		$edit_lnk_url = EE_Admin_Page::add_query_args_and_nonce( array( 'action'=>'edit_attendee', 'post'=>$item->ID() ), REG_ADMIN_URL );
114
-		$name_link = EE_Registry::instance()->CAP->current_user_can( 'ee_edit_contacts', 'espresso_registrations_edit_attendee' ) ?  '<a href="'.$edit_lnk_url.'" title="' . esc_attr__( 'Edit Contact', 'event_espresso' ) . '">' . $item->lname() . '</a>' : $item->lname();
113
+		$edit_lnk_url = EE_Admin_Page::add_query_args_and_nonce(array('action'=>'edit_attendee', 'post'=>$item->ID()), REG_ADMIN_URL);
114
+		$name_link = EE_Registry::instance()->CAP->current_user_can('ee_edit_contacts', 'espresso_registrations_edit_attendee') ? '<a href="'.$edit_lnk_url.'" title="'.esc_attr__('Edit Contact', 'event_espresso').'">'.$item->lname().'</a>' : $item->lname();
115 115
 		return $name_link;
116 116
 
117 117
 	}
@@ -124,30 +124,30 @@  discard block
 block discarded – undo
124 124
 		//Build row actions
125 125
 		$actions = array();
126 126
 		// edit attendee link
127
-		if ( EE_Registry::instance()->CAP->current_user_can( 'ee_edit_contacts', 'espresso_registrations_edit_attendee' ) ) {
128
-			$edit_lnk_url = EE_Admin_Page::add_query_args_and_nonce( array( 'action'=>'edit_attendee', 'post'=>$item->ID() ), REG_ADMIN_URL );
129
-			$actions['edit'] = '<a href="'.$edit_lnk_url.'" title="' . esc_attr__( 'Edit Contact', 'event_espresso' ) . '">' . __( 'Edit', 'event_espresso' ) . '</a>';
127
+		if (EE_Registry::instance()->CAP->current_user_can('ee_edit_contacts', 'espresso_registrations_edit_attendee')) {
128
+			$edit_lnk_url = EE_Admin_Page::add_query_args_and_nonce(array('action'=>'edit_attendee', 'post'=>$item->ID()), REG_ADMIN_URL);
129
+			$actions['edit'] = '<a href="'.$edit_lnk_url.'" title="'.esc_attr__('Edit Contact', 'event_espresso').'">'.__('Edit', 'event_espresso').'</a>';
130 130
 		}
131 131
 
132
-		if ( $this->_view == 'in_use' ) {
132
+		if ($this->_view == 'in_use') {
133 133
 			// trash attendee link
134
-			if ( EE_Registry::instance()->CAP->current_user_can( 'ee_delete_contacts', 'espresso_registrations_trash_attendees' ) ) {
135
-				$trash_lnk_url = EE_Admin_Page::add_query_args_and_nonce( array( 'action'=>'trash_attendees', 'ATT_ID'=>$item->ID() ), REG_ADMIN_URL );
136
-				$actions['trash'] = '<a href="'.$trash_lnk_url.'" title="' . esc_attr__( 'Move Contact to Trash', 'event_espresso' ) . '">' . __( 'Trash', 'event_espresso' ) . '</a>';
134
+			if (EE_Registry::instance()->CAP->current_user_can('ee_delete_contacts', 'espresso_registrations_trash_attendees')) {
135
+				$trash_lnk_url = EE_Admin_Page::add_query_args_and_nonce(array('action'=>'trash_attendees', 'ATT_ID'=>$item->ID()), REG_ADMIN_URL);
136
+				$actions['trash'] = '<a href="'.$trash_lnk_url.'" title="'.esc_attr__('Move Contact to Trash', 'event_espresso').'">'.__('Trash', 'event_espresso').'</a>';
137 137
 			}
138 138
 		} else {
139
-			if ( EE_Registry::instance()->CAP->current_user_can( 'ee_delete_contacts', 'espresso_registrations_restore_attendees' ) ) {
139
+			if (EE_Registry::instance()->CAP->current_user_can('ee_delete_contacts', 'espresso_registrations_restore_attendees')) {
140 140
 				// restore attendee link
141
-				$restore_lnk_url = EE_Admin_Page::add_query_args_and_nonce( array( 'action'=>'restore_attendees', 'ATT_ID'=>$item->ID() ), REG_ADMIN_URL );
142
-				$actions['restore'] = '<a href="'.$restore_lnk_url.'" title="' . esc_attr__( 'Restore Contact', 'event_espresso' ) . '">' . __( 'Restore', 'event_espresso' ) . '</a>';
141
+				$restore_lnk_url = EE_Admin_Page::add_query_args_and_nonce(array('action'=>'restore_attendees', 'ATT_ID'=>$item->ID()), REG_ADMIN_URL);
142
+				$actions['restore'] = '<a href="'.$restore_lnk_url.'" title="'.esc_attr__('Restore Contact', 'event_espresso').'">'.__('Restore', 'event_espresso').'</a>';
143 143
 			}
144 144
 		}
145 145
 
146
-		$edit_lnk_url = EE_Admin_Page::add_query_args_and_nonce( array( 'action'=>'edit_attendee', 'post'=>$item->ID() ), REG_ADMIN_URL );
147
-		$name_link = EE_Registry::instance()->CAP->current_user_can( 'ee_edit_contacts', 'espresso_registrations_edit_attendee' ) ?  '<a href="'.$edit_lnk_url.'" title="' . esc_attr__( 'Edit Contact', 'event_espresso' ) . '">' . $item->fname() . '</a>' : $item->fname();
146
+		$edit_lnk_url = EE_Admin_Page::add_query_args_and_nonce(array('action'=>'edit_attendee', 'post'=>$item->ID()), REG_ADMIN_URL);
147
+		$name_link = EE_Registry::instance()->CAP->current_user_can('ee_edit_contacts', 'espresso_registrations_edit_attendee') ? '<a href="'.$edit_lnk_url.'" title="'.esc_attr__('Edit Contact', 'event_espresso').'">'.$item->fname().'</a>' : $item->fname();
148 148
 
149 149
 		//Return the name contents
150
-		return sprintf('%1$s %2$s', $name_link, $this->row_actions($actions) );
150
+		return sprintf('%1$s %2$s', $name_link, $this->row_actions($actions));
151 151
 	}
152 152
 
153 153
 
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
 
156 156
 
157 157
 	function column_ATT_email($item) {
158
-		return '<a href="mailto:' . $item->email() . '">' . $item->email() . '</a>';
158
+		return '<a href="mailto:'.$item->email().'">'.$item->email().'</a>';
159 159
 	}
160 160
 
161 161
 
@@ -175,8 +175,8 @@  discard block
 block discarded – undo
175 175
 
176 176
 	function column_STA_ID($item) {
177 177
 		$states = EEM_State::instance()->get_all_states();
178
-		$state = isset( $states[ $item->state_ID() ] ) ? $states[ $item->state_ID() ]->get( 'STA_name' ) : $item->state_ID();
179
-		return ! is_numeric( $state ) ? $state : '';
178
+		$state = isset($states[$item->state_ID()]) ? $states[$item->state_ID()]->get('STA_name') : $item->state_ID();
179
+		return ! is_numeric($state) ? $state : '';
180 180
 	}
181 181
 
182 182
 
@@ -184,8 +184,8 @@  discard block
 block discarded – undo
184 184
 	function column_CNT_ISO($item) {
185 185
 		$countries = EEM_Country::instance()->get_all_countries();
186 186
 		//EEH_Debug_Tools::printr( $countries, '$countries  <br /><span style="font-size:10px;font-weight:normal;">' . __FILE__ . '<br />line no: ' . __LINE__ . '</span>', 'auto' );
187
-		$country = isset( $countries[ $item->country_ID() ] ) ? $countries[ $item->country_ID() ]->get( 'CNT_name' ) : $item->country_ID();
188
-		return ! is_numeric( $country ) ? $country : '';
187
+		$country = isset($countries[$item->country_ID()]) ? $countries[$item->country_ID()]->get('CNT_name') : $item->country_ID();
188
+		return ! is_numeric($country) ? $country : '';
189 189
 	}
190 190
 
191 191
 
Please login to merge, or discard this patch.