Passed
Push — master ( e5304e...cf5220 )
by Warwick
01:56
created
includes/classes/class-lsx-wc-widget-recent-reviews.php 1 patch
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-if ( ! defined( 'ABSPATH' ) ) {
3
+if ( ! defined('ABSPATH')) {
4 4
 	exit;
5 5
 }
6 6
 
@@ -20,14 +20,14 @@  discard block
 block discarded – undo
20 20
 	 */
21 21
 	public function __construct() {
22 22
 		$this->widget_cssclass    = 'woocommerce widget_recent_reviews';
23
-		$this->widget_description = __( 'Display a list of your most recent reviews on your site.', 'lsx' );
23
+		$this->widget_description = __('Display a list of your most recent reviews on your site.', 'lsx');
24 24
 		$this->widget_id          = 'woocommerce_recent_reviews';
25
-		$this->widget_name        = __( 'WooCommerce recent reviews', 'lsx' );
25
+		$this->widget_name        = __('WooCommerce recent reviews', 'lsx');
26 26
 		$this->settings           = array(
27 27
 			'title'  => array(
28 28
 				'type'  => 'text',
29
-				'std'   => __( 'Recent reviews', 'lsx' ),
30
-				'label' => __( 'Title', 'lsx' ),
29
+				'std'   => __('Recent reviews', 'lsx'),
30
+				'label' => __('Title', 'lsx'),
31 31
 			),
32 32
 			'number' => array(
33 33
 				'type'  => 'number',
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
 				'min'   => 1,
36 36
 				'max'   => '',
37 37
 				'std'   => 10,
38
-				'label' => __( 'Number of reviews to show', 'lsx' ),
38
+				'label' => __('Number of reviews to show', 'lsx'),
39 39
 			),
40 40
 		);
41 41
 
@@ -50,42 +50,42 @@  discard block
 block discarded – undo
50 50
 	 * @param array $args
51 51
 	 * @param array $instance
52 52
 	 */
53
-	public function widget( $args, $instance ) {
54
-		if ( $this->get_cached_widget( $args ) ) {
53
+	public function widget($args, $instance) {
54
+		if ($this->get_cached_widget($args)) {
55 55
 			return;
56 56
 		}
57 57
 		ob_start();
58
-		$number   = ! empty( $instance['number'] ) ? absint( $instance['number'] ) : $this->settings['number']['std'];
59
-		$comments = get_comments( array(
58
+		$number   = ! empty($instance['number']) ? absint($instance['number']) : $this->settings['number']['std'];
59
+		$comments = get_comments(array(
60 60
 			'number'      => $number,
61 61
 			'status'      => 'approve',
62 62
 			'post_status' => 'publish',
63 63
 			'post_type'   => 'product',
64 64
 			'parent'      => 0,
65
-		) );
65
+		));
66 66
 
67
-		if ( $comments ) {
68
-			$this->widget_start( $args, $instance );
67
+		if ($comments) {
68
+			$this->widget_start($args, $instance);
69 69
 
70
-			echo wp_kses_post( apply_filters( 'woocommerce_before_widget_product_list', '<ul class="product_list_widget">' ) );
70
+			echo wp_kses_post(apply_filters('woocommerce_before_widget_product_list', '<ul class="product_list_widget">'));
71 71
 
72 72
 			global $stored_comment, $_product, $rating;
73 73
 
74 74
 			the_comment();
75
-			foreach ( (array) $comments as $comment ) {
76
-				$_product = wc_get_product( $comment->comment_post_ID );
77
-				$rating = intval( get_comment_meta( $comment->comment_ID, 'rating', true ) );
75
+			foreach ((array) $comments as $comment) {
76
+				$_product = wc_get_product($comment->comment_post_ID);
77
+				$rating = intval(get_comment_meta($comment->comment_ID, 'rating', true));
78 78
 				$stored_comment = $comment;
79 79
 
80
-				wc_get_template( 'content-widget-review.php' );
80
+				wc_get_template('content-widget-review.php');
81 81
 			}
82 82
 
83
-			echo wp_kses_post( apply_filters( 'woocommerce_after_widget_product_list', '</ul>' ) );
83
+			echo wp_kses_post(apply_filters('woocommerce_after_widget_product_list', '</ul>'));
84 84
 
85
-			$this->widget_end( $args );
85
+			$this->widget_end($args);
86 86
 		}
87 87
 		$content = ob_get_clean();
88
-		echo wp_kses_post( $content );
89
-		$this->cache_widget( $args, $content );
88
+		echo wp_kses_post($content);
89
+		$this->cache_widget($args, $content);
90 90
 	}
91 91
 }
Please login to merge, or discard this patch.
partials/content-widget-review.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -1,42 +1,42 @@
 block discarded – undo
1 1
 <?php
2
-if ( ! defined( 'ABSPATH' ) ) {
2
+if ( ! defined('ABSPATH')) {
3 3
 	exit;
4 4
 }
5 5
 
6 6
 global $comment, $stored_comment, $_product, $rating;
7 7
 $the_comment = $comment;
8
-if ( null !== $stored_comment ) {
8
+if (null !== $stored_comment) {
9 9
 	$the_comment = $stored_comment;
10 10
 }
11 11
 ?>
12 12
 
13 13
 <div class="lsx-woocommerce-review-slot">
14 14
 	<div class="lsx-woocommerce-review-flex">
15
-		<a href="<?php echo esc_url( get_comment_link( $the_comment->comment_ID ) ); ?>">
15
+		<a href="<?php echo esc_url(get_comment_link($the_comment->comment_ID)); ?>">
16 16
 			<figure class="lsx-woocommerce-avatar">
17
-				<?php echo wp_kses_post( $_product->get_image( 'lsx-thumbnail-square' ) ); ?>
17
+				<?php echo wp_kses_post($_product->get_image('lsx-thumbnail-square')); ?>
18 18
 			</figure>
19 19
 		</a>
20 20
 
21 21
 		<div class="lsx-woocommerce-review-box">
22 22
 			<div class="lsx-woocommerce-rating">
23
-				<?php echo wp_kses_post( wc_get_rating_html( $rating ) ); ?>
23
+				<?php echo wp_kses_post(wc_get_rating_html($rating)); ?>
24 24
 			</div>
25 25
 
26 26
 			<h5 class="lsx-woocommerce-title">
27
-				<a href="<?php echo esc_url( get_comment_link( $the_comment->comment_ID ) ); ?>"><?php echo wp_kses_post( $_product->get_name() ); ?></a>
27
+				<a href="<?php echo esc_url(get_comment_link($the_comment->comment_ID)); ?>"><?php echo wp_kses_post($_product->get_name()); ?></a>
28 28
 			</h5>
29 29
 
30 30
 			<p class="lsx-woocommerce-reviewer">
31 31
 				<?php
32 32
 					/* translators: %s: review author */
33
-					echo wp_kses_post( esc_html__( 'by ', 'lsx' ) . get_comment_author( $the_comment->comment_ID ) );
33
+					echo wp_kses_post(esc_html__('by ', 'lsx') . get_comment_author($the_comment->comment_ID));
34 34
 				?>
35 35
 			</p>
36 36
 
37 37
 			<div class="lsx-woocommerce-content">
38
-				<p><?php echo wp_kses_post( $the_comment->comment_content ); ?></p>
39
-				<p><a href="<?php echo esc_url( get_comment_link( $the_comment->comment_ID ) ); ?>" class="moretag"><?php esc_attr_e( 'View more', 'lsx' ); ?></a></p>
38
+				<p><?php echo wp_kses_post($the_comment->comment_content); ?></p>
39
+				<p><a href="<?php echo esc_url(get_comment_link($the_comment->comment_ID)); ?>" class="moretag"><?php esc_attr_e('View more', 'lsx'); ?></a></p>
40 40
 			</div>
41 41
 		</div>
42 42
 	</div>
Please login to merge, or discard this patch.
partials/content-related.php 2 patches
Braces   +13 added lines, -5 removed lines patch added patch discarded remove patch
@@ -79,14 +79,20 @@  discard block
 block discarded – undo
79 79
 				<h2 class="entry-title">
80 80
 					<?php if ( has_post_thumbnail() ) : ?>
81 81
 						<a href="<?php echo esc_url( $archive_link ); ?>" class="format-link has-thumb fa fa-<?php echo esc_attr( $format ); ?>"></a>
82
-					<?php else : ?>
83
-						<a href="<?php echo esc_url( $archive_link ); ?>" class="format-link fa fa-<?php echo esc_attr( $format ); ?>"></a>
82
+					<?php else {
83
+	: ?>
84
+						<a href="<?php echo esc_url( $archive_link );
85
+}
86
+?>" class="format-link fa fa-<?php echo esc_attr( $format ); ?>"></a>
84 87
 					<?php endif; ?>
85 88
 
86 89
 					<?php if ( has_post_format( array( 'link' ) ) ) : ?>
87 90
 						<a href="<?php echo esc_url( lsx_get_my_url() ); ?>" rel="bookmark"><?php the_title(); ?> <span class="fa fa-external-link"></span></a>
88
-					<?php else : ?>
89
-						<a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?></a>
91
+					<?php else {
92
+	: ?>
93
+						<a href="<?php the_permalink();
94
+}
95
+?>" rel="bookmark"><?php the_title(); ?></a>
90 96
 					<?php endif; ?>
91 97
 
92 98
 					<?php if ( is_sticky() ) : ?>
@@ -111,11 +117,13 @@  discard block
 block discarded – undo
111 117
 						<?php the_content(); ?>
112 118
 					</div><!-- .entry-content -->
113 119
 
114
-				<?php else : ?>
120
+				<?php else {
121
+	: ?>
115 122
 
116 123
 					<div class="entry-content">
117 124
 						<?php
118 125
 							the_content();
126
+}
119 127
 
120 128
 							wp_link_pages( array(
121 129
 								'before'      => '<div class="lsx-postnav-wrapper"><div class="lsx-postnav">',
Please login to merge, or discard this patch.
Spacing   +43 added lines, -43 removed lines patch added patch discarded remove patch
@@ -17,38 +17,38 @@  discard block
 block discarded – undo
17 17
 			'quote' => 'quote',
18 18
 			'video' => 'video',
19 19
 		);
20
-	$no_thumb_post_formats = apply_filters( 'lsx_no_thumb_post_formats', $no_thumb_post_types );
20
+	$no_thumb_post_formats = apply_filters('lsx_no_thumb_post_formats', $no_thumb_post_types);
21 21
 
22
-	$has_thumb = has_post_thumbnail() && ! has_post_format( $no_thumb_post_formats );
22
+	$has_thumb = has_post_thumbnail() && ! has_post_format($no_thumb_post_formats);
23 23
 
24
-	if ( $has_thumb ) {
24
+	if ($has_thumb) {
25 25
 		$thumb_class = 'has-thumb';
26 26
 	} else {
27 27
 		$thumb_class = 'no-thumb';
28 28
 	}
29 29
 
30
-	$blog_layout = apply_filters( 'lsx_blog_layout', 'default' );
30
+	$blog_layout = apply_filters('lsx_blog_layout', 'default');
31 31
 
32 32
 	$image_class = '';
33 33
 
34
-	$thumbnail_id = get_post_thumbnail_id( get_the_ID() );
35
-	$image_arr    = wp_get_attachment_image_src( $thumbnail_id, 'lsx-thumbnail-single' );
34
+	$thumbnail_id = get_post_thumbnail_id(get_the_ID());
35
+	$image_arr    = wp_get_attachment_image_src($thumbnail_id, 'lsx-thumbnail-single');
36 36
 
37
-	if ( is_array( $image_arr ) ) {
37
+	if (is_array($image_arr)) {
38 38
 		$image_src = $image_arr[0];
39 39
 	}
40 40
 ?>
41 41
 
42
-<article id="post-<?php the_ID(); ?>" <?php post_class( array( 'lsx-slot', $thumb_class ) ); ?>>
42
+<article id="post-<?php the_ID(); ?>" <?php post_class(array('lsx-slot', $thumb_class)); ?>>
43 43
 	<?php lsx_entry_top(); ?>
44 44
 
45 45
 	<div class="entry-layout">
46 46
 		<div class="entry-layout-content entry-layout-content-<?php echo has_post_thumbnail() ? '67' : '100'; ?>">
47 47
 			<header class="entry-header">
48
-				<?php if ( $has_thumb ) : ?>
49
-					<div class="entry-image <?php echo esc_attr( $image_class ); ?>">
48
+				<?php if ($has_thumb) : ?>
49
+					<div class="entry-image <?php echo esc_attr($image_class); ?>">
50 50
 						<a class="thumbnail" href="<?php the_permalink(); ?>">
51
-							<?php lsx_thumbnail( 'lsx-thumbnail-single' ); ?>
51
+							<?php lsx_thumbnail('lsx-thumbnail-single'); ?>
52 52
 						</a>
53 53
 					</div>
54 54
 				<?php endif; ?>
@@ -56,37 +56,37 @@  discard block
 block discarded – undo
56 56
 				<?php
57 57
 					$format = get_post_format();
58 58
 
59
-					if ( false === $format ) {
59
+					if (false === $format) {
60 60
 						$format = 'standard';
61
-						$show_on_front = get_option( 'show_on_front', 'posts' );
61
+						$show_on_front = get_option('show_on_front', 'posts');
62 62
 
63
-						if ( 'page' === $show_on_front ) {
64
-							$archive_link = get_permalink( get_option( 'page_for_posts' ) );
63
+						if ('page' === $show_on_front) {
64
+							$archive_link = get_permalink(get_option('page_for_posts'));
65 65
 						} else {
66 66
 							$archive_link = home_url();
67 67
 						}
68 68
 					} else {
69
-						$archive_link = get_post_format_link( $format );
69
+						$archive_link = get_post_format_link($format);
70 70
 					}
71 71
 
72
-					$format = lsx_translate_format_to_fontawesome( $format );
72
+					$format = lsx_translate_format_to_fontawesome($format);
73 73
 				?>
74 74
 
75 75
 				<h2 class="entry-title">
76
-					<?php if ( has_post_thumbnail() ) : ?>
77
-						<a href="<?php echo esc_url( $archive_link ); ?>" class="format-link has-thumb fa fa-<?php echo esc_attr( $format ); ?>"></a>
76
+					<?php if (has_post_thumbnail()) : ?>
77
+						<a href="<?php echo esc_url($archive_link); ?>" class="format-link has-thumb fa fa-<?php echo esc_attr($format); ?>"></a>
78 78
 					<?php else : ?>
79
-						<a href="<?php echo esc_url( $archive_link ); ?>" class="format-link fa fa-<?php echo esc_attr( $format ); ?>"></a>
79
+						<a href="<?php echo esc_url($archive_link); ?>" class="format-link fa fa-<?php echo esc_attr($format); ?>"></a>
80 80
 					<?php endif; ?>
81 81
 
82
-					<?php if ( has_post_format( array( 'link' ) ) ) : ?>
83
-						<a href="<?php echo esc_url( lsx_get_my_url() ); ?>" rel="bookmark"><?php the_title(); ?> <span class="fa fa-external-link"></span></a>
82
+					<?php if (has_post_format(array('link'))) : ?>
83
+						<a href="<?php echo esc_url(lsx_get_my_url()); ?>" rel="bookmark"><?php the_title(); ?> <span class="fa fa-external-link"></span></a>
84 84
 					<?php else : ?>
85 85
 						<a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?></a>
86 86
 					<?php endif; ?>
87 87
 
88
-					<?php if ( is_sticky() ) : ?>
89
-						<span class="label label-default label-sticky"><?php esc_html_e( 'Featured', 'lsx' ); ?></span>
88
+					<?php if (is_sticky()) : ?>
89
+						<span class="label label-default label-sticky"><?php esc_html_e('Featured', 'lsx'); ?></span>
90 90
 					<?php endif; ?>
91 91
 				</h2>
92 92
 				<div class="entry-meta">
@@ -97,27 +97,27 @@  discard block
 block discarded – undo
97 97
 
98 98
 			</header><!-- .entry-header -->
99 99
 
100
-			<?php if ( has_post_format( array( 'quote' ) ) || apply_filters( 'lsx_blog_display_text_on_list', true ) ) : ?>
100
+			<?php if (has_post_format(array('quote')) || apply_filters('lsx_blog_display_text_on_list', true)) : ?>
101 101
 
102
-				<?php if ( lsx_post_format_force_content_on_list() && ! apply_filters( 'lsx_blog_force_content_on_list', false ) ) : ?>
102
+				<?php if (lsx_post_format_force_content_on_list() && ! apply_filters('lsx_blog_force_content_on_list', false)) : ?>
103 103
 
104 104
 					<div class="entry-summary">
105 105
 					<?php
106
-					if ( ! has_excerpt() ) {
106
+					if ( ! has_excerpt()) {
107 107
 
108
-						$excerpt_more = '<p><a class="moretag" href="' . esc_url( get_permalink() ) . '">' . esc_html__( 'Read More', 'lsx' ) . '</a></p>';
109
-						$content      = wp_trim_words( get_the_content(), 50 );
108
+						$excerpt_more = '<p><a class="moretag" href="' . esc_url(get_permalink()) . '">' . esc_html__('Read More', 'lsx') . '</a></p>';
109
+						$content      = wp_trim_words(get_the_content(), 50);
110 110
 						$content      = '<p>' . $content . '</p>' . $excerpt_more;
111
-						echo wp_kses_post( $content );
111
+						echo wp_kses_post($content);
112 112
 					} else {
113 113
 						the_excerpt();
114 114
 					}
115 115
 					?>
116 116
 					</div><!-- .entry-summary -->
117 117
 
118
-				<?php elseif ( has_post_format( array( 'link' ) ) ) : ?>
118
+				<?php elseif (has_post_format(array('link'))) : ?>
119 119
 
120
-				<?php elseif ( apply_filters( 'lsx_blog_force_content_on_list', false ) ) : ?>
120
+				<?php elseif (apply_filters('lsx_blog_force_content_on_list', false)) : ?>
121 121
 
122 122
 					<div class="entry-content">
123 123
 						<?php the_content(); ?>
@@ -129,12 +129,12 @@  discard block
 block discarded – undo
129 129
 						<?php
130 130
 							the_content();
131 131
 
132
-							wp_link_pages( array(
132
+							wp_link_pages(array(
133 133
 								'before'      => '<div class="lsx-postnav-wrapper"><div class="lsx-postnav">',
134 134
 								'after'       => '</div></div>',
135 135
 								'link_before' => '<span>',
136 136
 								'link_after'  => '</span>',
137
-							) );
137
+							));
138 138
 						?>
139 139
 					</div><!-- .entry-content -->
140 140
 
@@ -150,23 +150,23 @@  discard block
 block discarded – undo
150 150
 
151 151
 				<?php lsx_content_post_tags(); ?>
152 152
 
153
-				<?php if ( comments_open() && ! empty( $comments_number ) ) : ?>
153
+				<?php if (comments_open() && ! empty($comments_number)) : ?>
154 154
 					<div class="post-comments">
155 155
 						<a href="<?php the_permalink(); ?>#comments">
156 156
 							<?php
157
-								if ( '1' === $comments_number ) {
158
-									echo esc_html_x( 'One Comment', 'content.php', 'lsx' );
157
+								if ('1' === $comments_number) {
158
+									echo esc_html_x('One Comment', 'content.php', 'lsx');
159 159
 								} else {
160 160
 									printf(
161 161
 										/* Translators: %s: number of comments */
162
-										esc_html( _nx(
162
+										esc_html(_nx(
163 163
 											'%s Comment',
164 164
 											'%s Comments',
165 165
 											$comments_number,
166 166
 											'content.php',
167 167
 											'lsx'
168
-										) ),
169
-										esc_html( number_format_i18n( $comments_number ) )
168
+										)),
169
+										esc_html(number_format_i18n($comments_number))
170 170
 									);
171 171
 								}
172 172
 							?>
@@ -176,11 +176,11 @@  discard block
 block discarded – undo
176 176
 			</div>
177 177
 		</div>
178 178
 
179
-		<?php if ( has_post_thumbnail() ) : ?>
179
+		<?php if (has_post_thumbnail()) : ?>
180 180
 
181 181
 			<div class="entry-image hidden-xs">
182
-				<a class="thumbnail" href="<?php the_permalink(); ?>" style="background-image:url(<?php echo esc_url( $image_src ); ?>);">
183
-					<?php lsx_thumbnail( 'lsx-thumbnail-single' ); ?>
182
+				<a class="thumbnail" href="<?php the_permalink(); ?>" style="background-image:url(<?php echo esc_url($image_src); ?>);">
183
+					<?php lsx_thumbnail('lsx-thumbnail-single'); ?>
184 184
 				</a>
185 185
 			</div>
186 186
 
Please login to merge, or discard this patch.
partials/content-widget-product.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -15,42 +15,42 @@
 block discarded – undo
15 15
  */
16 16
 
17 17
 // Exit if accessed directly
18
-if ( ! defined( 'ABSPATH' ) ) {
18
+if ( ! defined('ABSPATH')) {
19 19
 	exit;
20 20
 }
21 21
 
22 22
 global $product;
23 23
 
24
-if ( ! is_a( $product, 'WC_Product' ) ) {
24
+if ( ! is_a($product, 'WC_Product')) {
25 25
 	return;
26 26
 } ?>
27 27
 
28 28
 <div class="lsx-woocommerce-slot">
29
-	<a href="<?php echo esc_url( $product->get_permalink() ); ?>">
29
+	<a href="<?php echo esc_url($product->get_permalink()); ?>">
30 30
 		<figure class="lsx-woocommerce-avatar">
31
-			<?php echo wp_kses_post( $product->get_image( 'lsx-thumbnail-square' ) ); ?>
31
+			<?php echo wp_kses_post($product->get_image('lsx-thumbnail-square')); ?>
32 32
 		</figure>
33 33
 	</a>
34 34
 
35 35
 	<h5 class="lsx-woocommerce-title">
36
-		<a href="<?php echo esc_url( $product->get_permalink() ); ?>"><?php echo wp_kses_post( $product->get_name() ); ?></a>
36
+		<a href="<?php echo esc_url($product->get_permalink()); ?>"><?php echo wp_kses_post($product->get_name()); ?></a>
37 37
 	</h5>
38 38
 
39
-	<?php if ( ! empty( $show_rating ) ) : ?>
39
+	<?php if ( ! empty($show_rating)) : ?>
40 40
 		<div class="lsx-woocommerce-rating">
41
-			<?php echo wp_kses_post( wc_get_rating_html( $product->get_average_rating() ) ); ?>
41
+			<?php echo wp_kses_post(wc_get_rating_html($product->get_average_rating())); ?>
42 42
 		</div>
43 43
 	<?php endif; ?>
44 44
 
45 45
 	<?php
46 46
 		$price_html = $product->get_price_html();
47
-		if ( $price_html ) : ?>
47
+		if ($price_html) : ?>
48 48
 		<div class="lsx-woocommerce-price">
49
-			<?php echo wp_kses_post( $price_html ); ?>
49
+			<?php echo wp_kses_post($price_html); ?>
50 50
 		</div>
51 51
 	<?php endif; ?>
52 52
 
53 53
 	<div class="lsx-woocommerce-content">
54
-		<a href="<?php echo esc_url( $product->get_permalink() ); ?>" class="moretag"><?php esc_attr_e( 'View more', 'lsx' ); ?></a>
54
+		<a href="<?php echo esc_url($product->get_permalink()); ?>" class="moretag"><?php esc_attr_e('View more', 'lsx'); ?></a>
55 55
 	</div>
56 56
 </div>
Please login to merge, or discard this patch.
includes/gutenberg.php 2 patches
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -6,36 +6,36 @@
 block discarded – undo
6 6
  * @subpackage Gutenberg
7 7
  */
8 8
 
9
-if ( ! defined( 'ABSPATH' ) ) {
9
+if ( ! defined('ABSPATH')) {
10 10
 	exit;
11 11
 }
12 12
 
13 13
 // Enqueue Admin styles on admin area
14 14
 function load_gutenberg_admin_style() {
15
-	wp_enqueue_style( 'admin_css', get_template_directory_uri() . '/assets/css/admin/gutenberg-admin.css', false, '1.0.0' );
15
+	wp_enqueue_style('admin_css', get_template_directory_uri() . '/assets/css/admin/gutenberg-admin.css', false, '1.0.0');
16 16
 }
17
-add_action( 'admin_enqueue_scripts', 'load_gutenberg_admin_style' );
17
+add_action('admin_enqueue_scripts', 'load_gutenberg_admin_style');
18 18
 
19 19
 // Gutenberg Compatibility
20
-require_once( get_template_directory() . '/lib/theme-support.php' );
20
+require_once(get_template_directory() . '/lib/theme-support.php');
21 21
 
22 22
 /**
23 23
  * Add custom class for Gutenberg Compatible template
24 24
  */
25 25
 
26
-function add_gutenberg_compatible_body_class( $classes ) {
26
+function add_gutenberg_compatible_body_class($classes) {
27 27
 	//if ( ! is_home() && ! is_front_page() )
28
-		if ( is_page() || is_page_template() || is_single() )
28
+		if (is_page() || is_page_template() || is_single())
29 29
 			$classes[] = 'gutenberg-compatible-template';
30 30
 		return $classes;
31 31
 
32 32
 }
33 33
 
34
-add_filter( 'body_class', __NAMESPACE__ . '\add_gutenberg_compatible_body_class' );
34
+add_filter('body_class', __NAMESPACE__ . '\add_gutenberg_compatible_body_class');
35 35
 
36 36
 // Add custom class for templates that are using the Gutenberg editor
37
-add_action('body_class', function( $classes ) {
38
-	if ( function_exists( 'has_blocks' ) && has_blocks( get_the_ID() ) && ( ! is_search() ) && ( ! is_archive() ) )
37
+add_action('body_class', function($classes) {
38
+	if (function_exists('has_blocks') && has_blocks(get_the_ID()) && ( ! is_search()) && ( ! is_archive()))
39 39
 		$classes[] = 'using-gutenberg';
40 40
 	return $classes;
41 41
 });
Please login to merge, or discard this patch.
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -25,8 +25,9 @@  discard block
 block discarded – undo
25 25
 
26 26
 function add_gutenberg_compatible_body_class( $classes ) {
27 27
 	//if ( ! is_home() && ! is_front_page() )
28
-		if ( is_page() || is_page_template() || is_single() )
29
-			$classes[] = 'gutenberg-compatible-template';
28
+		if ( is_page() || is_page_template() || is_single() ) {
29
+					$classes[] = 'gutenberg-compatible-template';
30
+		}
30 31
 		return $classes;
31 32
 
32 33
 }
@@ -35,7 +36,8 @@  discard block
 block discarded – undo
35 36
 
36 37
 // Add custom class for templates that are using the Gutenberg editor
37 38
 add_action('body_class', function( $classes ) {
38
-	if ( function_exists( 'has_blocks' ) && has_blocks( get_the_ID() ) && ( ! is_search() ) && ( ! is_archive() ) )
39
-		$classes[] = 'using-gutenberg';
39
+	if ( function_exists( 'has_blocks' ) && has_blocks( get_the_ID() ) && ( ! is_search() ) && ( ! is_archive() ) ) {
40
+			$classes[] = 'using-gutenberg';
41
+	}
40 42
 	return $classes;
41 43
 });
Please login to merge, or discard this patch.
includes/classes/class-lsx-schema-utils.php 1 patch
Spacing   +49 added lines, -49 removed lines patch added patch discarded remove patch
@@ -18,11 +18,11 @@  discard block
 block discarded – undo
18 18
 	 *
19 19
 	 * @return bool True if it has schema, false if not.
20 20
 	 */
21
-	public static function is_type( $post_type = null, $comparison_type = null ) {
22
-		if ( is_null( $comparison_type ) ) {
21
+	public static function is_type($post_type = null, $comparison_type = null) {
22
+		if (is_null($comparison_type)) {
23 23
 			return false;
24 24
 		}
25
-		if ( is_null( $post_type ) ) {
25
+		if (is_null($post_type)) {
26 26
 			$post_type = get_post_type();
27 27
 		}
28 28
 		/**
@@ -30,8 +30,8 @@  discard block
 block discarded – undo
30 30
 		 *
31 31
 		 * @api string[] $post_types The post types for which we output Review.
32 32
 		 */
33
-		$post_types = apply_filters( 'wpseo_schema_' . $comparison_type . '_post_types', array( $comparison_type ) );
34
-		return in_array( $post_type, $post_types );
33
+		$post_types = apply_filters('wpseo_schema_' . $comparison_type . '_post_types', array($comparison_type));
34
+		return in_array($post_type, $post_types);
35 35
 	}
36 36
 	/**
37 37
 	 * Retrieve a users Schema ID.
@@ -42,9 +42,9 @@  discard block
 block discarded – undo
42 42
 	 *
43 43
 	 * @return string The user's schema ID.
44 44
 	 */
45
-	public static function get_places_schema_id( $place_id, $type, $context ) {
46
-		$url = $context->site_url . '#/schema/' . strtolower( $type ) . '/' . wp_hash( $place_id . get_the_title( $place_id ) );
47
-		return trailingslashit( $url );
45
+	public static function get_places_schema_id($place_id, $type, $context) {
46
+		$url = $context->site_url . '#/schema/' . strtolower($type) . '/' . wp_hash($place_id . get_the_title($place_id));
47
+		return trailingslashit($url);
48 48
 	}
49 49
 	/**
50 50
 	 * Retrieve a users Schema ID.
@@ -54,9 +54,9 @@  discard block
 block discarded – undo
54 54
 	 *
55 55
 	 * @return string The user's schema ID.
56 56
 	 */
57
-	public static function get_subtrip_schema_id( $name, $context ) {
58
-		$url = $context->site_url . '#/subtrip/' . wp_hash( $name . $context->id );
59
-		return trailingslashit( $url );
57
+	public static function get_subtrip_schema_id($name, $context) {
58
+		$url = $context->site_url . '#/subtrip/' . wp_hash($name . $context->id);
59
+		return trailingslashit($url);
60 60
 	}
61 61
 	/**
62 62
 	 * Retrieve an offer Schema ID.
@@ -67,15 +67,15 @@  discard block
 block discarded – undo
67 67
 	 *
68 68
 	 * @return string The user's schema ID.
69 69
 	 */
70
-	public static function get_offer_schema_id( $id, $context, $local = false ) {
71
-		if ( false === $local ) {
70
+	public static function get_offer_schema_id($id, $context, $local = false) {
71
+		if (false === $local) {
72 72
 			$url = $context->site_url;
73 73
 		} else {
74
-			$url = get_permalink( $context->id );
74
+			$url = get_permalink($context->id);
75 75
 		}
76 76
 		$url .= '#/schema/offer/';
77
-		$url .= wp_hash( $id . get_the_title( $id ) );
78
-		return trailingslashit( $url );
77
+		$url .= wp_hash($id . get_the_title($id));
78
+		return trailingslashit($url);
79 79
 	}
80 80
 	/**
81 81
 	 * Retrieve an review Schema ID.
@@ -86,15 +86,15 @@  discard block
 block discarded – undo
86 86
 	 *
87 87
 	 * @return string The user's schema ID.
88 88
 	 */
89
-	public static function get_review_schema_id( $id, $context, $local = false ) {
90
-		if ( false === $local ) {
89
+	public static function get_review_schema_id($id, $context, $local = false) {
90
+		if (false === $local) {
91 91
 			$url = $context->site_url;
92 92
 		} else {
93
-			$url = get_permalink( $context->id );
93
+			$url = get_permalink($context->id);
94 94
 		}
95 95
 		$url .= '#/schema/review/';
96
-		$url .= wp_hash( $id . get_the_title( $id ) );
97
-		return trailingslashit( $url );
96
+		$url .= wp_hash($id . get_the_title($id));
97
+		return trailingslashit($url);
98 98
 	}
99 99
 	/**
100 100
 	 * Retrieve an Article Schema ID.
@@ -105,13 +105,13 @@  discard block
 block discarded – undo
105 105
 	 *
106 106
 	 * @return string The user's schema ID.
107 107
 	 */
108
-	public static function get_article_schema_id( $id, $context, $local = false ) {
109
-		if ( false === $local ) {
110
-			$url = get_permalink( $id ) . \WPSEO_Schema_IDs::ARTICLE_HASH;
108
+	public static function get_article_schema_id($id, $context, $local = false) {
109
+		if (false === $local) {
110
+			$url = get_permalink($id) . \WPSEO_Schema_IDs::ARTICLE_HASH;
111 111
 		} else {
112
-			$url = get_permalink( $context->id ) . '#/schema/article/' . wp_hash( $id . get_the_title( $id ) );
112
+			$url = get_permalink($context->id) . '#/schema/article/' . wp_hash($id . get_the_title($id));
113 113
 		}
114
-		return trailingslashit( $url );
114
+		return trailingslashit($url);
115 115
 	}
116 116
 	/**
117 117
 	 * Retrieve a users Schema ID.
@@ -121,8 +121,8 @@  discard block
 block discarded – undo
121 121
 	 *
122 122
 	 * @return string The user's schema ID.
123 123
 	 */
124
-	public static function get_author_schema_id( $name, $email, $context ) {
125
-		return $context->site_url . \WPSEO_Schema_IDs::PERSON_HASH . wp_hash( $name . $email );
124
+	public static function get_author_schema_id($name, $email, $context) {
125
+		return $context->site_url . \WPSEO_Schema_IDs::PERSON_HASH . wp_hash($name . $email);
126 126
 	}
127 127
 	/**
128 128
 	 * Generates the place graph piece for the subtrip / Itinerary arrays.
@@ -135,16 +135,16 @@  discard block
 block discarded – undo
135 135
 	 *
136 136
 	 * @return mixed array $data Place data.
137 137
 	 */
138
-	public static function add_place( $data, $type, $post_id, $context, $contained_in = false ) {
139
-		$at_id = self::get_places_schema_id( $post_id, $type, $context );
138
+	public static function add_place($data, $type, $post_id, $context, $contained_in = false) {
139
+		$at_id = self::get_places_schema_id($post_id, $type, $context);
140 140
 		$place = array(
141 141
 			'@type'       => $type,
142 142
 			'@id'         => $at_id,
143
-			'name'        => get_the_title( $post_id ),
144
-			'description' => get_the_excerpt( $post_id ),
145
-			'url'         => get_permalink( $post_id ),
143
+			'name'        => get_the_title($post_id),
144
+			'description' => get_the_excerpt($post_id),
145
+			'url'         => get_permalink($post_id),
146 146
 		);
147
-		if ( false !== $contained_in ) {
147
+		if (false !== $contained_in) {
148 148
 			$place['containedInPlace'] = array(
149 149
 				'@type' => 'Country',
150 150
 				'@id'   => $contained_in,
@@ -161,8 +161,8 @@  discard block
 block discarded – undo
161 161
 	 *
162 162
 	 * @return array $data The Review data.
163 163
 	 */
164
-	public static function add_image( $data, $context ) {
165
-		if ( $context->has_image ) {
164
+	public static function add_image($data, $context) {
165
+		if ($context->has_image) {
166 166
 			$data['image'] = array(
167 167
 				'@id' => $context->canonical . \WPSEO_Schema_IDs::PRIMARY_IMAGE_HASH,
168 168
 			);
@@ -176,18 +176,18 @@  discard block
 block discarded – undo
176 176
 	 * @param  string $type The schema type.
177 177
 	 * @return array $schema An array of the schema markup.
178 178
 	 */
179
-	public static function get_item_reviewed( $items = array(), $type = '' ) {
179
+	public static function get_item_reviewed($items = array(), $type = '') {
180 180
 		$schema = array();
181
-		if ( false !== $items && ! empty( $items ) && '' !== $type ) {
182
-			array_unique( $items );
183
-			foreach ( $items as $item ) {
184
-				$title = get_the_title( $item );
185
-				if ( '' !== $title ) {
181
+		if (false !== $items && ! empty($items) && '' !== $type) {
182
+			array_unique($items);
183
+			foreach ($items as $item) {
184
+				$title = get_the_title($item);
185
+				if ('' !== $title) {
186 186
 					$item_schema = array(
187 187
 						'@type' => $type,
188 188
 						'name'  => $title,
189 189
 					);
190
-					$schema[]    = $item_schema;
190
+					$schema[] = $item_schema;
191 191
 				}
192 192
 			}
193 193
 		}
@@ -203,18 +203,18 @@  discard block
 block discarded – undo
203 203
 	 *
204 204
 	 * @return mixed array $data Review data.
205 205
 	 */
206
-	public static function add_terms( $data, $post_id, $key, $taxonomy ) {
207
-		$terms = get_the_terms( $post_id, $taxonomy );
208
-		if ( is_array( $terms ) ) {
206
+	public static function add_terms($data, $post_id, $key, $taxonomy) {
207
+		$terms = get_the_terms($post_id, $taxonomy);
208
+		if (is_array($terms)) {
209 209
 			$keywords = array();
210
-			foreach ( $terms as $term ) {
210
+			foreach ($terms as $term) {
211 211
 				// We are checking against the WordPress internal translation.
212 212
 				// @codingStandardsIgnoreLine
213
-				if ( $term->name !== __( 'Uncategorized' ) ) {
213
+				if ($term->name !== __('Uncategorized')) {
214 214
 					$keywords[] = $term->name;
215 215
 				}
216 216
 			}
217
-			$data[ $key ] = implode( ',', $keywords );
217
+			$data[$key] = implode(',', $keywords);
218 218
 		}
219 219
 		return $data;
220 220
 	}
Please login to merge, or discard this patch.
includes/classes/class-lsx-optimisation.php 2 patches
Doc Comments   -2 removed lines patch added patch discarded remove patch
@@ -46,7 +46,6 @@  discard block
 block discarded – undo
46 46
 	/**
47 47
 	 * Defers the JS loading till Last
48 48
 	 *
49
-	 * @param  string $url The url to check and defer.
50 49
 	 * @return string
51 50
 	 */
52 51
 	public function preload_css( $tag, $handle, $href, $media ) {
@@ -59,7 +58,6 @@  discard block
 block discarded – undo
59 58
 	/**
60 59
 	 * Defers the JS loading till Last
61 60
 	 *
62
-	 * @param  string $url The url to check and defer.
63 61
 	 * @return string
64 62
 	 */
65 63
 	public function defer_parsing_of_js( $tag, $handle, $href ) {
Please login to merge, or discard this patch.
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-if ( ! defined( 'ABSPATH' ) ) {
3
+if ( ! defined('ABSPATH')) {
4 4
 	exit;
5 5
 }
6 6
 
@@ -26,9 +26,9 @@  discard block
 block discarded – undo
26 26
 	 * Constructor.
27 27
 	 */
28 28
 	public function __construct() {
29
-		add_filter( 'style_loader_tag', array( $this, 'preload_css' ), 100, 4 );
30
-		add_filter( 'script_loader_tag', array( $this, 'defer_parsing_of_js' ), 100, 3 );
31
-		add_action( 'init', array( $this, 'pum_remove_admin_bar_tools' ), 100 );
29
+		add_filter('style_loader_tag', array($this, 'preload_css'), 100, 4);
30
+		add_filter('script_loader_tag', array($this, 'defer_parsing_of_js'), 100, 3);
31
+		add_action('init', array($this, 'pum_remove_admin_bar_tools'), 100);
32 32
 	}
33 33
 	/**
34 34
 	 * Return an instance of this class.
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
 	 */
39 39
 	public static function get_instance() {
40 40
 		// If the single instance hasn't been set, set it now.
41
-		if ( null === self::$instance ) {
41
+		if (null === self::$instance) {
42 42
 			self::$instance = new self;
43 43
 		}
44 44
 		return self::$instance;
@@ -50,9 +50,9 @@  discard block
 block discarded – undo
50 50
 	 * @param  string $url The url to check and defer.
51 51
 	 * @return string
52 52
 	 */
53
-	public function preload_css( $tag, $handle, $href, $media ) {
54
-		if ( 'lsx_fonts' === $handle || 'fontawesome' === $handle ) {
55
-			$tag = str_replace( 'href', ' preload href', $tag );
53
+	public function preload_css($tag, $handle, $href, $media) {
54
+		if ('lsx_fonts' === $handle || 'fontawesome' === $handle) {
55
+			$tag = str_replace('href', ' preload href', $tag);
56 56
 		}
57 57
 		return $tag;
58 58
 	}
@@ -63,18 +63,18 @@  discard block
 block discarded – undo
63 63
 	 * @param  string $url The url to check and defer.
64 64
 	 * @return string
65 65
 	 */
66
-	public function defer_parsing_of_js( $tag, $handle, $href ) {
67
-		$skip_defer = apply_filters( 'lsx_defer_parsing_of_js', false, $tag, $handle, $href );
68
-		if ( ! is_admin() && false !== stripos( $href, '.js' ) && false === stripos( $href, 'jquery.js' ) && false === $skip_defer ) {
69
-			$tag = str_replace( 'src=', ' defer src=', $tag );
66
+	public function defer_parsing_of_js($tag, $handle, $href) {
67
+		$skip_defer = apply_filters('lsx_defer_parsing_of_js', false, $tag, $handle, $href);
68
+		if ( ! is_admin() && false !== stripos($href, '.js') && false === stripos($href, 'jquery.js') && false === $skip_defer) {
69
+			$tag = str_replace('src=', ' defer src=', $tag);
70 70
 		}
71 71
 		return $tag;
72 72
 	}
73 73
 
74 74
 	public function pum_remove_admin_bar_tools() {
75
-		remove_action( 'admin_bar_menu', array( 'PUM_Modules_Admin_Bar', 'toolbar_links' ), 999 );
76
-		remove_action( 'wp_footer', array( 'PUM_Modules_Admin_Bar', 'admin_bar_styles' ), 999 );
77
-		remove_action( 'init', array( 'PUM_Modules_Admin_Bar', 'show_debug_bar' ) );
75
+		remove_action('admin_bar_menu', array('PUM_Modules_Admin_Bar', 'toolbar_links'), 999);
76
+		remove_action('wp_footer', array('PUM_Modules_Admin_Bar', 'admin_bar_styles'), 999);
77
+		remove_action('init', array('PUM_Modules_Admin_Bar', 'show_debug_bar'));
78 78
 	}
79 79
 }
80 80
 LSX_Optimisation::get_instance();
Please login to merge, or discard this patch.
includes/template-tags.php 1 patch
Spacing   +168 added lines, -168 removed lines patch added patch discarded remove patch
@@ -6,11 +6,11 @@  discard block
 block discarded – undo
6 6
  * @subpackage template-tags
7 7
  */
8 8
 
9
-if ( ! defined( 'ABSPATH' ) ) {
9
+if ( ! defined('ABSPATH')) {
10 10
 	exit;
11 11
 }
12 12
 
13
-if ( ! function_exists( 'lsx_breadcrumbs' ) ) :
13
+if ( ! function_exists('lsx_breadcrumbs')) :
14 14
 
15 15
 	/**
16 16
 	 * Breadcrumbs.
@@ -19,44 +19,44 @@  discard block
 block discarded – undo
19 19
 	 * @subpackage template-tags
20 20
 	 */
21 21
 	function lsx_breadcrumbs() {
22
-		if ( ! function_exists( 'yoast_breadcrumb' ) && ! function_exists( 'woocommerce_breadcrumb' ) ) {
22
+		if ( ! function_exists('yoast_breadcrumb') && ! function_exists('woocommerce_breadcrumb')) {
23 23
 			return null;
24 24
 		}
25 25
 
26
-		$show_on_front = get_option( 'show_on_front' );
26
+		$show_on_front = get_option('show_on_front');
27 27
 
28
-		if ( ( 'posts' === $show_on_front && is_home() ) || ( 'page' === $show_on_front && is_front_page() ) ) {
28
+		if (('posts' === $show_on_front && is_home()) || ('page' === $show_on_front && is_front_page())) {
29 29
 			return;
30 30
 		}
31 31
 
32
-		if ( function_exists( 'woocommerce_breadcrumb' ) ) {
32
+		if (function_exists('woocommerce_breadcrumb')) {
33 33
 			ob_start();
34 34
 
35
-			woocommerce_breadcrumb( array(
35
+			woocommerce_breadcrumb(array(
36 36
 				'wrap_before' => '<div class="breadcrumbs-container breadcrumbs-woocommerce"><div class="container"><div class="row"><div class="col-xs-12">',
37 37
 				'wrap_after'  => '</div></div></div></div>',
38 38
 				'before'      => '<span>',
39 39
 				'after'       => '</span>',
40
-			) );
40
+			));
41 41
 
42 42
 			$output = ob_get_clean();
43
-		} elseif ( function_exists( 'yoast_breadcrumb' ) ) {
44
-			$output = yoast_breadcrumb( null, null, false );
43
+		} elseif (function_exists('yoast_breadcrumb')) {
44
+			$output = yoast_breadcrumb(null, null, false);
45 45
 			$output = '<div class="breadcrumbs-container breadcrumbs-yoast"><div class="container"><div class="row"><div class="col-xs-12">' . $output . '</div></div></div></div>';
46 46
 		}
47 47
 
48
-		$output = apply_filters( 'lsx_breadcrumbs', $output );
48
+		$output = apply_filters('lsx_breadcrumbs', $output);
49 49
 
50
-		echo wp_kses_post( $output );
50
+		echo wp_kses_post($output);
51 51
 	}
52 52
 
53 53
 endif;
54 54
 
55
-add_action( 'lsx_header_after', 'lsx_breadcrumbs', 1 );
55
+add_action('lsx_header_after', 'lsx_breadcrumbs', 1);
56 56
 //add_action( 'lsx_banner_inner_bottom', 'lsx_breadcrumbs', 100 );
57 57
 //add_action( 'lsx_global_header_inner_bottom', 'lsx_breadcrumbs', 100 );
58 58
 
59
-if ( ! function_exists( 'lsx_breadcrumbs_wpseo_seperator_filter' ) ) :
59
+if ( ! function_exists('lsx_breadcrumbs_wpseo_seperator_filter')) :
60 60
 
61 61
 	/**
62 62
 	 * Replaces the seperator.
@@ -64,16 +64,16 @@  discard block
 block discarded – undo
64 64
 	 * @package    lsx
65 65
 	 * @subpackage template-tags
66 66
 	 */
67
-	function lsx_breadcrumbs_wpseo_seperator_filter( $seperator ) {
67
+	function lsx_breadcrumbs_wpseo_seperator_filter($seperator) {
68 68
 		$seperator = '<i class="fa fa-angle-right" aria-hidden="true"></i>';
69 69
 		return $seperator;
70 70
 	}
71 71
 
72 72
 endif;
73 73
 
74
-add_filter( 'wpseo_breadcrumb_separator', 'lsx_breadcrumbs_wpseo_seperator_filter' );
74
+add_filter('wpseo_breadcrumb_separator', 'lsx_breadcrumbs_wpseo_seperator_filter');
75 75
 
76
-if ( ! function_exists( 'lsx_breadcrumbs_woocommerce_seperator_filter' ) ) :
76
+if ( ! function_exists('lsx_breadcrumbs_woocommerce_seperator_filter')) :
77 77
 
78 78
 	/**
79 79
 	 * Replaces the seperator.
@@ -81,16 +81,16 @@  discard block
 block discarded – undo
81 81
 	 * @package    lsx
82 82
 	 * @subpackage template-tags
83 83
 	 */
84
-	function lsx_breadcrumbs_woocommerce_seperator_filter( $defaults ) {
84
+	function lsx_breadcrumbs_woocommerce_seperator_filter($defaults) {
85 85
 		$defaults['delimiter'] = '<i class="fa fa-angle-right" aria-hidden="true"></i>';
86 86
 		return $defaults;
87 87
 	}
88 88
 
89 89
 endif;
90 90
 
91
-add_filter( 'woocommerce_breadcrumb_defaults', 'lsx_breadcrumbs_woocommerce_seperator_filter' );
91
+add_filter('woocommerce_breadcrumb_defaults', 'lsx_breadcrumbs_woocommerce_seperator_filter');
92 92
 
93
-if ( ! function_exists( 'lsx_site_title' ) ) :
93
+if ( ! function_exists('lsx_site_title')) :
94 94
 
95 95
 	/**
96 96
 	 * Displays logo when applicable.
@@ -101,15 +101,15 @@  discard block
 block discarded – undo
101 101
 	function lsx_site_title() {
102 102
 		?>
103 103
 			<div class="site-branding">
104
-				<h1 class="site-title"><a title="<?php bloginfo( 'name' ); ?>" href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
105
-				<p class="site-description"><?php bloginfo( 'description' ); ?></p>
104
+				<h1 class="site-title"><a title="<?php bloginfo('name'); ?>" href="<?php echo esc_url(home_url('/')); ?>" rel="home"><?php bloginfo('name'); ?></a></h1>
105
+				<p class="site-description"><?php bloginfo('description'); ?></p>
106 106
 			</div>
107 107
 		<?php
108 108
 	}
109 109
 
110 110
 endif;
111 111
 
112
-if ( ! function_exists( 'lsx_post_meta_list_top' ) ) :
112
+if ( ! function_exists('lsx_post_meta_list_top')) :
113 113
 
114 114
 	/**
115 115
 	 * Add customisable post meta (post list - above title).
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
 
131 131
 endif;
132 132
 
133
-if ( ! function_exists( 'lsx_post_meta_single_top' ) ) :
133
+if ( ! function_exists('lsx_post_meta_single_top')) :
134 134
 
135 135
 	/**
136 136
 	 * Add customisable post meta (single post - above title).
@@ -150,11 +150,11 @@  discard block
 block discarded – undo
150 150
 endif;
151 151
 
152 152
 //add_action( 'lsx_post_meta_top', 'lsx_post_meta_avatar' );
153
-add_action( 'lsx_post_meta_top', 'lsx_post_meta_author' );
154
-add_action( 'lsx_post_meta_top', 'lsx_post_meta_date' );
155
-add_action( 'lsx_post_meta_top', 'lsx_post_meta_category' );
153
+add_action('lsx_post_meta_top', 'lsx_post_meta_author');
154
+add_action('lsx_post_meta_top', 'lsx_post_meta_date');
155
+add_action('lsx_post_meta_top', 'lsx_post_meta_category');
156 156
 
157
-if ( ! function_exists( 'lsx_post_meta_single_bottom' ) ) :
157
+if ( ! function_exists('lsx_post_meta_single_bottom')) :
158 158
 
159 159
 	/**
160 160
 	 * Add customisable post meta (single post - below title).
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
 
174 174
 endif;
175 175
 
176
-if ( ! function_exists( 'lsx_post_meta_avatar' ) ) :
176
+if ( ! function_exists('lsx_post_meta_avatar')) :
177 177
 
178 178
 	/**
179 179
 	 * Add customisable post meta: author's avatar.
@@ -183,20 +183,20 @@  discard block
 block discarded – undo
183 183
 	 */
184 184
 	function lsx_post_meta_avatar() {
185 185
 		$author = get_the_author();
186
-		$author_id = get_the_author_meta( 'ID' );
187
-		$author_avatar = get_avatar( $author_id, 80 );
188
-		$author_url = get_author_posts_url( $author_id );
186
+		$author_id = get_the_author_meta('ID');
187
+		$author_avatar = get_avatar($author_id, 80);
188
+		$author_url = get_author_posts_url($author_id);
189 189
 
190 190
 		printf(
191 191
 			'<a href="%1$s" class="post-meta-avatar">%2$s</a>',
192
-			esc_url( $author_url ),
193
-			wp_kses_post( $author_avatar )
192
+			esc_url($author_url),
193
+			wp_kses_post($author_avatar)
194 194
 		);
195 195
 	}
196 196
 
197 197
 endif;
198 198
 
199
-if ( ! function_exists( 'lsx_post_meta_date' ) ) :
199
+if ( ! function_exists('lsx_post_meta_date')) :
200 200
 
201 201
 	/**
202 202
 	 * Add customisable post meta: post date.
@@ -207,23 +207,23 @@  discard block
 block discarded – undo
207 207
 	function lsx_post_meta_date() {
208 208
 		$time_string = '<time class="entry-date published updated" datetime="%1$s">%2$s</time>';
209 209
 
210
-		$time_string = sprintf( $time_string,
211
-			esc_attr( get_the_date( 'c' ) ),
210
+		$time_string = sprintf($time_string,
211
+			esc_attr(get_the_date('c')),
212 212
 			get_the_date(),
213
-			esc_attr( get_the_modified_date( 'c' ) ),
213
+			esc_attr(get_the_modified_date('c')),
214 214
 			get_the_modified_date()
215 215
 		);
216 216
 
217 217
 		printf(
218 218
 			'<span class="post-meta-time updated"><a href="%1$s" rel="bookmark">%2$s</a></span>',
219
-			esc_url( get_permalink() ),
220
-			wp_kses_post( $time_string )
219
+			esc_url(get_permalink()),
220
+			wp_kses_post($time_string)
221 221
 		);
222 222
 	}
223 223
 
224 224
 endif;
225 225
 
226
-if ( ! function_exists( 'lsx_post_meta_author' ) ) :
226
+if ( ! function_exists('lsx_post_meta_author')) :
227 227
 
228 228
 	/**
229 229
 	 * Add customisable post meta: post author.
@@ -233,27 +233,27 @@  discard block
 block discarded – undo
233 233
 	 */
234 234
 	function lsx_post_meta_author() {
235 235
 		$author = get_the_author();
236
-		$author_url = get_author_posts_url( get_the_author_meta( 'ID' ) );
236
+		$author_url = get_author_posts_url(get_the_author_meta('ID'));
237 237
 
238
-		if ( empty( $author ) ) {
238
+		if (empty($author)) {
239 239
 			global $post;
240 240
 
241
-			$author = get_user_by( 'ID', $post->post_author );
241
+			$author = get_user_by('ID', $post->post_author);
242 242
 			$author = $author->display_name;
243
-			$author_url = get_author_posts_url( $post->post_author );
243
+			$author_url = get_author_posts_url($post->post_author);
244 244
 		}
245 245
 
246 246
 		printf(
247 247
 			'<span class="vcard post-meta-author"><span>%1$s</span> <span class="fn"><a href="%2$s">%3$s</a>, </span></span>',
248
-			esc_html__( 'By ', 'lsx' ),
249
-			esc_url( $author_url ),
250
-			esc_html( $author )
248
+			esc_html__('By ', 'lsx'),
249
+			esc_url($author_url),
250
+			esc_html($author)
251 251
 		);
252 252
 	}
253 253
 
254 254
 endif;
255 255
 
256
-if ( ! function_exists( 'lsx_post_meta_category' ) ) :
256
+if ( ! function_exists('lsx_post_meta_category')) :
257 257
 
258 258
 	/**
259 259
 	 * Add customisable post meta: post category(ies).
@@ -262,25 +262,25 @@  discard block
 block discarded – undo
262 262
 	 * @subpackage template-tags
263 263
 	 */
264 264
 	function lsx_post_meta_category() {
265
-		$post_categories = wp_get_post_categories( get_the_ID() );
265
+		$post_categories = wp_get_post_categories(get_the_ID());
266 266
 		$cats = array();
267 267
 
268
-		foreach ( $post_categories as $c ) {
269
-			$cat = get_category( $c );
268
+		foreach ($post_categories as $c) {
269
+			$cat = get_category($c);
270 270
 			/* Translators: %s: category name */
271
-			$cats[] = '<a href="' . esc_url( get_category_link( $cat->term_id ) ) . '" title="' . sprintf( esc_html__( 'View all posts in %s' , 'lsx' ), $cat->name ) . '">' . $cat->name . '</a>';
271
+			$cats[] = '<a href="' . esc_url(get_category_link($cat->term_id)) . '" title="' . sprintf(esc_html__('View all posts in %s', 'lsx'), $cat->name) . '">' . $cat->name . '</a>';
272 272
 		}
273 273
 
274
-		if ( ! empty( $cats ) ) {
274
+		if ( ! empty($cats)) {
275 275
 			?>
276
-			<span class="post-meta-categories"><span><?php esc_html_e( 'Posted in: ', 'lsx' ); ?></span> <?php echo wp_kses_post( implode( ', ', $cats ) ); ?></span>
276
+			<span class="post-meta-categories"><span><?php esc_html_e('Posted in: ', 'lsx'); ?></span> <?php echo wp_kses_post(implode(', ', $cats)); ?></span>
277 277
 			<?php
278 278
 		}
279 279
 	}
280 280
 
281 281
 endif;
282 282
 
283
-if ( ! function_exists( 'lsx_post_tags' ) ) :
283
+if ( ! function_exists('lsx_post_tags')) :
284 284
 
285 285
 	/**
286 286
 	 * Add customisable post meta: post tag(s).
@@ -289,10 +289,10 @@  discard block
 block discarded – undo
289 289
 	 * @subpackage template-tags
290 290
 	 */
291 291
 	function lsx_post_tags() {
292
-		if ( has_tag() ) :
292
+		if (has_tag()) :
293 293
 			?>
294 294
 			<div class="post-tags">
295
-				<span><?php echo esc_html__( 'Tags: ', 'lsx' ); ?></span><?php echo wp_kses_post( get_the_tag_list( '' ) ); ?>
295
+				<span><?php echo esc_html__('Tags: ', 'lsx'); ?></span><?php echo wp_kses_post(get_the_tag_list('')); ?>
296 296
 			</div>
297 297
 			<?php
298 298
 		endif;
@@ -300,9 +300,9 @@  discard block
 block discarded – undo
300 300
 
301 301
 endif;
302 302
 
303
-add_action( 'lsx_content_post_tags', 'lsx_post_tags', 10 );
303
+add_action('lsx_content_post_tags', 'lsx_post_tags', 10);
304 304
 
305
-if ( ! function_exists( 'lsx_sharing_output' ) ) :
305
+if ( ! function_exists('lsx_sharing_output')) :
306 306
 
307 307
 	/**
308 308
 	 * Display sharing buttons.
@@ -312,14 +312,14 @@  discard block
 block discarded – undo
312 312
 	 */
313 313
 	function lsx_sharing_output() {
314 314
 		global $lsx_sharing;
315
-		echo wp_kses_post( $lsx_sharing->sharing_buttons() );
315
+		echo wp_kses_post($lsx_sharing->sharing_buttons());
316 316
 	}
317 317
 
318 318
 endif;
319 319
 
320
-add_action( 'lsx_content_sharing', 'lsx_sharing_output', 20 );
320
+add_action('lsx_content_sharing', 'lsx_sharing_output', 20);
321 321
 
322
-if ( ! function_exists( 'lsx_translate_format_to_fontawesome' ) ) :
322
+if ( ! function_exists('lsx_translate_format_to_fontawesome')) :
323 323
 
324 324
 	/**
325 325
 	 * Translate post format to Font Awesome class.
@@ -327,8 +327,8 @@  discard block
 block discarded – undo
327 327
 	 * @package    lsx
328 328
 	 * @subpackage template-tags
329 329
 	 */
330
-	function lsx_translate_format_to_fontawesome( $format ) {
331
-		switch ( $format ) {
330
+	function lsx_translate_format_to_fontawesome($format) {
331
+		switch ($format) {
332 332
 			case 'image':
333 333
 				$format = 'camera';
334 334
 				break;
@@ -360,7 +360,7 @@  discard block
 block discarded – undo
360 360
 
361 361
 endif;
362 362
 
363
-if ( ! function_exists( 'lsx_paging_nav' ) ) :
363
+if ( ! function_exists('lsx_paging_nav')) :
364 364
 
365 365
 	/**
366 366
 	 * Display navigation to next/previous set of posts when applicable.
@@ -371,37 +371,37 @@  discard block
 block discarded – undo
371 371
 	function lsx_paging_nav() {
372 372
 		global $wp_query;
373 373
 
374
-		if ( $wp_query->max_num_pages < 2 ) {
374
+		if ($wp_query->max_num_pages < 2) {
375 375
 			return;
376 376
 		}
377 377
 
378
-		if ( true === apply_filters( 'lsx_paging_nav_disable', false ) ) {
378
+		if (true === apply_filters('lsx_paging_nav_disable', false)) {
379 379
 			return true;
380
-		} elseif ( current_theme_supports( 'infinite-scroll' ) && class_exists( 'The_Neverending_Home_Page' ) ) {
380
+		} elseif (current_theme_supports('infinite-scroll') && class_exists('The_Neverending_Home_Page')) {
381 381
 			return true;
382 382
 		} else {
383 383
 			$html = '';
384 384
 			$html .= '<div class="lsx-pagination-wrapper">' . PHP_EOL;
385 385
 			$html .= '<div class="lsx-breaker"></div>' . PHP_EOL;
386 386
 			$html .= '<div class="lsx-pagination">' . PHP_EOL;
387
-			$html .= paginate_links( array(
388
-				'base'               => str_replace( 999999999, '%#%', esc_url( get_pagenum_link( 999999999 ) ) ),
387
+			$html .= paginate_links(array(
388
+				'base'               => str_replace(999999999, '%#%', esc_url(get_pagenum_link(999999999))),
389 389
 				'format'             => '?paged=%#%',
390 390
 				'total'              => $wp_query->max_num_pages,
391
-				'current'            => max( 1, intval( get_query_var( 'paged' ) ) ),
392
-				'prev_text'          => '<span class="meta-nav">&larr;</span> ' . esc_html__( 'Previous', 'lsx' ),
393
-				'next_text'          => esc_html__( 'Next', 'lsx' ) . ' <span class="meta-nav">&rarr;</span>',
394
-			) );
391
+				'current'            => max(1, intval(get_query_var('paged'))),
392
+				'prev_text'          => '<span class="meta-nav">&larr;</span> ' . esc_html__('Previous', 'lsx'),
393
+				'next_text'          => esc_html__('Next', 'lsx') . ' <span class="meta-nav">&rarr;</span>',
394
+			));
395 395
 			$html .= '</div>' . PHP_EOL;
396 396
 			$html .= '</div>' . PHP_EOL;
397 397
 
398
-			echo wp_kses_post( $html );
398
+			echo wp_kses_post($html);
399 399
 		}
400 400
 	}
401 401
 
402 402
 endif;
403 403
 
404
-if ( ! function_exists( 'lsx_post_nav' ) ) :
404
+if ( ! function_exists('lsx_post_nav')) :
405 405
 
406 406
 	/**
407 407
 	 * Display navigation to next/previous post when applicable.
@@ -410,24 +410,24 @@  discard block
 block discarded – undo
410 410
 	 * @subpackage template-tags
411 411
 	 */
412 412
 	function lsx_post_nav() {
413
-		$previous = ( is_attachment() ) ? get_post( get_post()->post_parent ) : get_adjacent_post( false, '', true );
414
-		$next     = get_adjacent_post( false, '', false );
413
+		$previous = (is_attachment()) ? get_post(get_post()->post_parent) : get_adjacent_post(false, '', true);
414
+		$next     = get_adjacent_post(false, '', false);
415 415
 
416
-		if ( ! $next && ! $previous ) {
416
+		if ( ! $next && ! $previous) {
417 417
 			return;
418 418
 		}
419 419
 
420 420
 		$default_size = 'sm';
421
-		$size         = apply_filters( 'lsx_bootstrap_column_size', $default_size );
421
+		$size         = apply_filters('lsx_bootstrap_column_size', $default_size);
422 422
 		?>
423 423
 		<nav class="navigation post-navigation" role="navigation">
424 424
 			<div class="lsx-breaker"></div>
425 425
 			<div class="nav-links pager row">
426
-				<div class="previous <?php echo 'col-' . esc_attr( $size ) . '-6'; ?>">
427
-					<?php previous_post_link( '%link', '<p class="nav-links-description">' . esc_html_x( 'Previous Post', 'Previous post link', 'lsx' ) . '</p><h3>%title</h3>' ); ?>
426
+				<div class="previous <?php echo 'col-' . esc_attr($size) . '-6'; ?>">
427
+					<?php previous_post_link('%link', '<p class="nav-links-description">' . esc_html_x('Previous Post', 'Previous post link', 'lsx') . '</p><h3>%title</h3>'); ?>
428 428
 				</div>
429
-				<div class="next <?php echo 'col-' . esc_attr( $size ) . '-6'; ?>">
430
-					<?php next_post_link( '%link', '<p class="nav-links-description">' . esc_html_x( 'Next Post', 'Next post link', 'lsx' ) . '</p><h3>%title</h3>' ); ?>
429
+				<div class="next <?php echo 'col-' . esc_attr($size) . '-6'; ?>">
430
+					<?php next_post_link('%link', '<p class="nav-links-description">' . esc_html_x('Next Post', 'Next post link', 'lsx') . '</p><h3>%title</h3>'); ?>
431 431
 				</div>
432 432
 			</div><!-- .nav-links -->
433 433
 		</nav><!-- .navigation -->
@@ -436,7 +436,7 @@  discard block
 block discarded – undo
436 436
 
437 437
 endif;
438 438
 
439
-if ( ! function_exists( 'lsx_site_identity' ) ) :
439
+if ( ! function_exists('lsx_site_identity')) :
440 440
 
441 441
 	/**
442 442
 	 * Outputs either the Site Title or the Site Logo.
@@ -445,10 +445,10 @@  discard block
 block discarded – undo
445 445
 	 * @subpackage template-tags
446 446
 	 */
447 447
 	function lsx_site_identity() {
448
-		if ( function_exists( 'has_custom_logo' ) && has_custom_logo() ) {
448
+		if (function_exists('has_custom_logo') && has_custom_logo()) {
449 449
 			the_custom_logo();
450 450
 		} else {
451
-			if ( get_theme_mod( 'site_logo_header_text', 1 ) ) {
451
+			if (get_theme_mod('site_logo_header_text', 1)) {
452 452
 				lsx_site_title();
453 453
 			}
454 454
 		}
@@ -456,7 +456,7 @@  discard block
 block discarded – undo
456 456
 
457 457
 endif;
458 458
 
459
-if ( ! function_exists( 'lsx_navbar_header' ) ) :
459
+if ( ! function_exists('lsx_navbar_header')) :
460 460
 	/**
461 461
 	 * Outputs the Nav Menu.
462 462
 	 *
@@ -467,17 +467,17 @@  discard block
 block discarded – undo
467 467
 		?>
468 468
 		<div class="navbar-header" itemscope itemtype="http://schema.org/WebPage">
469 469
 			<?php
470
-				if ( has_nav_menu( 'primary' ) ) :
470
+				if (has_nav_menu('primary')) :
471 471
 					?>
472 472
 					<div class="wrapper-toggle" data-toggle="collapse" data-target=".primary-navbar">
473 473
 						<button type="button" class="navbar-toggle">
474
-							<span class="sr-only"><?php esc_html_e( 'Toggle navigation', 'lsx' ); ?></span>
474
+							<span class="sr-only"><?php esc_html_e('Toggle navigation', 'lsx'); ?></span>
475 475
 							<span class="icon-bar"></span>
476 476
 							<span class="icon-bar"></span>
477 477
 							<span class="icon-bar"></span>
478 478
 							<span class="icon-bar"></span>
479 479
 						</button>
480
-						<span class="mobile-menu-title"><?php esc_html_e( 'Menu', 'lsx' ); ?></span>
480
+						<span class="mobile-menu-title"><?php esc_html_e('Menu', 'lsx'); ?></span>
481 481
 					</div>
482 482
 					<?php
483 483
 				endif;
@@ -490,9 +490,9 @@  discard block
 block discarded – undo
490 490
 
491 491
 endif;
492 492
 
493
-add_action( 'lsx_nav_before', 'lsx_navbar_header' );
493
+add_action('lsx_nav_before', 'lsx_navbar_header');
494 494
 
495
-if ( ! function_exists( 'lsx_nav_menu' ) ) :
495
+if ( ! function_exists('lsx_nav_menu')) :
496 496
 	/**
497 497
 	 * Outputs the Nav Menu.
498 498
 	 *
@@ -500,17 +500,17 @@  discard block
 block discarded – undo
500 500
 	 * @subpackage template-tags
501 501
 	 */
502 502
 	function lsx_nav_menu() {
503
-		if ( has_nav_menu( 'primary' ) ) :
503
+		if (has_nav_menu('primary')) :
504 504
 			?>
505 505
 			<nav class="primary-navbar collapse navbar-collapse">
506 506
 				<?php
507
-					wp_nav_menu( array(
507
+					wp_nav_menu(array(
508 508
 						'theme_location' => 'primary',
509 509
 						'depth'          => 3,
510 510
 						'container'      => false,
511 511
 						'menu_class'     => 'nav navbar-nav',
512 512
 						'walker'         => new LSX_Bootstrap_Navwalker(),
513
-					) );
513
+					));
514 514
 				?>
515 515
 			</nav>
516 516
 			<?php
@@ -518,7 +518,7 @@  discard block
 block discarded – undo
518 518
 	}
519 519
 endif;
520 520
 
521
-if ( ! function_exists( 'lsx_sitemap_loops' ) ) {
521
+if ( ! function_exists('lsx_sitemap_loops')) {
522 522
 	/**
523 523
 	 * Outputs the loops on the sitemap
524 524
 	 *
@@ -526,18 +526,18 @@  discard block
 block discarded – undo
526 526
 	 * @subpackage template-tags
527 527
 	 */
528 528
 	function lsx_sitemap_loops() {
529
-		$sitemap_loops  = array(
529
+		$sitemap_loops = array(
530 530
 			'page'     => array(
531 531
 				'type'  => 'post_type',
532
-				'label' => __( 'Pages', 'lsx' ),
532
+				'label' => __('Pages', 'lsx'),
533 533
 			),
534 534
 			'post'     => array(
535 535
 				'type'  => 'post_type',
536
-				'label' => __( 'Posts', 'lsx' ),
536
+				'label' => __('Posts', 'lsx'),
537 537
 			),
538 538
 			'category' => array(
539 539
 				'type'  => 'taxonomy',
540
-				'label' => __( 'Categories', 'lsx' ),
540
+				'label' => __('Categories', 'lsx'),
541 541
 			),
542 542
 		);
543 543
 		$post_type_args = array(
@@ -545,41 +545,41 @@  discard block
 block discarded – undo
545 545
 			'_builtin' => false,
546 546
 			'show_ui'  => true,
547 547
 		);
548
-		$post_types     = get_post_types( $post_type_args, 'objects' );
549
-		if ( ! empty( $post_types ) ) {
550
-			foreach ( $post_types as $post_type_key => $post_type_obj ) {
551
-				$sitemap_loops[ $post_type_key ] = array(
548
+		$post_types = get_post_types($post_type_args, 'objects');
549
+		if ( ! empty($post_types)) {
550
+			foreach ($post_types as $post_type_key => $post_type_obj) {
551
+				$sitemap_loops[$post_type_key] = array(
552 552
 					'type'  => 'post_type',
553 553
 					'label' => $post_type_obj->label,
554 554
 				);
555 555
 			}
556 556
 		}
557
-		$taxonomy_args  = array(
557
+		$taxonomy_args = array(
558 558
 			'public'   => true,
559 559
 			'_builtin' => false,
560 560
 			'show_ui'  => true,
561 561
 		);
562
-		$taxonomies     = get_taxonomies( $taxonomy_args, 'objects' );
563
-		if ( ! empty( $taxonomies ) ) {
564
-			foreach ( $taxonomies as $tax_key => $tax_obj ) {
565
-				$sitemap_loops[ $tax_key ] = array(
562
+		$taxonomies = get_taxonomies($taxonomy_args, 'objects');
563
+		if ( ! empty($taxonomies)) {
564
+			foreach ($taxonomies as $tax_key => $tax_obj) {
565
+				$sitemap_loops[$tax_key] = array(
566 566
 					'type'  => 'taxonomy',
567 567
 					'label' => $tax_obj->label,
568 568
 				);
569 569
 			}
570 570
 		}
571
-		$sitemap_loops = apply_filters( 'lsx_sitemap_loops_list', $sitemap_loops );
572
-		foreach ( $sitemap_loops as $sitemap_key => $sitemap_values ) {
573
-			if ( 'post_type' === $sitemap_values['type'] ) {
574
-				lsx_sitemap_custom_post_type( $sitemap_key, $sitemap_values['label'] );
571
+		$sitemap_loops = apply_filters('lsx_sitemap_loops_list', $sitemap_loops);
572
+		foreach ($sitemap_loops as $sitemap_key => $sitemap_values) {
573
+			if ('post_type' === $sitemap_values['type']) {
574
+				lsx_sitemap_custom_post_type($sitemap_key, $sitemap_values['label']);
575 575
 			} else {
576
-				lsx_sitemap_taxonomy( $sitemap_key, $sitemap_values['label'] );
576
+				lsx_sitemap_taxonomy($sitemap_key, $sitemap_values['label']);
577 577
 			}
578 578
 		}
579 579
 	}
580 580
 }
581 581
 
582
-if ( ! function_exists( 'lsx_sitemap_pages' ) ) :
582
+if ( ! function_exists('lsx_sitemap_pages')) :
583 583
 
584 584
 	/**
585 585
 	 * Outputs Pages for the Sitemap Template.
@@ -595,15 +595,15 @@  discard block
 block discarded – undo
595 595
 			'post_type'      => 'page',
596 596
 		);
597 597
 
598
-		$pages = new WP_Query( $page_args );
598
+		$pages = new WP_Query($page_args);
599 599
 
600
-		if ( $pages->have_posts() ) {
601
-			echo '<h2>' . esc_html__( 'Pages', 'lsx' ) . '</h2>';
600
+		if ($pages->have_posts()) {
601
+			echo '<h2>' . esc_html__('Pages', 'lsx') . '</h2>';
602 602
 			echo '<ul>';
603 603
 
604
-			while ( $pages->have_posts() ) {
604
+			while ($pages->have_posts()) {
605 605
 				$pages->the_post();
606
-				echo '<li class="page_item page-item-' . esc_attr( get_the_ID() ) . '"><a href="' . esc_url( get_permalink() ) . '" title="">' . get_the_title() . '</a></li>';
606
+				echo '<li class="page_item page-item-' . esc_attr(get_the_ID()) . '"><a href="' . esc_url(get_permalink()) . '" title="">' . get_the_title() . '</a></li>';
607 607
 			}
608 608
 
609 609
 			echo '</ul>';
@@ -613,7 +613,7 @@  discard block
 block discarded – undo
613 613
 
614 614
 endif;
615 615
 
616
-if ( ! function_exists( 'lsx_sitemap_custom_post_type' ) ) :
616
+if ( ! function_exists('lsx_sitemap_custom_post_type')) :
617 617
 
618 618
 	/**
619 619
 	 * Outputs a custom post type section.
@@ -621,18 +621,18 @@  discard block
 block discarded – undo
621 621
 	 * @package    lsx
622 622
 	 * @subpackage template-tags
623 623
 	 */
624
-	function lsx_sitemap_custom_post_type( $forced_type = '', $label = '' ) {
625
-		if ( '' !== $forced_type ) {
626
-			$post_types = array( $forced_type );
624
+	function lsx_sitemap_custom_post_type($forced_type = '', $label = '') {
625
+		if ('' !== $forced_type) {
626
+			$post_types = array($forced_type);
627 627
 		} else {
628 628
 			$args = array(
629 629
 				'public'   => true,
630 630
 				'_builtin' => false,
631 631
 			);
632
-			$post_types = get_post_types( $args, 'names' );
632
+			$post_types = get_post_types($args, 'names');
633 633
 		}
634 634
 
635
-		foreach ( $post_types as $post_type ) {
635
+		foreach ($post_types as $post_type) {
636 636
 			$post_type_args = array(
637 637
 				'post_type'      => 'page',
638 638
 				'posts_per_page' => 99,
@@ -640,24 +640,24 @@  discard block
 block discarded – undo
640 640
 				'post_type'      => $post_type,
641 641
 			);
642 642
 
643
-			$post_type_items  = new WP_Query( $post_type_args );
644
-			$post_type_object = get_post_type_object( $post_type );
643
+			$post_type_items  = new WP_Query($post_type_args);
644
+			$post_type_object = get_post_type_object($post_type);
645 645
 
646
-			if ( '' !== $label ) {
646
+			if ('' !== $label) {
647 647
 				$title = $label;
648
-			} elseif ( ! empty( $post_type_object ) ) {
648
+			} elseif ( ! empty($post_type_object)) {
649 649
 				$title = $post_type_object->labels->name;
650 650
 			} else {
651
-				$title = ucwords( $post_type );
651
+				$title = ucwords($post_type);
652 652
 			}
653 653
 
654
-			if ( $post_type_items->have_posts() ) {
655
-				echo '<h2>' . esc_html( $title ) . '</h2>';
654
+			if ($post_type_items->have_posts()) {
655
+				echo '<h2>' . esc_html($title) . '</h2>';
656 656
 				echo '<ul>';
657 657
 
658
-				while ( $post_type_items->have_posts() ) {
658
+				while ($post_type_items->have_posts()) {
659 659
 					$post_type_items->the_post();
660
-					echo '<li class="' . esc_attr( get_post_type() ) . '_item ' . esc_attr( get_post_type() ) . '-item-' . esc_attr( get_the_ID() ) . '"><a href="' . esc_url( get_permalink() ) . '" title="">' . get_the_title() . '</a></li>';
660
+					echo '<li class="' . esc_attr(get_post_type()) . '_item ' . esc_attr(get_post_type()) . '-item-' . esc_attr(get_the_ID()) . '"><a href="' . esc_url(get_permalink()) . '" title="">' . get_the_title() . '</a></li>';
661 661
 				}
662 662
 
663 663
 				echo '</ul>';
@@ -673,24 +673,24 @@  discard block
 block discarded – undo
673 673
  *
674 674
  * @return void
675 675
  */
676
-function lsx_sitemap_taxonomy( $taxonomy = '', $label = '' ) {
677
-	if ( '' !== $taxonomy ) {
678
-		$terms = get_terms( $taxonomy );
679
-		if ( ! empty( $terms ) ) {
676
+function lsx_sitemap_taxonomy($taxonomy = '', $label = '') {
677
+	if ('' !== $taxonomy) {
678
+		$terms = get_terms($taxonomy);
679
+		if ( ! empty($terms)) {
680 680
 
681
-			if ( '' !== $label ) {
681
+			if ('' !== $label) {
682 682
 				$title = $label;
683 683
 			} else {
684
-				$title = ucwords( $taxonomy );
684
+				$title = ucwords($taxonomy);
685 685
 			}
686 686
 
687 687
 			echo '<div class="sitemap-rows">';
688
-			echo '<h2>' . wp_kses_post( $title ) . '</h2>';
688
+			echo '<h2>' . wp_kses_post($title) . '</h2>';
689 689
 			echo '<ul>';
690
-			foreach ( $terms as $term ) {
690
+			foreach ($terms as $term) {
691 691
 				$name = $term->name;
692
-				$permalink = get_term_link( $term->term_id );
693
-				echo '<li><a href="' . esc_attr( $permalink ) . '">' . esc_attr( $name ) . '</a></li>';
692
+				$permalink = get_term_link($term->term_id);
693
+				echo '<li><a href="' . esc_attr($permalink) . '">' . esc_attr($name) . '</a></li>';
694 694
 			}
695 695
 			echo '</ul>';
696 696
 			echo '</div>';
@@ -698,7 +698,7 @@  discard block
 block discarded – undo
698 698
 	}
699 699
 }
700 700
 
701
-if ( ! function_exists( 'lsx_sitemap_taxonomy_clouds' ) ) :
701
+if ( ! function_exists('lsx_sitemap_taxonomy_clouds')) :
702 702
 
703 703
 	/**
704 704
 	 * Outputs the public taxonomies.
@@ -712,18 +712,18 @@  discard block
 block discarded – undo
712 712
 			'_builtin' => false,
713 713
 		);
714 714
 
715
-		$taxonomies = get_taxonomies( $taxonomy_args );
715
+		$taxonomies = get_taxonomies($taxonomy_args);
716 716
 
717
-		if ( ! empty( $taxonomies ) ) {
718
-			foreach ( $taxonomies as $taxonomy_id => $taxonomy ) {
719
-				$tag_cloud = wp_tag_cloud( array(
717
+		if ( ! empty($taxonomies)) {
718
+			foreach ($taxonomies as $taxonomy_id => $taxonomy) {
719
+				$tag_cloud = wp_tag_cloud(array(
720 720
 					'taxonomy' => $taxonomy_id,
721 721
 					'echo'     => false,
722
-				) );
722
+				));
723 723
 
724
-				if ( ! empty( $tag_cloud ) ) {
725
-					echo '<h2>' . esc_html( $taxonomy ) . '</h2>';
726
-					echo '<aside id="' . esc_attr( $taxonomy_id ) . '" class="widget widget_' . esc_attr( $taxonomy_id ) . '">' . esc_html( $tag_cloud ) . '</aside>';
724
+				if ( ! empty($tag_cloud)) {
725
+					echo '<h2>' . esc_html($taxonomy) . '</h2>';
726
+					echo '<aside id="' . esc_attr($taxonomy_id) . '" class="widget widget_' . esc_attr($taxonomy_id) . '">' . esc_html($tag_cloud) . '</aside>';
727 727
 				}
728 728
 			}
729 729
 		}
@@ -731,7 +731,7 @@  discard block
 block discarded – undo
731 731
 
732 732
 endif;
733 733
 
734
-if ( ! function_exists( 'lsx_add_top_menu' ) ) :
734
+if ( ! function_exists('lsx_add_top_menu')) :
735 735
 
736 736
 	/**
737 737
 	 * Adds our top menu to the theme.
@@ -740,28 +740,28 @@  discard block
 block discarded – undo
740 740
 	 * @subpackage template-tags
741 741
 	 */
742 742
 	function lsx_add_top_menu() {
743
-		if ( has_nav_menu( 'top-menu' ) || has_nav_menu( 'top-menu-left' ) ) :
743
+		if (has_nav_menu('top-menu') || has_nav_menu('top-menu-left')) :
744 744
 			?>
745 745
 			<div id="top-menu" class="<?php lsx_top_menu_classes(); ?>">
746 746
 				<div class="container">
747
-					<?php if ( has_nav_menu( 'top-menu' ) ) : ?>
747
+					<?php if (has_nav_menu('top-menu')) : ?>
748 748
 						<nav class="top-menu">
749 749
 							<?php
750
-								wp_nav_menu( array(
750
+								wp_nav_menu(array(
751 751
 									'theme_location' => 'top-menu',
752 752
 									'walker'         => new LSX_Bootstrap_Navwalker(),
753
-								) );
753
+								));
754 754
 							?>
755 755
 						</nav>
756 756
 					<?php endif; ?>
757 757
 
758
-					<?php if ( has_nav_menu( 'top-menu-left' ) ) : ?>
758
+					<?php if (has_nav_menu('top-menu-left')) : ?>
759 759
 						<nav class="top-menu pull-left">
760 760
 							<?php
761
-								wp_nav_menu( array(
761
+								wp_nav_menu(array(
762 762
 									'theme_location' => 'top-menu-left',
763 763
 									'walker'         => new LSX_Bootstrap_Navwalker(),
764
-								) );
764
+								));
765 765
 							?>
766 766
 						</nav>
767 767
 					<?php endif; ?>
@@ -773,9 +773,9 @@  discard block
 block discarded – undo
773 773
 
774 774
 endif;
775 775
 
776
-add_action( 'lsx_header_before', 'lsx_add_top_menu' );
776
+add_action('lsx_header_before', 'lsx_add_top_menu');
777 777
 
778
-if ( ! function_exists( 'lsx_get_my_url' ) ) :
778
+if ( ! function_exists('lsx_get_my_url')) :
779 779
 
780 780
 	/**
781 781
 	 * Return URL from a link in the content.
@@ -784,11 +784,11 @@  discard block
 block discarded – undo
784 784
 	 * @subpackage template-tags
785 785
 	 */
786 786
 	function lsx_get_my_url() {
787
-		if ( ! preg_match( '/^<a\s[^>]*?href=[\'"](.+?)[\'"]$/is', get_the_content(), $matches ) ) {
787
+		if ( ! preg_match('/^<a\s[^>]*?href=[\'"](.+?)[\'"]$/is', get_the_content(), $matches)) {
788 788
 			return false;
789 789
 		}
790 790
 
791
-		return esc_url_raw( $matches[1] );
791
+		return esc_url_raw($matches[1]);
792 792
 	}
793 793
 
794 794
 endif;
Please login to merge, or discard this patch.
includes/deprecated.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@
 block discarded – undo
6 6
  * @subpackage deprecated
7 7
  */
8 8
 
9
-if ( ! defined( 'ABSPATH' ) ) {
9
+if ( ! defined('ABSPATH')) {
10 10
 	exit;
11 11
 }
12 12
 
Please login to merge, or discard this patch.