Completed
Push — master ( 8df4c6...bcb67f )
by Fernando
03:23
created
inc/sensei.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -125,7 +125,7 @@
 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', array(), LSX_VERSION );
128
+	wp_enqueue_style( 'sensei', get_template_directory_uri() . '/css/sensei.css', array(), LSX_VERSION );
129 129
 }
130 130
 add_action( 'wp_enqueue_scripts', 'lsx_sensei_styles' );
131 131
 
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', array(), LSX_VERSION );
128
+    wp_enqueue_style('sensei', get_template_directory_uri() . '/css/sensei.css', array(), LSX_VERSION);
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' ) && $query->is_main_query() ) {
140
-		wp_redirect( home_url() . '/courses-overview' );
138
+function lsx_sensei_redirect_to_home($query) {
139
+	if ( ! is_admin() && is_post_type_archive('lesson') && $query->is_main_query()) {
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.
single.php 1 patch
Spacing   +4 added lines, -4 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,9 +17,9 @@  discard block
 block discarded – undo
17 17
 
18 18
 			<?php lsx_content_top(); ?>
19 19
 			
20
-			<?php while ( have_posts() ) : the_post(); ?>
20
+			<?php while (have_posts()) : the_post(); ?>
21 21
 
22
-				<?php get_template_part( 'content', get_post_type() ); ?>
22
+				<?php get_template_part('content', get_post_type()); ?>
23 23
 
24 24
 			<?php endwhile; // end of the loop. ?>
25 25
 			
@@ -35,6 +35,6 @@  discard block
 block discarded – undo
35 35
 	<?php lsx_content_wrap_after(); ?>
36 36
 
37 37
 <?php get_sidebar(); ?>
38
-<?php get_sidebar( 'alt' ); ?>
38
+<?php get_sidebar('alt'); ?>
39 39
 
40 40
 <?php get_footer();
41 41
\ No newline at end of file
Please login to merge, or discard this patch.
search.php 2 patches
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -42,9 +42,12 @@
 block discarded – undo
42 42
 
43 43
 			<?php lsx_paging_nav(); ?>
44 44
 
45
-		<?php else : ?>
45
+		<?php else {
46
+	: ?>
46 47
 
47
-			<?php get_template_part( 'content', 'none' ); ?>
48
+			<?php get_template_part( 'content', 'none' );
49
+}
50
+?>
48 51
 
49 52
 		<?php endif; $lsx_archive = 0; ?>
50 53
 
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -9,33 +9,33 @@  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
 
16 16
 		<main id="main" class="site-main">
17 17
 
18 18
 		<?php
19
-			$layout = get_theme_mod('lsx_layout','2cr');
20
-			$layout = apply_filters( 'lsx_layout', $layout );
21
-			if('1c' === $layout){
19
+			$layout = get_theme_mod('lsx_layout', '2cr');
20
+			$layout = apply_filters('lsx_layout', $layout);
21
+			if ('1c' === $layout) {
22 22
 				lsx_breadcrumbs();
23 23
 			}
24 24
 		?>
25 25
 
26 26
 		<?php lsx_content_top(); ?>
27 27
 
28
-		<?php if ( have_posts() ) : global $lsx_archive; $lsx_archive = 1; ?>
28
+		<?php if (have_posts()) : global $lsx_archive; $lsx_archive = 1; ?>
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.
author.php 2 patches
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -47,9 +47,12 @@
 block discarded – undo
47 47
 			
48 48
 			<?php lsx_paging_nav(); ?>
49 49
 
50
-		<?php else : ?>
50
+		<?php else {
51
+	: ?>
51 52
 
52
-			<?php get_template_part( 'content', 'none' ); ?>
53
+			<?php get_template_part( 'content', 'none' );
54
+}
55
+?>
53 56
 
54 57
 		<?php endif; ?>
55 58
 
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -11,33 +11,33 @@  discard block
 block discarded – undo
11 11
 
12 12
 	<?php lsx_content_wrap_before(); ?>
13 13
 
14
-	<div id="primary" class="content-area <?php echo esc_attr( lsx_main_class() ); ?>">
14
+	<div id="primary" class="content-area <?php echo esc_attr(lsx_main_class()); ?>">
15 15
 		
16 16
 		<?php lsx_content_before(); ?>
17 17
 
18 18
 		<main id="main" class="site-main">
19 19
 
20 20
 		<?php 
21
-			$layout = get_theme_mod('lsx_layout','2cr');
22
-			$layout = apply_filters( 'lsx_layout', $layout );
23
-			if('1c' === $layout){
21
+			$layout = get_theme_mod('lsx_layout', '2cr');
22
+			$layout = apply_filters('lsx_layout', $layout);
23
+			if ('1c' === $layout) {
24 24
 				lsx_breadcrumbs();
25 25
 			}
26 26
 		?>
27 27
 
28 28
 		<?php lsx_content_top(); ?>
29 29
 
30
-		<?php if ( have_posts() ) : ?>
30
+		<?php if (have_posts()) : ?>
31 31
 
32 32
 			<?php /* Start the Loop */ ?>
33
-			<?php while ( have_posts() ) : the_post(); ?>
33
+			<?php while (have_posts()) : the_post(); ?>
34 34
 
35 35
 				<?php
36 36
 					/* Include the Post-Format-specific template for the content.
37 37
 					 * If you want to override this in a child theme, then include a file
38 38
 					 * called content-___.php (where ___ is the Post Format name) and that will be used instead.
39 39
 					 */
40
-					get_template_part( 'content', get_post_format() );
40
+					get_template_part('content', get_post_format());
41 41
 				?>
42 42
 
43 43
 			<?php endwhile; ?>
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
 
47 47
 		<?php else : ?>
48 48
 
49
-			<?php get_template_part( 'content', 'none' ); ?>
49
+			<?php get_template_part('content', 'none'); ?>
50 50
 
51 51
 		<?php endif; ?>
52 52
 
Please login to merge, or discard this patch.
page-templates/template-no-sidebar.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -13,9 +13,9 @@  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
-					<?php get_template_part( 'content', 'page' ); ?>
18
+					<?php get_template_part('content', 'page'); ?>
19 19
 		
20 20
 				<?php endwhile; // end of the loop. ?>		
21 21
 				
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
 			
24 24
 			<?php
25 25
 				// If comments are open or we have at least one comment, load up the comment template
26
-				if ( comments_open() || '0' != get_comments_number() ) :
26
+				if (comments_open() || '0' != get_comments_number()) :
27 27
 					comments_template();
28 28
 				endif;
29 29
 			?>			
Please login to merge, or discard this patch.
inc/scripts.php 2 patches
Braces   +14 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,5 +1,8 @@  discard block
 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
  * Enqueue scripts and styles.
@@ -29,7 +32,7 @@  discard block
 block discarded – undo
29 32
 	wp_enqueue_script('imagesLoaded', get_template_directory_uri().'/js/vendor/imagesloaded.pkgd.min.js', array('jquery','masonry'), LSX_VERSION);	
30 33
 	if(defined('WP_DEBUG') && true === WP_DEBUG){
31 34
 		wp_enqueue_script('lsx_script', get_template_directory_uri() . '/js/lsx-script.js', array('masonry'), LSX_VERSION, false);
32
-	}else{
35
+	} else{
33 36
 		wp_enqueue_script('lsx_script', get_template_directory_uri() . '/js/lsx-script.min.js', array('masonry'), LSX_VERSION, false);
34 37
 	}
35 38
 	
@@ -107,9 +110,15 @@  discard block
 block discarded – undo
107 110
  */
108 111
 function lsx_scripts_defer_parsing( $url ) {
109 112
 	if ( ! ( is_admin() ) ) {
110
-		if ( FALSE === strpos( $url, '.js' ) ) return $url;
111
-		if ( strpos( $url, 'jquery.js' ) ) return $url;
112
-		if ( strpos( $url, ' defer ' ) ) return $url;
113
+		if ( FALSE === strpos( $url, '.js' ) ) {
114
+			return $url;
115
+		}
116
+		if ( strpos( $url, 'jquery.js' ) ) {
117
+			return $url;
118
+		}
119
+		if ( strpos( $url, ' defer ' ) ) {
120
+			return $url;
121
+		}
113 122
 		return "$url' defer onload='";
114 123
 	}
115 124
 
Please login to merge, or discard this patch.
Spacing   +29 added lines, -29 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
  * Enqueue scripts and styles.
@@ -12,10 +12,10 @@  discard block
 block discarded – undo
12 12
 	
13 13
 	wp_enqueue_style('lsx_main_style', get_template_directory_uri() . '/style.css', array(), LSX_VERSION);
14 14
 	
15
-	wp_enqueue_style('lsx_main', get_template_directory_uri() . '/css/app.css', array( 'lsx_main_style', 'fontawesome', 'medium-break' ), LSX_VERSION);
15
+	wp_enqueue_style('lsx_main', get_template_directory_uri() . '/css/app.css', array('lsx_main_style', 'fontawesome', 'medium-break'), LSX_VERSION);
16 16
 	
17
-	if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
18
-		wp_enqueue_script( 'comment-reply' );
17
+	if (is_singular() && comments_open() && get_option('thread_comments')) {
18
+		wp_enqueue_script('comment-reply');
19 19
 	}
20 20
 
21 21
 	wp_enqueue_script('bootstrap', get_template_directory_uri() . '/js/vendor/bootstrap.min.js', array('jquery'), LSX_VERSION, false);
@@ -26,31 +26,31 @@  discard block
 block discarded – undo
26 26
 	wp_enqueue_script('picturefill', get_template_directory_uri() . '/js/vendor/picturefill.min.js', array(), LSX_VERSION, false);
27 27
 
28 28
 	wp_enqueue_script('masonry');
29
-	wp_enqueue_script('imagesLoaded', get_template_directory_uri().'/js/vendor/imagesloaded.pkgd.min.js', array('jquery','masonry'), LSX_VERSION);	
30
-	if(defined('WP_DEBUG') && true === WP_DEBUG){
29
+	wp_enqueue_script('imagesLoaded', get_template_directory_uri() . '/js/vendor/imagesloaded.pkgd.min.js', array('jquery', 'masonry'), LSX_VERSION);	
30
+	if (defined('WP_DEBUG') && true === WP_DEBUG) {
31 31
 		wp_enqueue_script('lsx_script', get_template_directory_uri() . '/js/lsx-script.js', array('masonry'), LSX_VERSION, false);
32
-	}else{
32
+	} else {
33 33
 		wp_enqueue_script('lsx_script', get_template_directory_uri() . '/js/lsx-script.min.js', array('masonry'), LSX_VERSION, false);
34 34
 	}
35 35
 	
36 36
 	//Set some parameters that we can use in the JS
37 37
 	$is_portfolio = false;
38
-	if(is_post_type_archive('jetpack-portfolio') || is_tax('jetpack-portfolio-type') || is_tax('jetpack-portfolio-tag') || is_page_template('page-templates/template-portfolio.php')){
38
+	if (is_post_type_archive('jetpack-portfolio') || is_tax('jetpack-portfolio-type') || is_tax('jetpack-portfolio-tag') || is_page_template('page-templates/template-portfolio.php')) {
39 39
 		$is_portfolio = true;
40 40
 	}
41 41
 	$param_array = array(
42 42
 			'is_portfolio' => $is_portfolio
43 43
 	);
44 44
 	//Set the columns for the archives
45
-	$param_array['columns'] = apply_filters('lsx_archive_column_number',3);
46
-	wp_localize_script( 'lsx_script', 'lsx_params', $param_array );
45
+	$param_array['columns'] = apply_filters('lsx_archive_column_number', 3);
46
+	wp_localize_script('lsx_script', 'lsx_params', $param_array);
47 47
 
48
-	wp_enqueue_style( 'fontawesome', get_template_directory_uri() . '/css/font-awesome.min.css', array(), LSX_VERSION );
48
+	wp_enqueue_style('fontawesome', get_template_directory_uri() . '/css/font-awesome.min.css', array(), LSX_VERSION);
49 49
 	
50 50
 	wp_enqueue_style('medium-break', get_template_directory_uri() . '/css/medium-nav-break.css', array(), LSX_VERSION);
51 51
 	
52
-	$font = get_theme_mod('lsx_font','raleway_open_sans');
53
-	switch($font){
52
+	$font = get_theme_mod('lsx_font', 'raleway_open_sans');
53
+	switch ($font) {
54 54
 		case 'raleway_open_sans':
55 55
 			$header_font_location = 'Raleway';
56 56
 			$body_font_location = 'Open+Sans';
@@ -79,18 +79,18 @@  discard block
 block discarded – undo
79 79
 	}
80 80
 	
81 81
 	$http_var = 'http';
82
-	if(is_ssl()){ $http_var .= 's'; }
82
+	if (is_ssl()) { $http_var .= 's'; }
83 83
 	
84 84
 	//Call the Google Fonts and then Enque them.
85
-	wp_register_style('lsx-header-font', $http_var.'://fonts.googleapis.com/css?family='.$header_font_location);
86
-	wp_register_style('lsx-body-font', $http_var.'://fonts.googleapis.com/css?family='.$body_font_location);
87
-	wp_enqueue_style( 'lsx-header-font' );
88
-	wp_enqueue_style( 'lsx-body-font' );
85
+	wp_register_style('lsx-header-font', $http_var . '://fonts.googleapis.com/css?family=' . $header_font_location);
86
+	wp_register_style('lsx-body-font', $http_var . '://fonts.googleapis.com/css?family=' . $body_font_location);
87
+	wp_enqueue_style('lsx-header-font');
88
+	wp_enqueue_style('lsx-body-font');
89 89
 	
90
-	wp_enqueue_style('lsx_font_scheme', esc_url( get_template_directory_uri() . '/css/'.$font.'.css' ), array(), LSX_VERSION);
90
+	wp_enqueue_style('lsx_font_scheme', esc_url(get_template_directory_uri() . '/css/' . $font . '.css'), array(), LSX_VERSION);
91 91
 	
92 92
 }
93
-add_action( 'wp_enqueue_scripts', 'lsx_scripts' );
93
+add_action('wp_enqueue_scripts', 'lsx_scripts');
94 94
 
95 95
 /**
96 96
  * Enqueue scripts and styles (for child theme).
@@ -100,11 +100,11 @@  discard block
 block discarded – undo
100 100
  */
101 101
 function lsx_scripts_child_theme() {
102 102
 	global $content_width;
103
-	if(is_child_theme() && file_exists(get_stylesheet_directory() . '/custom.css')) {
104
-		wp_enqueue_style( 'child-css', get_stylesheet_directory_uri() . '/custom.css', array( 'lsx_main' ), LSX_VERSION );
103
+	if (is_child_theme() && file_exists(get_stylesheet_directory() . '/custom.css')) {
104
+		wp_enqueue_style('child-css', get_stylesheet_directory_uri() . '/custom.css', array('lsx_main'), LSX_VERSION);
105 105
 	}
106 106
 }
107
-add_action( 'wp_enqueue_scripts', 'lsx_scripts_child_theme', 1999 );
107
+add_action('wp_enqueue_scripts', 'lsx_scripts_child_theme', 1999);
108 108
 
109 109
 /**
110 110
  * Defer JavaScript
@@ -112,14 +112,14 @@  discard block
 block discarded – undo
112 112
  * @package 	lsx
113 113
  * @subpackage	scripts
114 114
  */
115
-function lsx_scripts_defer_parsing( $url ) {
116
-	if ( ! ( is_admin() ) ) {
117
-		if ( FALSE === strpos( $url, '.js' ) ) return $url;
118
-		if ( strpos( $url, 'jquery.js' ) ) return $url;
119
-		if ( strpos( $url, ' defer ' ) ) return $url;
115
+function lsx_scripts_defer_parsing($url) {
116
+	if ( ! (is_admin())) {
117
+		if (FALSE === strpos($url, '.js')) return $url;
118
+		if (strpos($url, 'jquery.js')) return $url;
119
+		if (strpos($url, ' defer ')) return $url;
120 120
 		return "$url' defer onload='";
121 121
 	}
122 122
 
123 123
 	return $url;
124 124
 }
125
-add_filter( 'clean_url', 'lsx_scripts_defer_parsing', 11, 1 );
125
+add_filter('clean_url', 'lsx_scripts_defer_parsing', 11, 1);
Please login to merge, or discard this patch.
content.php 2 patches
Braces   +13 added lines, -5 removed lines patch added patch discarded remove patch
@@ -69,14 +69,20 @@  discard block
 block discarded – undo
69 69
 				<h1 class="entry-title">
70 70
 					<?php if ( has_post_thumbnail() ) : ?>
71 71
 						<a href="<?php echo esc_url( $archive_link ) ?>" class="format-link has-thumb fa fa-<?php echo esc_attr( $format ) ?>"></a>
72
-					<?php else : ?>
72
+					<?php else {
73
+	: ?>
73 74
 						<a href="<?php echo esc_url( $archive_link ) ?>" class="format-link fa fa-<?php echo esc_attr( $format ) ?>"></a>
74
-					<?php endif; ?>
75
+					<?php endif;
76
+}
77
+?>
75 78
 
76 79
 					<?php if ( has_post_format( array('link') ) ) : ?>
77 80
 						<a href="<?php echo esc_url( lsx_get_my_url() ); ?>" rel="bookmark"><?php the_title(); ?> <span class="fa fa-external-link"></span></a>
78
-					<?php else : ?>
79
-						<a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?></a>
81
+					<?php else {
82
+	: ?>
83
+						<a href="<?php the_permalink();
84
+}
85
+?>" rel="bookmark"><?php the_title(); ?></a>
80 86
 					<?php endif; ?>
81 87
 
82 88
 					<?php if ( is_sticky() ) : ?>
@@ -99,10 +105,12 @@  discard block
 block discarded – undo
99 105
 				<div class="entry-content">
100 106
 					<?php the_content(); ?>
101 107
 				</div><!-- .entry-content -->
102
-			<?php else : ?>
108
+			<?php else {
109
+	: ?>
103 110
 				<div class="entry-content">
104 111
 					<?php
105 112
 						the_content();
113
+}
106 114
 
107 115
 						wp_link_pages( array(
108 116
 							'before' => '<div class="lsx-postnav-wrapper"><div class="lsx-postnav">',
Please login to merge, or discard this patch.
Spacing   +38 added lines, -38 removed lines patch added patch discarded remove patch
@@ -7,42 +7,42 @@  discard block
 block discarded – undo
7 7
 <?php lsx_entry_before(); ?>
8 8
 
9 9
 <?php
10
-	if ( has_post_thumbnail() ) { 
10
+	if (has_post_thumbnail()) { 
11 11
 		$thumb_class = 'has-thumb';
12 12
 	} else {
13 13
 		$thumb_class = 'no-thumb';
14 14
 	}
15 15
 
16
-	if ( ! is_singular() ) {
17
-		$blog_layout = apply_filters( 'lsx_blog_layout', 'default' );
16
+	if ( ! is_singular()) {
17
+		$blog_layout = apply_filters('lsx_blog_layout', 'default');
18 18
 	} else {
19 19
 		$blog_layout = 'default';
20 20
 	}
21 21
 
22
-	if ( 'list' === $blog_layout ) { 
22
+	if ('list' === $blog_layout) { 
23 23
 		$image_class = 'hidden-sm hidden-md hidden-ls';
24 24
 	} else {
25 25
 		$image_class = '';
26 26
 	}
27 27
 
28
-	$thumbnail_id = get_post_thumbnail_id( get_the_ID() );
29
-	$image_arr    = wp_get_attachment_image_src( $thumbnail_id, 'lsx-single-thumbnail' );
28
+	$thumbnail_id = get_post_thumbnail_id(get_the_ID());
29
+	$image_arr    = wp_get_attachment_image_src($thumbnail_id, 'lsx-single-thumbnail');
30 30
 
31
-	if ( is_array( $image_arr ) ) {
31
+	if (is_array($image_arr)) {
32 32
 		$image_src = $image_arr[0];
33 33
 	}
34 34
 ?>
35 35
 
36
-<article id="post-<?php the_ID(); ?>" <?php post_class( $thumb_class ); ?>>
36
+<article id="post-<?php the_ID(); ?>" <?php post_class($thumb_class); ?>>
37 37
 	<?php lsx_entry_top(); ?>
38 38
 
39 39
 	<div class="entry-layout">
40 40
 		<div class="entry-layout-content entry-layout-content-<?php echo has_post_thumbnail() ? '67' : '100'; ?>">
41 41
 			<header class="entry-header">
42
-				<?php if ( has_post_thumbnail() ) : ?>
43
-					<div class="entry-image <?php echo esc_attr( $image_class ); ?>">
42
+				<?php if (has_post_thumbnail()) : ?>
43
+					<div class="entry-image <?php echo esc_attr($image_class); ?>">
44 44
 						<a class="thumbnail" href="<?php the_permalink(); ?>">
45
-							 <?php lsx_thumbnail( 'lsx-thumbnail-single' ); ?>
45
+							 <?php lsx_thumbnail('lsx-thumbnail-single'); ?>
46 46
 						</a>
47 47
 					</div>
48 48
 				<?php endif; ?>
@@ -50,37 +50,37 @@  discard block
 block discarded – undo
50 50
 				<?php 
51 51
 					$format = get_post_format();
52 52
 
53
-					if ( false === $format ) {
53
+					if (false === $format) {
54 54
 						$format = 'standard';
55
-						$show_on_front = get_option( 'show_on_front', 'posts' );
55
+						$show_on_front = get_option('show_on_front', 'posts');
56 56
 						
57
-						if ( 'page' == $show_on_front ) {
58
-							$archive_link = get_permalink( get_option( 'page_for_posts' ) );
57
+						if ('page' == $show_on_front) {
58
+							$archive_link = get_permalink(get_option('page_for_posts'));
59 59
 						} else {
60 60
 							$archive_link = home_url();
61 61
 						}
62 62
 					} else {
63
-						$archive_link = get_post_format_link( $format );
63
+						$archive_link = get_post_format_link($format);
64 64
 					}
65 65
 
66
-					$format = lsx_translate_format_to_fontawesome( $format );
66
+					$format = lsx_translate_format_to_fontawesome($format);
67 67
 				?>
68 68
 
69 69
 				<h1 class="entry-title">
70
-					<?php if ( has_post_thumbnail() ) : ?>
71
-						<a href="<?php echo esc_url( $archive_link ) ?>" class="format-link has-thumb fa fa-<?php echo esc_attr( $format ) ?>"></a>
70
+					<?php if (has_post_thumbnail()) : ?>
71
+						<a href="<?php echo esc_url($archive_link) ?>" class="format-link has-thumb fa fa-<?php echo esc_attr($format) ?>"></a>
72 72
 					<?php else : ?>
73
-						<a href="<?php echo esc_url( $archive_link ) ?>" class="format-link fa fa-<?php echo esc_attr( $format ) ?>"></a>
73
+						<a href="<?php echo esc_url($archive_link) ?>" class="format-link fa fa-<?php echo esc_attr($format) ?>"></a>
74 74
 					<?php endif; ?>
75 75
 
76
-					<?php if ( has_post_format( array('link') ) ) : ?>
77
-						<a href="<?php echo esc_url( lsx_get_my_url() ); ?>" rel="bookmark"><?php the_title(); ?> <span class="fa fa-external-link"></span></a>
76
+					<?php if (has_post_format(array('link'))) : ?>
77
+						<a href="<?php echo esc_url(lsx_get_my_url()); ?>" rel="bookmark"><?php the_title(); ?> <span class="fa fa-external-link"></span></a>
78 78
 					<?php else : ?>
79 79
 						<a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?></a>
80 80
 					<?php endif; ?>
81 81
 
82
-					<?php if ( is_sticky() ) : ?>
83
-						<span class="label label-default label-sticky"><?php esc_html_e( 'Featured', 'lsx' ); ?></span>
82
+					<?php if (is_sticky()) : ?>
83
+						<span class="label label-default label-sticky"><?php esc_html_e('Featured', 'lsx'); ?></span>
84 84
 					<?php endif; ?>
85 85
 				</h1>
86 86
 
@@ -89,13 +89,13 @@  discard block
 block discarded – undo
89 89
 				</div><!-- .entry-meta -->
90 90
 			</header><!-- .entry-header -->	
91 91
 
92
-			<?php if ( ! is_singular() && ! has_post_format( array( 'video', 'audio', 'quote', 'link' ) ) && ! apply_filters( 'lsx_blog_force_content_on_list', false ) ) : // Only display Excerpts for Search and Archives ?>
92
+			<?php if ( ! is_singular() && ! has_post_format(array('video', 'audio', 'quote', 'link')) && ! apply_filters('lsx_blog_force_content_on_list', false)) : // Only display Excerpts for Search and Archives ?>
93 93
 				<div class="entry-summary"> 
94 94
 					<?php the_excerpt(); ?>
95 95
 				</div><!-- .entry-summary -->
96
-			<?php elseif ( has_post_format( array('link') ) ) : ?>
96
+			<?php elseif (has_post_format(array('link'))) : ?>
97 97
 
98
-			<?php elseif ( apply_filters( 'lsx_blog_force_content_on_list', false ) ) : ?>
98
+			<?php elseif (apply_filters('lsx_blog_force_content_on_list', false)) : ?>
99 99
 				<div class="entry-content">
100 100
 					<?php the_content(); ?>
101 101
 				</div><!-- .entry-content -->
@@ -104,12 +104,12 @@  discard block
 block discarded – undo
104 104
 					<?php
105 105
 						the_content();
106 106
 
107
-						wp_link_pages( array(
107
+						wp_link_pages(array(
108 108
 							'before' => '<div class="lsx-postnav-wrapper"><div class="lsx-postnav">',
109 109
 							'after' => '</div></div>',
110 110
 							'link_before' => '<span>',
111 111
 							'link_after' => '</span>'
112
-						) );
112
+						));
113 113
 					?>
114 114
 				</div><!-- .entry-content -->
115 115
 			<?php endif; ?>
@@ -119,19 +119,19 @@  discard block
 block discarded – undo
119 119
 			<?php
120 120
 				$comments_number = get_comments_number();
121 121
 
122
-				if ( has_tag() || ( comments_open() && ! empty( $comments_number ) ) ) :
122
+				if (has_tag() || (comments_open() && ! empty($comments_number))) :
123 123
 					?>
124 124
 					
125 125
 					<div class="post-tags-wrapper">
126 126
 						<?php lsx_content_post_tags(); ?>
127 127
 						
128
-						<?php if ( comments_open() && ! empty( $comments_number ) ) : ?>
128
+						<?php if (comments_open() && ! empty($comments_number)) : ?>
129 129
 							<div class="post-comments">
130 130
 								<a href="<?php the_permalink() ?>#comments">
131 131
 									<?php
132 132
 										printf(
133
-											esc_html( _n( 'One Comment', '%1$s Comments', $comments_number, 'lsx' ) ),
134
-											esc_html( number_format_i18n( $comments_number ) )
133
+											esc_html(_n('One Comment', '%1$s Comments', $comments_number, 'lsx')),
134
+											esc_html(number_format_i18n($comments_number))
135 135
 										);
136 136
 									?>
137 137
 								</a>
@@ -144,10 +144,10 @@  discard block
 block discarded – undo
144 144
 			?>
145 145
 		</div>
146 146
 	
147
-		<?php if ( has_post_thumbnail() ) : ?>
147
+		<?php if (has_post_thumbnail()) : ?>
148 148
 			<div class="entry-image hidden hidden-xs">
149
-				<a class="thumbnail" href="<?php the_permalink(); ?>" style="background-image:url(<?php echo esc_url( $image_src ); ?>);">
150
-					<?php lsx_thumbnail( 'lsx-thumbnail-single' ); ?>
149
+				<a class="thumbnail" href="<?php the_permalink(); ?>" style="background-image:url(<?php echo esc_url($image_src); ?>);">
150
+					<?php lsx_thumbnail('lsx-thumbnail-single'); ?>
151 151
 				</a>
152 152
 			</div>
153 153
 		<?php endif; ?>
@@ -157,9 +157,9 @@  discard block
 block discarded – undo
157 157
 
158 158
 	<div class="clearfix"></div>
159 159
 
160
-	<?php edit_post_link( esc_html__( 'Edit', 'lsx' ), '<span class="edit-link">', '</span>' ); ?>
160
+	<?php edit_post_link(esc_html__('Edit', 'lsx'), '<span class="edit-link">', '</span>'); ?>
161 161
 
162
-	<?php if ( ! is_singular() && ! is_single() ) : // Display full-width divider on Archives ?>
162
+	<?php if ( ! is_singular() && ! is_single()) : // Display full-width divider on Archives ?>
163 163
 		<div class="lsx-breaker"></div>
164 164
 	<?php endif; ?>
165 165
 </article>
Please login to merge, or discard this patch.
inc/hooks.php 1 patch
Spacing   +35 added lines, -35 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,39 +89,39 @@  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
-function lsx_content_sharing(){
124
-	do_action( 'lsx_content_sharing' );
123
+function lsx_content_sharing() {
124
+	do_action('lsx_content_sharing');
125 125
 }
126 126
 
127 127
 /**
@@ -130,19 +130,19 @@  discard block
 block discarded – undo
130 130
 * $lsx_supports[] = 'entry';
131 131
 */
132 132
 function lsx_entry_before() {
133
-	do_action( 'lsx_entry_before' );
133
+	do_action('lsx_entry_before');
134 134
 }
135 135
 
136 136
 function lsx_entry_after() {
137
-	do_action( 'lsx_entry_after' );
137
+	do_action('lsx_entry_after');
138 138
 }
139 139
 
140 140
 function lsx_entry_top() {
141
-	do_action( 'lsx_entry_top' );
141
+	do_action('lsx_entry_top');
142 142
 }
143 143
 
144 144
 function lsx_entry_bottom() {
145
-	do_action( 'lsx_entry_bottom' );
145
+	do_action('lsx_entry_bottom');
146 146
 }
147 147
 
148 148
 /**
@@ -151,11 +151,11 @@  discard block
 block discarded – undo
151 151
 * $lsx_supports[] = 'comments';
152 152
 */
153 153
 function lsx_comments_before() {
154
-	do_action( 'lsx_comments_before' );
154
+	do_action('lsx_comments_before');
155 155
 }
156 156
 
157 157
 function lsx_comments_after() {
158
-	do_action( 'lsx_comments_after' );
158
+	do_action('lsx_comments_after');
159 159
 }
160 160
 
161 161
 /**
@@ -164,19 +164,19 @@  discard block
 block discarded – undo
164 164
 * $lsx_supports[] = 'sidebar';
165 165
 */
166 166
 function lsx_sidebars_before() {
167
-	do_action( 'lsx_sidebars_before' );
167
+	do_action('lsx_sidebars_before');
168 168
 }
169 169
 
170 170
 function lsx_sidebars_after() {
171
-	do_action( 'lsx_sidebars_after' );
171
+	do_action('lsx_sidebars_after');
172 172
 }
173 173
 
174 174
 function lsx_sidebar_top() {
175
-	do_action( 'lsx_sidebar_top' );
175
+	do_action('lsx_sidebar_top');
176 176
 }
177 177
 
178 178
 function lsx_sidebar_bottom() {
179
-	do_action( 'lsx_sidebar_bottom' );
179
+	do_action('lsx_sidebar_bottom');
180 180
 }
181 181
 
182 182
 /**
@@ -185,17 +185,17 @@  discard block
 block discarded – undo
185 185
 * $lsx_supports[] = 'footer';
186 186
 */
187 187
 function lsx_footer_before() {
188
-	do_action( 'lsx_footer_before' );
188
+	do_action('lsx_footer_before');
189 189
 }
190 190
 
191 191
 function lsx_footer_after() {
192
-	do_action( 'lsx_footer_after' );
192
+	do_action('lsx_footer_after');
193 193
 }
194 194
 
195 195
 function lsx_footer_top() {
196
-	do_action( 'lsx_footer_top' );
196
+	do_action('lsx_footer_top');
197 197
 }
198 198
 
199 199
 function lsx_footer_bottom() {
200
-	do_action( 'lsx_footer_bottom' );
200
+	do_action('lsx_footer_bottom');
201 201
 }
202 202
\ No newline at end of file
Please login to merge, or discard this patch.
functions.php 2 patches
Spacing   +40 added lines, -40 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@  discard block
 block discarded – undo
4 4
  *
5 5
  * @package lsx
6 6
  */
7
-if ( ! defined( 'ABSPATH' ) ) return; // Exit if accessed directly
7
+if ( ! defined('ABSPATH')) return; // Exit if accessed directly
8 8
 
9 9
 define('LSX_VERSION', '1.8.7');
10 10
 
@@ -19,22 +19,22 @@  discard block
 block discarded – undo
19 19
 require get_template_directory() . '/inc/comment-walker.php';
20 20
 require get_template_directory() . '/inc/jetpack.php';
21 21
 require get_template_directory() . '/inc/lazyload.php';
22
-if(class_exists('BuddyPress')){
22
+if (class_exists('BuddyPress')) {
23 23
 	require get_template_directory() . '/inc/buddypress.php';
24 24
 }
25
-if(class_exists('WooCommerce')){
25
+if (class_exists('WooCommerce')) {
26 26
 	require get_template_directory() . '/inc/woocommerce.php';
27 27
 }
28
-if(class_exists('WP_Job_Manager')){
28
+if (class_exists('WP_Job_Manager')) {
29 29
 	require get_template_directory() . '/inc/wp-job-manager.php';
30 30
 }
31
-if(class_exists('Tribe__Events__Main')){
31
+if (class_exists('Tribe__Events__Main')) {
32 32
 	require get_template_directory() . '/inc/the-events-calendar.php';
33 33
 }
34 34
 require get_template_directory() . '/inc/template-tags.php';
35 35
 require get_template_directory() . '/inc/extras.php';
36 36
 require get_template_directory() . '/inc/wp-bootstrap-navwalker.php';
37
-if(class_exists('Sensei_WC')){
37
+if (class_exists('Sensei_WC')) {
38 38
 	require get_template_directory() . '/inc/sensei.php';
39 39
 }
40 40
 require get_template_directory() . '/inc/welcome.php';
@@ -47,10 +47,10 @@  discard block
 block discarded – undo
47 47
  * @category	customizer
48 48
  * @return		$lsx_controls array()
49 49
  */
50
-function lsx_customizer_core_controls( $lsx_controls ) {
50
+function lsx_customizer_core_controls($lsx_controls) {
51 51
 	$lsx_controls['sections']['lsx-core'] = array(
52
-		'title'       =>  esc_html__( 'Core Settings', 'lsx' ),
53
-		'description' => esc_html__( 'Change the core settings.', 'lsx' ),
52
+		'title'       =>  esc_html__('Core Settings', 'lsx'),
53
+		'description' => esc_html__('Change the core settings.', 'lsx'),
54 54
 		'priority'    => 21
55 55
 	);
56 56
 
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
 	);
62 62
 
63 63
 	$lsx_controls['fields']['lsx_lazyload_status'] = array(
64
-		'label'         =>  esc_html__( 'Lazy Loading Images', 'lsx' ),
64
+		'label'         =>  esc_html__('Lazy Loading Images', 'lsx'),
65 65
 		'section'       =>  'lsx-core',
66 66
 		'type'          =>  'checkbox',
67 67
 	);
@@ -73,14 +73,14 @@  discard block
 block discarded – undo
73 73
 	);
74 74
 
75 75
 	$lsx_controls['fields']['lsx_preloader_content_status'] = array(
76
-		'label'         =>  esc_html__( 'Preloader Content', 'lsx' ),
76
+		'label'         =>  esc_html__('Preloader Content', 'lsx'),
77 77
 		'section'       =>  'lsx-core',
78 78
 		'type'          =>  'checkbox',
79 79
 	);
80 80
 
81 81
 	return $lsx_controls;
82 82
 }
83
-add_filter( 'lsx_customizer_controls', 'lsx_customizer_core_controls' );
83
+add_filter('lsx_customizer_controls', 'lsx_customizer_core_controls');
84 84
 
85 85
 /**
86 86
  * Returns an array of the layout panel.
@@ -91,56 +91,56 @@  discard block
 block discarded – undo
91 91
  * @return		$lsx_controls array()
92 92
  */
93 93
 function lsx_customizer_layout_controls($lsx_controls) {
94
-	$lsx_controls['settings']['lsx_header_layout']  = array(
94
+	$lsx_controls['settings']['lsx_header_layout'] = array(
95 95
 			'default'       =>  'inline', //Default setting/value to save
96 96
 			'type'        =>  'theme_mod', //Is this an 'option' or a 'theme_mod'?
97 97
 			'transport'     =>  'postMessage', //What triggers a refresh of the setting? 'refresh' or 'postMessage' (instant)?
98 98
 	);
99 99
 	$lsx_controls['fields']['lsx_header_layout'] = array(
100
-			'label'         =>  esc_html__('Header','lsx'),
100
+			'label'         =>  esc_html__('Header', 'lsx'),
101 101
 			'section'       =>  'lsx-layout',
102 102
 			'control'   =>  'LSX_Customize_Header_Layout_Control',
103
-			'choices'		=>	array('central','expanded','inline')
103
+			'choices'		=>	array('central', 'expanded', 'inline')
104 104
 	);	
105 105
 	$lsx_controls['sections']['lsx-layout'] = array(
106
-			'title'       =>  esc_html__( 'Layout', 'lsx' ),
107
-			'description' => esc_html__( 'Change the layout sitewide. If your homepage is set to use a page with a template, the following will not apply to it.', 'lsx' ),
106
+			'title'       =>  esc_html__('Layout', 'lsx'),
107
+			'description' => esc_html__('Change the layout sitewide. If your homepage is set to use a page with a template, the following will not apply to it.', 'lsx'),
108 108
 			'priority' => 22
109 109
 	);
110
-	$lsx_controls['settings']['lsx_layout']  = array(
110
+	$lsx_controls['settings']['lsx_layout'] = array(
111 111
 			'default'       =>  '2cr', //Default setting/value to save
112 112
 			'type'        =>  'theme_mod', //Is this an 'option' or a 'theme_mod'?
113 113
 			'transport'     =>  'refresh', //What triggers a refresh of the setting? 'refresh' or 'postMessage' (instant)?
114 114
 	);
115
-	$lsx_controls['settings']['lsx_header_fixed']  = array(
115
+	$lsx_controls['settings']['lsx_header_fixed'] = array(
116 116
 			'default'       =>  false, //Default setting/value to save
117 117
 			'sanitize_callback' => 'lsx_sanitize_checkbox',
118 118
 			'transport'     =>  'postMessage', //What triggers a refresh of the setting? 'refresh' or 'postMessage' (instant)?
119 119
 	);
120 120
 	$lsx_controls['fields']['lsx_header_fixed'] = array(
121
-			'label'         =>  esc_html__('Fixed Header','lsx'),
121
+			'label'         =>  esc_html__('Fixed Header', 'lsx'),
122 122
 			'section'       =>  'lsx-layout',
123 123
 			'type'       =>  'checkbox',
124 124
 	);
125
-	$lsx_controls['settings']['lsx_header_search']  = array(
125
+	$lsx_controls['settings']['lsx_header_search'] = array(
126 126
 			'default'       =>  false, //Default setting/value to save
127 127
 			'sanitize_callback' => 'lsx_sanitize_checkbox',
128 128
 			'transport'     =>  'postMessage', //What triggers a refresh of the setting? 'refresh' or 'postMessage' (instant)?
129 129
 	);
130 130
 	$lsx_controls['fields']['lsx_header_search'] = array(
131
-			'label'         =>  esc_html__('Search Box in Header','lsx'),
131
+			'label'         =>  esc_html__('Search Box in Header', 'lsx'),
132 132
 			'section'       =>  'lsx-layout',
133 133
 			'type'       =>  'checkbox',
134 134
 	);	
135 135
 	$lsx_controls['fields']['lsx_layout'] = array(
136
-			'label'         =>  esc_html__('Body','lsx'),
136
+			'label'         =>  esc_html__('Body', 'lsx'),
137 137
 			'section'       =>  'lsx-layout',
138 138
 			'control'   =>  'LSX_Customize_Layout_Control',
139
-			'choices'		=>	array('1c','2cr','2cl')
139
+			'choices'		=>	array('1c', '2cr', '2cl')
140 140
 	);	
141 141
 	return $lsx_controls;
142 142
 }
143
-add_filter('lsx_customizer_controls','lsx_customizer_layout_controls');
143
+add_filter('lsx_customizer_controls', 'lsx_customizer_layout_controls');
144 144
 
145 145
 /**
146 146
  * Returns an array of the font controls.
@@ -152,11 +152,11 @@  discard block
 block discarded – undo
152 152
  */
153 153
 function lsx_customizer_font_controls($lsx_controls) {
154 154
 	$lsx_controls['sections']['lsx-font'] = array(
155
-			'title'       =>  esc_html__( 'Font', 'lsx' ),
155
+			'title'       =>  esc_html__('Font', 'lsx'),
156 156
 			'description' => 'Change the fonts sitewide.',
157 157
 			'priority' => 41
158 158
 	);
159
-	$lsx_controls['settings']['lsx_font']  = array(
159
+	$lsx_controls['settings']['lsx_font'] = array(
160 160
 			'default'       =>  'raleway_open_sans', //Default setting/value to save
161 161
 			'type'        =>  'theme_mod', //Is this an 'option' or a 'theme_mod'?
162 162
 			'transport'     =>  'refresh', //What triggers a refresh of the setting? 'refresh' or 'postMessage' (instant)?
@@ -170,13 +170,13 @@  discard block
 block discarded – undo
170 170
 			'choices'   =>  array(
171 171
 					'raleway_open_sans' => array(
172 172
 							'header'  => array(
173
-									"title" => esc_html__( 'Raleway', 'lsx' ),
173
+									"title" => esc_html__('Raleway', 'lsx'),
174 174
 									"location" => "Raleway",
175 175
 									"cssDeclaration" => "'Raleway', sans-serif",
176 176
 									"cssClass" => "raleway",
177 177
 							),
178 178
 							'body'  => array(
179
-									"title" => esc_html__( 'Open Sans', 'lsx' ),
179
+									"title" => esc_html__('Open Sans', 'lsx'),
180 180
 									"location" => "Open+Sans",
181 181
 									"cssDeclaration" => "'Open Sans', sans-serif",
182 182
 									"cssClass" => "openSans"
@@ -184,13 +184,13 @@  discard block
 block discarded – undo
184 184
 					),
185 185
 					'noto_serif_noto_sans' => array(
186 186
 							'header'  => array(
187
-									"title" => esc_html__( 'Noto Serif', 'lsx' ),
187
+									"title" => esc_html__('Noto Serif', 'lsx'),
188 188
 									"location" => "Noto+Serif",
189 189
 									"cssDeclaration" => "'Noto Serif', serif",
190 190
 									"cssClass" => "notoSerif",
191 191
 							),
192 192
 							'body'  => array(
193
-									"title" => esc_html__( 'Noto Sans', 'lsx' ),
193
+									"title" => esc_html__('Noto Sans', 'lsx'),
194 194
 									"location" => "Noto+Sans",
195 195
 									"cssDeclaration" => "'Noto Sans', sans-serif",
196 196
 									"cssClass" => "notoSans",
@@ -198,13 +198,13 @@  discard block
 block discarded – undo
198 198
 					),
199 199
 					'noto_sans_noto_sans' => array(
200 200
 					'header'  => array(
201
-					"title" => esc_html__( 'Noto Sans', 'lsx' ),
201
+					"title" => esc_html__('Noto Sans', 'lsx'),
202 202
 					"location" => "Noto+Sans",
203 203
 					"cssDeclaration" => "'Noto Sans', sans-serif",
204 204
 					"cssClass" => "notoSans",
205 205
 					),
206 206
 					'body'  => array(
207
-					"title" => esc_html__( 'Noto Sans', 'lsx' ),
207
+					"title" => esc_html__('Noto Sans', 'lsx'),
208 208
 					"location" => "Noto+Sans",
209 209
 					"cssDeclaration" => "'Noto Sans', sans-serif",
210 210
 					"cssClass" => "notoSans",
@@ -212,13 +212,13 @@  discard block
 block discarded – undo
212 212
 					),
213 213
 					'alegreya_open_sans' => array(
214 214
 					'header'  => array(
215
-					"title" => esc_html__( 'Alegreya', 'lsx' ),
215
+					"title" => esc_html__('Alegreya', 'lsx'),
216 216
 					"location" => "Alegreya",
217 217
 					"cssDeclaration" => "'Alegreya', serif",
218 218
 					"cssClass" => "alegreya",
219 219
 					),
220 220
 					'body'  => array(
221
-					"title" => esc_html__( 'Open Sans', 'lsx' ),
221
+					"title" => esc_html__('Open Sans', 'lsx'),
222 222
 					"location" => "Open+Sans",
223 223
 					"cssDeclaration" => "'Open Sans', sans-serif",
224 224
 					"cssClass" => "openSans"
@@ -229,7 +229,7 @@  discard block
 block discarded – undo
229 229
 	);	
230 230
 	return $lsx_controls;
231 231
 }
232
-add_filter('lsx_customizer_controls','lsx_customizer_font_controls');
232
+add_filter('lsx_customizer_controls', 'lsx_customizer_font_controls');
233 233
 
234 234
 /**
235 235
  * Returns an array of $controls for the customizer class to generate.
@@ -239,12 +239,12 @@  discard block
 block discarded – undo
239 239
  * @category	customizer
240 240
  * @return		$lsx_controls array()
241 241
  */
242
-function lsx_get_customizer_controls(){
242
+function lsx_get_customizer_controls() {
243 243
 	$lsx_controls = array();
244 244
 	$lsx_controls = apply_filters('lsx_customizer_controls', $lsx_controls);
245 245
 	return $lsx_controls;
246 246
 }
247
-$lsx_customizer = new LSX_Theme_Customizer( lsx_get_customizer_controls() );
247
+$lsx_customizer = new LSX_Theme_Customizer(lsx_get_customizer_controls());
248 248
 
249
-add_image_size( 'lsx-thumbnail-wide', 350, 230, true );
250
-add_image_size( 'lsx-thumbnail-single', 750, 350, true );
251 249
\ No newline at end of file
250
+add_image_size('lsx-thumbnail-wide', 350, 230, true);
251
+add_image_size('lsx-thumbnail-single', 750, 350, true);
252 252
\ 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
@@ -4,7 +4,10 @@
 block discarded – undo
4 4
  *
5 5
  * @package lsx
6 6
  */
7
-if ( ! defined( 'ABSPATH' ) ) return; // Exit if accessed directly
7
+if ( ! defined( 'ABSPATH' ) ) {
8
+	return;
9
+}
10
+// Exit if accessed directly
8 11
 
9 12
 define('LSX_VERSION', '1.8.7');
10 13
 
Please login to merge, or discard this patch.