Passed
Pull Request — master (#337)
by
unknown
01:59
created
tribe-events/list/single-event.php 1 patch
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -9,8 +9,8 @@  discard block
 block discarded – undo
9 9
  * @package TribeEventsCalendarPro
10 10
  */
11 11
 
12
-if ( ! defined( 'ABSPATH' ) ) {
13
-	die( '-1' );
12
+if ( ! defined('ABSPATH')) {
13
+	die('-1');
14 14
 }
15 15
 
16 16
 // Setup an array of venue details for use later in the template.
@@ -21,46 +21,46 @@  discard block
 block discarded – undo
21 21
 $venue_address = tribe_get_address();
22 22
 
23 23
 // Venue.
24
-$has_venue_address = ( ! empty( $venue_details['address'] ) ) ? ' location' : '';
24
+$has_venue_address = ( ! empty($venue_details['address'])) ? ' location' : '';
25 25
 
26 26
 // Organizer.
27 27
 $organizer = tribe_get_organizer();
28 28
 
29 29
 // Event Image.
30
-echo wp_kses_post( tribe_event_featured_image( null, 'medium' ) );
30
+echo wp_kses_post(tribe_event_featured_image(null, 'medium'));
31 31
 ?>
32 32
 
33 33
 <div class="tribe-events-event-content">
34 34
 	<!-- Event Title -->
35
-	<?php do_action( 'tribe_events_before_the_event_title' ); ?>
35
+	<?php do_action('tribe_events_before_the_event_title'); ?>
36 36
 	<h2 class="tribe-events-list-event-title">
37
-		<a class="tribe-event-url" href="<?php echo esc_url( tribe_get_event_link() ); ?>" title="<?php the_title_attribute(); ?>" rel="bookmark">
37
+		<a class="tribe-event-url" href="<?php echo esc_url(tribe_get_event_link()); ?>" title="<?php the_title_attribute(); ?>" rel="bookmark">
38 38
 			<?php the_title(); ?>
39 39
 		</a>
40 40
 	</h2>
41
-	<?php do_action( 'tribe_events_after_the_event_title' ); ?>
41
+	<?php do_action('tribe_events_after_the_event_title'); ?>
42 42
 
43 43
 	<!-- Event Meta -->
44
-	<?php do_action( 'tribe_events_before_the_meta' ); ?>
44
+	<?php do_action('tribe_events_before_the_meta'); ?>
45 45
 	<div class="tribe-events-event-meta">
46
-		<div class="author <?php echo esc_attr( $has_venue_address ); ?>">
46
+		<div class="author <?php echo esc_attr($has_venue_address); ?>">
47 47
 
48 48
 			<!-- Schedule & Recurrence Details -->
49 49
 			<div class="tribe-event-schedule-details">
50
-				<?php echo wp_kses_post( tribe_events_event_schedule_details() ); ?>
50
+				<?php echo wp_kses_post(tribe_events_event_schedule_details()); ?>
51 51
 			</div>
52 52
 
53
-			<?php if ( $venue_details ) : ?>
53
+			<?php if ($venue_details) : ?>
54 54
 				<!-- Venue Display Info -->
55 55
 				<div class="tribe-events-venue-details">
56 56
 				<?php
57
-				$address_delimiter = empty( $venue_address ) ? ' ' : ', ';
57
+				$address_delimiter = empty($venue_address) ? ' ' : ', ';
58 58
 
59 59
 				// These details are already escaped in various ways earlier in the process.
60
-				echo implode( $address_delimiter, $venue_details );
60
+				echo implode($address_delimiter, $venue_details);
61 61
 
62
-				if ( tribe_show_google_map_link() ) {
63
-					echo wp_kses_post( tribe_get_map_link_html() );
62
+				if (tribe_show_google_map_link()) {
63
+					echo wp_kses_post(tribe_get_map_link_html());
64 64
 				}
65 65
 				?>
66 66
 				</div> <!-- .tribe-events-venue-details -->
@@ -70,29 +70,29 @@  discard block
 block discarded – undo
70 70
 	</div><!-- .tribe-events-event-meta -->
71 71
 
72 72
 	<!-- Event Cost -->
73
-	<?php if ( tribe_get_cost() ) : ?>
73
+	<?php if (tribe_get_cost()) : ?>
74 74
 		<div class="tribe-events-event-cost">
75
-			<?php esc_html_e( 'Price:', 'lsx' ); ?>
76
-			<span class="ticket-cost"><?php echo tribe_get_cost( null, true ); ?></span>
75
+			<?php esc_html_e('Price:', 'lsx'); ?>
76
+			<span class="ticket-cost"><?php echo tribe_get_cost(null, true); ?></span>
77 77
 			<?php
78 78
 			/**
79 79
 			 * Runs after cost is displayed in list style views
80 80
 			 *
81 81
 			 * @since 4.5
82 82
 			 */
83
-			do_action( 'tribe_events_inside_cost' )
83
+			do_action('tribe_events_inside_cost')
84 84
 			?>
85 85
 		</div>
86 86
 	<?php endif; ?>
87 87
 
88
-	<?php do_action( 'tribe_events_after_the_meta' ); ?>
88
+	<?php do_action('tribe_events_after_the_meta'); ?>
89 89
 
90 90
 	<!-- Event Content -->
91
-	<?php do_action( 'tribe_events_before_the_content' ); ?>
91
+	<?php do_action('tribe_events_before_the_content'); ?>
92 92
 	<div class="tribe-events-list-event-description tribe-events-content description entry-summary">
93
-		<?php echo wp_kses_post( tribe_events_get_the_excerpt() ); ?>
94
-		<a href="<?php echo esc_url( tribe_get_event_link() ); ?>" class="tribe-events-read-more" rel="bookmark"><?php esc_html_e( 'Find out more', 'lsx' ); ?></a>
93
+		<?php echo wp_kses_post(tribe_events_get_the_excerpt()); ?>
94
+		<a href="<?php echo esc_url(tribe_get_event_link()); ?>" class="tribe-events-read-more" rel="bookmark"><?php esc_html_e('Find out more', 'lsx'); ?></a>
95 95
 	</div><!-- .tribe-events-list-event-description -->
96 96
 
97
-	<?php do_action( 'tribe_events_after_the_content' ); ?>
97
+	<?php do_action('tribe_events_after_the_content'); ?>
98 98
 </div>
Please login to merge, or discard this patch.
tribe-events/list/single-featured.php 1 patch
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -9,52 +9,52 @@  discard block
 block discarded – undo
9 9
  * @package TribeEventsCalendarPro
10 10
  */
11 11
 
12
-if ( ! defined( 'ABSPATH' ) ) {
13
-	die( '-1' );
12
+if ( ! defined('ABSPATH')) {
13
+	die('-1');
14 14
 }
15 15
 
16 16
 // Setup an array of venue details for use later in the template.
17 17
 $venue_details = tribe_get_venue_details();
18 18
 
19 19
 // Venue.
20
-$has_venue_address = ( ! empty( $venue_details['address'] ) ) ? ' location' : '';
20
+$has_venue_address = ( ! empty($venue_details['address'])) ? ' location' : '';
21 21
 
22 22
 // Organizer.
23 23
 $organizer = tribe_get_organizer();
24 24
 
25 25
 // Event Image.
26
-echo wp_kses_post( tribe_event_featured_image( null, 'large' ) );
26
+echo wp_kses_post(tribe_event_featured_image(null, 'large'));
27 27
 ?>
28 28
 
29 29
 <div class="tribe-events-event-content">
30 30
 	<!-- Event Title -->
31
-	<?php do_action( 'tribe_events_before_the_event_title' ); ?>
31
+	<?php do_action('tribe_events_before_the_event_title'); ?>
32 32
 	<h2 class="tribe-events-list-event-title">
33
-		<a class="tribe-event-url" href="<?php echo esc_url( tribe_get_event_link() ); ?>" title="<?php the_title_attribute(); ?>" rel="bookmark">
33
+		<a class="tribe-event-url" href="<?php echo esc_url(tribe_get_event_link()); ?>" title="<?php the_title_attribute(); ?>" rel="bookmark">
34 34
 			<?php the_title(); ?>
35 35
 		</a>
36 36
 
37
-		<span class="label label-default"><?php esc_html_e( 'Featured', 'lsx' ); ?></span>
37
+		<span class="label label-default"><?php esc_html_e('Featured', 'lsx'); ?></span>
38 38
 	</h2>
39
-	<?php do_action( 'tribe_events_after_the_event_title' ); ?>
39
+	<?php do_action('tribe_events_after_the_event_title'); ?>
40 40
 
41 41
 	<!-- Event Meta -->
42
-	<?php do_action( 'tribe_events_before_the_meta' ); ?>
42
+	<?php do_action('tribe_events_before_the_meta'); ?>
43 43
 	<div class="tribe-events-event-meta">
44
-		<div class="author <?php echo esc_attr( $has_venue_address ); ?>">
44
+		<div class="author <?php echo esc_attr($has_venue_address); ?>">
45 45
 
46 46
 			<!-- Schedule & Recurrence Details -->
47 47
 			<div class="tribe-event-schedule-details">
48
-				<?php echo wp_kses_post( tribe_events_event_schedule_details() ); ?>
48
+				<?php echo wp_kses_post(tribe_events_event_schedule_details()); ?>
49 49
 			</div>
50 50
 
51
-			<?php if ( $venue_details ) : ?>
51
+			<?php if ($venue_details) : ?>
52 52
 				<!-- Venue Display Info -->
53 53
 				<div class="tribe-events-venue-details">
54
-					<?php echo wp_kses_post( implode( ', ', $venue_details ) ); ?>
54
+					<?php echo wp_kses_post(implode(', ', $venue_details)); ?>
55 55
 					<?php
56
-					if ( tribe_show_google_map_link() ) {
57
-						echo wp_kses_post( tribe_get_map_link_html() );
56
+					if (tribe_show_google_map_link()) {
57
+						echo wp_kses_post(tribe_get_map_link_html());
58 58
 					}
59 59
 					?>
60 60
 				</div> <!-- .tribe-events-venue-details -->
@@ -62,26 +62,26 @@  discard block
 block discarded – undo
62 62
 
63 63
 		</div>
64 64
 	</div><!-- .tribe-events-event-meta -->
65
-	<?php do_action( 'tribe_events_after_the_meta' ); ?>
65
+	<?php do_action('tribe_events_after_the_meta'); ?>
66 66
 
67 67
 	<!-- Event Cost -->
68
-	<?php if ( tribe_get_cost() ) : ?>
68
+	<?php if (tribe_get_cost()) : ?>
69 69
 		<div class="tribe-events-event-cost featured-event">
70
-			<?php esc_html_e( 'Price:', 'lsx' ); ?>
71
-			<span class="ticket-cost"><?php echo esc_html( tribe_get_cost( null, true ) ); ?></span>
70
+			<?php esc_html_e('Price:', 'lsx'); ?>
71
+			<span class="ticket-cost"><?php echo esc_html(tribe_get_cost(null, true)); ?></span>
72 72
 			<?php
73 73
 			/** This action is documented in the-events-calendar/src/views/list/single-event.php */
74
-			do_action( 'tribe_events_inside_cost' )
74
+			do_action('tribe_events_inside_cost')
75 75
 			?>
76 76
 		</div>
77 77
 	<?php endif; ?>
78 78
 
79 79
 	<!-- Event Content -->
80
-	<?php do_action( 'tribe_events_before_the_content' ); ?>
80
+	<?php do_action('tribe_events_before_the_content'); ?>
81 81
 	<div class="tribe-events-list-event-description tribe-events-content">
82
-		<?php echo wp_kses_post( tribe_events_get_the_excerpt() ); ?>
83
-		<a href="<?php echo esc_url( tribe_get_event_link() ); ?>" class="tribe-events-read-more" rel="bookmark"><?php esc_html_e( 'Find out more', 'lsx' ); ?></a>
82
+		<?php echo wp_kses_post(tribe_events_get_the_excerpt()); ?>
83
+		<a href="<?php echo esc_url(tribe_get_event_link()); ?>" class="tribe-events-read-more" rel="bookmark"><?php esc_html_e('Find out more', 'lsx'); ?></a>
84 84
 	</div><!-- .tribe-events-list-event-description -->
85 85
 
86
-	<?php do_action( 'tribe_events_after_the_content' ); ?>
86
+	<?php do_action('tribe_events_after_the_content'); ?>
87 87
 </div>
Please login to merge, or discard this patch.
tribe-events/day/single-event.php 1 patch
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -9,76 +9,76 @@
 block discarded – undo
9 9
  * @package TribeEventsCalendarPro
10 10
  */
11 11
 
12
-if ( ! defined( 'ABSPATH' ) ) {
13
-	die( '-1' );
12
+if ( ! defined('ABSPATH')) {
13
+	die('-1');
14 14
 }
15 15
 
16 16
 $venue_details = tribe_get_venue_details();
17 17
 
18 18
 // Venue microformats.
19
-$has_venue         = ( $venue_details ) ? ' vcard' : '';
20
-$has_venue_address = ( ! empty( $venue_details['address'] ) ) ? ' location' : '';
19
+$has_venue         = ($venue_details) ? ' vcard' : '';
20
+$has_venue_address = ( ! empty($venue_details['address'])) ? ' location' : '';
21 21
 
22 22
 // The address string via tribe_get_venue_details will often be populated even when there's
23 23
 // no address, so let's get the address string on its own for a couple of checks below.
24 24
 $venue_address = tribe_get_address();
25 25
 
26 26
 // Event Image.
27
-echo wp_kses_post( tribe_event_featured_image( null, 'medium' ) );
27
+echo wp_kses_post(tribe_event_featured_image(null, 'medium'));
28 28
 ?>
29 29
 
30 30
 <div class="tribe-events-event-content">
31 31
 	<!-- Event Title -->
32
-	<?php do_action( 'tribe_events_before_the_event_title' ); ?>
32
+	<?php do_action('tribe_events_before_the_event_title'); ?>
33 33
 	<h2 class="tribe-events-list-event-title summary">
34
-		<a class="url" href="<?php echo esc_url( tribe_get_event_link() ); ?>" title="<?php the_title_attribute(); ?>" rel="bookmark">
34
+		<a class="url" href="<?php echo esc_url(tribe_get_event_link()); ?>" title="<?php the_title_attribute(); ?>" rel="bookmark">
35 35
 			<?php the_title(); ?>
36 36
 		</a>
37 37
 	</h2>
38
-	<?php do_action( 'tribe_events_after_the_event_title' ); ?>
38
+	<?php do_action('tribe_events_after_the_event_title'); ?>
39 39
 
40 40
 	<!-- Event Meta -->
41
-	<?php do_action( 'tribe_events_before_the_meta' ); ?>
42
-	<div class="tribe-events-event-meta <?php echo esc_attr( $has_venue . $has_venue_address ); ?>">
41
+	<?php do_action('tribe_events_before_the_meta'); ?>
42
+	<div class="tribe-events-event-meta <?php echo esc_attr($has_venue . $has_venue_address); ?>">
43 43
 
44 44
 		<!-- Schedule & Recurrence Details -->
45 45
 		<div class="tribe-updated published time-details">
46
-			<?php echo wp_kses_post( tribe_events_event_schedule_details() ); ?>
46
+			<?php echo wp_kses_post(tribe_events_event_schedule_details()); ?>
47 47
 		</div>
48 48
 
49
-		<?php if ( $venue_details ) : ?>
49
+		<?php if ($venue_details) : ?>
50 50
 			<!-- Venue Display Info -->
51 51
 			<div class="tribe-events-venue-details">
52 52
 			<?php
53
-				$address_delimiter = empty( $venue_address ) ? ' ' : ', ';
53
+				$address_delimiter = empty($venue_address) ? ' ' : ', ';
54 54
 
55 55
 				// These details are already escaped in various ways earlier in the code.
56
-				echo implode( $address_delimiter, $venue_details );
56
+				echo implode($address_delimiter, $venue_details);
57 57
 			?>
58 58
 			</div> <!-- .tribe-events-venue-details -->
59 59
 		<?php endif; ?>
60 60
 
61 61
 	</div><!-- .tribe-events-event-meta -->
62 62
 
63
-	<?php if ( tribe_get_cost() ) : ?>
63
+	<?php if (tribe_get_cost()) : ?>
64 64
 		<div class="tribe-events-event-cost">
65
-			<?php esc_html_e( 'Price:', 'lsx' ); ?>
66
-			<span class="ticket-cost"><?php echo tribe_get_cost( null, true ); ?></span>
65
+			<?php esc_html_e('Price:', 'lsx'); ?>
66
+			<span class="ticket-cost"><?php echo tribe_get_cost(null, true); ?></span>
67 67
 			<?php
68 68
 			/** This action is documented in the-events-calendar/src/views/list/single-event.php */
69
-			do_action( 'tribe_events_inside_cost' )
69
+			do_action('tribe_events_inside_cost')
70 70
 			?>
71 71
 		</div>
72 72
 	<?php endif; ?>
73 73
 
74
-	<?php do_action( 'tribe_events_after_the_meta' ); ?>
74
+	<?php do_action('tribe_events_after_the_meta'); ?>
75 75
 
76 76
 	<!-- Event Content -->
77
-	<?php do_action( 'tribe_events_before_the_content' ); ?>
77
+	<?php do_action('tribe_events_before_the_content'); ?>
78 78
 	<div class="tribe-events-list-event-description tribe-events-content description entry-summary">
79
-		<?php echo wp_kses_post( tribe_events_get_the_excerpt() ); ?>
80
-		<a href="<?php echo esc_url( tribe_get_event_link() ); ?>" class="tribe-events-read-more" rel="bookmark"><?php esc_html_e( 'Find out more', 'lsx' ); ?></a>
79
+		<?php echo wp_kses_post(tribe_events_get_the_excerpt()); ?>
80
+		<a href="<?php echo esc_url(tribe_get_event_link()); ?>" class="tribe-events-read-more" rel="bookmark"><?php esc_html_e('Find out more', 'lsx'); ?></a>
81 81
 	</div><!-- .tribe-events-list-event-description -->
82 82
 
83
-	<?php do_action( 'tribe_events_after_the_content' ); ?>
83
+	<?php do_action('tribe_events_after_the_content'); ?>
84 84
 </div>
Please login to merge, or discard this patch.
tribe-events/day/single-featured.php 1 patch
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -9,66 +9,66 @@
 block discarded – undo
9 9
  * @package TribeEventsCalendarPro
10 10
  */
11 11
 
12
-if ( ! defined( 'ABSPATH' ) ) {
13
-	die( '-1' );
12
+if ( ! defined('ABSPATH')) {
13
+	die('-1');
14 14
 }
15 15
 
16 16
 $venue_details = tribe_get_venue_details();
17 17
 
18 18
 // Venue microformats.
19
-$has_venue         = ( $venue_details ) ? ' vcard' : '';
20
-$has_venue_address = ( ! empty( $venue_details['address'] ) ) ? ' location' : '';
19
+$has_venue         = ($venue_details) ? ' vcard' : '';
20
+$has_venue_address = ( ! empty($venue_details['address'])) ? ' location' : '';
21 21
 
22 22
 // Event Image.
23
-echo wp_kses_post( tribe_event_featured_image( null, 'large' ) );
23
+echo wp_kses_post(tribe_event_featured_image(null, 'large'));
24 24
 ?>
25 25
 
26 26
 <div class="tribe-events-event-content">
27 27
 	<!-- Event Title -->
28
-	<?php do_action( 'tribe_events_before_the_event_title' ); ?>
28
+	<?php do_action('tribe_events_before_the_event_title'); ?>
29 29
 	<h2 class="tribe-events-list-event-title summary">
30
-		<a class="url" href="<?php echo esc_url( tribe_get_event_link() ); ?>" title="<?php the_title_attribute(); ?>" rel="bookmark">
30
+		<a class="url" href="<?php echo esc_url(tribe_get_event_link()); ?>" title="<?php the_title_attribute(); ?>" rel="bookmark">
31 31
 			<?php the_title(); ?>
32 32
 		</a>
33 33
 	</h2>
34
-	<?php do_action( 'tribe_events_after_the_event_title' ); ?>
34
+	<?php do_action('tribe_events_after_the_event_title'); ?>
35 35
 
36 36
 	<!-- Event Meta -->
37
-	<?php do_action( 'tribe_events_before_the_meta' ); ?>
38
-	<div class="tribe-events-event-meta <?php echo esc_attr( $has_venue . $has_venue_address ); ?>">
37
+	<?php do_action('tribe_events_before_the_meta'); ?>
38
+	<div class="tribe-events-event-meta <?php echo esc_attr($has_venue . $has_venue_address); ?>">
39 39
 
40 40
 		<!-- Schedule & Recurrence Details -->
41 41
 		<div class="tribe-updated published time-details">
42
-			<?php echo wp_kses_post( tribe_events_event_schedule_details() ); ?>
42
+			<?php echo wp_kses_post(tribe_events_event_schedule_details()); ?>
43 43
 		</div>
44 44
 
45
-		<?php if ( $venue_details ) : ?>
45
+		<?php if ($venue_details) : ?>
46 46
 			<!-- Venue Display Info -->
47 47
 			<div class="tribe-events-venue-details">
48
-				<?php echo implode( ', ', $venue_details ); ?>
48
+				<?php echo implode(', ', $venue_details); ?>
49 49
 			</div> <!-- .tribe-events-venue-details -->
50 50
 		<?php endif; ?>
51 51
 
52 52
 	</div><!-- .tribe-events-event-meta -->
53
-	<?php do_action( 'tribe_events_after_the_meta' ); ?>
53
+	<?php do_action('tribe_events_after_the_meta'); ?>
54 54
 
55
-	<?php if ( tribe_get_cost() ) : ?>
55
+	<?php if (tribe_get_cost()) : ?>
56 56
 		<div class="tribe-events-event-cost">
57
-			<?php esc_html_e( 'Price:', 'lsx' ); ?>
58
-			<span class="ticket-cost"><?php echo tribe_get_cost( null, true ); ?></span>
57
+			<?php esc_html_e('Price:', 'lsx'); ?>
58
+			<span class="ticket-cost"><?php echo tribe_get_cost(null, true); ?></span>
59 59
 			<?php
60 60
 			/** This action is documented in the-events-calendar/src/views/list/single-event.php */
61
-			do_action( 'tribe_events_inside_cost' )
61
+			do_action('tribe_events_inside_cost')
62 62
 			?>
63 63
 		</div>
64 64
 	<?php endif; ?>
65 65
 
66 66
 	<!-- Event Content -->
67
-	<?php do_action( 'tribe_events_before_the_content' ); ?>
67
+	<?php do_action('tribe_events_before_the_content'); ?>
68 68
 	<div class="tribe-events-list-event-description tribe-events-content description entry-summary">
69
-		<?php echo wp_kses_post( tribe_events_get_the_excerpt() ); ?>
70
-		<a href="<?php echo esc_url( tribe_get_event_link() ); ?>" class="tribe-events-read-more" rel="bookmark"><?php esc_html_e( 'Find out more', 'lsx' ); ?></a>
69
+		<?php echo wp_kses_post(tribe_events_get_the_excerpt()); ?>
70
+		<a href="<?php echo esc_url(tribe_get_event_link()); ?>" class="tribe-events-read-more" rel="bookmark"><?php esc_html_e('Find out more', 'lsx'); ?></a>
71 71
 	</div><!-- .tribe-events-list-event-description -->
72 72
 
73
-	<?php do_action( 'tribe_events_after_the_content' ); ?>
73
+	<?php do_action('tribe_events_after_the_content'); ?>
74 74
 </div>
Please login to merge, or discard this patch.
tribe-events/pro/related-events.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -14,31 +14,31 @@
 block discarded – undo
14 14
  * @package TribeEventsCalendarPro
15 15
  */
16 16
 
17
-if ( ! defined( 'ABSPATH' ) ) {
18
-	die( '-1' );
17
+if ( ! defined('ABSPATH')) {
18
+	die('-1');
19 19
 }
20 20
 
21 21
 $posts = tribe_get_related_posts();
22 22
 
23
-if ( is_array( $posts ) && ! empty( $posts ) ) : ?>
23
+if (is_array($posts) && ! empty($posts)) : ?>
24 24
 <?php /* Translators: %s: related */ ?>
25
-<h3 class="tribe-events-related-events-title"><?php printf( esc_html__( 'Related %s', 'lsx' ), esc_html( tribe_get_event_label_plural() ) ); ?></h3>
25
+<h3 class="tribe-events-related-events-title"><?php printf(esc_html__('Related %s', 'lsx'), esc_html(tribe_get_event_label_plural())); ?></h3>
26 26
 
27 27
 <ul class="tribe-related-events tribe-clearfix">
28
-	<?php foreach ( $posts as $post ) : ?>
28
+	<?php foreach ($posts as $post) : ?>
29 29
 	<li>
30
-		<?php $thumb = ( has_post_thumbnail( $post->ID ) ) ? get_the_post_thumbnail( $post->ID, 'large' ) : '<img src="' . esc_url( trailingslashit( Tribe__Events__Pro__Main::instance()->pluginUrl ) . 'src/resources/images/tribe-related-events-placeholder.png' ) . '" alt="' . esc_attr( get_the_title( $post->ID ) ) . '" />'; ?>
30
+		<?php $thumb = (has_post_thumbnail($post->ID)) ? get_the_post_thumbnail($post->ID, 'large') : '<img src="' . esc_url(trailingslashit(Tribe__Events__Pro__Main::instance()->pluginUrl) . 'src/resources/images/tribe-related-events-placeholder.png') . '" alt="' . esc_attr(get_the_title($post->ID)) . '" />'; ?>
31 31
 		<div class="tribe-related-events-thumbnail">
32
-			<a href="<?php echo esc_url( tribe_get_event_link( $post ) ); ?>" class="url" rel="bookmark"><?php echo wp_kses_post( $thumb ); ?></a>
32
+			<a href="<?php echo esc_url(tribe_get_event_link($post)); ?>" class="url" rel="bookmark"><?php echo wp_kses_post($thumb); ?></a>
33 33
 		</div>
34 34
 		<div class="tribe-related-event-info">
35
-			<h3 class="tribe-related-events-title"><a href="<?php echo esc_url( tribe_get_event_link( $post ) ); ?>" class="tribe-event-url" rel="bookmark"><?php echo get_the_title( $post->ID ); ?></a></h3>
35
+			<h3 class="tribe-related-events-title"><a href="<?php echo esc_url(tribe_get_event_link($post)); ?>" class="tribe-event-url" rel="bookmark"><?php echo get_the_title($post->ID); ?></a></h3>
36 36
 			<?php
37
-			if ( Tribe__Events__Main::POSTTYPE === $post->post_type ) {
38
-				echo wp_kses_post( tribe_events_event_schedule_details( $post ) );
37
+			if (Tribe__Events__Main::POSTTYPE === $post->post_type) {
38
+				echo wp_kses_post(tribe_events_event_schedule_details($post));
39 39
 			}
40 40
 			?>
41
-			<a href="<?php echo esc_url( tribe_get_event_link( $post ) ); ?>" class="moretag"><?php esc_html_e( 'View event', 'lsx' ); ?></a>
41
+			<a href="<?php echo esc_url(tribe_get_event_link($post)); ?>" class="moretag"><?php esc_html_e('View event', 'lsx'); ?></a>
42 42
 		</div>
43 43
 	</li>
44 44
 	<?php endforeach; ?>
Please login to merge, or discard this patch.
includes/hooks.php 1 patch
Spacing   +44 added lines, -44 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@  discard block
 block discarded – undo
6 6
  * @subpackage hooks
7 7
  */
8 8
 
9
-if ( ! defined( 'ABSPATH' ) ) {
9
+if ( ! defined('ABSPATH')) {
10 10
 	exit;
11 11
 }
12 12
 
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
  * $lsx_supports[] = 'body';
17 17
  */
18 18
 function lsx_body_top() {
19
-	do_action( 'lsx_body_top' );
19
+	do_action('lsx_body_top');
20 20
 }
21 21
 
22 22
 /**
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
  * @return void
26 26
  */
27 27
 function lsx_body_bottom() {
28
-	do_action( 'lsx_body_bottom' );
28
+	do_action('lsx_body_bottom');
29 29
 }
30 30
 
31 31
 /**
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
  * $lsx_supports[] = 'head';
35 35
  */
36 36
 function lsx_head_top() {
37
-	do_action( 'lsx_head_top' );
37
+	do_action('lsx_head_top');
38 38
 }
39 39
 
40 40
 /**
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
  * @return void
44 44
  */
45 45
 function lsx_head_bottom() {
46
-	do_action( 'lsx_head_bottom' );
46
+	do_action('lsx_head_bottom');
47 47
 }
48 48
 
49 49
 /**
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
  * $lsx_supports[] = 'header';
53 53
  */
54 54
 function lsx_header_before() {
55
-	do_action( 'lsx_header_before' );
55
+	do_action('lsx_header_before');
56 56
 }
57 57
 
58 58
 /**
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
  * @return void
62 62
  */
63 63
 function lsx_header_after() {
64
-	do_action( 'lsx_header_after' );
64
+	do_action('lsx_header_after');
65 65
 }
66 66
 
67 67
 /**
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
  * @return void
71 71
  */
72 72
 function lsx_header_top() {
73
-	do_action( 'lsx_header_top' );
73
+	do_action('lsx_header_top');
74 74
 }
75 75
 
76 76
 /**
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
  * @return void
80 80
  */
81 81
 function lsx_header_bottom() {
82
-	do_action( 'lsx_header_bottom' );
82
+	do_action('lsx_header_bottom');
83 83
 }
84 84
 
85 85
 /**
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
  * @return void
89 89
  */
90 90
 function lsx_nav_before() {
91
-	do_action( 'lsx_nav_before' );
91
+	do_action('lsx_nav_before');
92 92
 }
93 93
 
94 94
 /**
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
  * @return void
98 98
  */
99 99
 function lsx_nav_after() {
100
-	do_action( 'lsx_nav_after' );
100
+	do_action('lsx_nav_after');
101 101
 }
102 102
 
103 103
 /**
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
  * $lsx_supports[] = 'banner';
107 107
  */
108 108
 function lsx_banner_content() {
109
-	do_action( 'lsx_banner_content' );
109
+	do_action('lsx_banner_content');
110 110
 }
111 111
 
112 112
 /**
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
  * @return void
116 116
  */
117 117
 function lsx_banner_inner_top() {
118
-	do_action( 'lsx_banner_inner_top' );
118
+	do_action('lsx_banner_inner_top');
119 119
 }
120 120
 
121 121
 /**
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
  * @return void
125 125
  */
126 126
 function lsx_banner_inner_bottom() {
127
-	do_action( 'lsx_banner_inner_bottom' );
127
+	do_action('lsx_banner_inner_bottom');
128 128
 }
129 129
 
130 130
 /**
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
  * $lsx_supports[] = 'global_header';
134 134
  */
135 135
 function lsx_global_header_inner_bottom() {
136
-	do_action( 'lsx_global_header_inner_bottom' );
136
+	do_action('lsx_global_header_inner_bottom');
137 137
 }
138 138
 
139 139
 /**
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
  * $lsx_supports[] = 'content';
143 143
  */
144 144
 function lsx_content_wrap_before() {
145
-	do_action( 'lsx_content_wrap_before' );
145
+	do_action('lsx_content_wrap_before');
146 146
 }
147 147
 
148 148
 /**
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
  * @return void
152 152
  */
153 153
 function lsx_content_wrap_after() {
154
-	do_action( 'lsx_content_wrap_after' );
154
+	do_action('lsx_content_wrap_after');
155 155
 }
156 156
 
157 157
 /**
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
  * @return void
161 161
  */
162 162
 function lsx_content_before() {
163
-	do_action( 'lsx_content_before' );
163
+	do_action('lsx_content_before');
164 164
 }
165 165
 
166 166
 /**
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
  * @return void
170 170
  */
171 171
 function lsx_content_after() {
172
-	do_action( 'lsx_content_after' );
172
+	do_action('lsx_content_after');
173 173
 }
174 174
 
175 175
 /**
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
  * @return void
179 179
  */
180 180
 function lsx_content_top() {
181
-	do_action( 'lsx_content_top' );
181
+	do_action('lsx_content_top');
182 182
 }
183 183
 
184 184
 /**
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
  * @return void
188 188
  */
189 189
 function lsx_content_bottom() {
190
-	do_action( 'lsx_content_bottom' );
190
+	do_action('lsx_content_bottom');
191 191
 }
192 192
 
193 193
 /**
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
  * @return void
197 197
  */
198 198
 function lsx_content_post_tags() {
199
-	do_action( 'lsx_content_post_tags' );
199
+	do_action('lsx_content_post_tags');
200 200
 }
201 201
 
202 202
 /**
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
  * @return void
206 206
  */
207 207
 function lsx_content_sharing() {
208
-	do_action( 'lsx_content_sharing' );
208
+	do_action('lsx_content_sharing');
209 209
 }
210 210
 
211 211
 /**
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
  * $lsx_supports[] = 'entry';
215 215
  */
216 216
 function lsx_entry_before() {
217
-	do_action( 'lsx_entry_before' );
217
+	do_action('lsx_entry_before');
218 218
 }
219 219
 
220 220
 /**
@@ -223,7 +223,7 @@  discard block
 block discarded – undo
223 223
  * @return void
224 224
  */
225 225
 function lsx_entry_after() {
226
-	do_action( 'lsx_entry_after' );
226
+	do_action('lsx_entry_after');
227 227
 }
228 228
 
229 229
 /**
@@ -232,7 +232,7 @@  discard block
 block discarded – undo
232 232
  * @return void
233 233
  */
234 234
 function lsx_entry_top() {
235
-	do_action( 'lsx_entry_top' );
235
+	do_action('lsx_entry_top');
236 236
 }
237 237
 
238 238
 /**
@@ -241,14 +241,14 @@  discard block
 block discarded – undo
241 241
  * @return void
242 242
  */
243 243
 function lsx_entry_bottom() {
244
-	do_action( 'lsx_entry_bottom' );
244
+	do_action('lsx_entry_bottom');
245 245
 }
246 246
 
247 247
 /**
248 248
  * Semantic <entry> hooks
249 249
  */
250 250
 function lsx_post_meta_top() {
251
-	do_action( 'lsx_post_meta_top' );
251
+	do_action('lsx_post_meta_top');
252 252
 }
253 253
 
254 254
 /**
@@ -257,7 +257,7 @@  discard block
 block discarded – undo
257 257
  * $lsx_supports[] = 'entry';
258 258
  */
259 259
 function lsx_widget_entry_before() {
260
-	do_action( 'lsx_widget_entry_before' );
260
+	do_action('lsx_widget_entry_before');
261 261
 }
262 262
 
263 263
 /**
@@ -266,7 +266,7 @@  discard block
 block discarded – undo
266 266
  * @return void
267 267
  */
268 268
 function lsx_widget_entry_after() {
269
-	do_action( 'lsx_widget_entry_after' );
269
+	do_action('lsx_widget_entry_after');
270 270
 }
271 271
 
272 272
 /**
@@ -275,7 +275,7 @@  discard block
 block discarded – undo
275 275
  * @return void
276 276
  */
277 277
 function lsx_widget_entry_top() {
278
-	do_action( 'lsx_widget_entry_top' );
278
+	do_action('lsx_widget_entry_top');
279 279
 }
280 280
 
281 281
 /**
@@ -284,7 +284,7 @@  discard block
 block discarded – undo
284 284
  * @return void
285 285
  */
286 286
 function lsx_widget_entry_bottom() {
287
-	do_action( 'lsx_widget_entry_bottom' );
287
+	do_action('lsx_widget_entry_bottom');
288 288
 }
289 289
 
290 290
 /**
@@ -293,7 +293,7 @@  discard block
 block discarded – undo
293 293
  * @return void
294 294
  */
295 295
 function lsx_widget_entry_content_top() {
296
-	do_action( 'lsx_widget_entry_content_top' );
296
+	do_action('lsx_widget_entry_content_top');
297 297
 }
298 298
 
299 299
 /**
@@ -302,7 +302,7 @@  discard block
 block discarded – undo
302 302
  * @return void
303 303
  */
304 304
 function lsx_widget_entry_content_bottom() {
305
-	do_action( 'lsx_widget_entry_content_bottom' );
305
+	do_action('lsx_widget_entry_content_bottom');
306 306
 }
307 307
 
308 308
 /**
@@ -311,7 +311,7 @@  discard block
 block discarded – undo
311 311
  * $lsx_supports[] = 'comments';
312 312
  */
313 313
 function lsx_comments_before() {
314
-	do_action( 'lsx_comments_before' );
314
+	do_action('lsx_comments_before');
315 315
 }
316 316
 
317 317
 /**
@@ -320,7 +320,7 @@  discard block
 block discarded – undo
320 320
  * @return void
321 321
  */
322 322
 function lsx_comments_after() {
323
-	do_action( 'lsx_comments_after' );
323
+	do_action('lsx_comments_after');
324 324
 }
325 325
 
326 326
 /**
@@ -329,7 +329,7 @@  discard block
 block discarded – undo
329 329
  * $lsx_supports[] = 'sidebar';
330 330
  */
331 331
 function lsx_sidebars_before() {
332
-	do_action( 'lsx_sidebars_before' );
332
+	do_action('lsx_sidebars_before');
333 333
 }
334 334
 
335 335
 /**
@@ -338,7 +338,7 @@  discard block
 block discarded – undo
338 338
  * @return void
339 339
  */
340 340
 function lsx_sidebars_after() {
341
-	do_action( 'lsx_sidebars_after' );
341
+	do_action('lsx_sidebars_after');
342 342
 }
343 343
 
344 344
 /**
@@ -347,7 +347,7 @@  discard block
 block discarded – undo
347 347
  * @return void
348 348
  */
349 349
 function lsx_sidebar_top() {
350
-	do_action( 'lsx_sidebar_top' );
350
+	do_action('lsx_sidebar_top');
351 351
 }
352 352
 
353 353
 /**
@@ -356,7 +356,7 @@  discard block
 block discarded – undo
356 356
  * @return void
357 357
  */
358 358
 function lsx_sidebar_bottom() {
359
-	do_action( 'lsx_sidebar_bottom' );
359
+	do_action('lsx_sidebar_bottom');
360 360
 }
361 361
 
362 362
 /**
@@ -365,7 +365,7 @@  discard block
 block discarded – undo
365 365
  * $lsx_supports[] = 'footer';
366 366
  */
367 367
 function lsx_footer_before() {
368
-	do_action( 'lsx_footer_before' );
368
+	do_action('lsx_footer_before');
369 369
 }
370 370
 
371 371
 /**
@@ -374,7 +374,7 @@  discard block
 block discarded – undo
374 374
  * @return void
375 375
  */
376 376
 function lsx_footer_after() {
377
-	do_action( 'lsx_footer_after' );
377
+	do_action('lsx_footer_after');
378 378
 }
379 379
 
380 380
 /**
@@ -383,7 +383,7 @@  discard block
 block discarded – undo
383 383
  * @return void
384 384
  */
385 385
 function lsx_footer_top() {
386
-	do_action( 'lsx_footer_top' );
386
+	do_action('lsx_footer_top');
387 387
 }
388 388
 
389 389
 /**
@@ -392,5 +392,5 @@  discard block
 block discarded – undo
392 392
  * @return void
393 393
  */
394 394
 function lsx_footer_bottom() {
395
-	do_action( 'lsx_footer_bottom' );
395
+	do_action('lsx_footer_bottom');
396 396
 }
Please login to merge, or discard this patch.
includes/widgets.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -6,11 +6,11 @@  discard block
 block discarded – undo
6 6
  * @subpackage widgets
7 7
  */
8 8
 
9
-if ( ! defined( 'ABSPATH' ) ) {
9
+if ( ! defined('ABSPATH')) {
10 10
 	exit;
11 11
 }
12 12
 
13
-if ( ! function_exists( 'lsx_widget_area_init' ) ) :
13
+if ( ! function_exists('lsx_widget_area_init')) :
14 14
 
15 15
 	/**
16 16
 	 * Register widgetized area and update sidebar with default widgets.
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
 	function lsx_widget_area_init() {
22 22
 		register_sidebar(
23 23
 			array(
24
-				'name'          => esc_html__( 'Home', 'lsx' ),
24
+				'name'          => esc_html__('Home', 'lsx'),
25 25
 				'id'            => 'sidebar-home',
26 26
 				'before_widget' => '<aside id="%1$s" class="widget %2$s">',
27 27
 				'after_widget'  => '</aside>',
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 
33 33
 		register_sidebar(
34 34
 			array(
35
-				'name'          => esc_html__( 'Sidebar', 'lsx' ),
35
+				'name'          => esc_html__('Sidebar', 'lsx'),
36 36
 				'id'            => 'sidebar-1',
37 37
 				'before_widget' => '<aside id="%1$s" class="widget %2$s">',
38 38
 				'after_widget'  => '</aside>',
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
 
44 44
 		register_sidebar(
45 45
 			array(
46
-				'name'          => esc_html__( 'Footer', 'lsx' ),
46
+				'name'          => esc_html__('Footer', 'lsx'),
47 47
 				'id'            => 'sidebar-footer',
48 48
 				'before_widget' => '<div class="styler"><aside id="%1$s" class="widget %2$s">',
49 49
 				'after_widget'  => '</aside></div>',
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
 
55 55
 		register_sidebar(
56 56
 			array(
57
-				'name'          => esc_html__( 'Footer Call to Action', 'lsx' ),
57
+				'name'          => esc_html__('Footer Call to Action', 'lsx'),
58 58
 				'id'            => 'sidebar-footer-cta',
59 59
 				'before_widget' => '<aside id="%1$s" class="widget %2$s">',
60 60
 				'after_widget'  => '</aside>',
@@ -66,9 +66,9 @@  discard block
 block discarded – undo
66 66
 
67 67
 endif;
68 68
 
69
-add_action( 'widgets_init', 'lsx_widget_area_init' );
69
+add_action('widgets_init', 'lsx_widget_area_init');
70 70
 
71
-if ( ! function_exists( 'lsx_sidebar_footer_params' ) ) :
71
+if ( ! function_exists('lsx_sidebar_footer_params')) :
72 72
 
73 73
 	/**
74 74
 	 * Register widgetized area and update sidebar with default widgets.
@@ -77,13 +77,13 @@  discard block
 block discarded – undo
77 77
 	 * @subpackage widgets
78 78
 	 * @return $params
79 79
 	 */
80
-	function lsx_sidebar_footer_params( $params ) {
80
+	function lsx_sidebar_footer_params($params) {
81 81
 		$sidebar_id = $params[0]['id'];
82 82
 
83
-		if ( 'sidebar-footer' === $sidebar_id ) {
83
+		if ('sidebar-footer' === $sidebar_id) {
84 84
 			$total_widgets              = wp_get_sidebars_widgets();
85
-			$sidebar_widgets            = count( $total_widgets[ $sidebar_id ] );
86
-			$params[0]['before_widget'] = str_replace( 'class="styler', 'class="col-md-' . floor( 12 / $sidebar_widgets ), $params[0]['before_widget'] );
85
+			$sidebar_widgets            = count($total_widgets[$sidebar_id]);
86
+			$params[0]['before_widget'] = str_replace('class="styler', 'class="col-md-' . floor(12 / $sidebar_widgets), $params[0]['before_widget']);
87 87
 		}
88 88
 
89 89
 		return $params;
@@ -91,4 +91,4 @@  discard block
 block discarded – undo
91 91
 
92 92
 endif;
93 93
 
94
-add_filter( 'dynamic_sidebar_params', 'lsx_sidebar_footer_params' );
94
+add_filter('dynamic_sidebar_params', 'lsx_sidebar_footer_params');
Please login to merge, or discard this patch.
includes/config.php 1 patch
Spacing   +59 added lines, -59 removed lines patch added patch discarded remove patch
@@ -6,11 +6,11 @@  discard block
 block discarded – undo
6 6
  * @subpackage config
7 7
  */
8 8
 
9
-if ( ! defined( 'ABSPATH' ) ) {
9
+if ( ! defined('ABSPATH')) {
10 10
 	exit;
11 11
 }
12 12
 
13
-if ( ! function_exists( 'lsx_setup' ) ) :
13
+if ( ! function_exists('lsx_setup')) :
14 14
 
15 15
 	/**
16 16
 	 * Theme after_setup_theme action.
@@ -22,26 +22,26 @@  discard block
 block discarded – undo
22 22
 		global $content_width;
23 23
 		$content_width = 1140;
24 24
 
25
-		load_theme_textdomain( 'lsx', get_template_directory() . '/languages' );
25
+		load_theme_textdomain('lsx', get_template_directory() . '/languages');
26 26
 
27
-		add_image_size( 'lsx-thumbnail-carousel', 350, 230, true );
28
-		add_image_size( 'lsx-thumbnail-wide', 360, 168, true );
29
-		add_image_size( 'lsx-thumbnail-square', 350, 350, true );
30
-		add_image_size( 'lsx-thumbnail-single', 750, 350, true );
31
-		add_image_size( 'lsx-banner', 1920, 600, true );
27
+		add_image_size('lsx-thumbnail-carousel', 350, 230, true);
28
+		add_image_size('lsx-thumbnail-wide', 360, 168, true);
29
+		add_image_size('lsx-thumbnail-square', 350, 350, true);
30
+		add_image_size('lsx-thumbnail-single', 750, 350, true);
31
+		add_image_size('lsx-banner', 1920, 600, true);
32 32
 
33 33
 		register_nav_menus(
34 34
 			array(
35
-				'primary'       => esc_html__( 'Primary Menu', 'lsx' ),
36
-				'top-menu'      => esc_html__( 'Top Menu (right)', 'lsx' ),
37
-				'top-menu-left' => esc_html__( 'Top Menu (left)', 'lsx' ),
38
-				'social'        => esc_html__( 'Social Menu', 'lsx' ),
39
-				'footer'        => esc_html__( 'Footer Menu', 'lsx' ),
35
+				'primary'       => esc_html__('Primary Menu', 'lsx'),
36
+				'top-menu'      => esc_html__('Top Menu (right)', 'lsx'),
37
+				'top-menu-left' => esc_html__('Top Menu (left)', 'lsx'),
38
+				'social'        => esc_html__('Social Menu', 'lsx'),
39
+				'footer'        => esc_html__('Footer Menu', 'lsx'),
40 40
 			)
41 41
 		);
42 42
 
43
-		add_theme_support( 'automatic-feed-links' );
44
-		add_theme_support( 'custom-background' );
43
+		add_theme_support('automatic-feed-links');
44
+		add_theme_support('custom-background');
45 45
 
46 46
 		add_theme_support(
47 47
 			'custom-logo',
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
 			)
54 54
 		);
55 55
 
56
-		add_theme_support( 'html5', array( 'caption' ) );
56
+		add_theme_support('html5', array('caption'));
57 57
 
58 58
 		add_theme_support(
59 59
 			'post-formats',
@@ -66,8 +66,8 @@  discard block
 block discarded – undo
66 66
 			)
67 67
 		);
68 68
 
69
-		add_theme_support( 'post-thumbnails' );
70
-		add_theme_support( 'sensei' );
69
+		add_theme_support('post-thumbnails');
70
+		add_theme_support('sensei');
71 71
 
72 72
 		add_theme_support(
73 73
 			'site-logo',
@@ -80,14 +80,14 @@  discard block
 block discarded – undo
80 80
 			)
81 81
 		);
82 82
 
83
-		add_theme_support( 'title-tag' );
83
+		add_theme_support('title-tag');
84 84
 
85 85
 		/*
86 86
 		 * @TODO - Necessary to test it
87 87
 		 */
88 88
 
89 89
 		// add_theme_support( 'woocommerce' );.
90
-		add_theme_support( 'starter-content', array(
90
+		add_theme_support('starter-content', array(
91 91
 			'widgets'     => array(
92 92
 				'sidebar-home'       => array(
93 93
 					'custom_widget_1' => array(
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
 
96 96
 						array(
97 97
 							'title' => '',
98
-							'text'  => wp_kses_post( '<div class="row"><div class="col-sm-12 text-center"><h3>Build your perfect website <small>with the LSX theme</small></h3></div></div><div class="row"><div class="col-sm-4 text-center"><h4>Fast</h4><p>"Quick" isn\'t a word most people use when describing their website building experience.</p></div><div class="col-sm-4 text-center"><h4>Easy</h4><p>We\'ve built websites for countless clients, and we know what kind of back-end makes sense easily.</p></div><div class="col-sm-4 text-center"><h4>Comprehensive</h4><p>The LSX extensions come with features out the box that are essential.</p></div></div>' ),
98
+							'text'  => wp_kses_post('<div class="row"><div class="col-sm-12 text-center"><h3>Build your perfect website <small>with the LSX theme</small></h3></div></div><div class="row"><div class="col-sm-4 text-center"><h4>Fast</h4><p>"Quick" isn\'t a word most people use when describing their website building experience.</p></div><div class="col-sm-4 text-center"><h4>Easy</h4><p>We\'ve built websites for countless clients, and we know what kind of back-end makes sense easily.</p></div><div class="col-sm-4 text-center"><h4>Comprehensive</h4><p>The LSX extensions come with features out the box that are essential.</p></div></div>'),
99 99
 						),
100 100
 					),
101 101
 
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
 
105 105
 						array(
106 106
 							'title' => '',
107
-							'text'  => wp_kses_post( '<div class="lsx-full-width-alt"><div class="row"><div class="col-xs-12"><h3>A big CTA title</h3><p class="text-center"><a class="btn cta-btn" href="http://www.lsdeb.biz/" target="_blank" rel="noreferrer noopener">Hire Us</a><p></div></div></div>' ),
107
+							'text'  => wp_kses_post('<div class="lsx-full-width-alt"><div class="row"><div class="col-xs-12"><h3>A big CTA title</h3><p class="text-center"><a class="btn cta-btn" href="http://www.lsdeb.biz/" target="_blank" rel="noreferrer noopener">Hire Us</a><p></div></div></div>'),
108 108
 						),
109 109
 					),
110 110
 
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
 
114 114
 						array(
115 115
 							'title' => '',
116
-							'text'  => wp_kses_post( '<div class="row"><div class="col-xs-12"><h3>Homepage Widget</h3><p>Lorem ipsum dolor sit amet, <a href="#">consectetuer adipiscing elit</a>. Donec odio. Quisque volutpat mattis eros. Nullam malesuada erat ut turpis. Suspendisse urna nibh, viverra non, semper suscipit, posuere a, pede.</p></div></div>' ),
116
+							'text'  => wp_kses_post('<div class="row"><div class="col-xs-12"><h3>Homepage Widget</h3><p>Lorem ipsum dolor sit amet, <a href="#">consectetuer adipiscing elit</a>. Donec odio. Quisque volutpat mattis eros. Nullam malesuada erat ut turpis. Suspendisse urna nibh, viverra non, semper suscipit, posuere a, pede.</p></div></div>'),
117 117
 						),
118 118
 					),
119 119
 				),
@@ -123,8 +123,8 @@  discard block
 block discarded – undo
123 123
 						'text',
124 124
 
125 125
 						array(
126
-							'title' => esc_html__( 'Space for Footer Widgets', 'lsx' ),
127
-							'text'  => esc_html__( 'This is here to showcase some footer widgets. You can decide what to add and what to hide. Nam nostrum evertitur ad, ut pri nibh veniam, urbanitas definitionem eum ex.', 'lsx' ),
126
+							'title' => esc_html__('Space for Footer Widgets', 'lsx'),
127
+							'text'  => esc_html__('This is here to showcase some footer widgets. You can decide what to add and what to hide. Nam nostrum evertitur ad, ut pri nibh veniam, urbanitas definitionem eum ex.', 'lsx'),
128 128
 						),
129 129
 					),
130 130
 
@@ -132,8 +132,8 @@  discard block
 block discarded – undo
132 132
 						'text',
133 133
 
134 134
 						array(
135
-							'title' => esc_html__( 'Space for Footer Widgets', 'lsx' ),
136
-							'text'  => esc_html__( 'This is here to showcase some footer widgets. You can decide what to add and what to hide. Nam nostrum evertitur ad, ut pri nibh veniam, urbanitas definitionem eum ex.', 'lsx' ),
135
+							'title' => esc_html__('Space for Footer Widgets', 'lsx'),
136
+							'text'  => esc_html__('This is here to showcase some footer widgets. You can decide what to add and what to hide. Nam nostrum evertitur ad, ut pri nibh veniam, urbanitas definitionem eum ex.', 'lsx'),
137 137
 						),
138 138
 					),
139 139
 
@@ -141,8 +141,8 @@  discard block
 block discarded – undo
141 141
 						'text',
142 142
 
143 143
 						array(
144
-							'title' => esc_html__( 'Contact us:', 'lsx' ),
145
-							'text'  => wp_kses_post( '<a href="mailto:[email protected]><i class="fa fa-envelope fa-fw"></i> [email protected]</a><br><a href="tel:+27214489843"><i class="fa fa-phone fa-fw"></i> +27 21 448 9843</a><br><i class="fa fa-skype fa-fw"></i> /lightspeeddevelopment' ),
144
+							'title' => esc_html__('Contact us:', 'lsx'),
145
+							'text'  => wp_kses_post('<a href="mailto:[email protected]><i class="fa fa-envelope fa-fw"></i> [email protected]</a><br><a href="tel:+27214489843"><i class="fa fa-phone fa-fw"></i> +27 21 448 9843</a><br><i class="fa fa-skype fa-fw"></i> /lightspeeddevelopment'),
146 146
 						),
147 147
 					),
148 148
 				),
@@ -152,8 +152,8 @@  discard block
 block discarded – undo
152 152
 						'text',
153 153
 
154 154
 						array(
155
-							'title' => esc_html__( 'A Footer Call to Action', 'lsx' ),
156
-							'text'  => esc_html__( 'Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec odio. Quisque volutpat mattis eros. Nullam malesuada erat ut turpis. Suspendisse urna nibh, viverra non, semper suscipit, posuere a, pede.', 'lsx' ),
155
+							'title' => esc_html__('A Footer Call to Action', 'lsx'),
156
+							'text'  => esc_html__('Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec odio. Quisque volutpat mattis eros. Nullam malesuada erat ut turpis. Suspendisse urna nibh, viverra non, semper suscipit, posuere a, pede.', 'lsx'),
157 157
 						),
158 158
 					),
159 159
 				),
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
 				'home'    => array(
164 164
 					'template'     => 'page-templates/template-front-page.php',
165 165
 					'thumbnail'    => '{{image-banner-example-01}}',
166
-					'post_title'   => esc_html__( 'LSX is a free WordPress theme', 'lsx' ),
166
+					'post_title'   => esc_html__('LSX is a free WordPress theme', 'lsx'),
167 167
 					'post_content' => '',
168 168
 				),
169 169
 
@@ -180,17 +180,17 @@  discard block
 block discarded – undo
180 180
 
181 181
 			'attachments' => array(
182 182
 				'image-banner-example-01' => array(
183
-					'post_title' => esc_html_x( 'Banner Example 01', 'Theme starter content', 'lsx' ),
183
+					'post_title' => esc_html_x('Banner Example 01', 'Theme starter content', 'lsx'),
184 184
 					'file'       => 'assets/images/admin/banner-example-01.jpg',
185 185
 				),
186 186
 
187 187
 				'image-banner-example-02' => array(
188
-					'post_title' => esc_html_x( 'Banner Example 02', 'Theme starter content', 'lsx' ),
188
+					'post_title' => esc_html_x('Banner Example 02', 'Theme starter content', 'lsx'),
189 189
 					'file'       => 'assets/images/admin/banner-example-02.jpg',
190 190
 				),
191 191
 
192 192
 				'image-banner-example-03' => array(
193
-					'post_title' => esc_html_x( 'Banner Example 03', 'Theme starter content', 'lsx' ),
193
+					'post_title' => esc_html_x('Banner Example 03', 'Theme starter content', 'lsx'),
194 194
 					'file'       => 'assets/images/admin/banner-example-03.jpg',
195 195
 				),
196 196
 			),
@@ -199,12 +199,12 @@  discard block
 block discarded – undo
199 199
 				'show_on_front'   => 'page',
200 200
 				'page_on_front'   => '{{home}}',
201 201
 				'page_for_posts'  => '{{blog}}',
202
-				'blogdescription' => esc_html__( 'LSX starter content example', 'lsx' ),
202
+				'blogdescription' => esc_html__('LSX starter content example', 'lsx'),
203 203
 			),
204 204
 
205 205
 			'nav_menus'   => array(
206 206
 				'primary'  => array(
207
-					'name'  => esc_html__( 'Primary Menu', 'lsx' ),
207
+					'name'  => esc_html__('Primary Menu', 'lsx'),
208 208
 
209 209
 					'items' => array(
210 210
 						'page_home',
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
 				),
216 216
 
217 217
 				'top-menu' => array(
218
-					'name'  => esc_html__( 'Top Menu', 'lsx' ),
218
+					'name'  => esc_html__('Top Menu', 'lsx'),
219 219
 
220 220
 					'items' => array(
221 221
 						'custom_link_1' => array(
@@ -243,7 +243,7 @@  discard block
 block discarded – undo
243 243
 				),
244 244
 
245 245
 				'social'   => array(
246
-					'name'  => esc_html__( 'Social Menu', 'lsx' ),
246
+					'name'  => esc_html__('Social Menu', 'lsx'),
247 247
 
248 248
 					'items' => array(
249 249
 						'link_facebook',
@@ -258,7 +258,7 @@  discard block
 block discarded – undo
258 258
 				),
259 259
 
260 260
 				'footer'   => array(
261
-					'name'  => esc_html__( 'Footer Menu', 'lsx' ),
261
+					'name'  => esc_html__('Footer Menu', 'lsx'),
262 262
 
263 263
 					'items' => array(
264 264
 						'page_about',
@@ -272,14 +272,14 @@  discard block
 block discarded – undo
272 272
 				'lsx_header_search' => false,
273 273
 				'lsx_layout'        => '1c',
274 274
 			),
275
-		) );
275
+		));
276 276
 	}
277 277
 
278 278
 endif;
279 279
 
280
-add_action( 'after_setup_theme', 'lsx_setup' );
280
+add_action('after_setup_theme', 'lsx_setup');
281 281
 
282
-if ( ! function_exists( 'lsx_init' ) ) :
282
+if ( ! function_exists('lsx_init')) :
283 283
 
284 284
 	/**
285 285
 	 * Theme init action.
@@ -288,20 +288,20 @@  discard block
 block discarded – undo
288 288
 	 * @subpackage config
289 289
 	 */
290 290
 	function lsx_init() {
291
-		add_post_type_support( 'page', 'excerpt' );
291
+		add_post_type_support('page', 'excerpt');
292 292
 
293
-		if ( class_exists( 'WooCommerce' ) ) {
294
-			remove_action( 'woocommerce_before_main_content', 'woocommerce_breadcrumb', 20 );
293
+		if (class_exists('WooCommerce')) {
294
+			remove_action('woocommerce_before_main_content', 'woocommerce_breadcrumb', 20);
295 295
 		}
296 296
 
297
-		remove_action( 'comment_form', 'wp_comment_form_unfiltered_html_nonce', 10 );
297
+		remove_action('comment_form', 'wp_comment_form_unfiltered_html_nonce', 10);
298 298
 	}
299 299
 
300 300
 endif;
301 301
 
302
-add_action( 'init', 'lsx_init', 100 );
302
+add_action('init', 'lsx_init', 100);
303 303
 
304
-if ( ! function_exists( 'lsx_process_content_width' ) ) :
304
+if ( ! function_exists('lsx_process_content_width')) :
305 305
 
306 306
 	/**
307 307
 	 * Overwrite the $content_width var, based on the layout of the page.
@@ -313,8 +313,8 @@  discard block
 block discarded – undo
313 313
 		global $content_width;
314 314
 
315 315
 		if (
316
-			is_page_template( 'page-templates/template-front-page.php' ) ||
317
-			is_page_template( 'page-templates/template-full-width.php' )
316
+			is_page_template('page-templates/template-front-page.php') ||
317
+			is_page_template('page-templates/template-full-width.php')
318 318
 		) {
319 319
 			$content_width = 1140;
320 320
 		}
@@ -322,9 +322,9 @@  discard block
 block discarded – undo
322 322
 
323 323
 endif;
324 324
 
325
-add_action( 'wp_head', 'lsx_process_content_width' );
325
+add_action('wp_head', 'lsx_process_content_width');
326 326
 
327
-if ( ! function_exists( 'lsx_file_get_contents' ) ) :
327
+if ( ! function_exists('lsx_file_get_contents')) :
328 328
 
329 329
 	/**
330 330
 	 * Get file contents.
@@ -332,19 +332,19 @@  discard block
 block discarded – undo
332 332
 	 * @package    lsx
333 333
 	 * @subpackage config
334 334
 	 */
335
-	function lsx_file_get_contents( $file ) {
336
-		if ( file_exists( $file ) ) {
335
+	function lsx_file_get_contents($file) {
336
+		if (file_exists($file)) {
337 337
 			global $wp_filesystem;
338 338
 
339
-			if ( empty( $wp_filesystem ) ) {
339
+			if (empty($wp_filesystem)) {
340 340
 				require_once ABSPATH . 'wp-admin/includes/file.php';
341 341
 				WP_Filesystem();
342 342
 			}
343 343
 
344
-			if ( $wp_filesystem ) {
345
-				$contents = $wp_filesystem->get_contents( $file );
344
+			if ($wp_filesystem) {
345
+				$contents = $wp_filesystem->get_contents($file);
346 346
 
347
-				if ( ! empty( $contents ) ) {
347
+				if ( ! empty($contents)) {
348 348
 					return $contents;
349 349
 				}
350 350
 			}
Please login to merge, or discard this patch.
includes/sanitize.php 1 patch
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -6,11 +6,11 @@  discard block
 block discarded – undo
6 6
  * @subpackage sanitize
7 7
  */
8 8
 
9
-if ( ! defined( 'ABSPATH' ) ) {
9
+if ( ! defined('ABSPATH')) {
10 10
 	exit;
11 11
 }
12 12
 
13
-if ( ! function_exists( 'lsx_sanitize_choices' ) ) :
13
+if ( ! function_exists('lsx_sanitize_choices')) :
14 14
 
15 15
 	/**
16 16
 	 * Sanitize a value from a list of allowed values.
@@ -22,18 +22,18 @@  discard block
 block discarded – undo
22 22
 	 * @param mixed $setting    The setting for which the sanitizing is occurring.
23 23
 	 * @return mixed                The sanitized value.
24 24
 	 */
25
-	function lsx_sanitize_choices( $value, $setting ) {
26
-		if ( is_object( $setting ) ) {
25
+	function lsx_sanitize_choices($value, $setting) {
26
+		if (is_object($setting)) {
27 27
 			$setting = $setting->id;
28 28
 		}
29 29
 
30
-		$choices = lsx_customizer_sanitize_get_choices( $setting );
30
+		$choices = lsx_customizer_sanitize_get_choices($setting);
31 31
 
32
-		if ( ! is_wp_error( $choices ) && ! empty( $choices ) ) {
33
-			$allowed_choices = array_keys( $choices );
32
+		if ( ! is_wp_error($choices) && ! empty($choices)) {
33
+			$allowed_choices = array_keys($choices);
34 34
 
35
-			if ( ! in_array( $value, $allowed_choices ) ) {
36
-				$value = lsx_customizer_sanitize_get_default( $setting );
35
+			if ( ! in_array($value, $allowed_choices)) {
36
+				$value = lsx_customizer_sanitize_get_default($setting);
37 37
 			}
38 38
 
39 39
 			return $value;
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 
45 45
 endif;
46 46
 
47
-if ( ! function_exists( 'lsx_customizer_sanitize_get_choices' ) ) :
47
+if ( ! function_exists('lsx_customizer_sanitize_get_choices')) :
48 48
 
49 49
 	/**
50 50
 	 * Helper function to return the choices for a field.
@@ -55,14 +55,14 @@  discard block
 block discarded – undo
55 55
 	 * @param string
56 56
 	 * @return mixed $field
57 57
 	 */
58
-	function lsx_customizer_sanitize_get_choices( $id ) {
58
+	function lsx_customizer_sanitize_get_choices($id) {
59 59
 		global $lsx_customizer;
60 60
 
61
-		$can_validate = method_exists( 'WP_Customize_Setting', 'validate' );
62
-		$field        = $lsx_customizer->get_control( $id );
61
+		$can_validate = method_exists('WP_Customize_Setting', 'validate');
62
+		$field        = $lsx_customizer->get_control($id);
63 63
 
64
-		if ( ! isset( $field['choices'] ) ) {
65
-			return $can_validate ? new WP_Error( 'notexists', esc_html__( 'Choice doesn\'t exist', 'lsx' ) ) : false;
64
+		if ( ! isset($field['choices'])) {
65
+			return $can_validate ? new WP_Error('notexists', esc_html__('Choice doesn\'t exist', 'lsx')) : false;
66 66
 		}
67 67
 
68 68
 		return $field['choices'];
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
 
71 71
 endif;
72 72
 
73
-if ( ! function_exists( 'lsx_customizer_sanitize_get_default' ) ) :
73
+if ( ! function_exists('lsx_customizer_sanitize_get_default')) :
74 74
 
75 75
 	/**
76 76
 	 * Helper function to return defaults.
@@ -81,11 +81,11 @@  discard block
 block discarded – undo
81 81
 	 * @param string
82 82
 	 * @return mixed $default
83 83
 	 */
84
-	function lsx_customizer_sanitize_get_default( $id ) {
84
+	function lsx_customizer_sanitize_get_default($id) {
85 85
 		global $lsx_customizer;
86
-		$setting = $lsx_customizer->get_setting( $id );
86
+		$setting = $lsx_customizer->get_setting($id);
87 87
 
88
-		if ( isset( $setting['default'] ) ) {
88
+		if (isset($setting['default'])) {
89 89
 			return $setting['default'];
90 90
 		}
91 91
 
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
 
95 95
 endif;
96 96
 
97
-if ( ! function_exists( 'lsx_sanitize_checkbox' ) ) :
97
+if ( ! function_exists('lsx_sanitize_checkbox')) :
98 98
 
99 99
 	/**
100 100
 	 * Sanitizes an single or multiple checkbox input.
@@ -105,11 +105,11 @@  discard block
 block discarded – undo
105 105
 	 * @param array $input
106 106
 	 * @return array $output
107 107
 	 */
108
-	function lsx_sanitize_checkbox( $input ) {
109
-		$can_validate = method_exists( 'WP_Customize_Setting', 'validate' );
108
+	function lsx_sanitize_checkbox($input) {
109
+		$can_validate = method_exists('WP_Customize_Setting', 'validate');
110 110
 
111
-		if ( ! is_bool( $input ) ) {
112
-			return $can_validate ? new WP_Error( 'notboolean', esc_html__( 'Not a boolean', 'lsx' ) ) : false;
111
+		if ( ! is_bool($input)) {
112
+			return $can_validate ? new WP_Error('notboolean', esc_html__('Not a boolean', 'lsx')) : false;
113 113
 		}
114 114
 
115 115
 		return $input;
Please login to merge, or discard this patch.