Completed
Push — master ( e92ddb...e3b499 )
by Fernando
04:49 queued 02:14
created
inc/customizer-core.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,12 +1,12 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if ( ! defined( 'ABSPATH' ) ) return; // Exit if accessed directly
2
+if ( ! defined('ABSPATH')) return; // Exit if accessed directly
3 3
 
4 4
 /**
5 5
  * Customize Swatch Control Class
6 6
  *
7 7
  * @since 1.0.0
8 8
  */
9
-if( !class_exists( 'WP_Customize_Control' ) ){
9
+if ( ! class_exists('WP_Customize_Control')) {
10 10
 	return;
11 11
 }
12 12
 class LSX_Customize_Core_Control extends WP_Customize_Control {
@@ -22,13 +22,13 @@  discard block
 block discarded – undo
22 22
 	public function render_content() {
23 23
 		?> 
24 24
 		<label>
25
-			<?php if ( ! empty( $this->label ) ) { ?>
26
-				<span class="customize-control-title"><?php echo esc_html( $this->label ) ?></span>
25
+			<?php if ( ! empty($this->label)) { ?>
26
+				<span class="customize-control-title"><?php echo esc_html($this->label) ?></span>
27 27
 			<?php }
28
-			if ( ! empty( $this->description ) ) { ?>
29
-				<span class="description customize-control-description"><?php echo esc_html( $this->description ) ?></span>
28
+			if ( ! empty($this->description)) { ?>
29
+				<span class="description customize-control-description"><?php echo esc_html($this->description) ?></span>
30 30
 			<?php } ?>
31
-			<input <?php $this->link() ?> type="checkbox" value="<?php echo esc_attr( $this->value() ) ?>" <?php $this->input_attrs() ?>>
31
+			<input <?php $this->link() ?> type="checkbox" value="<?php echo esc_attr($this->value()) ?>" <?php $this->input_attrs() ?>>
32 32
 		</label>
33 33
 	<?php
34 34
 	}
Please login to merge, or discard this patch.
inc/hooks.php 1 patch
Spacing   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -24,11 +24,11 @@  discard block
 block discarded – undo
24 24
  * $lsx_supports[] = 'body';
25 25
  */
26 26
  function lsx_body_top() {
27
-	 do_action( 'lsx_body_top' );
27
+	 do_action('lsx_body_top');
28 28
  }
29 29
 
30 30
  function lsx_body_bottom() {
31
-	 do_action( 'lsx_body_bottom' );
31
+	 do_action('lsx_body_bottom');
32 32
  }
33 33
  
34 34
 /**
@@ -37,11 +37,11 @@  discard block
 block discarded – undo
37 37
 * $lsx_supports[] = 'head';
38 38
 */
39 39
 function lsx_head_top() {
40
-	do_action( 'lsx_head_top' );
40
+	do_action('lsx_head_top');
41 41
 }
42 42
 
43 43
 function lsx_head_bottom() {
44
-	do_action( 'lsx_head_bottom' );
44
+	do_action('lsx_head_bottom');
45 45
 }
46 46
 
47 47
 /**
@@ -50,27 +50,27 @@  discard block
 block discarded – undo
50 50
 * $lsx_supports[] = 'header';
51 51
 */
52 52
 function lsx_header_before() {
53
-	do_action( 'lsx_header_before' );
53
+	do_action('lsx_header_before');
54 54
 }
55 55
 
56 56
 function lsx_header_after() {
57
-	do_action( 'lsx_header_after' );
57
+	do_action('lsx_header_after');
58 58
 }
59 59
 
60 60
 function lsx_header_top() {
61
-	do_action( 'lsx_header_top' );
61
+	do_action('lsx_header_top');
62 62
 }
63 63
 
64 64
 function lsx_header_bottom() {
65
-	do_action( 'lsx_header_bottom' );
65
+	do_action('lsx_header_bottom');
66 66
 }
67 67
 
68 68
 function lsx_nav_before() {
69
-	do_action( 'lsx_nav_before' );
69
+	do_action('lsx_nav_before');
70 70
 }
71 71
 
72 72
 function lsx_nav_after() {
73
-	do_action( 'lsx_nav_after' );
73
+	do_action('lsx_nav_after');
74 74
 }
75 75
 
76 76
 /**
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
  */
81 81
 
82 82
 function lsx_banner_content() {
83
-	do_action( 'lsx_banner_content' );
83
+	do_action('lsx_banner_content');
84 84
 }
85 85
 
86 86
 /**
@@ -89,35 +89,35 @@  discard block
 block discarded – undo
89 89
 * $lsx_supports[] = 'content';
90 90
 */
91 91
 function lsx_content_wrap_before() {
92
-	do_action( 'lsx_content_wrap_before' );
92
+	do_action('lsx_content_wrap_before');
93 93
 }
94 94
 
95 95
 function lsx_content_wrap_after() {
96
-	do_action( 'lsx_content_wrap_after' );
96
+	do_action('lsx_content_wrap_after');
97 97
 }
98 98
 
99 99
 function lsx_content_before() {
100
-	do_action( 'lsx_content_before' );
100
+	do_action('lsx_content_before');
101 101
 }
102 102
 
103 103
 function lsx_content_after() {
104
-	do_action( 'lsx_content_after' );
104
+	do_action('lsx_content_after');
105 105
 }
106 106
 
107 107
 function lsx_content_top() {
108
-	do_action( 'lsx_content_top' );
108
+	do_action('lsx_content_top');
109 109
 }
110 110
 
111 111
 function lsx_content_bottom() {
112
-	do_action( 'lsx_content_bottom' );
112
+	do_action('lsx_content_bottom');
113 113
 }
114 114
 
115 115
 function lsx_content_post_meta() {
116
-	do_action( 'lsx_content_post_meta' );
116
+	do_action('lsx_content_post_meta');
117 117
 }
118 118
 
119 119
 function lsx_content_post_tags() {
120
-	do_action( 'lsx_content_post_tags' );
120
+	do_action('lsx_content_post_tags');
121 121
 }
122 122
 
123 123
 /**
@@ -126,19 +126,19 @@  discard block
 block discarded – undo
126 126
 * $lsx_supports[] = 'entry';
127 127
 */
128 128
 function lsx_entry_before() {
129
-	do_action( 'lsx_entry_before' );
129
+	do_action('lsx_entry_before');
130 130
 }
131 131
 
132 132
 function lsx_entry_after() {
133
-	do_action( 'lsx_entry_after' );
133
+	do_action('lsx_entry_after');
134 134
 }
135 135
 
136 136
 function lsx_entry_top() {
137
-	do_action( 'lsx_entry_top' );
137
+	do_action('lsx_entry_top');
138 138
 }
139 139
 
140 140
 function lsx_entry_bottom() {
141
-	do_action( 'lsx_entry_bottom' );
141
+	do_action('lsx_entry_bottom');
142 142
 }
143 143
 
144 144
 /**
@@ -147,11 +147,11 @@  discard block
 block discarded – undo
147 147
 * $lsx_supports[] = 'comments';
148 148
 */
149 149
 function lsx_comments_before() {
150
-	do_action( 'lsx_comments_before' );
150
+	do_action('lsx_comments_before');
151 151
 }
152 152
 
153 153
 function lsx_comments_after() {
154
-	do_action( 'lsx_comments_after' );
154
+	do_action('lsx_comments_after');
155 155
 }
156 156
 
157 157
 /**
@@ -160,19 +160,19 @@  discard block
 block discarded – undo
160 160
 * $lsx_supports[] = 'sidebar';
161 161
 */
162 162
 function lsx_sidebars_before() {
163
-	do_action( 'lsx_sidebars_before' );
163
+	do_action('lsx_sidebars_before');
164 164
 }
165 165
 
166 166
 function lsx_sidebars_after() {
167
-	do_action( 'lsx_sidebars_after' );
167
+	do_action('lsx_sidebars_after');
168 168
 }
169 169
 
170 170
 function lsx_sidebar_top() {
171
-	do_action( 'lsx_sidebar_top' );
171
+	do_action('lsx_sidebar_top');
172 172
 }
173 173
 
174 174
 function lsx_sidebar_bottom() {
175
-	do_action( 'lsx_sidebar_bottom' );
175
+	do_action('lsx_sidebar_bottom');
176 176
 }
177 177
 
178 178
 /**
@@ -181,17 +181,17 @@  discard block
 block discarded – undo
181 181
 * $lsx_supports[] = 'footer';
182 182
 */
183 183
 function lsx_footer_before() {
184
-	do_action( 'lsx_footer_before' );
184
+	do_action('lsx_footer_before');
185 185
 }
186 186
 
187 187
 function lsx_footer_after() {
188
-	do_action( 'lsx_footer_after' );
188
+	do_action('lsx_footer_after');
189 189
 }
190 190
 
191 191
 function lsx_footer_top() {
192
-	do_action( 'lsx_footer_top' );
192
+	do_action('lsx_footer_top');
193 193
 }
194 194
 
195 195
 function lsx_footer_bottom() {
196
-	do_action( 'lsx_footer_bottom' );
196
+	do_action('lsx_footer_bottom');
197 197
 }
198 198
\ No newline at end of file
Please login to merge, or discard this patch.
search.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
 
10 10
 	<?php lsx_content_wrap_before(); ?>
11 11
 
12
-	<div id="primary" class="content-area <?php echo esc_attr( lsx_main_class() ); ?>">
12
+	<div id="primary" class="content-area <?php echo esc_attr(lsx_main_class()); ?>">
13 13
 
14 14
 		<?php lsx_content_before(); ?>
15 15
 
@@ -17,25 +17,25 @@  discard block
 block discarded – undo
17 17
 
18 18
 		<?php lsx_content_top(); ?>	
19 19
 
20
-		<?php if ( have_posts() ) : global $lsx_archive; $lsx_archive = 1; ?>
20
+		<?php if (have_posts()) : global $lsx_archive; $lsx_archive = 1; ?>
21 21
 		
22 22
 			<?php 
23
-			$layout = get_theme_mod('lsx_layout','2cr');
24
-			$layout = apply_filters( 'lsx_layout', $layout );
25
-			if('1c' === $layout){
23
+			$layout = get_theme_mod('lsx_layout', '2cr');
24
+			$layout = apply_filters('lsx_layout', $layout);
25
+			if ('1c' === $layout) {
26 26
 				lsx_breadcrumbs();
27 27
 			}
28 28
 			?>	
29 29
 
30 30
 			<?php /* Start the Loop */ ?>
31
-			<?php while ( have_posts() ) : the_post(); ?>
31
+			<?php while (have_posts()) : the_post(); ?>
32 32
 
33 33
 				<?php
34 34
 					/* Include the Post-Format-specific template for the content.
35 35
 					 * If you want to override this in a child theme, then include a file
36 36
 					 * called content-___.php (where ___ is the Post Format name) and that will be used instead.
37 37
 					 */
38
-					get_template_part( 'content', get_post_format() );
38
+					get_template_part('content', get_post_format());
39 39
 				?>
40 40
 
41 41
 			<?php endwhile; ?>
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 
45 45
 		<?php else : ?>
46 46
 
47
-			<?php get_template_part( 'content', 'none' ); ?>
47
+			<?php get_template_part('content', 'none'); ?>
48 48
 
49 49
 		<?php endif; $lsx_archive = 0; ?>
50 50
 
Please login to merge, or discard this patch.
inc/google-font-collection.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if ( ! defined( 'ABSPATH' ) ) return; // Exit if accessed directly
2
+if ( ! defined('ABSPATH')) return; // Exit if accessed directly
3 3
 /**
4 4
  * Google Font_Collection Class
5 5
 **/
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
 	**/
16 16
 	public function __construct($fonts)
17 17
 	{
18
-		if(empty($fonts))
18
+		if (empty($fonts))
19 19
 		{
20 20
 			//we didn't get the required data
21 21
 			return false;
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
 		// create fonts
25 25
 		foreach ($fonts as $key => $value) 
26 26
 		{	
27
-			if( empty( $value["system"] ) ){
27
+			if (empty($value["system"])) {
28 28
 				$this->fonts[$value["title"]] = new LSX_Google_Font($value["title"], $value["location"], $value["cssDeclaration"], $value["cssClass"]);
29 29
 			}
30 30
 		}
@@ -106,9 +106,9 @@  discard block
 block discarded – undo
106 106
 		foreach ($this->fonts as $key => $value) 
107 107
 		{
108 108
 			$protocol = 'http';
109
-			if(is_ssl()){ $protocol.='s'; }
109
+			if (is_ssl()) { $protocol .= 's'; }
110 110
 			?>
111
-			<link href="<?php echo esc_attr( $protocol ); ?>://fonts.googleapis.com/css?family=<?php echo esc_attr( $value->__get( "location" ) ); ?>" rel='stylesheet'>
111
+			<link href="<?php echo esc_attr($protocol); ?>://fonts.googleapis.com/css?family=<?php echo esc_attr($value->__get("location")); ?>" rel='stylesheet'>
112 112
 			<?php
113 113
 		}
114 114
 	}
@@ -125,8 +125,8 @@  discard block
 block discarded – undo
125 125
 			foreach ($this->fonts as $key => $value) 
126 126
 			{
127 127
 				?>
128
-				.<?php echo esc_attr( $value->__get( "cssClass" ) ); ?>{
129
-					font-family: <?php echo esc_attr( $value->__get( "cssDeclaration" ) ); ?>;
128
+				.<?php echo esc_attr($value->__get("cssClass")); ?>{
129
+					font-family: <?php echo esc_attr($value->__get("cssDeclaration")); ?>;
130 130
 				}
131 131
 				<?php
132 132
 			}
Please login to merge, or discard this patch.
page-templates/template-archives.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@  discard block
 block discarded – undo
5 5
 
6 6
 	<?php lsx_content_wrap_before(); ?>
7 7
 
8
-	<div id="primary" class="content-area <?php echo esc_attr( lsx_main_class() ); ?>">
8
+	<div id="primary" class="content-area <?php echo esc_attr(lsx_main_class()); ?>">
9 9
 
10 10
 		<?php lsx_content_before(); ?>
11 11
 
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
 
14 14
 			<?php lsx_content_top(); ?>
15 15
 
16
-			<?php while ( have_posts() ) : the_post(); ?>
16
+			<?php while (have_posts()) : the_post(); ?>
17 17
 
18 18
 				<?php lsx_entry_before(); ?>
19 19
 
@@ -22,28 +22,28 @@  discard block
 block discarded – undo
22 22
 					<?php lsx_entry_top(); ?>
23 23
 
24 24
 					<div class="entry-content">
25
-						<h2><?php esc_html_e( 'The Last 30 Posts', 'lsx' ); ?></h3>
25
+						<h2><?php esc_html_e('The Last 30 Posts', 'lsx'); ?></h3>
26 26
                         <ul>
27
-                            <?php $loop = new WP_Query( array( 'posts_per_page' => 30 ) ); ?>
28
-                            <?php if ( $loop->have_posts() ) { while ( $loop->have_posts() ) { $loop->the_post(); ?>
27
+                            <?php $loop = new WP_Query(array('posts_per_page' => 30)); ?>
28
+                            <?php if ($loop->have_posts()) { while ($loop->have_posts()) { $loop->the_post(); ?>
29 29
                                 <?php $loop->is_home = false; ?>
30
-                                <li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a> - <?php the_time( get_option( 'date_format' ) ); ?> - <?php echo esc_html( $post->comment_count ); ?> <?php esc_html_e( 'comments', 'lsx' ); ?></li>
30
+                                <li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a> - <?php the_time(get_option('date_format')); ?> - <?php echo esc_html($post->comment_count); ?> <?php esc_html_e('comments', 'lsx'); ?></li>
31 31
                             <?php } } wp_reset_postdata(); ?>
32 32
                         </ul>
33 33
 
34
-                        <h2><?php esc_html_e( 'Categories', 'lsx' ); ?></h3>
34
+                        <h2><?php esc_html_e('Categories', 'lsx'); ?></h3>
35 35
 
36 36
                         <ul>
37
-                            <?php wp_list_categories( 'title_li=&hierarchical=0&show_count=1' ); ?>
37
+                            <?php wp_list_categories('title_li=&hierarchical=0&show_count=1'); ?>
38 38
                         </ul>
39 39
 
40
-                        <h2><?php esc_html_e( 'Monthly Archives', 'lsx' ); ?></h3>
40
+                        <h2><?php esc_html_e('Monthly Archives', 'lsx'); ?></h3>
41 41
 
42 42
                         <ul>
43
-                            <?php wp_get_archives( 'type=monthly&show_post_count=1' ); ?>
43
+                            <?php wp_get_archives('type=monthly&show_post_count=1'); ?>
44 44
                         </ul>
45 45
 					</div><!-- .entry-content -->
46
-					<?php edit_post_link( esc_html__( 'Edit', 'lsx' ), '<footer class="entry-meta"><span class="edit-link">', '</span></footer>' ); ?>
46
+					<?php edit_post_link(esc_html__('Edit', 'lsx'), '<footer class="entry-meta"><span class="edit-link">', '</span></footer>'); ?>
47 47
 
48 48
 					<?php lsx_entry_bottom(); ?>
49 49
 					
Please login to merge, or discard this patch.
page-templates/template-portfolio.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -17,8 +17,8 @@  discard block
 block discarded – undo
17 17
 
18 18
 			<?php lsx_content_top(); ?>
19 19
 
20
-			<?php if(have_posts()) { ?>
21
-				<?php while(have_posts()) { the_post(); ?>
20
+			<?php if (have_posts()) { ?>
21
+				<?php while (have_posts()) { the_post(); ?>
22 22
 					<div class="entry-content">
23 23
 						
24 24
 						<?php the_content(); ?>
@@ -29,10 +29,10 @@  discard block
 block discarded – undo
29 29
 			<?php } ?>
30 30
 
31 31
 			<?php
32
-				if ( get_query_var( 'paged' ) ) :
33
-					$paged = get_query_var( 'paged' );
34
-				elseif ( get_query_var( 'page' ) ) :
35
-					$paged = get_query_var( 'page' );
32
+				if (get_query_var('paged')) :
33
+					$paged = get_query_var('paged');
34
+				elseif (get_query_var('page')) :
35
+					$paged = get_query_var('page');
36 36
 				else :
37 37
 					$paged = 1;
38 38
 				endif;
@@ -41,18 +41,18 @@  discard block
 block discarded – undo
41 41
 					'post_type'      => 'jetpack-portfolio',
42 42
 					'posts_per_page' => 99,
43 43
 				);
44
-				$project_query = new WP_Query ( $args );
45
-				if ( post_type_exists( 'jetpack-portfolio' ) && $project_query -> have_posts() ) :
44
+				$project_query = new WP_Query($args);
45
+				if (post_type_exists('jetpack-portfolio') && $project_query -> have_posts()) :
46 46
 			?>
47 47
 			
48 48
 				<?php lsx_portfolio_sorter(); ?>
49 49
 
50 50
 				<div class="filter-items-wrapper lsx-portfolio-wrapper">
51 51
 					<div class="filter-items-container lsx-portfolio masonry">
52
-						<?php while ( $project_query -> have_posts() ) : $project_query -> the_post(); ?>
52
+						<?php while ($project_query -> have_posts()) : $project_query -> the_post(); ?>
53 53
 
54
-							<?php if(has_post_thumbnail()) { ?>
55
-								<?php get_template_part( 'content', 'portfolio' ); ?>
54
+							<?php if (has_post_thumbnail()) { ?>
55
+								<?php get_template_part('content', 'portfolio'); ?>
56 56
 							<?php } ?>
57 57
 
58 58
 						<?php endwhile; ?>
@@ -63,17 +63,17 @@  discard block
 block discarded – undo
63 63
 
64 64
 				<section class="no-results not-found">
65 65
 					<header class="page-header">
66
-						<h1 class="page-title"><?php esc_html_e( 'Nothing Found', 'lsx' ); ?></h1>
66
+						<h1 class="page-title"><?php esc_html_e('Nothing Found', 'lsx'); ?></h1>
67 67
 					</header><!-- .page-header -->
68 68
 
69 69
 					<div class="page-content">
70
-						<?php if ( current_user_can( 'publish_posts' ) ) : ?>
70
+						<?php if (current_user_can('publish_posts')) : ?>
71 71
 
72
-							<p><?php esc_html_e( 'Ready to publish your first project?', 'lsx' ); ?> <a href="<?php echo esc_url( admin_url( 'post-new.php?post_type=jetpack-portfolio' ) ) ?>"><?php esc_html_e( 'Get started here', 'lsx' ); ?></a></p>
72
+							<p><?php esc_html_e('Ready to publish your first project?', 'lsx'); ?> <a href="<?php echo esc_url(admin_url('post-new.php?post_type=jetpack-portfolio')) ?>"><?php esc_html_e('Get started here', 'lsx'); ?></a></p>
73 73
 
74 74
 						<?php else : ?>
75 75
 
76
-							<p><?php esc_html_e( 'It seems we can&rsquo;t find what you&rsquo;re looking for. Perhaps searching can help.', 'lsx' ); ?></p>
76
+							<p><?php esc_html_e('It seems we can&rsquo;t find what you&rsquo;re looking for. Perhaps searching can help.', 'lsx'); ?></p>
77 77
 							<?php get_search_form(); ?>
78 78
 
79 79
 						<?php endif; ?>
Please login to merge, or discard this patch.
searchform.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -8,19 +8,19 @@
 block discarded – undo
8 8
 // This is to help the customizer function better
9 9
 $style = '';
10 10
 
11
-if ( is_customize_preview() ) {
12
-	$search_form = get_theme_mod( 'lsx_header_search', 0 );
11
+if (is_customize_preview()) {
12
+	$search_form = get_theme_mod('lsx_header_search', 0);
13 13
 	
14
-	if ( ! $search_form ) {
14
+	if ( ! $search_form) {
15 15
 		$style = 'display:none;';
16 16
 	}
17 17
 }
18 18
 ?>
19 19
 
20
-<form role="search" method="get" style="<?php echo esc_attr( $style ); ?>" class="search-form form-inline" id="searchform" action="<?php echo esc_url( home_url( '/' ) ); ?>">
20
+<form role="search" method="get" style="<?php echo esc_attr($style); ?>" class="search-form form-inline" id="searchform" action="<?php echo esc_url(home_url('/')); ?>">
21 21
 	<div class="input-group">
22
-		<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' ) ); ?>">
23
-		<label class="hide"><?php esc_attr_e( 'Search for:', 'lsx' ); ?></label>
22
+		<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')); ?>">
23
+		<label class="hide"><?php esc_attr_e('Search for:', 'lsx'); ?></label>
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>
Please login to merge, or discard this patch.
inc/comment-walker.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if ( ! defined( 'ABSPATH' ) ) return; // Exit if accessed directly
2
+if ( ! defined('ABSPATH')) return; // Exit if accessed directly
3 3
 
4 4
 /**
5 5
  * lsx Comment Walker
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
     $GLOBALS['comment_depth'] = $depth;
30 30
     $GLOBALS['comment'] = $comment;
31 31
 
32
-    if (!empty($args['callback'])) {
32
+    if ( ! empty($args['callback'])) {
33 33
       call_user_func($args['callback'], $comment, $args, $depth);
34 34
       return;
35 35
     }?>
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
   }
41 41
 
42 42
   function end_el(&$output, $comment, $depth = 0, $args = array()) {
43
-    if (!empty($args['end-callback'])) {
43
+    if ( ! empty($args['end-callback'])) {
44 44
       call_user_func($args['end-callback'], $comment, $args, $depth);
45 45
       return;
46 46
     }
@@ -62,13 +62,13 @@  discard block
 block discarded – undo
62 62
  * @subpackage layout
63 63
  */
64 64
 function lsx_comment_form_fields_filter($fields) {	
65
-	foreach($fields as &$field){
66
-		if(stristr('class=', $field)){
65
+	foreach ($fields as &$field) {
66
+		if (stristr('class=', $field)) {
67 67
 			$field = str_replace('class="', 'class="form-control ', $field);
68
-		}else{
68
+		} else {
69 69
 			$field = str_replace('<input', '<input class="form-control" ', $field);
70 70
 		}
71 71
 	}
72 72
 	return $fields;
73 73
 }
74
-add_filter( 'comment_form_default_fields', 'lsx_comment_form_fields_filter');
74
+add_filter('comment_form_default_fields', 'lsx_comment_form_fields_filter');
Please login to merge, or discard this patch.
inc/layout.php 1 patch
Spacing   +46 added lines, -46 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if ( ! defined( 'ABSPATH' ) ) return; // Exit if accessed directly
2
+if ( ! defined('ABSPATH')) return; // Exit if accessed directly
3 3
 
4 4
 /**
5 5
  * Layout hooks
@@ -7,15 +7,15 @@  discard block
 block discarded – undo
7 7
  * @package lsx
8 8
  */
9 9
 
10
-function lsx_layout_selector( $class, $area = 'site' ) {
10
+function lsx_layout_selector($class, $area = 'site') {
11 11
 
12
-	$layout = get_theme_mod('lsx_layout','2cr');
13
-	$layout = apply_filters( 'lsx_layout', $layout );
12
+	$layout = get_theme_mod('lsx_layout', '2cr');
13
+	$layout = apply_filters('lsx_layout', $layout);
14 14
 
15 15
 	$default_size = 'sm';
16
-	$size = apply_filters( 'lsx_bootstrap_column_size', $default_size );
16
+	$size = apply_filters('lsx_bootstrap_column_size', $default_size);
17 17
 
18
-	switch ( $layout ) {
18
+	switch ($layout) {
19 19
 		case '1c':
20 20
 			$main_class = 'col-' . $size . '-12';
21 21
 			$sidebar_class = 'col-' . $size . '-12';
@@ -34,11 +34,11 @@  discard block
 block discarded – undo
34 34
 			break;
35 35
 	}
36 36
 
37
-	if ( 'main' == $class ) {
37
+	if ('main' == $class) {
38 38
 		return $main_class;
39 39
 	}
40 40
 
41
-	if ( 'sidebar' == $class ) {
41
+	if ('sidebar' == $class) {
42 42
 		return $sidebar_class;
43 43
 	}
44 44
 }
@@ -47,11 +47,11 @@  discard block
 block discarded – undo
47 47
  * .main classes
48 48
  */
49 49
 function lsx_main_class() {
50
-	return lsx_layout_selector( 'main' );
50
+	return lsx_layout_selector('main');
51 51
 }
52 52
 
53 53
 function lsx_home_main_class() {
54
-	return lsx_layout_selector( 'main', 'home' );
54
+	return lsx_layout_selector('main', 'home');
55 55
 }
56 56
 
57 57
 /**
@@ -60,10 +60,10 @@  discard block
 block discarded – undo
60 60
 function lsx_index_main_class() {
61 61
 
62 62
 	$show_on_front = get_option('show_on_front');
63
-	if('page' == $show_on_front){
64
-		return lsx_layout_selector( 'main', 'home' );
65
-	}else{
66
-		return lsx_layout_selector( 'main', 'site' );
63
+	if ('page' == $show_on_front) {
64
+		return lsx_layout_selector('main', 'home');
65
+	} else {
66
+		return lsx_layout_selector('main', 'site');
67 67
 	}
68 68
 
69 69
 }
@@ -72,11 +72,11 @@  discard block
 block discarded – undo
72 72
  * .sidebar classes
73 73
  */
74 74
 function lsx_sidebar_class() {
75
-	return lsx_layout_selector( 'sidebar' );
75
+	return lsx_layout_selector('sidebar');
76 76
 }
77 77
 
78 78
 function lsx_home_sidebar_class() {
79
-	return lsx_layout_selector( 'sidebar', 'home' );
79
+	return lsx_layout_selector('sidebar', 'home');
80 80
 }
81 81
 
82 82
 /**
@@ -91,15 +91,15 @@  discard block
 block discarded – undo
91 91
 	$classes = 'banner navbar navbar-default';
92 92
 	
93 93
 	//Fixed header
94
-	$fixed_header = get_theme_mod('lsx_header_fixed',false);
95
-	if(false != $fixed_header){
94
+	$fixed_header = get_theme_mod('lsx_header_fixed', false);
95
+	if (false != $fixed_header) {
96 96
 		$classes .= ' navbar-static-top';
97 97
 	}
98 98
 	
99
-	if(false != $additional){
100
-		$classes .= ' '.$additional;
99
+	if (false != $additional) {
100
+		$classes .= ' ' . $additional;
101 101
 	}
102
-	echo esc_attr( $classes );
102
+	echo esc_attr($classes);
103 103
 }
104 104
 
105 105
 /**
@@ -114,37 +114,37 @@  discard block
 block discarded – undo
114 114
 	$classes = 'top-menu-default';
115 115
 	
116 116
 	//Fixed header
117
-	$fixed_header = get_theme_mod('lsx_header_fixed',false);
118
-	if(false != $fixed_header){
117
+	$fixed_header = get_theme_mod('lsx_header_fixed', false);
118
+	if (false != $fixed_header) {
119 119
 		$classes .= ' top-menu-fixed';
120 120
 	}
121 121
 	
122
-	if(false != $additional){
123
-		$classes .= ' '.$additional;
122
+	if (false != $additional) {
123
+		$classes .= ' ' . $additional;
124 124
 	}
125
-	echo esc_attr( $classes );
125
+	echo esc_attr($classes);
126 126
 }
127 127
 
128
-add_action( 'lsx_footer_before', 'lsx_add_footer_sidebar_area' );
129
-if ( ! function_exists( 'lsx_add_footer_sidebar_area' ) ) { 
128
+add_action('lsx_footer_before', 'lsx_add_footer_sidebar_area');
129
+if ( ! function_exists('lsx_add_footer_sidebar_area')) { 
130 130
 	function lsx_add_footer_sidebar_area() {
131
-		if ( is_active_sidebar( 'sidebar-footer-cta' ) ) : ?>
131
+		if (is_active_sidebar('sidebar-footer-cta')) : ?>
132 132
 			<div id="footer-cta">
133 133
 				<div class="container">
134 134
 					<div class="lsx-full-width">
135 135
 						<div class="lsx-hero-unit">
136
-							<?php dynamic_sidebar( 'sidebar-footer-cta' ); ?>
136
+							<?php dynamic_sidebar('sidebar-footer-cta'); ?>
137 137
 						</div>
138 138
 					</div>
139 139
 				</div>
140 140
 			</div>
141 141
 		<?php endif; ?>
142 142
 
143
-		<?php if ( is_active_sidebar( 'sidebar-footer' ) ) : ?>
143
+		<?php if (is_active_sidebar('sidebar-footer')) : ?>
144 144
 			<div id="footer-widgets">
145 145
 				<div class="container">
146 146
 					<div class="row">
147
-						<?php dynamic_sidebar( 'sidebar-footer' ); ?>
147
+						<?php dynamic_sidebar('sidebar-footer'); ?>
148 148
 					</div>
149 149
 				</div>
150 150
 			</div>
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
 		<?php
168 168
 	else*/if (is_singular('post')) :
169 169
 		$format = get_post_format();
170
-		if ( false === $format ) {
170
+		if (false === $format) {
171 171
 			$format = 'standard';
172 172
 		}
173 173
 		$format_link = get_post_format_link($format);
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
 		?>
176 176
 		<header class="archive-header">
177 177
 			<h1 class="archive-title">
178
-				<i class="format-link fa fa-<?php echo esc_attr( $format ) ?>"></i>
178
+				<i class="format-link fa fa-<?php echo esc_attr($format) ?>"></i>
179 179
 				<span><?php the_title(); ?></span>
180 180
 			</h1>
181 181
 		</header>
@@ -189,25 +189,25 @@  discard block
 block discarded – undo
189 189
 	elseif (is_search()) :
190 190
 		?>
191 191
 		<header class="archive-header">
192
-			<h1 class="archive-title"><?php printf( esc_html__( 'Search Results for: %s', 'lsx' ), '<span>' . get_search_query() . '</span>' ); ?></h1>
192
+			<h1 class="archive-title"><?php printf(esc_html__('Search Results for: %s', 'lsx'), '<span>' . get_search_query() . '</span>'); ?></h1>
193 193
 		</header>
194 194
 		<?php
195 195
 	elseif (is_author()) :
196 196
 		?>
197 197
 		<header class="archive-header">
198 198
 			<h1 class="archive-title">
199
-				<?php printf( esc_html__( 'Author: %s', 'lsx' ), get_the_author() ); ?>
199
+				<?php printf(esc_html__('Author: %s', 'lsx'), get_the_author()); ?>
200 200
 			</h1>
201 201
 
202 202
 			<?php if (get_the_author_meta('description')) { ?>
203
-			    <p class="author-desc"><?php echo esc_html( get_the_author_meta( 'description' ) ) ?></p>
203
+			    <p class="author-desc"><?php echo esc_html(get_the_author_meta('description')) ?></p>
204 204
 			<?php } ?>
205 205
 		</header>
206 206
 		<?php
207
-	elseif (is_archive() && class_exists('WooCommerce') && is_post_type_archive('product') ) :
207
+	elseif (is_archive() && class_exists('WooCommerce') && is_post_type_archive('product')) :
208 208
 		?>
209 209
 		<header class="archive-header">
210
-			<h1 class="archive-title"><?php esc_html_e( 'Shop', 'lsx' ); ?></h1>
210
+			<h1 class="archive-title"><?php esc_html_e('Shop', 'lsx'); ?></h1>
211 211
 			<?php echo term_description(); ?>
212 212
 		</header>
213 213
 		<?php
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
 		?>
216 216
 		<header class="archive-header">
217 217
 			<h1 class="archive-title">
218
-				<?php if ( has_post_format() && !is_category() && !is_tag() && !is_date() && !is_tax('post_format') ) { ?>
218
+				<?php if (has_post_format() && ! is_category() && ! is_tag() && ! is_date() && ! is_tax('post_format')) { ?>
219 219
 					Type: <?php the_archive_title(); ?>
220 220
 				<?php } else { ?>
221 221
 					<?php the_archive_title(); ?>
@@ -240,7 +240,7 @@  discard block
 block discarded – undo
240 240
 
241 241
 	if (in_array('blog', $classes)) { ?>
242 242
 		<header class="archive-header">
243
-			<h1 class="archive-title"><?php esc_html_e( 'Blog', 'lsx' ); ?></h1>
243
+			<h1 class="archive-title"><?php esc_html_e('Blog', 'lsx'); ?></h1>
244 244
 		</header>
245 245
 	<?php }
246 246
 }
@@ -253,16 +253,16 @@  discard block
 block discarded – undo
253 253
 	?>
254 254
 		<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=0">
255 255
 	<?php }
256
-add_action( 'wp_head', 'lsx_add_viewport_meta_tag' );
256
+add_action('wp_head', 'lsx_add_viewport_meta_tag');
257 257
 
258 258
 
259 259
 /**
260 260
  * Add a search form to just above the nav menu
261 261
  */
262 262
 function lsx_header_search_form() {
263
-	$search_form = get_theme_mod( 'lsx_header_search', 0 );
264
-	if($search_form || is_customize_preview()){
265
-		get_search_form( true );
263
+	$search_form = get_theme_mod('lsx_header_search', 0);
264
+	if ($search_form || is_customize_preview()) {
265
+		get_search_form(true);
266 266
 	}
267 267
 }
268
-add_action( 'lsx_nav_before', 'lsx_header_search_form', 0 );
269 268
\ No newline at end of file
269
+add_action('lsx_nav_before', 'lsx_header_search_form', 0);
270 270
\ No newline at end of file
Please login to merge, or discard this patch.