Completed
Branch FET-7988-evertec-needs (20e248)
by
unknown
824:36 queued 813:30
created
public/Espresso_Arabica_2014/loop-espresso_venues.php 2 patches
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -10,30 +10,30 @@
 block discarded – undo
10 10
  * @ version		4+
11 11
  */
12 12
 
13
-if ( have_posts() ) : ?>
13
+if (have_posts()) : ?>
14 14
 
15 15
 	<header class="page-header">
16 16
 		<h1 class="page-title">
17
-			<?php echo __( 'Event Venues', 'event_espresso' ); ?>
17
+			<?php echo __('Event Venues', 'event_espresso'); ?>
18 18
 		</h1>
19 19
 	</header><!-- .page-header -->
20 20
 	
21 21
 <?php 
22 22
 	// allow other stuff
23
-	do_action( 'AHEE__archive_espresso_venues_template__before_loop' ); 
23
+	do_action('AHEE__archive_espresso_venues_template__before_loop'); 
24 24
 	// Start the Loop.
25
-	while ( have_posts() ) : the_post();
25
+	while (have_posts()) : the_post();
26 26
 		// Include the post TYPE-specific template for the content.
27
-		espresso_get_template_part( 'content', 'espresso_venues' );
27
+		espresso_get_template_part('content', 'espresso_venues');
28 28
 	endwhile;
29 29
 	// Previous/next page navigation.
30 30
 	espresso_pagination();
31 31
 	// allow moar other stuff
32
-	do_action( 'AHEE__archive_espresso_venues_template__after_loop' ); 
32
+	do_action('AHEE__archive_espresso_venues_template__after_loop'); 
33 33
 
34 34
 
35 35
 else :
36 36
 	// If no content, include the "No posts found" template.
37
-	espresso_get_template_part( 'content', 'none' );
37
+	espresso_get_template_part('content', 'none');
38 38
 	
39 39
 endif;
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,8 +32,10 @@
 block discarded – undo
32 32
 	do_action( 'AHEE__archive_espresso_venues_template__after_loop' ); 
33 33
 
34 34
 
35
-else :
35
+else {
36
+	:
36 37
 	// If no content, include the "No posts found" template.
37 38
 	espresso_get_template_part( 'content', 'none' );
39
+}
38 40
 	
39 41
 endif;
Please login to merge, or discard this patch.
public/Espresso_Arabica_2014/single-espresso_events.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-event-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_events' );
23
+					espresso_get_template_part('content', 'espresso_events');
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.
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_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_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
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.
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,24 +77,24 @@  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 ) {
87
-			$payment_method_slug = EE_Registry::instance()->REQ->get( 'ee_payment_method', NULL );
88
-			if( $payment_method_slug ) {
89
-				$payment_method = EEM_Payment_Method::instance()->get_one_by_slug( $payment_method_slug );
90
-			}else{
86
+		if ($this->_current_txn instanceof EE_Transaction) {
87
+			$payment_method_slug = EE_Registry::instance()->REQ->get('ee_payment_method', NULL);
88
+			if ($payment_method_slug) {
89
+				$payment_method = EEM_Payment_Method::instance()->get_one_by_slug($payment_method_slug);
90
+			} else {
91 91
 				$payment_method = null;
92 92
 			}
93 93
 			/** @type EE_Payment_Processor $payment_processor */
94 94
 			$payment_processor = EE_Registry::instance()->load_core('Payment_Processor');
95
-			$payment_processor->process_ipn( $_REQUEST, $this->_current_txn, $payment_method );
95
+			$payment_processor->process_ipn($_REQUEST, $this->_current_txn, $payment_method);
96 96
 			//allow gateways to add a filter to stop rendering the page
97
-			if( apply_filters( 'FHEE__EES_Espresso_Txn_Page__run__exit', FALSE ) ){
97
+			if (apply_filters('FHEE__EES_Espresso_Txn_Page__run__exit', FALSE)) {
98 98
 				exit;
99 99
 			}
100 100
 		}
@@ -111,8 +111,8 @@  discard block
 block discarded – undo
111 111
 	 *  @param		array 	$attributes
112 112
 	 *  @return 	string
113 113
 	 */
114
-	public function process_shortcode( $attributes = array() ) {
115
-		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' );
114
+	public function process_shortcode($attributes = array()) {
115
+		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 116
 	}
117 117
 
118 118
 
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.
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.
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( '>=', current_time( 'mysql' ));
318
+				if ( ! $show_expired) {
319
+					$where['Datetime.DTT_EVT_end'] = array('>=', current_time('mysql'));
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.