Passed
Push — master ( 21f271...41e4ce )
by Warwick
02:15 queued 12s
created
partials/content-custom.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -16,12 +16,12 @@
 block discarded – undo
16 16
 		<?php
17 17
 			the_content();
18 18
 
19
-			wp_link_pages( array(
19
+			wp_link_pages(array(
20 20
 				'before'      => '<div class="lsx-postnav-wrapper"><div class="lsx-postnav">',
21 21
 				'after'       => '</div></div>',
22 22
 				'link_before' => '<span>',
23 23
 				'link_after'  => '</span>',
24
-			) );
24
+			));
25 25
 		?>
26 26
 	</div><!-- .entry-content -->
27 27
 
Please login to merge, or discard this patch.
partials/content-page.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -16,12 +16,12 @@
 block discarded – undo
16 16
 		<?php
17 17
 			the_content();
18 18
 
19
-			wp_link_pages( array(
19
+			wp_link_pages(array(
20 20
 				'before'      => '<div class="lsx-postnav-wrapper"><div class="lsx-postnav">',
21 21
 				'after'       => '</div></div>',
22 22
 				'link_before' => '<span>',
23 23
 				'link_after'  => '</span>',
24
-			) );
24
+			));
25 25
 		?>
26 26
 	</div><!-- .entry-content -->
27 27
 
Please login to merge, or discard this patch.
includes/admin/welcome-screen/component-header.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -9,21 +9,21 @@  discard block
 block discarded – undo
9 9
 
10 10
 <div class="row">
11 11
 	<div class="col-md-12">
12
-		<h1><span class="logo"><?php echo esc_html__( 'LSX', 'lsx' ); ?></span> <sup class="version"><?php echo esc_html( LSX_VERSION ); ?></sup></h1>
12
+		<h1><span class="logo"><?php echo esc_html__('LSX', 'lsx'); ?></span> <sup class="version"><?php echo esc_html(LSX_VERSION); ?></sup></h1>
13 13
 	</div>
14 14
 </div>
15 15
 
16 16
 <div class="row">
17 17
 	<div class="col-md-6">
18 18
 		<div class="box enrich">
19
-			<h2><?php esc_html_e( 'Built to enrich your WordPress experience', 'lsx' ); ?></h2>
20
-			<p><?php esc_html_e( 'Whether you\'re using LSX for your personal blog, as the platform for a powerful WooCommerce store or as the foundation for your own child-theme, you\'ll find it\'s the perfect fit for WordPress.', 'lsx' ); ?></p>
19
+			<h2><?php esc_html_e('Built to enrich your WordPress experience', 'lsx'); ?></h2>
20
+			<p><?php esc_html_e('Whether you\'re using LSX for your personal blog, as the platform for a powerful WooCommerce store or as the foundation for your own child-theme, you\'ll find it\'s the perfect fit for WordPress.', 'lsx'); ?></p>
21 21
 
22 22
 			<p>
23 23
 				<?php
24 24
 					printf(
25 25
 						/* Translators: 1: HTML open tag link, 2: HTML close tag link */
26
-						esc_html__( 'Use LSX with our %1$sTour Operator Plugin%2$s to create the ultimate tour operators website!', 'lsx' ),
26
+						esc_html__('Use LSX with our %1$sTour Operator Plugin%2$s to create the ultimate tour operators website!', 'lsx'),
27 27
 						'<a href="https://wordpress.org/plugins/tour-operator/ target="_blank" rel="noreferrer noopener">',
28 28
 						'</a>'
29 29
 					);
@@ -34,13 +34,13 @@  discard block
 block discarded – undo
34 34
 
35 35
 	<div class="col-md-6">
36 36
 		<div class="box support">
37
-			<h2><?php esc_html_e( 'Get support', 'lsx' ); ?></h2>
37
+			<h2><?php esc_html_e('Get support', 'lsx'); ?></h2>
38 38
 
39 39
 			<p>
40 40
 				<?php
