Completed
Push — master ( 2fcc6a...e555ed )
by
unknown
03:04
created
inc/customizer-core.php 2 patches
Spacing   +6 added lines, -6 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 ) ) { ?>
28
+			if ( ! empty($this->description)) { ?>
29 29
 				<span class="description customize-control-description"><?php echo $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.
Braces   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,8 @@
 block discarded – undo
1 1
 <?php
2
-if ( ! defined( 'ABSPATH' ) ) return; // Exit if accessed directly
2
+if ( ! defined( 'ABSPATH' ) ) {
3
+	return;
4
+}
5
+// Exit if accessed directly
3 6
 
4 7
 /**
5 8
  * Customize Swatch Control Class
Please login to merge, or discard this patch.
inc/jetpack.php 3 patches
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -123,11 +123,11 @@  discard block
 block discarded – undo
123 123
  * @category portfolio
124 124
  */
125 125
 function lsx_remove_single_related_posts() {
126
-    if ( is_single() && class_exists( 'Jetpack_RelatedPosts' ) ) {
127
-        $jprp = Jetpack_RelatedPosts::init();
128
-        $callback = array( $jprp, 'filter_add_target_to_dom' );
129
-        remove_filter( 'the_content', $callback, 40 );
130
-    }
126
+	if ( is_single() && class_exists( 'Jetpack_RelatedPosts' ) ) {
127
+		$jprp = Jetpack_RelatedPosts::init();
128
+		$callback = array( $jprp, 'filter_add_target_to_dom' );
129
+		remove_filter( 'the_content', $callback, 40 );
130
+	}
131 131
 }
132 132
 add_filter( 'wp', 'lsx_remove_single_related_posts', 20 );
133 133
 
@@ -311,7 +311,7 @@  discard block
 block discarded – undo
311 311
 		if(is_array($types)){
312 312
 			foreach ($types as $type) {
313 313
 				$content = '<li><a href="#" data-filter=".'.$type->slug.'">';
314
-		    	$content .= $type->name;					
314
+				$content .= $type->name;					
315 315
 				$content .= '</a></li>';
316 316
 				echo $content;
317 317
 				echo "\n";
Please login to merge, or discard this patch.
Spacing   +97 added lines, -97 removed lines patch added patch discarded remove patch
@@ -19,8 +19,8 @@  discard block
 block discarded – undo
19 19
  */
20 20
 function lsx_allowed_related_post_types($allowed_post_types) {
21 21
 	$allowed_post_types[] = 'jetpack-portfolio';
22
-	foreach($allowed_post_types as $key => $value){
23
-		if('page' == $value){
22
+	foreach ($allowed_post_types as $key => $value) {
23
+		if ('page' == $value) {
24 24
 			unset($allowed_post_types[$key]);
25 25
 		}
26 26
 	}
@@ -35,12 +35,12 @@  discard block
 block discarded – undo
35 35
  * @category site-logo
36 36
  */
37 37
 
38
-function lsx_site_logo_title_tag( $html) {
38
+function lsx_site_logo_title_tag($html) {
39 39
 
40
-	$html = str_replace('<a', '<a title="'.get_bloginfo('name').'" ', $html);
40
+	$html = str_replace('<a', '<a title="' . get_bloginfo('name') . '" ', $html);
41 41
 	return $html;
42 42
 }
43
-add_filter( 'jetpack_the_site_logo', 'lsx_site_logo_title_tag');
43
+add_filter('jetpack_the_site_logo', 'lsx_site_logo_title_tag');
44 44
 
45 45
 
46 46
 /*
@@ -54,19 +54,19 @@  discard block
 block discarded – undo
54 54
  * @subpackage jetpack
55 55
  * @category portfolio
56 56
  */
57
-function lsx_portfolio_infinite_scroll(){
58
-	global $_wp_theme_features,$wp_query;
57
+function lsx_portfolio_infinite_scroll() {
58
+	global $_wp_theme_features, $wp_query;
59 59
 
60
-	if(is_post_type_archive('jetpack-portfolio') || is_tax('jetpack-portfolio-type') || is_tax('jetpack-portfolio-tag')){
60
+	if (is_post_type_archive('jetpack-portfolio') || is_tax('jetpack-portfolio-type') || is_tax('jetpack-portfolio-tag')) {
61 61
 		
62
-		if(class_exists('The_Neverending_Home_Page')){
62
+		if (class_exists('The_Neverending_Home_Page')) {
63 63
 			$_wp_theme_features['infinite-scroll'][0]['container'] = 'portfolio-infinite-scroll-wrapper';
64 64
 			$_wp_theme_features['infinite-scroll'][0]['posts_per_page'] = -1;
65 65
 		}
66 66
 	}
67 67
 
68 68
 }
69
-add_action('wp_head','lsx_portfolio_infinite_scroll',1000);
69
+add_action('wp_head', 'lsx_portfolio_infinite_scroll', 1000);
70 70
 
71 71
 /**
72 72
  * Disables the infinite scroll on the portfolio archive
@@ -75,13 +75,13 @@  discard block
 block discarded – undo
75 75
  * @subpackage jetpack
76 76
  * @category portfolio
77 77
  */
78
-function lsx_portfolio_infinite_scroll_disable($supported){
79
-	if(is_post_type_archive('jetpack-portfolio')){
78
+function lsx_portfolio_infinite_scroll_disable($supported) {
79
+	if (is_post_type_archive('jetpack-portfolio')) {
80 80
 		$supported = false;
81 81
 	}
82 82
 	return $supported;
83 83
 }
84
-add_filter( 'infinite_scroll_archive_supported', 'lsx_portfolio_infinite_scroll_disable' , 1 , 10 );
84
+add_filter('infinite_scroll_archive_supported', 'lsx_portfolio_infinite_scroll_disable', 1, 10);
85 85
 
86 86
 /**
87 87
  * Set the Portfolio to 9 posts per page
@@ -90,14 +90,14 @@  discard block
 block discarded – undo
90 90
  * @subpackage jetpack
91 91
  * @category portfolio
92 92
 */
93
-function lsx_portfolio_archive_pagination( $query ) {
94
-	if(!is_admin()){
95
-		if ( $query->is_post_type_archive(array('jetpack-portfolio')) && $query->is_main_query() && class_exists('The_Neverending_Home_Page')) {
96
-			$query->set( 'posts_per_page', -1 );
93
+function lsx_portfolio_archive_pagination($query) {
94
+	if ( ! is_admin()) {
95
+		if ($query->is_post_type_archive(array('jetpack-portfolio')) && $query->is_main_query() && class_exists('The_Neverending_Home_Page')) {
96
+			$query->set('posts_per_page', -1);
97 97
 		}
98 98
 	}
99 99
 }
100
-add_action( 'pre_get_posts', 'lsx_portfolio_archive_pagination' , 100 );
100
+add_action('pre_get_posts', 'lsx_portfolio_archive_pagination', 100);
101 101
 
102 102
 /**
103 103
  * Remove the related posts from below the content area.
@@ -107,13 +107,13 @@  discard block
 block discarded – undo
107 107
  * @category portfolio
108 108
  */
109 109
 function lsx_remove_portfolio_related_posts() {
110
-	if ( is_single() && 'jetpack-portfolio' == get_post_type() && class_exists( 'Jetpack_RelatedPosts' ) ) {
110
+	if (is_single() && 'jetpack-portfolio' == get_post_type() && class_exists('Jetpack_RelatedPosts')) {
111 111
 		$jprp = Jetpack_RelatedPosts::init();
112
-		$callback = array( $jprp, 'filter_add_target_to_dom' );
113
-		remove_filter( 'the_content', $callback, 40 );
112
+		$callback = array($jprp, 'filter_add_target_to_dom');
113
+		remove_filter('the_content', $callback, 40);
114 114
 	}
115 115
 }
116
-add_filter( 'wp', 'lsx_remove_portfolio_related_posts', 20 );
116
+add_filter('wp', 'lsx_remove_portfolio_related_posts', 20);
117 117
 
118 118
 /**
119 119
  * Remove the related posts from below the content area.
@@ -123,13 +123,13 @@  discard block
 block discarded – undo
123 123
  * @category portfolio
124 124
  */
125 125
 function lsx_remove_single_related_posts() {
126
-    if ( is_single() && class_exists( 'Jetpack_RelatedPosts' ) ) {
126
+    if (is_single() && class_exists('Jetpack_RelatedPosts')) {
127 127
         $jprp = Jetpack_RelatedPosts::init();
128
-        $callback = array( $jprp, 'filter_add_target_to_dom' );
129
-        remove_filter( 'the_content', $callback, 40 );
128
+        $callback = array($jprp, 'filter_add_target_to_dom');
129
+        remove_filter('the_content', $callback, 40);
130 130
     }
131 131
 }
132
-add_filter( 'wp', 'lsx_remove_single_related_posts', 20 );
132
+add_filter('wp', 'lsx_remove_single_related_posts', 20);
133 133
 
134 134
 /**
135 135
  * A template tag to call the Portfolios Related posts
@@ -138,8 +138,8 @@  discard block
 block discarded – undo
138 138
  * @subpackage jetpack
139 139
  * @category portfolio
140 140
  */
141
-function lsx_portfolio_related_posts(){
142
-	if(class_exists('Jetpack_RelatedPosts')){ ?>
141
+function lsx_portfolio_related_posts() {
142
+	if (class_exists('Jetpack_RelatedPosts')) { ?>
143 143
 		<div class="row">
144 144
 			<div class="col-md-12">
145 145
 				<?php echo do_shortcode('[jetpack-related-posts]'); ?>
@@ -156,16 +156,16 @@  discard block
 block discarded – undo
156 156
  * @category portfolio
157 157
  */
158 158
 function lsx_portfolio_remove_share() {
159
-	if ( ( is_single() && 'jetpack-portfolio' == get_post_type() ) || is_page_template( 'page-templates/template-portfolio.php' ) ) {
160
-		remove_filter( 'the_content', 'sharing_display',19 );
161
-		remove_filter( 'the_excerpt', 'sharing_display',19 );
159
+	if ((is_single() && 'jetpack-portfolio' == get_post_type()) || is_page_template('page-templates/template-portfolio.php')) {
160
+		remove_filter('the_content', 'sharing_display', 19);
161
+		remove_filter('the_excerpt', 'sharing_display', 19);
162 162
 
163
-		if ( class_exists( 'Jetpack_Likes' ) ) {
164
-			remove_filter( 'the_content', array( Jetpack_Likes::init(), 'post_likes' ), 30, 1 );
163
+		if (class_exists('Jetpack_Likes')) {
164
+			remove_filter('the_content', array(Jetpack_Likes::init(), 'post_likes'), 30, 1);
165 165
 		}
166 166
 	}
167 167
 }
168
-add_action( 'loop_start', 'lsx_portfolio_remove_share' );
168
+add_action('loop_start', 'lsx_portfolio_remove_share');
169 169
 
170 170
 /**
171 171
  * Remove the sharing from single
@@ -175,16 +175,16 @@  discard block
 block discarded – undo
175 175
  * @category post
176 176
  */
177 177
 function lsx_single_remove_share() {
178
-	if ( is_single() ) {
179
-		remove_filter( 'the_content', 'sharing_display',19 );
180
-		remove_filter( 'the_excerpt', 'sharing_display',19 );
178
+	if (is_single()) {
179
+		remove_filter('the_content', 'sharing_display', 19);
180
+		remove_filter('the_excerpt', 'sharing_display', 19);
181 181
 
182
-		if ( class_exists( 'Jetpack_Likes' ) ) {
183
-			remove_filter( 'the_content', array( Jetpack_Likes::init(), 'post_likes' ), 30, 1 );
182
+		if (class_exists('Jetpack_Likes')) {
183
+			remove_filter('the_content', array(Jetpack_Likes::init(), 'post_likes'), 30, 1);
184 184
 		}
185 185
 	}
186 186
 }
187
-add_action( 'loop_start', 'lsx_single_remove_share' );
187
+add_action('loop_start', 'lsx_single_remove_share');
188 188
 
189 189
 /**
190 190
  * Redirect the template archive to our one
@@ -193,18 +193,18 @@  discard block
 block discarded – undo
193 193
  * @subpackage jetpack
194 194
  * @category portfolio
195 195
 */
196
-function lsx_portfolio_taxonomy_template( $template ) {
196
+function lsx_portfolio_taxonomy_template($template) {
197 197
 
198
-	if ( is_tax(array('jetpack-portfolio-type','jetpack-portfolio-tag'))  ) {
199
-		$new_template = locate_template( array( 'archive-jetpack-portfolio.php' ) );
200
-		if ( '' != $new_template ) {
201
-			return $new_template ;
198
+	if (is_tax(array('jetpack-portfolio-type', 'jetpack-portfolio-tag'))) {
199
+		$new_template = locate_template(array('archive-jetpack-portfolio.php'));
200
+		if ('' != $new_template) {
201
+			return $new_template;
202 202
 		}
203 203
 	}
204 204
 
205 205
 	return $template;
206 206
 }
207
-add_filter( 'template_include', 'lsx_portfolio_taxonomy_template', 99 );
207
+add_filter('template_include', 'lsx_portfolio_taxonomy_template', 99);
208 208
 
209 209
 
210 210
 /**
@@ -214,38 +214,38 @@  discard block
 block discarded – undo
214 214
  * @subpackage jetpack
215 215
  * @category portfolio
216 216
  */
217
-add_action( 'add_meta_boxes', 'lsx_add_portfolio_post_meta_boxes' );
218
-add_action( 'save_post', 'lsx_save_portfolio_post_meta', 100, 2 );
217
+add_action('add_meta_boxes', 'lsx_add_portfolio_post_meta_boxes');
218
+add_action('save_post', 'lsx_save_portfolio_post_meta', 100, 2);
219 219
 
220
-function lsx_save_portfolio_post_meta( $post_id, $post ) {
220
+function lsx_save_portfolio_post_meta($post_id, $post) {
221 221
 
222 222
 
223
-	if ( (!isset( $_POST['lsx_website_nonce'] ) || !wp_verify_nonce( $_POST['lsx_website_nonce'], basename( __FILE__ ) ))
224
-	|| (!isset( $_POST['lsx_client_nonce'] ) || !wp_verify_nonce( $_POST['lsx_client_nonce'], basename( __FILE__ ) )) )
223
+	if (( ! isset($_POST['lsx_website_nonce']) || ! wp_verify_nonce($_POST['lsx_website_nonce'], basename(__FILE__)))
224
+	|| ( ! isset($_POST['lsx_client_nonce']) || ! wp_verify_nonce($_POST['lsx_client_nonce'], basename(__FILE__))))
225 225
 		return $post_id;
226 226
 
227
-	$post_type = get_post_type_object( $post->post_type );
227
+	$post_type = get_post_type_object($post->post_type);
228 228
 
229
-	if ( !current_user_can( $post_type->cap->edit_post, $post_id ) )
229
+	if ( ! current_user_can($post_type->cap->edit_post, $post_id))
230 230
 		return $post_id;
231 231
 
232 232
 
233
-	$meta_keys = array('lsx-website','lsx-client');
233
+	$meta_keys = array('lsx-website', 'lsx-client');
234 234
 
235
-	foreach($meta_keys as $meta_key){
235
+	foreach ($meta_keys as $meta_key) {
236 236
 
237
-		$new_meta_value = ( isset( $_POST[$meta_key] ) ? sanitize_text_field($_POST[$meta_key]) : '' );
237
+		$new_meta_value = (isset($_POST[$meta_key]) ? sanitize_text_field($_POST[$meta_key]) : '');
238 238
 
239
-		$meta_value = get_post_meta( $post_id, $meta_key, true );
239
+		$meta_value = get_post_meta($post_id, $meta_key, true);
240 240
 
241
-		if ( $new_meta_value && '' == $meta_value )
242
-			add_post_meta( $post_id, $meta_key, $new_meta_value, true );
241
+		if ($new_meta_value && '' == $meta_value)
242
+			add_post_meta($post_id, $meta_key, $new_meta_value, true);
243 243
 
244
-		elseif ( $new_meta_value && $new_meta_value != $meta_value )
245
-		update_post_meta( $post_id, $meta_key, $new_meta_value );
244
+		elseif ($new_meta_value && $new_meta_value != $meta_value)
245
+		update_post_meta($post_id, $meta_key, $new_meta_value);
246 246
 
247
-		elseif ( '' == $new_meta_value && $meta_value )
248
-		delete_post_meta( $post_id, $meta_key, $meta_value );
247
+		elseif ('' == $new_meta_value && $meta_value)
248
+		delete_post_meta($post_id, $meta_key, $meta_value);
249 249
 
250 250
 	}
251 251
 }
@@ -254,7 +254,7 @@  discard block
 block discarded – undo
254 254
 
255 255
 	add_meta_box(
256 256
 	'lsx_client_meta_box',
257
-	esc_html__( 'Client', 'lsx' ),
257
+	esc_html__('Client', 'lsx'),
258 258
 	'lsx_client_meta_box',
259 259
 	'jetpack-portfolio',
260 260
 	'side',
@@ -263,7 +263,7 @@  discard block
 block discarded – undo
263 263
 
264 264
 	add_meta_box(
265 265
 	'lsx_website_meta_box',
266
-	esc_html__( 'Website', 'lsx' ),
266
+	esc_html__('Website', 'lsx'),
267 267
 	'lsx_website_meta_box',
268 268
 	'jetpack-portfolio',
269 269
 	'side',
@@ -271,25 +271,25 @@  discard block
 block discarded – undo
271 271
 			);
272 272
 }
273 273
 
274
-function lsx_client_meta_box( $object, $box ) { ?>
274
+function lsx_client_meta_box($object, $box) { ?>
275 275
 
276
-  <?php wp_nonce_field( basename( __FILE__ ), 'lsx_client_nonce' ); ?>
276
+  <?php wp_nonce_field(basename(__FILE__), 'lsx_client_nonce'); ?>
277 277
 
278 278
   <p>
279
-    <input class="widefat" type="text" name="lsx-client" id="lsx-client" value="<?php echo esc_attr( get_post_meta( $object->ID, 'lsx-client', true ) ); ?>" size="30" />
279
+    <input class="widefat" type="text" name="lsx-client" id="lsx-client" value="<?php echo esc_attr(get_post_meta($object->ID, 'lsx-client', true)); ?>" size="30" />
280 280
     <br /><br />
281
-    <label for="lsx-client"><?php _e( "Enter the name of the project client", 'lsx' ); ?></label>
281
+    <label for="lsx-client"><?php _e("Enter the name of the project client", 'lsx'); ?></label>
282 282
   </p>
283 283
 <?php }
284 284
 
285
-function lsx_website_meta_box( $object, $box ) { ?>
285
+function lsx_website_meta_box($object, $box) { ?>
286 286
 
287
-  <?php wp_nonce_field( basename( __FILE__ ), 'lsx_website_nonce' ); ?>
287
+  <?php wp_nonce_field(basename(__FILE__), 'lsx_website_nonce'); ?>
288 288
 
289 289
   <p>
290
-    <input class="widefat" type="text" name="lsx-website" id="lsx-website" value="<?php echo esc_attr( get_post_meta( $object->ID, 'lsx-website', true ) ); ?>" size="30" />
290
+    <input class="widefat" type="text" name="lsx-website" id="lsx-website" value="<?php echo esc_attr(get_post_meta($object->ID, 'lsx-website', true)); ?>" size="30" />
291 291
     <br /><br />
292
-    <label for="lsx-website"><?php _e( "Enter the URL of the project website", 'lsx' ); ?></label>
292
+    <label for="lsx-website"><?php _e("Enter the URL of the project website", 'lsx'); ?></label>
293 293
   </p>
294 294
 <?php }
295 295
 
@@ -302,15 +302,15 @@  discard block
 block discarded – undo
302 302
  * @category portfolio
303 303
  */   
304 304
 
305
-function lsx_portfolio_sorter(){ ?>
305
+function lsx_portfolio_sorter() { ?>
306 306
 	<ul id="filterNav" class="clearfix">
307 307
 		<li class="allBtn"><a href="#" data-filter="*" class="selected"><?php _e('All', 'lsx'); ?></a></li>
308 308
 		<?php 
309 309
 		$types = get_terms('jetpack-portfolio-type');
310 310
 		
311
-		if(is_array($types)){
311
+		if (is_array($types)) {
312 312
 			foreach ($types as $type) {
313
-				$content = '<li><a href="#" data-filter=".'.$type->slug.'">';
313
+				$content = '<li><a href="#" data-filter=".' . $type->slug . '">';
314 314
 		    	$content .= $type->name;					
315 315
 				$content .= '</a></li>';
316 316
 				echo $content;
@@ -328,18 +328,18 @@  discard block
 block discarded – undo
328 328
  * @category portfolio
329 329
  */
330 330
 
331
-function lsx_portfolio_naviagtion_labels($labels){ 
331
+function lsx_portfolio_naviagtion_labels($labels) { 
332 332
 	
333
-	if(is_post_type_archive('jetpack-portfolio')){
333
+	if (is_post_type_archive('jetpack-portfolio')) {
334 334
 		$labels = array(
335
-				'next' 		=> '<span class="meta-nav">&larr;</span> '.__( 'Older', 'lsx' ),
336
-				'previous' 	=> __( 'Newer', 'lsx' ).' <span class="meta-nav">&rarr;</span>',
337
-				'title' 	=> __( 'Portfolio navigation', 'lsx' )
335
+				'next' 		=> '<span class="meta-nav">&larr;</span> ' . __('Older', 'lsx'),
336
+				'previous' 	=> __('Newer', 'lsx') . ' <span class="meta-nav">&rarr;</span>',
337
+				'title' 	=> __('Portfolio navigation', 'lsx')
338 338
 		);
339 339
 	}
340 340
 	return $labels;
341 341
 }
342
-add_filter('lsx_post_navigation_labels','lsx_portfolio_naviagtion_labels',1,10);
342
+add_filter('lsx_post_navigation_labels', 'lsx_portfolio_naviagtion_labels', 1, 10);
343 343
 
344 344
 
345 345
 /*
@@ -353,11 +353,11 @@  discard block
 block discarded – undo
353 353
  * @subpackage jetpack
354 354
  * @category related-posts
355 355
  */
356
-function lsx_remove_related_post_context(){
357
-	add_filter( 'jetpack_relatedposts_filter_post_context', '__return_empty_string' );
358
-	add_filter( 'rest_api_allowed_post_types', 'lsx_allowed_related_post_types' );
356
+function lsx_remove_related_post_context() {
357
+	add_filter('jetpack_relatedposts_filter_post_context', '__return_empty_string');
358
+	add_filter('rest_api_allowed_post_types', 'lsx_allowed_related_post_types');
359 359
 }
360
-add_action('init','lsx_remove_related_post_context',20);
360
+add_action('init', 'lsx_remove_related_post_context', 20);
361 361
 
362 362
 
363 363
 /*
@@ -374,13 +374,13 @@  discard block
 block discarded – undo
374 374
 	$infinite_scroll_args = array(
375 375
 			'container' => 'main',
376 376
 			'type' => 'click',
377
-			'posts_per_page' => get_option('posts_per_page',10),
377
+			'posts_per_page' => get_option('posts_per_page', 10),
378 378
 			'render'    => 'lsx_infinite_scroll_render'
379 379
 	);
380 380
 
381
-	add_theme_support( 'infinite-scroll', $infinite_scroll_args );
381
+	add_theme_support('infinite-scroll', $infinite_scroll_args);
382 382
 }
383
-add_action( 'after_setup_theme', 'lsx_jetpack_infinite_scroll_after_setup' );
383
+add_action('after_setup_theme', 'lsx_jetpack_infinite_scroll_after_setup');
384 384
 
385 385
 /**
386 386
  * Set the code to be rendered on for calling posts,
@@ -393,13 +393,13 @@  discard block
 block discarded – undo
393 393
  function lsx_infinite_scroll_render() {
394 394
 	global $wp_query;
395 395
 	
396
-	while(have_posts()){
396
+	while (have_posts()) {
397 397
 		the_post();
398 398
 		
399
-		if('jetpack-portfolio' == get_post_type()){
400
-			get_template_part( 'content', 'portfolio' );
401
-		}else{
402
-			get_template_part( 'content', get_post_type() );
399
+		if ('jetpack-portfolio' == get_post_type()) {
400
+			get_template_part('content', 'portfolio');
401
+		} else {
402
+			get_template_part('content', get_post_type());
403 403
 		}
404 404
 	}
405 405
  }
@@ -411,8 +411,8 @@  discard block
 block discarded – undo
411 411
  * @subpackage jetpack
412 412
  * @category related posts
413 413
  */
414
-function lsx_related_posts_headline( $headline ) {
415
-	$headline = sprintf( '<h3 class="jp-relatedposts-headline"><em>%s</em></h3>', esc_html( 'Related Posts' ) );
414
+function lsx_related_posts_headline($headline) {
415
+	$headline = sprintf('<h3 class="jp-relatedposts-headline"><em>%s</em></h3>', esc_html('Related Posts'));
416 416
 	return $headline;
417 417
 }
418
-add_filter( 'jetpack_relatedposts_filter_headline', 'lsx_related_posts_headline' );
418
+add_filter('jetpack_relatedposts_filter_headline', 'lsx_related_posts_headline');
Please login to merge, or discard this patch.
Braces   +14 added lines, -13 removed lines patch added patch discarded remove patch
@@ -221,13 +221,15 @@  discard block
 block discarded – undo
221 221
 
222 222
 
223 223
 	if ( (!isset( $_POST['lsx_website_nonce'] ) || !wp_verify_nonce( $_POST['lsx_website_nonce'], basename( __FILE__ ) ))
224
-	|| (!isset( $_POST['lsx_client_nonce'] ) || !wp_verify_nonce( $_POST['lsx_client_nonce'], basename( __FILE__ ) )) )
225
-		return $post_id;
224
+	|| (!isset( $_POST['lsx_client_nonce'] ) || !wp_verify_nonce( $_POST['lsx_client_nonce'], basename( __FILE__ ) )) ) {
225
+			return $post_id;
226
+	}
226 227
 
227 228
 	$post_type = get_post_type_object( $post->post_type );
228 229
 
229
-	if ( !current_user_can( $post_type->cap->edit_post, $post_id ) )
230
-		return $post_id;
230
+	if ( !current_user_can( $post_type->cap->edit_post, $post_id ) ) {
231
+			return $post_id;
232
+	}
231 233
 
232 234
 
233 235
 	$meta_keys = array('lsx-website','lsx-client');
@@ -238,14 +240,13 @@  discard block
 block discarded – undo
238 240
 
239 241
 		$meta_value = get_post_meta( $post_id, $meta_key, true );
240 242
 
241
-		if ( $new_meta_value && '' == $meta_value )
242
-			add_post_meta( $post_id, $meta_key, $new_meta_value, true );
243
-
244
-		elseif ( $new_meta_value && $new_meta_value != $meta_value )
245
-		update_post_meta( $post_id, $meta_key, $new_meta_value );
246
-
247
-		elseif ( '' == $new_meta_value && $meta_value )
248
-		delete_post_meta( $post_id, $meta_key, $meta_value );
243
+		if ( $new_meta_value && '' == $meta_value ) {
244
+					add_post_meta( $post_id, $meta_key, $new_meta_value, true );
245
+		} elseif ( $new_meta_value && $new_meta_value != $meta_value ) {
246
+				update_post_meta( $post_id, $meta_key, $new_meta_value );
247
+		} elseif ( '' == $new_meta_value && $meta_value ) {
248
+				delete_post_meta( $post_id, $meta_key, $meta_value );
249
+		}
249 250
 
250 251
 	}
251 252
 }
@@ -398,7 +399,7 @@  discard block
 block discarded – undo
398 399
 		
399 400
 		if('jetpack-portfolio' == get_post_type()){
400 401
 			get_template_part( 'content', 'portfolio' );
401
-		}else{
402
+		} else{
402 403
 			get_template_part( 'content', get_post_type() );
403 404
 		}
404 405
 	}
Please login to merge, or discard this patch.
inc/example/customizer-colour-extended.php 2 patches
Spacing   +38 added lines, -38 removed lines patch added patch discarded remove patch
@@ -1,77 +1,77 @@  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
  * Filter: lsx_customizer_colour_names
6 6
  *
7 7
  * Add two new colors (test) in main array of colors
8 8
  */
9
-function test_lsx_customizer_colour_names( $array ) {
10
-	$array['test_text_color'] = esc_html__( 'TEST: Text', 'lsx' );
11
-	$array['test_text_color_hover'] = esc_html__( 'TEST: Text (hover)', 'lsx' );
9
+function test_lsx_customizer_colour_names($array) {
10
+	$array['test_text_color'] = esc_html__('TEST: Text', 'lsx');
11
+	$array['test_text_color_hover'] = esc_html__('TEST: Text (hover)', 'lsx');
12 12
 	return $array;
13 13
 }
14
-add_filter( 'lsx_customizer_colour_names', 'test_lsx_customizer_colour_names' );
14
+add_filter('lsx_customizer_colour_names', 'test_lsx_customizer_colour_names');
15 15
 
16 16
 /**
17 17
  * Filter: lsx_customizer_colour_choices_default
18 18
  *
19 19
  * Add the new colors (test) in default scheme
20 20
  */
21
-function test_lsx_customizer_colour_choices_default( $array ) {
21
+function test_lsx_customizer_colour_choices_default($array) {
22 22
 	$array[] = '#ddddd1';
23 23
 	$array[] = '#eeeee1';
24 24
 	return $array;
25 25
 }
26
-add_filter( 'lsx_customizer_colour_choices_default', 'test_lsx_customizer_colour_choices_default' );
26
+add_filter('lsx_customizer_colour_choices_default', 'test_lsx_customizer_colour_choices_default');
27 27
 
28 28
 /**
29 29
  * Filter: lsx_customizer_colour_choices_red
30 30
  *
31 31
  * Add the new colors (test) in red scheme
32 32
  */
33
-function test_lsx_customizer_colour_choices_red( $array ) {
33
+function test_lsx_customizer_colour_choices_red($array) {
34 34
 	$array[] = '#ddddd2';
35 35
 	$array[] = '#eeeee2';
36 36
 	return $array;
37 37
 }
38
-add_filter( 'lsx_customizer_colour_choices_red', 'test_lsx_customizer_colour_choices_red' );
38
+add_filter('lsx_customizer_colour_choices_red', 'test_lsx_customizer_colour_choices_red');
39 39
 
40 40
 /**
41 41
  * Filter: lsx_customizer_colour_choices_orange
42 42
  *
43 43
  * Add the new colors (test) in orange scheme
44 44
  */
45
-function test_lsx_customizer_colour_choices_orange( $array ) {
45
+function test_lsx_customizer_colour_choices_orange($array) {
46 46
 	$array[] = '#ddddd3';
47 47
 	$array[] = '#eeeee3';
48 48
 	return $array;
49 49
 }
50
-add_filter( 'lsx_customizer_colour_choices_orange', 'test_lsx_customizer_colour_choices_orange' );
50
+add_filter('lsx_customizer_colour_choices_orange', 'test_lsx_customizer_colour_choices_orange');
51 51
 
52 52
 /**
53 53
  * Filter: lsx_customizer_colour_choices_green
54 54
  *
55 55
  * Add the new colors (test) in green scheme
56 56
  */
57
-function test_lsx_customizer_colour_choices_green( $array ) {
57
+function test_lsx_customizer_colour_choices_green($array) {
58 58
 	$array[] = '#ddddd4';
59 59
 	$array[] = '#eeeee4';
60 60
 	return $array;
61 61
 }
62
-add_filter( 'lsx_customizer_colour_choices_green', 'test_lsx_customizer_colour_choices_green' );
62
+add_filter('lsx_customizer_colour_choices_green', 'test_lsx_customizer_colour_choices_green');
63 63
 
64 64
 /**
65 65
  * Filter: lsx_customizer_colour_choices_brown
66 66
  *
67 67
  * Add the new colors (test) in brown scheme
68 68
  */
69
-function test_lsx_customizer_colour_choices_brown( $array ) {
69
+function test_lsx_customizer_colour_choices_brown($array) {
70 70
 	$array[] = '#ddddd5';
71 71
 	$array[] = '#eeeee5';
72 72
 	return $array;
73 73
 }
74
-add_filter( 'lsx_customizer_colour_choices_brown', 'test_lsx_customizer_colour_choices_brown' );
74
+add_filter('lsx_customizer_colour_choices_brown', 'test_lsx_customizer_colour_choices_brown');
75 75
 
76 76
 /**
77 77
  * Filter: lsx_customizer_colour_choices
@@ -79,9 +79,9 @@  discard block
 block discarded – undo
79 79
  * Add a new scheme
80 80
  * Also add the new colors (test) in new scheme
81 81
  */
82
-function test_lsx_customizer_colour_choices( $array ) {
82
+function test_lsx_customizer_colour_choices($array) {
83 83
 	$array['test'] = array(
84
-		'label'  => __( 'Test', 'lsx' ),
84
+		'label'  => __('Test', 'lsx'),
85 85
 		'colors' => array(
86 86
 			// Button
87 87
 			'#428bca', '#2a6496', '#ffffff', '#ffffff',
@@ -110,14 +110,14 @@  discard block
 block discarded – undo
110 110
 
111 111
 	return $array;
112 112
 }
113
-add_filter( 'lsx_customizer_colour_choices', 'test_lsx_customizer_colour_choices' );
113
+add_filter('lsx_customizer_colour_choices', 'test_lsx_customizer_colour_choices');
114 114
 
115 115
 /**
116 116
  * Filter: lsx_customizer_colour_selectors_button
117 117
  *
118 118
  * Add new selectors in "button" group of colours
119 119
  */
120
-function test_lsx_customizer_colour_selectors_button( $css, $colors ) {
120
+function test_lsx_customizer_colour_selectors_button($css, $colors) {
121 121
 	$css .= <<<CSS
122 122
 	
123 123
 	/* Button TEST */
@@ -132,14 +132,14 @@  discard block
 block discarded – undo
132 132
 
133 133
 	return $css;
134 134
 }
135
-add_filter( 'lsx_customizer_colour_selectors_button', 'test_lsx_customizer_colour_selectors_button', 10, 2 );
135
+add_filter('lsx_customizer_colour_selectors_button', 'test_lsx_customizer_colour_selectors_button', 10, 2);
136 136
 
137 137
 /**
138 138
  * Filter: lsx_customizer_colour_selectors_button_cta
139 139
  *
140 140
  * Add new selectors in "button cta" group of colours
141 141
  */
142
-function test_lsx_customizer_colour_selectors_button_cta( $css, $colors ) {
142
+function test_lsx_customizer_colour_selectors_button_cta($css, $colors) {
143 143
 	$css .= <<<CSS
144 144
 	
145 145
 	/* Button CTA TEST */
@@ -154,14 +154,14 @@  discard block
 block discarded – undo
154 154
 
155 155
 	return $css;
156 156
 }
157
-add_filter( 'lsx_customizer_colour_selectors_button_cta', 'test_lsx_customizer_colour_selectors_button_cta', 10, 2 );
157
+add_filter('lsx_customizer_colour_selectors_button_cta', 'test_lsx_customizer_colour_selectors_button_cta', 10, 2);
158 158
 
159 159
 /**
160 160
  * Filter: lsx_customizer_colour_selectors_top_menu
161 161
  *
162 162
  * Add new selectors in "top menu" group of colours
163 163
  */
164
-function test_lsx_customizer_colour_selectors_top_menu( $css, $colors ) {
164
+function test_lsx_customizer_colour_selectors_top_menu($css, $colors) {
165 165
 	$css .= <<<CSS
166 166
 	
167 167
 	/* Top Menu TEST */
@@ -175,14 +175,14 @@  discard block
 block discarded – undo
175 175
 
176 176
 	return $css;
177 177
 }
178
-add_filter( 'lsx_customizer_colour_selectors_top_menu', 'test_lsx_customizer_colour_selectors_top_menu', 10, 2 );
178
+add_filter('lsx_customizer_colour_selectors_top_menu', 'test_lsx_customizer_colour_selectors_top_menu', 10, 2);
179 179
 
180 180
 /**
181 181
  * Filter: lsx_customizer_colour_selectors_header
182 182
  *
183 183
  * Add new selectors in "header" group of colours
184 184
  */
185
-function test_lsx_customizer_colour_selectors_header( $css, $colors ) {
185
+function test_lsx_customizer_colour_selectors_header($css, $colors) {
186 186
 	$css .= <<<CSS
187 187
 	
188 188
 	/* Header TEST */
@@ -197,14 +197,14 @@  discard block
 block discarded – undo
197 197
 
198 198
 	return $css;
199 199
 }
200
-add_filter( 'lsx_customizer_colour_selectors_header', 'test_lsx_customizer_colour_selectors_header', 10, 2 );
200
+add_filter('lsx_customizer_colour_selectors_header', 'test_lsx_customizer_colour_selectors_header', 10, 2);
201 201
 
202 202
 /**
203 203
  * Filter: lsx_customizer_colour_selectors_main_menu
204 204
  *
205 205
  * Add new selectors in "main meun" group of colours
206 206
  */
207
-function test_lsx_customizer_colour_selectors_main_menu( $css, $colors ) {
207
+function test_lsx_customizer_colour_selectors_main_menu($css, $colors) {
208 208
 	$css .= <<<CSS
209 209
 	
210 210
 	/* Main Menu TEST */
@@ -220,14 +220,14 @@  discard block
 block discarded – undo
220 220
 
221 221
 	return $css;
222 222
 }
223
-add_filter( 'lsx_customizer_colour_selectors_main_menu', 'test_lsx_customizer_colour_selectors_main_menu', 10, 2 );
223
+add_filter('lsx_customizer_colour_selectors_main_menu', 'test_lsx_customizer_colour_selectors_main_menu', 10, 2);
224 224
 
225 225
 /**
226 226
  * Filter: lsx_customizer_colour_selectors_banner
227 227
  *
228 228
  * Add new selectors in "banner" group of colours
229 229
  */
230
-function test_lsx_customizer_colour_selectors_banner( $css, $colors ) {
230
+function test_lsx_customizer_colour_selectors_banner($css, $colors) {
231 231
 	$css .= <<<CSS
232 232
 	
233 233
 	/* Banner TEST */
@@ -241,14 +241,14 @@  discard block
 block discarded – undo
241 241
 
242 242
 	return $css;
243 243
 }
244
-add_filter( 'lsx_customizer_colour_selectors_banner', 'test_lsx_customizer_colour_selectors_banner', 10, 2 );
244
+add_filter('lsx_customizer_colour_selectors_banner', 'test_lsx_customizer_colour_selectors_banner', 10, 2);
245 245
 
246 246
 /**
247 247
  * Filter: lsx_customizer_colour_selectors_body
248 248
  *
249 249
  * Add new selectors in "body" group of colours
250 250
  */
251
-function test_lsx_customizer_colour_selectors_body( $css, $colors ) {
251
+function test_lsx_customizer_colour_selectors_body($css, $colors) {
252 252
 	$css .= <<<CSS
253 253
 	
254 254
 	/* Body TEST */
@@ -265,14 +265,14 @@  discard block
 block discarded – undo
265 265
 
266 266
 	return $css;
267 267
 }
268
-add_filter( 'lsx_customizer_colour_selectors_body', 'test_lsx_customizer_colour_selectors_body', 10, 2 );
268
+add_filter('lsx_customizer_colour_selectors_body', 'test_lsx_customizer_colour_selectors_body', 10, 2);
269 269
 
270 270
 /**
271 271
  * Filter: lsx_customizer_colour_selectors_footer_cta
272 272
  *
273 273
  * Add new selectors in "footer cta" group of colours
274 274
  */
275
-function test_lsx_customizer_colour_selectors_footer_cta( $css, $colors ) {
275
+function test_lsx_customizer_colour_selectors_footer_cta($css, $colors) {
276 276
 	$css .= <<<CSS
277 277
 	
278 278
 	/* Footer CTA TEST */
@@ -287,14 +287,14 @@  discard block
 block discarded – undo
287 287
 
288 288
 	return $css;
289 289
 }
290
-add_filter( 'lsx_customizer_colour_selectors_footer_cta', 'test_lsx_customizer_colour_selectors_footer_cta', 10, 2 );
290
+add_filter('lsx_customizer_colour_selectors_footer_cta', 'test_lsx_customizer_colour_selectors_footer_cta', 10, 2);
291 291
 
292 292
 /**
293 293
  * Filter: lsx_customizer_colour_selectors_footer_widgets
294 294
  *
295 295
  * Add new selectors in "footer widgets" group of colours
296 296
  */
297
-function test_lsx_customizer_colour_selectors_footer_widgets( $css, $colors ) {
297
+function test_lsx_customizer_colour_selectors_footer_widgets($css, $colors) {
298 298
 	$css .= <<<CSS
299 299
 	
300 300
 	/* Footer Widgets TEST */
@@ -309,14 +309,14 @@  discard block
 block discarded – undo
309 309
 
310 310
 	return $css;
311 311
 }
312
-add_filter( 'lsx_customizer_colour_selectors_footer_widgets', 'test_lsx_customizer_colour_selectors_footer_widgets', 10, 2 );
312
+add_filter('lsx_customizer_colour_selectors_footer_widgets', 'test_lsx_customizer_colour_selectors_footer_widgets', 10, 2);
313 313
 
314 314
 /**
315 315
  * Filter: lsx_customizer_colour_selectors_footer
316 316
  *
317 317
  * Add new selectors in "footer" group of colours
318 318
  */
319
-function test_lsx_customizer_colour_selectors_footer( $css, $colors ) {
319
+function test_lsx_customizer_colour_selectors_footer($css, $colors) {
320 320
 	$css .= <<<CSS
321 321
 	
322 322
 	/* Footer TEST */
@@ -331,6 +331,6 @@  discard block
 block discarded – undo
331 331
 
332 332
 	return $css;
333 333
 }
334
-add_filter( 'lsx_customizer_colour_selectors_footer', 'test_lsx_customizer_colour_selectors_footer', 10, 2 );
334
+add_filter('lsx_customizer_colour_selectors_footer', 'test_lsx_customizer_colour_selectors_footer', 10, 2);
335 335
 
336 336
 ?>
337 337
\ No newline at end of file
Please login to merge, or discard this patch.
Braces   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,8 @@
 block discarded – undo
1 1
 <?php
2
-if ( ! defined( 'ABSPATH' ) ) return; // Exit if accessed directly
2
+if ( ! defined( 'ABSPATH' ) ) {
3
+	return;
4
+}
5
+// Exit if accessed directly
3 6
 
4 7
 /**
5 8
  * Customize Swatch Control Class
Please login to merge, or discard this patch.
inc/sensei.php 2 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
  * @category styles
126 126
  */
127 127
 function lsx_sensei_styles() {
128
-    wp_enqueue_style( 'sensei', get_template_directory_uri() . '/css/sensei.css' );
128
+	wp_enqueue_style( 'sensei', get_template_directory_uri() . '/css/sensei.css' );
129 129
 }
130 130
 add_action( 'wp_enqueue_scripts', 'lsx_sensei_styles' );
131 131
 
@@ -136,10 +136,10 @@  discard block
 block discarded – undo
136 136
  * @category 	styles
137 137
  */
138 138
 function lsx_sensei_redirect_to_home( $query ){
139
-    if(!is_admin() && is_post_type_archive( 'lesson' ) ) {
140
-         wp_redirect( home_url() . '/courses-overview' );
141
-         exit;
142
-     }
139
+	if(!is_admin() && is_post_type_archive( 'lesson' ) ) {
140
+		 wp_redirect( home_url() . '/courses-overview' );
141
+		 exit;
142
+	 }
143 143
 }
144 144
 add_action( 'parse_query', 'lsx_sensei_redirect_to_home' );
145 145
 
Please login to merge, or discard this patch.
Spacing   +37 added lines, -37 removed lines patch added patch discarded remove patch
@@ -12,26 +12,26 @@  discard block
 block discarded – undo
12 12
  * Hooks
13 13
  */
14 14
 
15
-remove_action( 'sensei_before_main_content', array( $woothemes_sensei->frontend, 'sensei_output_content_wrapper' ), 10 );
16
-remove_action( 'sensei_after_main_content', array( $woothemes_sensei->frontend, 'sensei_output_content_wrapper_end' ), 10 );
15
+remove_action('sensei_before_main_content', array($woothemes_sensei->frontend, 'sensei_output_content_wrapper'), 10);
16
+remove_action('sensei_after_main_content', array($woothemes_sensei->frontend, 'sensei_output_content_wrapper_end'), 10);
17 17
 
18 18
 add_action('sensei_before_main_content', 'lsx_sensei_before_content', 10);
19 19
 add_action('sensei_after_main_content', 'lsx_sensei_after_content', 10);
20 20
 
21 21
 //Switching the course filters and the headers around
22
-remove_action('sensei_archive_before_course_loop', array( 'Sensei_Course', 'archive_header' ), 10, 0 );
23
-remove_action ( 'sensei_archive_before_course_loop' , array( 'Sensei_Course', 'course_archive_sorting' ) );
24
-remove_action ( 'sensei_archive_before_course_loop' , array( 'Sensei_Course', 'course_archive_filters' ) );
25
-add_action('sensei_archive_before_course_loop', array( 'Sensei_Course', 'archive_header' ), 11, 0 );
26
-add_action ( 'sensei_archive_before_course_loop' , array( 'Sensei_Course', 'course_archive_sorting' ),12 );
27
-add_action ( 'sensei_archive_before_course_loop' , array( 'Sensei_Course', 'course_archive_filters' ),12 );
22
+remove_action('sensei_archive_before_course_loop', array('Sensei_Course', 'archive_header'), 10, 0);
23
+remove_action('sensei_archive_before_course_loop', array('Sensei_Course', 'course_archive_sorting'));
24
+remove_action('sensei_archive_before_course_loop', array('Sensei_Course', 'course_archive_filters'));
25
+add_action('sensei_archive_before_course_loop', array('Sensei_Course', 'archive_header'), 11, 0);
26
+add_action('sensei_archive_before_course_loop', array('Sensei_Course', 'course_archive_sorting'), 12);
27
+add_action('sensei_archive_before_course_loop', array('Sensei_Course', 'course_archive_filters'), 12);
28 28
 
29 29
 // Moving course image up in DOM
30
-remove_action('sensei_course_content_inside_before', array( Sensei()->course, 'course_image' ) ,10, 1 );
31
-add_action('sensei_course_content_inside_before', array( Sensei()->course, 'course_image' ) ,1, 1 );
30
+remove_action('sensei_course_content_inside_before', array(Sensei()->course, 'course_image'), 10, 1);
31
+add_action('sensei_course_content_inside_before', array(Sensei()->course, 'course_image'), 1, 1);
32 32
 
33
-remove_action( 'sensei_single_course_content_inside_before', array( Sensei()->course , 'course_image'), 20 );
34
-add_action( 'sensei_single_course_content_inside_before', array( Sensei()->course , 'course_image'), 12 );
33
+remove_action('sensei_single_course_content_inside_before', array(Sensei()->course, 'course_image'), 20);
34
+add_action('sensei_single_course_content_inside_before', array(Sensei()->course, 'course_image'), 12);
35 35
 
36 36
 /**
37 37
  * Adds the top and primary divs for the layout.
@@ -39,22 +39,22 @@  discard block
 block discarded – undo
39 39
  * @subpackage sensei
40 40
  * @category 	layout
41 41
  */
42
-function lsx_sensei_wp_head(){
42
+function lsx_sensei_wp_head() {
43 43
 
44
-	$layout = get_theme_mod('lsx_layout','2cr');
45
-	$layout = apply_filters( 'lsx_layout', $layout );
44
+	$layout = get_theme_mod('lsx_layout', '2cr');
45
+	$layout = apply_filters('lsx_layout', $layout);
46 46
 
47
-	if('1c' === $layout && is_post_type_archive(array('course','lesson'))) {
48
-		add_action('sensei_archive_before_course_loop', 'lsx_breadcrumbs', 11 );
47
+	if ('1c' === $layout && is_post_type_archive(array('course', 'lesson'))) {
48
+		add_action('sensei_archive_before_course_loop', 'lsx_breadcrumbs', 11);
49 49
 	}
50 50
 	
51
-	if('1c' === $layout && is_tax(array('module','course-category'))) {
51
+	if ('1c' === $layout && is_tax(array('module', 'course-category'))) {
52 52
 		remove_action('lsx_content_top', 'lsx_breadcrumbs');
53
-		add_action( 'sensei_loop_course_before', 'lsx_breadcrumbs', 80 , 1 );
53
+		add_action('sensei_loop_course_before', 'lsx_breadcrumbs', 80, 1);
54 54
 		
55
-		if(is_tax('module')){
56
-			remove_action( 'sensei_content_lesson_inside_before', array( 'Sensei_Lesson', 'the_lesson_meta' ), 20 );
57
-			add_action( 'sensei_content_lesson_inside_before', array( 'Sensei_Lesson', 'the_lesson_meta' ), 40 );
55
+		if (is_tax('module')) {
56
+			remove_action('sensei_content_lesson_inside_before', array('Sensei_Lesson', 'the_lesson_meta'), 20);
57
+			add_action('sensei_content_lesson_inside_before', array('Sensei_Lesson', 'the_lesson_meta'), 40);
58 58
 			
59 59
 			remove_action('sensei_content_lesson_inside_before', array('Sensei_Core_Modules', 'module_archive_description'), 11);
60 60
 		}
@@ -73,10 +73,10 @@  discard block
 block discarded – undo
73 73
  * @subpackage sensei
74 74
  * @category 	layout
75 75
  */
76
-function lsx_sensei_before_content(){ ?>
76
+function lsx_sensei_before_content() { ?>
77 77
 	<?php lsx_content_wrap_before(); ?>
78 78
 
79
-	<div id="primary" class="content-area <?php echo esc_attr( lsx_main_class() ); ?>">
79
+	<div id="primary" class="content-area <?php echo esc_attr(lsx_main_class()); ?>">
80 80
 
81 81
 		<?php lsx_content_before(); ?>
82 82
 
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
  * @subpackage sensei
93 93
  * @category 	layout
94 94
  */
95
-function lsx_sensei_after_content(){ ?>
95
+function lsx_sensei_after_content() { ?>
96 96
 		<?php lsx_content_bottom(); ?>
97 97
 
98 98
 		</main><!-- #main -->
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
  * @subpackage sensei
117 117
  * @category redirect
118 118
  */
119
-add_filter( 'sensei_disable_styles', '__return_true' );
119
+add_filter('sensei_disable_styles', '__return_true');
120 120
 
121 121
 /**
122 122
  * Includes the sensei specific styles.
@@ -125,9 +125,9 @@  discard block
 block discarded – undo
125 125
  * @category styles
126 126
  */
127 127
 function lsx_sensei_styles() {
128
-    wp_enqueue_style( 'sensei', get_template_directory_uri() . '/css/sensei.css' );
128
+    wp_enqueue_style('sensei', get_template_directory_uri() . '/css/sensei.css');
129 129
 }
130
-add_action( 'wp_enqueue_scripts', 'lsx_sensei_styles' );
130
+add_action('wp_enqueue_scripts', 'lsx_sensei_styles');
131 131
 
132 132
 /**
133 133
  * Redirects Lessons Archive to Courses Overview
@@ -135,13 +135,13 @@  discard block
 block discarded – undo
135 135
  * @subpackage woocommerce
136 136
  * @category 	styles
137 137
  */
138
-function lsx_sensei_redirect_to_home( $query ){
139
-    if(!is_admin() && is_post_type_archive( 'lesson' ) ) {
140
-         wp_redirect( home_url() . '/courses-overview' );
138
+function lsx_sensei_redirect_to_home($query) {
139
+    if ( ! is_admin() && is_post_type_archive('lesson')) {
140
+         wp_redirect(home_url() . '/courses-overview');
141 141
          exit;
142 142
      }
143 143
 }
144
-add_action( 'parse_query', 'lsx_sensei_redirect_to_home' );
144
+add_action('parse_query', 'lsx_sensei_redirect_to_home');
145 145
 
146 146
 /**
147 147
  * Filters the archive title
@@ -149,10 +149,10 @@  discard block
 block discarded – undo
149 149
  * @subpackage woocommerce
150 150
  * @category 	styles
151 151
  */
152
-function lsx_sensei_category_title( $html,$term_id ){
153
-	$html = str_replace('h2','h1',$html);
154
-	$html = str_replace('sensei-category-title','archive-title',$html);
152
+function lsx_sensei_category_title($html, $term_id) {
153
+	$html = str_replace('h2', 'h1', $html);
154
+	$html = str_replace('sensei-category-title', 'archive-title', $html);
155 155
 	
156
-	return '<header class="archive-header">'.$html.'</header>';
156
+	return '<header class="archive-header">' . $html . '</header>';
157 157
 }
158
-add_filter( 'course_category_title', 'lsx_sensei_category_title',1,10 );
159 158
\ No newline at end of file
159
+add_filter('course_category_title', 'lsx_sensei_category_title', 1, 10);
160 160
\ No newline at end of file
Please login to merge, or discard this patch.
inc/buddypress.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -19,10 +19,10 @@
 block discarded – undo
19 19
  */
20 20
  function lsx_buddypress_page_columns($layout) {
21 21
  	
22
-	if(bp_is_profile_component()|| bp_is_settings_component() || bp_is_activity_component() || bp_is_group() || bp_is_messages_component()
23
-		|| bp_is_members_directory() || bp_is_groups_directory() || bp_is_groups_component() || bp_is_members_component()){
22
+	if (bp_is_profile_component() || bp_is_settings_component() || bp_is_activity_component() || bp_is_group() || bp_is_messages_component()
23
+		|| bp_is_members_directory() || bp_is_groups_directory() || bp_is_groups_component() || bp_is_members_component()) {
24 24
 		$layout = '1c';
25 25
 	}
26 26
 	return $layout;
27 27
  }
28
- add_filter( 'lsx_layout', 'lsx_buddypress_page_columns' , 1 , 100 );
29 28
\ No newline at end of file
29
+ add_filter('lsx_layout', 'lsx_buddypress_page_columns', 1, 100);
30 30
\ No newline at end of file
Please login to merge, or discard this patch.
inc/customizer-header-fixed.php 2 patches
Spacing   +10 added lines, -10 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
  * Customizer Header Fixed 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_Header_Fixed_Control extends WP_Customize_Control {
@@ -38,9 +38,9 @@  discard block
 block discarded – undo
38 38
 	 * @param string $id
39 39
 	 * @param array $args
40 40
 	 */
41
-	public function __construct( $manager, $id, $args = array() ) {
42
-		parent::__construct( $manager, $id, $args );
43
-		if( !empty( $args['choices'] ) ){
41
+	public function __construct($manager, $id, $args = array()) {
42
+		parent::__construct($manager, $id, $args);
43
+		if ( ! empty($args['choices'])) {
44 44
 			$this->layouts = $args['choices'];
45 45
 		}
46 46
 	}
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
 	 */
53 53
 	public function enqueue() {
54 54
 		// 
55
-		wp_enqueue_script( 'lsx-header-fixed-control', get_template_directory_uri() .'/js/customizer-header-fixed.js', array('jquery'), null, true );
55
+		wp_enqueue_script('lsx-header-fixed-control', get_template_directory_uri() . '/js/customizer-header-fixed.js', array('jquery'), null, true);
56 56
 	}
57 57
 
58 58
 	/**
@@ -62,16 +62,16 @@  discard block
 block discarded – undo
62 62
 	 */
63 63
 	public function render_content() {
64 64
 		
65
-		$post_id    = 'customize-control-' . str_replace( '[', '-', str_replace( ']', '', $this->id ) );
65
+		$post_id = 'customize-control-' . str_replace('[', '-', str_replace(']', '', $this->id));
66 66
 		$class = 'customize-control customize-control-' . $this->type;
67 67
 		$value = $this->value();
68 68
 
69 69
 		?>
70 70
 		<label>
71
-			<?php if ( ! empty( $this->label ) ) { ?>
72
-				<span class="customize-control-title"><?php echo esc_html( $this->label ); ?></span>
71
+			<?php if ( ! empty($this->label)) { ?>
72
+				<span class="customize-control-title"><?php echo esc_html($this->label); ?></span>
73 73
 			<?php }
74
-			if ( ! empty( $this->description ) ) { ?>
74
+			if ( ! empty($this->description)) { ?>
75 75
 				<span class="description customize-control-description"><?php echo $this->description; ?></span>
76 76
 			<?php } ?>
77 77
 			<div class="header-fixed">
Please login to merge, or discard this patch.
Braces   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,8 @@
 block discarded – undo
1 1
 <?php
2
-if ( ! defined( 'ABSPATH' ) ) return; // Exit if accessed directly
2
+if ( ! defined( 'ABSPATH' ) ) {
3
+	return;
4
+}
5
+// Exit if accessed directly
3 6
 
4 7
 /**
5 8
  * Customize Swatch Control Class
Please login to merge, or discard this patch.
inc/nav.php 2 patches
Spacing   +8 added lines, -8 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
  * Cleaner walker for wp_nav_menu()
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
 		$item_html = '';
26 26
 		
27 27
 		//If there is no menu set, dont use the pages, the objects are not the same as whats supposed to be used.
28
-		if(isset($item->title)){
28
+		if (isset($item->title)) {
29 29
 
30 30
 			parent::start_el($item_html, $item, $depth, $args);
31 31
 	
@@ -45,10 +45,10 @@  discard block
 block discarded – undo
45 45
 	}
46 46
 
47 47
 	function display_element($element, &$children_elements, $max_depth, $depth = 0, $args, &$output) {
48
-		$element->is_dropdown = ((!empty($children_elements[$element->ID]) && (($depth+1) < $max_depth || ($max_depth === 0))));
48
+		$element->is_dropdown = (( ! empty($children_elements[$element->ID]) && (($depth + 1) < $max_depth || ($max_depth === 0))));
49 49
 
50 50
 		if ($element->is_dropdown) {
51
-			if ($depth>0) {
51
+			if ($depth > 0) {
52 52
 				$element->classes[] = 'dropdown-submenu';
53 53
 			} else {
54 54
 				$element->classes[] = 'dropdown';
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
 	$classes = preg_replace('/(current(-menu-|[-_]page[-_])(item|parent|ancestor))/', 'active', $classes);
69 69
 	$classes = preg_replace('/^((menu|page)[-_\w+]+)+/', '', $classes);
70 70
 
71
-	$classes[] = 'menu-'.$slug;
71
+	$classes[] = 'menu-' . $slug;
72 72
 
73 73
 	$classes = array_unique($classes);
74 74
 
@@ -86,15 +86,15 @@  discard block
 block discarded – undo
86 86
 function lsx_nav_menu_args($args = '') {
87 87
 	$roots_nav_menu_args['container'] = false;
88 88
 
89
-	if (!$args['items_wrap']) {
89
+	if ( ! $args['items_wrap']) {
90 90
 		$roots_nav_menu_args['items_wrap'] = '<ul class="%2$s">%3$s</ul>';
91 91
 	}
92 92
 
93
-	if (current_theme_supports('bootstrap-top-navbar') && !$args['depth']) {
93
+	if (current_theme_supports('bootstrap-top-navbar') && ! $args['depth']) {
94 94
 		$roots_nav_menu_args['depth'] = 2;
95 95
 	}
96 96
 
97
-	if (!$args['walker']) {
97
+	if ( ! $args['walker']) {
98 98
 		$roots_nav_menu_args['walker'] = new LSX_Nav_Walker();
99 99
 	}
100 100
 
Please login to merge, or discard this patch.
Braces   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,8 @@
 block discarded – undo
1 1
 <?php
2
-if ( ! defined( 'ABSPATH' ) ) return; // Exit if accessed directly
2
+if ( ! defined( 'ABSPATH' ) ) {
3
+	return;
4
+}
5
+// Exit if accessed directly
3 6
 
4 7
 /**
5 8
  * Customize Swatch Control Class
Please login to merge, or discard this patch.
inc/google-font.php 3 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
 
13 13
 	/**
14 14
 	 * Constructor
15
-	**/
15
+	 **/
16 16
 	public function __construct($title, $location, $cssDeclaration, $cssClass)
17 17
 	{
18 18
 		$this->title = $title;
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
 	/**
25 25
 	 * Getters
26 26
 	 * taken from: http://stackoverflow.com/questions/4478661/getter-and-setter
27
-	**/
27
+	 **/
28 28
 	public function __get($property) 
29 29
 	{
30 30
 		if (property_exists($this, $property)) {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 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 Class
5 5
 **/
Please login to merge, or discard this patch.
Braces   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,8 @@
 block discarded – undo
1 1
 <?php
2
-if ( ! defined( 'ABSPATH' ) ) return; // Exit if accessed directly
2
+if ( ! defined( 'ABSPATH' ) ) {
3
+	return;
4
+}
5
+// Exit if accessed directly
3 6
 
4 7
 /**
5 8
  * Customize Swatch Control Class
Please login to merge, or discard this patch.
inc/hooks.php 1 patch
Spacing   +31 added lines, -31 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,27 +89,27 @@  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
 /**
@@ -118,19 +118,19 @@  discard block
 block discarded – undo
118 118
 * $lsx_supports[] = 'entry';
119 119
 */
120 120
 function lsx_entry_before() {
121
-	do_action( 'lsx_entry_before' );
121
+	do_action('lsx_entry_before');
122 122
 }
123 123
 
124 124
 function lsx_entry_after() {
125
-	do_action( 'lsx_entry_after' );
125
+	do_action('lsx_entry_after');
126 126
 }
127 127
 
128 128
 function lsx_entry_top() {
129
-	do_action( 'lsx_entry_top' );
129
+	do_action('lsx_entry_top');
130 130
 }
131 131
 
132 132
 function lsx_entry_bottom() {
133
-	do_action( 'lsx_entry_bottom' );
133
+	do_action('lsx_entry_bottom');
134 134
 }
135 135
 
136 136
 /**
@@ -139,11 +139,11 @@  discard block
 block discarded – undo
139 139
 * $lsx_supports[] = 'comments';
140 140
 */
141 141
 function lsx_comments_before() {
142
-	do_action( 'lsx_comments_before' );
142
+	do_action('lsx_comments_before');
143 143
 }
144 144
 
145 145
 function lsx_comments_after() {
146
-	do_action( 'lsx_comments_after' );
146
+	do_action('lsx_comments_after');
147 147
 }
148 148
 
149 149
 /**
@@ -152,19 +152,19 @@  discard block
 block discarded – undo
152 152
 * $lsx_supports[] = 'sidebar';
153 153
 */
154 154
 function lsx_sidebars_before() {
155
-	do_action( 'lsx_sidebars_before' );
155
+	do_action('lsx_sidebars_before');
156 156
 }
157 157
 
158 158
 function lsx_sidebars_after() {
159
-	do_action( 'lsx_sidebars_after' );
159
+	do_action('lsx_sidebars_after');
160 160
 }
161 161
 
162 162
 function lsx_sidebar_top() {
163
-	do_action( 'lsx_sidebar_top' );
163
+	do_action('lsx_sidebar_top');
164 164
 }
165 165
 
166 166
 function lsx_sidebar_bottom() {
167
-	do_action( 'lsx_sidebar_bottom' );
167
+	do_action('lsx_sidebar_bottom');
168 168
 }
169 169
 
170 170
 /**
@@ -173,17 +173,17 @@  discard block
 block discarded – undo
173 173
 * $lsx_supports[] = 'footer';
174 174
 */
175 175
 function lsx_footer_before() {
176
-	do_action( 'lsx_footer_before' );
176
+	do_action('lsx_footer_before');
177 177
 }
178 178
 
179 179
 function lsx_footer_after() {
180
-	do_action( 'lsx_footer_after' );
180
+	do_action('lsx_footer_after');
181 181
 }
182 182
 
183 183
 function lsx_footer_top() {
184
-	do_action( 'lsx_footer_top' );
184
+	do_action('lsx_footer_top');
185 185
 }
186 186
 
187 187
 function lsx_footer_bottom() {
188
-	do_action( 'lsx_footer_bottom' );
188
+	do_action('lsx_footer_bottom');
189 189
 }
190 190
\ No newline at end of file
Please login to merge, or discard this patch.