Passed
Pull Request — master (#389)
by Jacques
03:10
created
sidebar-sitemap.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -5,32 +5,32 @@
 block discarded – undo
5 5
  * @package lsx
6 6
  */
7 7
 
8
-$show_on_front = get_option( 'show_on_front' );
8
+$show_on_front = get_option('show_on_front');
9 9
 
10
-$layout = get_theme_mod( 'lsx_layout', '2cr' );
11
-$layout = apply_filters( 'lsx_layout', $layout );
10
+$layout = get_theme_mod('lsx_layout', '2cr');
11
+$layout = apply_filters('lsx_layout', $layout);
12 12
 
13
-if ( 'posts' === $show_on_front && is_home() ) {
13
+if ('posts' === $show_on_front && is_home()) {
14 14
 	$sidebar = 'home';
15 15
 } else {
16 16
 	$sidebar = 'sidebar-1';
17 17
 }
18 18
 
19
-if ( '1c' !== $layout ) : ?>
19
+if ('1c' !== $layout) : ?>
20 20
 
21 21
 	<?php lsx_sidebars_before(); ?>
22 22
 
23
-	<div id="secondary" class="widget-area <?php echo esc_attr( lsx_sidebar_class() ); ?>" role="complementary">
23
+	<div id="secondary" class="widget-area <?php echo esc_attr(lsx_sidebar_class()); ?>" role="complementary">
24 24
 
25 25
 		<?php lsx_sidebar_top(); ?>
26 26
 
27
-		<h2><?php esc_attr_e( 'Categories', 'lsx' ); ?></h2>
27
+		<h2><?php esc_attr_e('Categories', 'lsx'); ?></h2>
28 28
 
29 29
 		<aside id="categories" class="widget widget_categories">
30 30
 			<?php
31
-				echo wp_tag_cloud( array(
31
+				echo wp_tag_cloud(array(
32 32
 					'taxonomy' => 'category',
33
-				) );
33
+				));
34 34
 			?>
35 35
 		</aside>
36 36
 
Please login to merge, or discard this patch.
sidebar.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -5,56 +5,56 @@
 block discarded – undo
5 5
  * @package lsx
6 6
  */
7 7
 
8
-$sidebar_enabled = apply_filters( 'lsx_sidebar_enable', true );
8
+$sidebar_enabled = apply_filters('lsx_sidebar_enable', true);
9 9
 
10
-if ( true !== $sidebar_enabled ) {
10
+if (true !== $sidebar_enabled) {
11 11
 	return true;
12 12
 }
13 13
 
14
-$show_on_front = get_option( 'show_on_front' );
14
+$show_on_front = get_option('show_on_front');
15 15
 
16
-if ( 'page' === $show_on_front && is_front_page() ) {
16
+if ('page' === $show_on_front && is_front_page()) {
17 17
 	$layout  = '1c';
18 18
 	$sidebar = 'home';
19 19
 } else {
20
-	$layout = get_theme_mod( 'lsx_layout', '2cr' );
21
-	$layout = apply_filters( 'lsx_layout', $layout );
20
+	$layout = get_theme_mod('lsx_layout', '2cr');
21
+	$layout = apply_filters('lsx_layout', $layout);
22 22
 
23
-	if ( 'posts' === $show_on_front && is_home() ) {
23
+	if ('posts' === $show_on_front && is_home()) {
24 24
 		$sidebar = 'home';
25 25
 	} else {
26 26
 		$sidebar = 'sidebar-1';
27 27
 	}
28 28
 }
29 29
 
30
-if ( '1c' !== $layout ) : ?>
30
+if ('1c' !== $layout) : ?>
31 31
 
32 32
 	<?php lsx_sidebars_before(); ?>
33 33
 
34
-	<div id="secondary" class="widget-area <?php echo esc_attr( lsx_sidebar_class() ); ?>" role="complementary">
34
+	<div id="secondary" class="widget-area <?php echo esc_attr(lsx_sidebar_class()); ?>" role="complementary">
35 35
 
36 36
 		<?php lsx_sidebar_top(); ?>
37 37
 
38
-		<?php if ( ! dynamic_sidebar( $sidebar ) ) : ?>
38
+		<?php if ( ! dynamic_sidebar($sidebar)) : ?>
39 39
 
40 40
 			<aside id="search" class="widget widget_search">
41 41
 				<?php get_search_form(); ?>
42 42
 			</aside>
43 43
 
44 44
 			<aside id="archives" class="widget">
45
-				<h1 class="widget-title"><?php esc_attr_e( 'Archives', 'lsx' ); ?></h1>
45
+				<h1 class="widget-title"><?php esc_attr_e('Archives', 'lsx'); ?></h1>
46 46
 
47 47
 				<ul>
48 48
 					<?php
49
-						wp_get_archives( array(
49
+						wp_get_archives(array(
50 50
 							'type' => 'monthly',
51
-						) );
51
+						));
52 52
 					?>
53 53
 				</ul>
54 54
 			</aside>
55 55
 
56 56
 			<aside id="meta" class="widget">
57
-				<h1 class="widget-title"><?php esc_attr_e( 'Meta', 'lsx' ); ?></h1>
57
+				<h1 class="widget-title"><?php esc_attr_e('Meta', 'lsx'); ?></h1>
58 58
 
59 59
 				<ul>
60 60
 					<?php wp_register(); ?>
Please login to merge, or discard this patch.
searchform.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -7,28 +7,28 @@
 block discarded – undo
7 7
 
8 8
 $style = 'body #searchform { display: block; }';
9 9
 
10
-if ( is_customize_preview() ) {
11
-	$search_form = get_theme_mod( 'lsx_header_search', false );
10
+if (is_customize_preview()) {
11
+	$search_form = get_theme_mod('lsx_header_search', false);
12 12
 
13
-	if ( false === $search_form ) {
13
+	if (false === $search_form) {
14 14
 		$style = 'body #searchform { display: none; }';
15 15
 	}
16 16
 }
17 17
 ?>
18 18
 
19
-<form role="search" method="get" class="search-form form-inline" id="searchform" action="<?php echo esc_url( home_url( '/' ) ); ?>">
19
+<form role="search" method="get" class="search-form form-inline" id="searchform" action="<?php echo esc_url(home_url('/')); ?>">
20 20
 	<div class="input-group">
21
-		<input type="search" value="<?php if ( is_search() ) { echo get_search_query(); } ?>" name="s" class="search-field form-control" placeholder="<?php esc_attr_e( 'Search', 'lsx' ); ?> <?php echo esc_attr( get_bloginfo( 'name' ) ); ?>">
22
-		<label class="hide"><?php esc_attr_e( 'Search for:', 'lsx' ); ?></label>
21
+		<input type="search" value="<?php if (is_search()) { echo get_search_query(); } ?>" name="s" class="search-field form-control" placeholder="<?php esc_attr_e('Search', 'lsx'); ?> <?php echo esc_attr(get_bloginfo('name')); ?>">
22
+		<label class="hide"><?php esc_attr_e('Search for:', 'lsx'); ?></label>
23 23
 
24 24
 		<span class="input-group-btn">
25 25
 			<button type="submit" class="search-submit btn btn-default"><span class="fa fa-search"></span></button>
26 26
 		</span>
27 27
 	</div>
28 28
 
29
-	<?php if ( is_customize_preview() ) : ?>
29
+	<?php if (is_customize_preview()) : ?>
30 30
 		<style id="lsx-header-search-css">
31
-			<?php echo esc_attr( $style ); ?>
31
+			<?php echo esc_attr($style); ?>
32 32
 		</style>
33 33
 	<?php endif; ?>
34 34
 </form>
Please login to merge, or discard this patch.
header.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -11,14 +11,14 @@
 block discarded – undo
11 11
 <html <?php language_attributes(); ?>>
12 12
 	<head>
13 13
 		<?php lsx_head_top(); ?>
14
-		<meta charset="<?php bloginfo( 'charset' ); ?>">
14
+		<meta charset="<?php bloginfo('charset'); ?>">
15 15
 		<link rel="profile" href="http://gmpg.org/xfn/11">
16
-		<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">
16
+		<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>">
17 17
 		<?php lsx_head_bottom(); ?>
18 18
 		<?php wp_head(); ?>
19 19
 	</head>
20 20
 
21
-	<body <?php body_class( 'lsx' ); ?>>
21
+	<body <?php body_class('lsx'); ?>>
22 22
 		<?php lsx_body_top(); ?>
23 23
 
24 24
 		<div class="header-wrap">
Please login to merge, or discard this patch.
includes/nav-navwalker.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -7,13 +7,13 @@  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
-add_filter( 'nav_menu_item_id', '__return_null' );
14
+add_filter('nav_menu_item_id', '__return_null');
15 15
 
16
-if ( ! function_exists( 'lsx_nav_menu_css_class' ) ) :
16
+if ( ! function_exists('lsx_nav_menu_css_class')) :
17 17
 
18 18
 	/**
19 19
 	 * Remove the id="" on nav menu items.
@@ -23,22 +23,22 @@  discard block
 block discarded – undo
23 23
 	 * @subpackage navigation
24 24
 	 * @category   bootstrap-walker
25 25
 	 */
26
-	function lsx_nav_menu_css_class( $classes, $item ) {
27
-		$slug    = sanitize_title( $item->title );
28
-		$classes = preg_replace( '/(current(-menu-|[-_]page[-_])(item|parent|ancestor))/', 'active', $classes );
29
-		$classes = preg_replace( '/^((menu|page)[-_\w+]+)+/', '', $classes );
26
+	function lsx_nav_menu_css_class($classes, $item) {
27
+		$slug    = sanitize_title($item->title);
28
+		$classes = preg_replace('/(current(-menu-|[-_]page[-_])(item|parent|ancestor))/', 'active', $classes);
29
+		$classes = preg_replace('/^((menu|page)[-_\w+]+)+/', '', $classes);
30 30
 
31 31
 		$classes[] = 'menu-' . $slug;
32
-		$classes   = array_unique( $classes );
32
+		$classes   = array_unique($classes);
33 33
 
34
-		return array_filter( $classes, 'lsx_is_element_empty' );
34
+		return array_filter($classes, 'lsx_is_element_empty');
35 35
 	}
36 36
 
37 37
 endif;
38 38
 
39
-add_filter( 'nav_menu_css_class', 'lsx_nav_menu_css_class', 10, 2 );
39
+add_filter('nav_menu_css_class', 'lsx_nav_menu_css_class', 10, 2);
40 40
 
41
-if ( ! function_exists( 'lsx_nav_menu_args' ) ) :
41
+if ( ! function_exists('lsx_nav_menu_args')) :
42 42
 
43 43
 	/**
44 44
 	 * Clean up wp_nav_menu_args.
@@ -50,24 +50,24 @@  discard block
 block discarded – undo
50 50
 	 * @subpackage navigation
51 51
 	 * @category   bootstrap-walker
52 52
 	 */
53
-	function lsx_nav_menu_args( $args = '' ) {
53
+	function lsx_nav_menu_args($args = '') {
54 54
 		$roots_nav_menu_args['container'] = false;
55 55
 
56
-		if ( ! $args['items_wrap'] ) {
56
+		if ( ! $args['items_wrap']) {
57 57
 			$roots_nav_menu_args['items_wrap'] = '<ul class="%2$s">%3$s</ul>';
58 58
 		}
59 59
 
60
-		if ( current_theme_supports( 'bootstrap-top-navbar' ) && ! $args['depth'] ) {
60
+		if (current_theme_supports('bootstrap-top-navbar') && ! $args['depth']) {
61 61
 			$roots_nav_menu_args['depth'] = 2;
62 62
 		}
63 63
 
64
-		if ( ! $args['walker'] ) {
64
+		if ( ! $args['walker']) {
65 65
 			$roots_nav_menu_args['walker'] = new LSX_Nav_Walker();
66 66
 		}
67 67
 
68
-		return array_merge( $args, $roots_nav_menu_args );
68
+		return array_merge($args, $roots_nav_menu_args);
69 69
 	}
70 70
 
71 71
 endif;
72 72
 
73
-add_filter( 'wp_nav_menu_args', 'lsx_nav_menu_args' );
73
+add_filter('wp_nav_menu_args', 'lsx_nav_menu_args');
Please login to merge, or discard this patch.
404.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -11,11 +11,11 @@  discard block
 block discarded – undo
11 11
 		<main id="main" class="site-main" role="main">
12 12
 			<section class="error-404 not-found">
13 13
 				<header class="page-header">
14
-					<h1 class="page-title"><?php esc_html_e( 'Whoops!', 'lsx' ); ?></h1>
14
+					<h1 class="page-title"><?php esc_html_e('Whoops!', 'lsx'); ?></h1>
15 15
 				</header><!-- .page-header -->
16 16
 
17 17
 				<div class="page-content">
18
-					<p><?php esc_html_e( 'It looks like nothing was found at this location. Maybe try a search?', 'lsx' ); ?></p>
18
+					<p><?php esc_html_e('It looks like nothing was found at this location. Maybe try a search?', 'lsx'); ?></p>
19 19
 					<?php get_search_form(); ?>
20 20
 				</div><!-- .page-content -->
21 21
 			</section><!-- .error-404 -->
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
 
26 26
 	<div id="secondary" class="col-sm-12 sidebar-container" role="complementary">
27 27
 		<div class="widget-area">
28
-			<?php dynamic_sidebar( 'sidebar-404' ); ?>
28
+			<?php dynamic_sidebar('sidebar-404'); ?>
29 29
 		</div><!-- .widget-area -->
30 30
 	</div><!-- #secondary -->
31 31
 
Please login to merge, or discard this patch.
includes/admin/welcome-screen/component-footer.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -10,30 +10,30 @@  discard block
 block discarded – undo
10 10
 <div class="row">
11 11
 	<div class="col-md-6">
12 12
 		<div class="box mailchimp">
13
-			<h2><?php esc_html_e( 'Newsletter', 'lsx' ); ?></h2>
14
-			<p><?php esc_html_e( 'Subscribe to our mailing list.', 'lsx' ); ?></p>
13
+			<h2><?php esc_html_e('Newsletter', 'lsx'); ?></h2>
14
+			<p><?php esc_html_e('Subscribe to our mailing list.', 'lsx'); ?></p>
15 15
 
16 16
 			<!-- Begin MailChimp Signup Form -->
17 17
 			<form action="//lsdev.us2.list-manage.com/subscribe/post?u=e50b2c5c82f4b42ea978af479&amp;id=92c36218e5" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank" novalidate>
18 18
 				<div id="mc_embed_signup">
19 19
 					<div id="mc_embed_signup_scroll">
20 20
 						<div class="mc-field-group">
21
-							<label for="mce-EMAIL"><?php esc_html_e( 'Email Address', 'lsx' ); ?> <span class="asterisk">*</span></label>
21
+							<label for="mce-EMAIL"><?php esc_html_e('Email Address', 'lsx'); ?> <span class="asterisk">*</span></label>
22 22
 							<input type="email" value="" name="EMAIL" class="required email" id="mce-EMAIL">
23 23
 						</div>
24 24
 						<div class="mc-field-group">
25
-							<label for="mce-FNAME"><?php esc_html_e( 'First Name', 'lsx' ); ?> </label>
25
+							<label for="mce-FNAME"><?php esc_html_e('First Name', 'lsx'); ?> </label>
26 26
 							<input type="text" value="" name="FNAME" class="" id="mce-FNAME">
27 27
 						</div>
28 28
 						<div class="mc-field-group">
29
-							<label for="mce-LNAME"><?php esc_html_e( 'Last Name', 'lsx' ); ?> </label>
29
+							<label for="mce-LNAME"><?php esc_html_e('Last Name', 'lsx'); ?> </label>
30 30
 							<input type="text" value="" name="LNAME" class="" id="mce-LNAME">
31 31
 						</div>
32 32
 					</div>
33 33
 					<div style="position:absolute;left:-5000px;" aria-hidden="true"><input type="text" name="b_e50b2c5c82f4b42ea978af479_92c36218e5" tabindex="-1" value=""></div>
34 34
 				</div>
35 35
 				<div class="more-button">
36
-					<input type="submit" value="<?php esc_html_e( 'Subscribe', 'lsx' ); ?>" name="subscribe" class="button button-primary">
36
+					<input type="submit" value="<?php esc_html_e('Subscribe', 'lsx'); ?>" name="subscribe" class="button button-primary">
37 37
 				</div>
38 38
 			</form>
39 39
 			<!--End mc_embed_signup-->
@@ -42,13 +42,13 @@  discard block
 block discarded – undo
42 42
 
43 43
 	<div class="col-md-6">
44 44
 		<div class="box suggest">
45
-			<h2><?php esc_html_e( 'Enjoying LSX?', 'lsx' ); ?></h2>
45
+			<h2><?php esc_html_e('Enjoying LSX?', 'lsx'); ?></h2>
46 46
 
47 47
 			<p>
48 48
 				<?php
49 49
 					printf(
50 50
 						/* Translators: 1: HTML open tag link, 2: HTML close tag link */
51
-						esc_html__( 'Why not %1$sleave a review%2$s on WordPress.org? We\'re looking foward to all our users\' feedback!', 'lsx' ),
51
+						esc_html__('Why not %1$sleave a review%2$s on WordPress.org? We\'re looking foward to all our users\' feedback!', 'lsx'),
52 52
 						'<a href="https://wordpress.org/themes/lsx" target="_blank rel="noopener noreferrer">',
53 53
 						'</a>'
54 54
 					);
Please login to merge, or discard this patch.
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.