41 41
 					printf(
42 42
 						/* Translators: 1: HTML open tag link, 2: HTML close tag link, 3: HTML open tag link, 4: HTML close tag link */
43
-						esc_html__( 'You\'ll find information on how to use and customize the LSX theme in our %1$sdocumentation%2$s section. However, please do %3$scontact us%4$s for support should you still find yourself unable to achieve your needs.', 'lsx' ),
43
+						esc_html__('You\'ll find information on how to use and customize the LSX theme in our %1$sdocumentation%2$s section. However, please do %3$scontact us%4$s for support should you still find yourself unable to achieve your needs.', 'lsx'),
44 44
 						'<a href="https://www.lsdev.biz/documentation/lsx/" target="_blank" rel="noreferrer noopener">',
45 45
 						'</a>',
46 46
 						'<a href="https://www.lsdev.biz/contact-us/" target="_blank" rel="noreferrer noopener">',
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 
52 52
 			<div class="more-button">
53 53
 				<a href="https://www.lsdev.biz/contact-us/" target="_blank" rel="noreferrer" class="button button-primary" >
54
-					<?php esc_html_e( 'Get in touch', 'lsx' ); ?>
54
+					<?php esc_html_e('Get in touch', 'lsx'); ?>
55 55
 				</a>
56 56
 			</div>
57 57
 		</div>
Please login to merge, or discard this patch.
includes/admin/welcome-screen/component-enhance.php 1 patch
Spacing   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -10,28 +10,28 @@  discard block
 block discarded – undo
10 10
 <div class="row">
11 11
 	<div class="col-md-12">
12 12
 		<div class="box enhance">
13
-			<h2><?php esc_html_e( 'Enhance LSX', 'lsx' ); ?></h2>
14
-			<p><?php esc_html_e( 'Take a look at our range of extensions that add to the already rich functionality of the LSX WordPress theme.', 'lsx' ); ?></p>
13
+			<h2><?php esc_html_e('Enhance LSX', 'lsx'); ?></h2>
14
+			<p><?php esc_html_e('Take a look at our range of extensions that add to the already rich functionality of the LSX WordPress theme.', 'lsx'); ?></p>
15 15
 
16 16
 			<div class="row">
17 17
 				<div class="col-md-4">
18 18
 					<div class="box-clean">
19
-						<a href="https://wordpress.org/plugins/lsx-banners/" target="_blank"><?php esc_html_e( 'Banners', 'lsx' ); ?></a>
20
-						<p><?php esc_html_e( 'The LSX Banners extension adds advanced banner configuration options to your WordPress site running LSX theme.', 'lsx' ); ?></p>
19
+						<a href="https://wordpress.org/plugins/lsx-banners/" target="_blank"><?php esc_html_e('Banners', 'lsx'); ?></a>
20
+						<p><?php esc_html_e('The LSX Banners extension adds advanced banner configuration options to your WordPress site running LSX theme.', 'lsx'); ?></p>
21 21
 					</div>
22 22
 				</div>
23 23
 
24 24
 				<div class="col-md-4">
25 25
 					<div class="box-clean">
26
-						<a href="https://wordpress.org/plugins/lsx-currencies/" target="_blank"><?php esc_html_e( 'Currencies', 'lsx' ); ?></a>
27
-						<p><?php esc_html_e( 'The LSX Currencies extension adds currency selection functionality to sites, allowing users to view your products in whatever currencies you choose to sell in.', 'lsx' ); ?></p>
26
+						<a href="https://wordpress.org/plugins/lsx-currencies/" target="_blank"><?php esc_html_e('Currencies', 'lsx'); ?></a>
27
+						<p><?php esc_html_e('The LSX Currencies extension adds currency selection functionality to sites, allowing users to view your products in whatever currencies you choose to sell in.', 'lsx'); ?></p>
28 28
 					</div>
29 29
 				</div>
30 30
 
31 31
 				<div class="col-md-4">
32 32
 					<div class="box-clean">
33
-						<a href="https://wordpress.org/plugins/lsx-blog-customizer/" target="_blank"><?php esc_html_e( 'Blog Customizer', 'lsx' ); ?></a>
34
-						<p><?php esc_html_e( 'It allows you it to customize various aspects of the the appearance of your blog, posts widgets, archive pages and single posts so they looks exactly how you want.', 'lsx' ); ?></p>
33
+						<a href="https://wordpress.org/plugins/lsx-blog-customizer/" target="_blank"><?php esc_html_e('Blog Customizer', 'lsx'); ?></a>
34
+						<p><?php esc_html_e('It allows you it to customize various aspects of the the appearance of your blog, posts widgets, archive pages and single posts so they looks exactly how you want.', 'lsx'); ?></p>
35 35
 					</div>
36 36
 				</div>
37 37
 			</div>
@@ -39,22 +39,22 @@  discard block
 block discarded – undo
39 39
 			<div class="row">
40 40
 				<div class="col-md-4">
41 41
 					<div class="box-clean">
42
-						<a href="https://wordpress.org/plugins/lsx-customizer/" target="_blank"><?php esc_html_e( 'Customizer', 'lsx' ); ?></a>
43
-						<p><?php esc_html_e( 'You\'ve installed LSX, so now why not make it all yours? Whether it\'s a small CSS tweak or changing the entire layout of pages, posts or archives, please make use of the Theme Customizer plugin.', 'lsx' ); ?></p>
42
+						<a href="https://wordpress.org/plugins/lsx-customizer/" target="_blank"><?php esc_html_e('Customizer', 'lsx'); ?></a>
43
+						<p><?php esc_html_e('You\'ve installed LSX, so now why not make it all yours? Whether it\'s a small CSS tweak or changing the entire layout of pages, posts or archives, please make use of the Theme Customizer plugin.', 'lsx'); ?></p>
44 44
 					</div>
45 45
 				</div>
46 46
 
47 47
 				<div class="col-md-4">
48 48
 					<div class="box-clean">
49
-						<a href="https://wordpress.org/plugins/lsx-login/" target="_blank"><?php esc_html_e( 'Login', 'lsx' ); ?></a>
50
-						<p><?php esc_html_e( 'The LSX Login extension allows users to log into a dashboard and then see configurable content based on which users can access which content.', 'lsx' ); ?></p>
49
+						<a href="https://wordpress.org/plugins/lsx-login/" target="_blank"><?php esc_html_e('Login', 'lsx'); ?></a>
50
+						<p><?php esc_html_e('The LSX Login extension allows users to log into a dashboard and then see configurable content based on which users can access which content.', 'lsx'); ?></p>
51 51
 					</div>
52 52
 				</div>
53 53
 
54 54
 				<div class="col-md-4">
55 55
 					<div class="box-clean">
56
-						<a href="https://wordpress.org/plugins/lsx-mega-menus/" target="_blank"><?php esc_html_e( 'Mega Menus', 'lsx' ); ?></a>
57
-						<p><?php esc_html_e( 'Create custom, full-width dropdown menus that contain images, widgets and more that seamlessly tie into your LSX WordPress site.', 'lsx' ); ?></p>
56
+						<a href="https://wordpress.org/plugins/lsx-mega-menus/" target="_blank"><?php esc_html_e('Mega Menus', 'lsx'); ?></a>
57
+						<p><?php esc_html_e('Create custom, full-width dropdown menus that contain images, widgets and more that seamlessly tie into your LSX WordPress site.', 'lsx'); ?></p>
58 58
 					</div>
59 59
 				</div>
60 60
 			</div>
@@ -62,22 +62,22 @@  discard block
 block discarded – undo
62 62
 			<div class="row">
63 63
 				<div class="col-md-4">
64 64
 					<div class="box-clean">
65
-						<a href="https://wordpress.org/plugins/lsx-team/" target="_blank"><?php esc_html_e( 'Team', 'lsx' ); ?></a>
66
-						<p><?php esc_html_e( 'The LSX Team Extension provides a custom post type that allows you to easily show off the people that make up your business.', 'lsx' ); ?></p>
65
+						<a href="https://wordpress.org/plugins/lsx-team/" target="_blank"><?php esc_html_e('Team', 'lsx'); ?></a>
66
+						<p><?php esc_html_e('The LSX Team Extension provides a custom post type that allows you to easily show off the people that make up your business.', 'lsx'); ?></p>
67 67
 					</div>
68 68
 				</div>
69 69
 
70 70
 				<div class="col-md-4">
71 71
 					<div class="box-clean">
72
-						<a href="https://wordpress.org/plugins/lsx-testimonials/" target="_blank"><?php esc_html_e( 'Testimonials', 'lsx' ); ?></a>
73
-						<p><?php esc_html_e( 'The LSX Testimonials extension adds the "Testimonials" post type, which you can display front-and-centre on your site.', 'lsx' ); ?></p>
72
+						<a href="https://wordpress.org/plugins/lsx-testimonials/" target="_blank"><?php esc_html_e('Testimonials', 'lsx'); ?></a>
73
+						<p><?php esc_html_e('The LSX Testimonials extension adds the "Testimonials" post type, which you can display front-and-centre on your site.', 'lsx'); ?></p>
74 74
 					</div>
75 75
 				</div>
76 76
 
77 77
 				<div class="col-md-4">
78 78
 					<div class="box-clean">
79
-						<a href="https://wordpress.org/plugins/lsx-geo-content/" target="_blank"><?php esc_html_e( 'Geo Content', 'lsx' ); ?></a>
80
-						<p><?php esc_html_e( 'LSX Geo Content allows you to serve different content to users based on their automatically-detected IP address.', 'lsx' ); ?></p>
79
+						<a href="https://wordpress.org/plugins/lsx-geo-content/" target="_blank"><?php esc_html_e('Geo Content', 'lsx'); ?></a>
80
+						<p><?php esc_html_e('LSX Geo Content allows you to serve different content to users based on their automatically-detected IP address.', 'lsx'); ?></p>
81 81
 					</div>
82 82
 				</div>
83 83
 			</div>
@@ -85,22 +85,22 @@  discard block
 block discarded – undo
85 85
 			<div class="row">
86 86
 				<div class="col-md-4">
87 87
 					<div class="box-clean">
88
-						<a href="https://wordpress.org/plugins/lsx-videos/" target="_blank"><?php esc_html_e( 'Videos', 'lsx' ); ?></a>
89
-						<p><?php esc_html_e( 'Adds the "Videos" post type to your LSX website which allows you to display and categorize videos.', 'lsx' ); ?></p>
88
+						<a href="https://wordpress.org/plugins/lsx-videos/" target="_blank"><?php esc_html_e('Videos', 'lsx'); ?></a>
89
+						<p><?php esc_html_e('Adds the "Videos" post type to your LSX website which allows you to display and categorize videos.', 'lsx'); ?></p>
90 90
 					</div>
91 91
 				</div>
92 92
 
93 93
 				<div class="col-md-4">
94 94
 					<div class="box-clean">
95
-						<a href="https://wordpress.org/plugins/lsx-projects/" target="_blank"><?php esc_html_e( 'Projects', 'lsx' ); ?></a>
96
-						<p><?php esc_html_e( 'Show off your finest work with the LSX Projects Extension! It adds a "Project" post type, allowing you to categorize and display your Projects on your LSX website.', 'lsx' ); ?></p>
95
+						<a href="https://wordpress.org/plugins/lsx-projects/" target="_blank"><?php esc_html_e('Projects', 'lsx'); ?></a>
96
+						<p><?php esc_html_e('Show off your finest work with the LSX Projects Extension! It adds a "Project" post type, allowing you to categorize and display your Projects on your LSX website.', 'lsx'); ?></p>
97 97
 					</div>
98 98
 				</div>
99 99
 
100 100
 				<div class="col-md-4">
101 101
 					<div class="box-clean">
102
-						<a href="https://wordpress.org/plugins/lsx-sharing/" target="_blank"><?php esc_html_e( 'Sharing', 'lsx' ); ?></a>
103
-						<p><?php esc_html_e( 'LSX Sharing adds buttons to your posts that your readers can use to share your content on Facebook, Twitter and Pinterest.', 'lsx' ); ?></p>
102
+						<a href="https://wordpress.org/plugins/lsx-sharing/" target="_blank"><?php esc_html_e('Sharing', 'lsx'); ?></a>
103
+						<p><?php esc_html_e('LSX Sharing adds buttons to your posts that your readers can use to share your content on Facebook, Twitter and Pinterest.', 'lsx'); ?></p>
104 104
 					</div>
105 105
 				</div>
106 106
 			</div>
Please login to merge, or discard this patch.
comment.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -5,25 +5,25 @@  discard block
 block discarded – undo
5 5
  * @package lsx
6 6
  */
7 7
 
8
-if ( isset( $GLOBALS['comment_depth'] ) ) {
9
-	$depth = intval( $GLOBALS['comment_depth'] );
8
+if (isset($GLOBALS['comment_depth'])) {
9
+	$depth = intval($GLOBALS['comment_depth']);
10 10
 } else {
11 11
 	$depth = 1;
12 12
 }
13 13
 
14
-$max_depth = intval( get_option( 'thread_comments_depth' ) );
14
+$max_depth = intval(get_option('thread_comments_depth'));
15 15
 
16
-echo get_avatar( $comment, '128' );
16
+echo get_avatar($comment, '128');
17 17
 ?>
18 18
 <div class="media-body">
19 19
 	<h4 class="media-heading"><?php echo get_comment_author_link(); ?></h4>
20 20
 
21
-	<time datetime="<?php echo comment_date( 'c' ); ?>">
22
-		<a href="<?php echo esc_url( get_comment_link( $comment->comment_ID ) ); ?>">
21
+	<time datetime="<?php echo comment_date('c'); ?>">
22
+		<a href="<?php echo esc_url(get_comment_link($comment->comment_ID)); ?>">
23 23
 			<?php
24 24
 				printf(
25 25
 					/* Translators: 1: post date, 2: post time */
26
-					esc_html__( '%1$s on %2$s', 'lsx' ),
26
+					esc_html__('%1$s on %2$s', 'lsx'),
27 27
 					get_comment_date(),
28 28
 					get_comment_time()
29 29
 				);
@@ -31,11 +31,11 @@  discard block
 block discarded – undo
31 31
 		</a>
32 32
 	</time>
33 33
 
34
-	<?php edit_comment_link( esc_html__( '(Edit)', 'lsx' ), '', '' ); ?>
34
+	<?php edit_comment_link(esc_html__('(Edit)', 'lsx'), '', ''); ?>
35 35
 
36
-	<?php if ( ! $comment->comment_approved ) : ?>
36
+	<?php if ( ! $comment->comment_approved) : ?>
37 37
 		<div class="alert alert-info">
38
-			<?php esc_html_e( 'Your comment is awaiting moderation.', 'lsx' ); ?>
38
+			<?php esc_html_e('Your comment is awaiting moderation.', 'lsx'); ?>
39 39
 		</div>
40 40
 	<?php endif; ?>
41 41
 
Please login to merge, or discard this patch.
partials/content-none.php 2 patches
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -8,25 +8,25 @@
 block discarded – undo
8 8
 
9 9
 <section class="no-results not-found">
10 10
 	<header class="page-header">
11
-		<h1 class="page-title"><?php esc_html_e( 'Nothing Found', 'lsx' ); ?></h1>
11
+		<h1 class="page-title"><?php esc_html_e('Nothing Found', 'lsx'); ?></h1>
12 12
 	</header><!-- .page-header -->
13 13
 
14 14
 	<div class="page-content">
15 15
 
16
-		<?php if ( is_home() && current_user_can( 'publish_posts' ) ) : ?>
16
+		<?php if (is_home() && current_user_can('publish_posts')) : ?>
17 17
 
18
-			<p><?php esc_html_e( 'Ready to publish your first post?', 'lsx' ); ?> <a href="<?php echo esc_url( admin_url( 'post-new.php' ) ); ?>"><?php esc_html_e( 'Get started here', 'lsx' ); ?></a></p>
18
+			<p><?php esc_html_e('Ready to publish your first post?', 'lsx'); ?> <a href="<?php echo esc_url(admin_url('post-new.php')); ?>"><?php esc_html_e('Get started here', 'lsx'); ?></a></p>
19 19
 
20
-		<?php elseif ( is_search() ) : ?>
20
+		<?php elseif (is_search()) : ?>
21 21
 
22
-			<p><?php esc_html_e( 'Your search for "', 'lsx' ); ?><?php echo get_search_query(); ?><?php esc_html_e( '" didn’t return any results… ', 'lsx' ); ?><br><?php esc_html_e( 'Please try another keyword', 'lsx' ); ?></p>
22
+			<p><?php esc_html_e('Your search for "', 'lsx'); ?><?php echo get_search_query(); ?><?php esc_html_e('" didn’t return any results… ', 'lsx'); ?><br><?php esc_html_e('Please try another keyword', 'lsx'); ?></p>
23 23
 
24
-			<?php echo wp_kses_post( apply_filters( 'lsx_404_search_form', get_search_form() ) ); ?>
24
+			<?php echo wp_kses_post(apply_filters('lsx_404_search_form', get_search_form())); ?>
25 25
 
26 26
 		<?php else : ?>
27 27
 
28
-			<p><?php esc_html_e( 'It seems we can&rsquo;t find what you&rsquo;re looking for. Perhaps searching can help.', 'lsx' ); ?></p>
29
-			<?php echo wp_kses_post( apply_filters( 'lsx_404_search_form', get_search_form() ) ); ?>
28
+			<p><?php esc_html_e('It seems we can&rsquo;t find what you&rsquo;re looking for. Perhaps searching can help.', 'lsx'); ?></p>
29
+			<?php echo wp_kses_post(apply_filters('lsx_404_search_form', get_search_form())); ?>
30 30
 
31 31
 		<?php endif; ?>
32 32
 
Please login to merge, or discard this patch.
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,9 +23,12 @@
 block discarded – undo
23 23
 
24 24
 			<?php echo wp_kses_post( apply_filters( 'lsx_404_search_form', get_search_form() ) ); ?>
25 25
 
26
-		<?php else : ?>
26
+		<?php else {
27
+	: ?>
27 28
 
28
-			<p><?php esc_html_e( 'It seems we can&rsquo;t find what you&rsquo;re looking for. Perhaps searching can help.', 'lsx' ); ?></p>
29
+			<p><?php esc_html_e( 'It seems we can&rsquo;t find what you&rsquo;re looking for. Perhaps searching can help.', 'lsx' );
30
+}
31
+?></p>
29 32
 			<?php echo wp_kses_post( apply_filters( 'lsx_404_search_form', get_search_form() ) ); ?>
30 33
 
31 34
 		<?php endif; ?>
Please login to merge, or discard this patch.
includes/classes/class-lsx-nav-walker.php 1 patch
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -7,15 +7,15 @@  discard block
 block discarded – undo
7 7
  * @category   bootstrap-walker
8 8
  */
9 9
 
10
-if ( ! defined( 'ABSPATH' ) ) {
10
+if ( ! defined('ABSPATH')) {
11 11
 	exit;
12 12
 }
13 13
 
14
-if ( ! class_exists( 'Walker_Nav_Menu' ) ) {
14
+if ( ! class_exists('Walker_Nav_Menu')) {
15 15
 	return;
16 16
 }
17 17
 
18
-if ( ! class_exists( 'LSX_Nav_Walker' ) ) :
18
+if ( ! class_exists('LSX_Nav_Walker')) :
19 19
 
20 20
 	/**
21 21
 	 * Cleaner walker for wp_nav_menu()
@@ -34,46 +34,46 @@  discard block
 block discarded – undo
34 34
 	 */
35 35
 	class LSX_Nav_Walker extends Walker_Nav_Menu {
36 36
 
37
-		function check_current( $classes ) {
38
-			return preg_match( '/^(current[-_])|active|dropdown$/', $classes );
37
+		function check_current($classes) {
38
+			return preg_match('/^(current[-_])|active|dropdown$/', $classes);
39 39
 		}
40 40
 
41
-		function start_lvl( &$output, $depth = 0, $args = array() ) {
41
+		function start_lvl(&$output, $depth = 0, $args = array()) {
42 42
 			$output .= "\n<ul class=\"dropdown-menu\">\n";
43 43
 		}
44 44
 
45
-		function start_el( &$output, $item, $depth = 0, $args = array(), $id = 0 ) {
45
+		function start_el(&$output, $item, $depth = 0, $args = array(), $id = 0) {
46 46
 			$item_html = '';
47 47
 
48
-			if ( isset( $item->title ) ) {
49
-				parent::start_el( $item_html, $item, $depth, $args );
48
+			if (isset($item->title)) {
49
+				parent::start_el($item_html, $item, $depth, $args);
50 50
 
51
-				if ( $item->is_dropdown && ( 0 === $depth ) ) {
52
-					$item_html = str_replace( '<a', '<a class="dropdown-toggle" data-target="#"', $item_html );
53
-					$item_html = str_replace( '</a>', ' <b class="caret"></b></a>', $item_html );
54
-				} elseif ( stristr( $item_html, 'li class="divider"' ) ) {
55
-					$item_html = preg_replace( '/<a[^>]*>.*?<\/a>/iU', '', $item_html );
56
-				} elseif ( stristr( $item_html, 'li class="dropdown-header"' ) ) {
57
-					$item_html = preg_replace( '/<a[^>]*>(.*)<\/a>/iU', '$1', $item_html );
51
+				if ($item->is_dropdown && (0 === $depth)) {
52
+					$item_html = str_replace('<a', '<a class="dropdown-toggle" data-target="#"', $item_html);
53
+					$item_html = str_replace('</a>', ' <b class="caret"></b></a>', $item_html);
54
+				} elseif (stristr($item_html, 'li class="divider"')) {
55
+					$item_html = preg_replace('/<a[^>]*>.*?<\/a>/iU', '', $item_html);
56
+				} elseif (stristr($item_html, 'li class="dropdown-header"')) {
57
+					$item_html = preg_replace('/<a[^>]*>(.*)<\/a>/iU', '$1', $item_html);
58 58
 				}
59 59
 
60
-				$item_html = apply_filters( 'lsx_wp_nav_menu_item', $item_html );
60
+				$item_html = apply_filters('lsx_wp_nav_menu_item', $item_html);
61 61
 				$output   .= $item_html;
62 62
 			}
63 63
 		}
64 64
 
65
-		function display_element( $element, &$children_elements, $max_depth, $depth = 0, $args, &$output ) {
66
-			$element->is_dropdown = ( ( ! empty( $children_elements[ $element->ID ] ) && ( ( $depth + 1 ) < $max_depth || ( 0 === $max_depth ) ) ) );
65
+		function display_element($element, &$children_elements, $max_depth, $depth = 0, $args, &$output) {
66
+			$element->is_dropdown = (( ! empty($children_elements[$element->ID]) && (($depth + 1) < $max_depth || (0 === $max_depth))));
67 67
 
68
-			if ( $element->is_dropdown ) {
69
-				if ( $depth > 0 ) {
68
+			if ($element->is_dropdown) {
69
+				if ($depth > 0) {
70 70
 					$element->classes[] = 'dropdown-submenu';
71 71
 				} else {
72 72
 					$element->classes[] = 'dropdown';
73 73
 				}
74 74
 			}
75 75
 
76
-			parent::display_element( $element, $children_elements, $max_depth, $depth, $args, $output );
76
+			parent::display_element($element, $children_elements, $max_depth, $depth, $args, $output);
77 77
 		}
78 78
 
79 79
 	}
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   +44 added lines, -44 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
 <?php lsx_entry_before(); ?>
11 11
 
12 12
 <?php
13
-	$no_thumb_post_types   = array(
13
+	$no_thumb_post_types = array(
14 14
 		'audio'   => 'audio',
15 15
 		'gallery' => 'gallery',
16 16
 		'image'   => 'image',
@@ -18,38 +18,38 @@  discard block
 block discarded – undo
18 18
 		'quote'   => 'quote',
19 19
 		'video'   => 'video',
20 20
 	);
21
-	$no_thumb_post_formats = apply_filters( 'lsx_no_thumb_post_formats', $no_thumb_post_types );
21
+	$no_thumb_post_formats = apply_filters('lsx_no_thumb_post_formats', $no_thumb_post_types);
22 22
 
23
-	$has_thumb = has_post_thumbnail() && ! has_post_format( $no_thumb_post_formats );
23
+	$has_thumb = has_post_thumbnail() && ! has_post_format($no_thumb_post_formats);
24 24
 
25
-	if ( $has_thumb ) {
25
+	if ($has_thumb) {
26 26
 		$thumb_class = 'has-thumb';
27 27
 	} else {
28 28
 		$thumb_class = 'no-thumb';
29 29
 	}
30 30
 
31
-	$blog_layout = apply_filters( 'lsx_blog_layout', 'default' );
31
+	$blog_layout = apply_filters('lsx_blog_layout', 'default');
32 32
 
33 33
 	$image_class = '';
34 34
 
35
-	$thumbnail_id = get_post_thumbnail_id( get_the_ID() );
36
-	$image_arr    = wp_get_attachment_image_src( $thumbnail_id, 'lsx-thumbnail-single' );
35
+	$thumbnail_id = get_post_thumbnail_id(get_the_ID());
36
+	$image_arr    = wp_get_attachment_image_src($thumbnail_id, 'lsx-thumbnail-single');
37 37
 
38
-	if ( is_array( $image_arr ) ) {
38
+	if (is_array($image_arr)) {
39 39
 		$image_src = $image_arr[0];
40 40
 	}
41 41
 ?>
42 42
 
43
-<article id="post-<?php the_ID(); ?>" <?php post_class( array( 'lsx-slot', $thumb_class ) ); ?>>
43
+<article id="post-<?php the_ID(); ?>" <?php post_class(array('lsx-slot', $thumb_class)); ?>>
44 44
 	<?php lsx_entry_top(); ?>
45 45
 
46 46
 	<div class="entry-layout">
47 47
 		<div class="entry-layout-content entry-layout-content-<?php echo has_post_thumbnail() ? '67' : '100'; ?>">
48 48
 			<header class="entry-header">
49
-				<?php if ( $has_thumb ) : ?>
50
-					<div class="entry-image <?php echo esc_attr( $image_class ); ?>">
49
+				<?php if ($has_thumb) : ?>
50
+					<div class="entry-image <?php echo esc_attr($image_class); ?>">
51 51
 						<a class="thumbnail" href="<?php the_permalink(); ?>">
52
-							<?php lsx_thumbnail( 'lsx-thumbnail-single' ); ?>
52
+							<?php lsx_thumbnail('lsx-thumbnail-single'); ?>
53 53
 						</a>
54 54
 					</div>
55 55
 				<?php endif; ?>
@@ -57,37 +57,37 @@  discard block
 block discarded – undo
57 57
 				<?php
58 58
 				$format = get_post_format();
59 59
 
60
-				if ( false === $format ) {
60
+				if (false === $format) {
61 61
 					$format        = 'standard';
62
-					$show_on_front = get_option( 'show_on_front', 'posts' );
62
+					$show_on_front = get_option('show_on_front', 'posts');
63 63
 
64
-					if ( 'page' === $show_on_front ) {
65
-						$archive_link = get_permalink( get_option( 'page_for_posts' ) );
64
+					if ('page' === $show_on_front) {
65
+						$archive_link = get_permalink(get_option('page_for_posts'));
66 66
 					} else {
67 67
 						$archive_link = home_url();
68 68
 					}
69 69
 				} else {
70
-					$archive_link = get_post_format_link( $format );
70
+					$archive_link = get_post_format_link($format);
71 71
 				}
72 72
 
73
-				$format = lsx_translate_format_to_fontawesome( $format );
73
+				$format = lsx_translate_format_to_fontawesome($format);
74 74
 				?>
75 75
 
76 76
 				<h2 class="entry-title">
77
-					<?php if ( has_post_thumbnail() ) : ?>
78
-						<a href="<?php echo esc_url( $archive_link ); ?>" class="format-link has-thumb fa fa-<?php echo esc_attr( $format ); ?>"></a>
77
+					<?php if (has_post_thumbnail()) : ?>
78
+						<a href="<?php echo esc_url($archive_link); ?>" class="format-link has-thumb fa fa-<?php echo esc_attr($format); ?>"></a>
79 79
 					<?php else : ?>
80
-						<a href="<?php echo esc_url( $archive_link ); ?>" class="format-link fa fa-<?php echo esc_attr( $format ); ?>"></a>
80
+						<a href="<?php echo esc_url($archive_link); ?>" class="format-link fa fa-<?php echo esc_attr($format); ?>"></a>
81 81
 					<?php endif; ?>
82 82
 
83
-					<?php if ( has_post_format( array( 'link' ) ) ) : ?>
84
-						<a href="<?php echo esc_url( lsx_get_my_url() ); ?>" rel="bookmark"><?php the_title(); ?> <span class="fa fa-external-link"></span></a>
83
+					<?php if (has_post_format(array('link'))) : ?>
84
+						<a href="<?php echo esc_url(lsx_get_my_url()); ?>" rel="bookmark"><?php the_title(); ?> <span class="fa fa-external-link"></span></a>
85 85
 					<?php else : ?>
86 86
 						<a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?></a>
87 87
 					<?php endif; ?>
88 88
 
89
-					<?php if ( is_sticky() ) : ?>
90
-						<span class="label label-default label-sticky"><?php esc_html_e( 'Featured', 'lsx' ); ?></span>
89
+					<?php if (is_sticky()) : ?>
90
+						<span class="label label-default label-sticky"><?php esc_html_e('Featured', 'lsx'); ?></span>
91 91
 					<?php endif; ?>
92 92
 				</h2>
93 93
 				<div class="entry-meta">
@@ -98,27 +98,27 @@  discard block
 block discarded – undo
98 98
 
99 99
 			</header><!-- .entry-header -->
100 100
 
101
-			<?php if ( has_post_format( array( 'quote' ) ) || apply_filters( 'lsx_blog_display_text_on_list', true ) ) : ?>
101
+			<?php if (has_post_format(array('quote')) || apply_filters('lsx_blog_display_text_on_list', true)) : ?>
102 102
 
103
-				<?php if ( lsx_post_format_force_content_on_list() && ! apply_filters( 'lsx_blog_force_content_on_list', false ) ) : ?>
103
+				<?php if (lsx_post_format_force_content_on_list() && ! apply_filters('lsx_blog_force_content_on_list', false)) : ?>
104 104
 
105 105
 					<div class="entry-summary">
106 106
 					<?php
107
-					if ( ! has_excerpt() ) {
107
+					if ( ! has_excerpt()) {
108 108
 
109
-						$excerpt_more = '<p><a class="moretag" href="' . esc_url( get_permalink() ) . '">' . esc_html__( 'Read More', 'lsx' ) . '</a></p>';
110
-						$content      = wp_trim_words( get_the_content(), 50 );
109
+						$excerpt_more = '<p><a class="moretag" href="' . esc_url(get_permalink()) . '">' . esc_html__('Read More', 'lsx') . '</a></p>';
110
+						$content      = wp_trim_words(get_the_content(), 50);
111 111
 						$content      = '<p>' . $content . '</p>' . $excerpt_more;
112
-						echo wp_kses_post( $content );
112
+						echo wp_kses_post($content);
113 113
 					} else {
114 114
 						the_excerpt();
115 115
 					}
116 116
 					?>
117 117
 					</div><!-- .entry-summary -->
118 118
 
119
-				<?php elseif ( has_post_format( array( 'link' ) ) ) : ?>
119
+				<?php elseif (has_post_format(array('link'))) : ?>
120 120
 
121
-				<?php elseif ( apply_filters( 'lsx_blog_force_content_on_list', false ) ) : ?>
121
+				<?php elseif (apply_filters('lsx_blog_force_content_on_list', false)) : ?>
122 122
 
123 123
 					<div class="entry-content">
124 124
 						<?php the_content(); ?>
@@ -130,12 +130,12 @@  discard block
 block discarded – undo
130 130
 						<?php
131 131
 							the_content();
132 132
 
133
-							wp_link_pages( array(
133
+							wp_link_pages(array(
134 134
 								'before'      => '<div class="lsx-postnav-wrapper"><div class="lsx-postnav">',
135 135
 								'after'       => '</div></div>',
136 136
 								'link_before' => '<span>',
137 137
 								'link_after'  => '</span>',
138
-							) );
138
+							));
139 139
 						?>
140 140
 					</div><!-- .entry-content -->
141 141
 
@@ -151,23 +151,23 @@  discard block
 block discarded – undo
151 151
 
152 152
 				<?php lsx_content_post_tags(); ?>
153 153
 
154
-				<?php if ( comments_open() && ! empty( $comments_number ) ) : ?>
154
+				<?php if (comments_open() && ! empty($comments_number)) : ?>
155 155
 					<div class="post-comments">
156 156
 						<a href="<?php the_permalink(); ?>#comments">
157 157
 							<?php
158
-							if ( '1' === $comments_number ) {
159
-								echo esc_html_x( 'One Comment', 'content.php', 'lsx' );
158
+							if ('1' === $comments_number) {
159
+								echo esc_html_x('One Comment', 'content.php', 'lsx');
160 160
 							} else {
161 161
 								printf(
162 162
 									/* Translators: %s: number of comments */
163
-									esc_html( _nx(
163
+									esc_html(_nx(
164 164
 										'%s Comment',
165 165
 										'%s Comments',
166 166
 										$comments_number,
167 167
 										'content.php',
168 168
 										'lsx'
169
-									) ),
170
-									esc_html( number_format_i18n( $comments_number ) )
169
+									)),
170
+									esc_html(number_format_i18n($comments_number))
171 171
 								);
172 172
 							}
173 173
 							?>
@@ -177,11 +177,11 @@  discard block
 block discarded – undo
177 177
 			</div>
178 178
 		</div>
179 179
 
180
-		<?php if ( has_post_thumbnail() ) : ?>
180
+		<?php if (has_post_thumbnail()) : ?>
181 181
 
182 182
 			<div class="entry-image hidden-xs">
183
-				<a class="thumbnail" href="<?php the_permalink(); ?>" style="background-image:url(<?php echo esc_url( $image_src ); ?>);">
184
-					<?php lsx_thumbnail( 'lsx-thumbnail-single' ); ?>
183
+				<a class="thumbnail" href="<?php the_permalink(); ?>" style="background-image:url(<?php echo esc_url($image_src); ?>);">
184
+					<?php lsx_thumbnail('lsx-thumbnail-single'); ?>
185 185
 				</a>
186 186
 			</div>
187 187
 
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   +13 added lines, -13 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
 
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 	public function __construct() {
29 29
 		//add_filter( 'style_loader_tag', array( $this, 'preload_css' ), 100, 4 );
30 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 );
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.