Completed
Push — master ( f96565...5f0c73 )
by Warwick
03:00
created
inc/admin/welcome-screen/component-header.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -9,47 +9,47 @@  discard block
 block discarded – undo
9 9
 
10 10
 <div class="row">
11 11
 	<div class="col-md-6">
12
-		<h1><?php echo esc_html__( 'LSX', 'lsx' ) . ' <sup class="version">' . esc_attr( LSX_VERSION ) . '</sup>'; ?></h1>
12
+		<h1><?php echo esc_html__('LSX', 'lsx') . ' <sup class="version">' . esc_attr(LSX_VERSION) . '</sup>'; ?></h1>
13 13
 	</div>
14 14
 
15 15
 	<div class="col-md-6">
16
-		<p class="review"><?php echo sprintf( esc_html__( '%1$sEnjoying LSX?%2$s Why not %3$sleave a review%4$s on WordPress.org? We\'re looking foward to all our users\' feedback!', 'lsx' ), '<strong>', '</strong>', '<a href="https://wordpress.org/themes/lsx" target="_blank">', '</a>' ); ?></p>
16
+		<p class="review"><?php echo sprintf(esc_html__('%1$sEnjoying LSX?%2$s Why not %3$sleave a review%4$s on WordPress.org? We\'re looking foward to all our users\' feedback!', 'lsx'), '<strong>', '</strong>', '<a href="https://wordpress.org/themes/lsx" target="_blank">', '</a>'); ?></p>
17 17
 	</div>
18 18
 </div>
19 19
 
20 20
 <div class="row">
21 21
 	<div class="col-md-6">
22 22
 		<div class="box enrich">
23
-			<h2><?php esc_html_e( 'Built to enrich your WordPress experience', 'lsx' ); ?></h2>
24
-			<p><?php esc_html_e( 'Whether you\'re using LSX for your personal blog, as the platform for a powerful WooCommerce store or as the foundation for your own child-theme, you\'ll find it\'s the perfect fit for WordPress.', 'lsx' ); ?></p>
23
+			<h2><?php esc_html_e('Built to enrich your WordPress experience', 'lsx'); ?></h2>
24
+			<p><?php esc_html_e('Whether you\'re using LSX for your personal blog, as the platform for a powerful WooCommerce store or as the foundation for your own child-theme, you\'ll find it\'s the perfect fit for WordPress.', 'lsx'); ?></p>
25 25
 		</div>
26 26
 	</div>
27 27
 
28 28
 	<div class="col-md-6">
29 29
 		<div class="box news">
30
-			<h2><?php esc_html_e( 'LSX News &amp; Documentation', 'lsx' ); ?></h2>
30
+			<h2><?php esc_html_e('LSX News &amp; Documentation', 'lsx'); ?></h2>
31 31
 
32 32
 			<div class="row">
33 33
 				<div class="col-md-6 news">
34
-					<h3><?php esc_html_e( 'Recent News', 'lsx' ); ?></h3>
34
+					<h3><?php esc_html_e('Recent News', 'lsx'); ?></h3>
35 35
 					
36 36
 					<ul>
37 37
 						<?php
38
-							$rss = fetch_feed( 'https://www.lsdev.biz/lsx/feed/' );
38
+							$rss = fetch_feed('https://www.lsdev.biz/lsx/feed/');
39 39
 							$rss_items = array();
40 40
 
41
-							if ( ! is_wp_error( $rss ) ) {
42
-								$maxitems 	= $rss->get_item_quantity( 3 );
43
-								$rss_items 	= $rss->get_items( 0, $maxitems );
41
+							if ( ! is_wp_error($rss)) {
42
+								$maxitems = $rss->get_item_quantity(3);
43
+								$rss_items = $rss->get_items(0, $maxitems);
44 44
 							}
45 45
 
46
-							foreach ( $rss_items as $item ) : ?>
46
+							foreach ($rss_items as $item) : ?>
47 47
 								<li>
48
-									<a href="<?php echo esc_url( $item->get_permalink() ); ?>" target="_blank">
49
-										<?php echo esc_html( $item->get_title() ); ?>
48
+									<a href="<?php echo esc_url($item->get_permalink()); ?>" target="_blank">
49
+										<?php echo esc_html($item->get_title()); ?>
50 50
 									</a>
51 51
 								</li>
52
-								<span class="date"><?php echo esc_attr( $item->get_date( 'j F Y' ) ); ?></span>
52
+								<span class="date"><?php echo esc_attr($item->get_date('j F Y')); ?></span>
53 53
 							<?php
54 54
 							endforeach;
55 55
 						?>
@@ -57,11 +57,11 @@  discard block
 block discarded – undo
57 57
 				</div>
58 58
 
59 59
 				<div class="col-md-6 docs">
60
-					<h3><?php esc_html_e( 'Documentation', 'lsx' ); ?></h3>
60
+					<h3><?php esc_html_e('Documentation', 'lsx'); ?></h3>
61 61
 					
62 62
 					<ul>
63 63
 						<li>
64
-							<a href="https://www.lsdev.biz/documentation/lsx/" target="_blank"><?php esc_html_e( 'Installation &amp; configuration', 'lsx' ); ?></a>
64
+							<a href="https://www.lsdev.biz/documentation/lsx/" target="_blank"><?php esc_html_e('Installation &amp; configuration', 'lsx'); ?></a>
65 65
 						</li>
66 66
 					</ul>
67 67
 				</div>
Please login to merge, or discard this patch.
inc/admin/welcome-screen/component-footer.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -10,12 +10,12 @@  discard block
 block discarded – undo
10 10
 <div class="row">
11 11
 	<div class="col-md-4">
12 12
 		<div class="box customise">
13
-			<h2><?php esc_html_e( 'Theme Customizer', 'lsx' ); ?> - <span class="price">$59.00</span></h2>
14
-			<p><?php esc_html_e( 'You\'ve installed LSX, so now why not make it all yours? Whether it\'s a small CSS tweak or changing the entire layout of pages, posts or archives, please make use of the Theme Customizer plugin. Click below to install and get custom!', 'lsx' ); ?></p>
13
+			<h2><?php esc_html_e('Theme Customizer', 'lsx'); ?> - <span class="price">$59.00</span></h2>
14
+			<p><?php esc_html_e('You\'ve installed LSX, so now why not make it all yours? Whether it\'s a small CSS tweak or changing the entire layout of pages, posts or archives, please make use of the Theme Customizer plugin. Click below to install and get custom!', 'lsx'); ?></p>
15 15
 
16 16
 			<div class="more-button">
17 17
 				<a href="https://www.lsdev.biz/product/lsx-theme-customizer/" target="_blank" class="button button-primary">
18
-					<?php esc_html_e( 'Theme Customizer', 'lsx' ); ?>
18
+					<?php esc_html_e('Theme Customizer', 'lsx'); ?>
19 19
 				</a>
20 20
 			</div>
21 21
 		</div>
@@ -23,12 +23,12 @@  discard block
 block discarded – undo
23 23
 
24 24
 	<div class="col-md-4">
25 25
 		<div class="box support">
26
-			<h2><?php esc_html_e( 'Get support', 'lsx' ); ?></h2>
27
-			<p><?php printf( esc_html__( 'You\'ll find information on how to use and customize the LSX theme in our %1$sdocumentation%2$s section. However, please do %3$scontact us%4$s for support should you still find yourself unable to achieve your needs.', 'lsx' ), '<a href="https://www.lsdev.biz/documentation/lsx/" target="_blank">', '</a>', '<a href="https://www.lsdev.biz/contact-us/" target="_blank">', '</a>' ); ?></p>
26
+			<h2><?php esc_html_e('Get support', 'lsx'); ?></h2>
27
+			<p><?php printf(esc_html__('You\'ll find information on how to use and customize the LSX theme in our %1$sdocumentation%2$s section. However, please do %3$scontact us%4$s for support should you still find yourself unable to achieve your needs.', 'lsx'), '<a href="https://www.lsdev.biz/documentation/lsx/" target="_blank">', '</a>', '<a href="https://www.lsdev.biz/contact-us/" target="_blank">', '</a>'); ?></p>
28 28
 
29 29
 			<div class="more-button">
30 30
 				<a href="https://www.lsdev.biz/contact-us/" target="_blank" class="button button-primary">
31
-					<?php esc_html_e( 'Get in touch', 'lsx' ); ?>
31
+					<?php esc_html_e('Get in touch', 'lsx'); ?>
32 32
 				</a>
33 33
 			</div>
34 34
 		</div>
@@ -36,12 +36,12 @@  discard block
 block discarded – undo
36 36
 
37 37
 	<div class="col-md-4">
38 38
 		<div class="box suggest">
39
-			<h2><?php esc_html_e( 'Suggest a feature', 'lsx' ); ?></h2>
40
-			<p><?php printf( esc_html__( 'If you\'d like to suggest a feature for inclusion in upcoming releases of the LSX theme, please don\'t hesitate to %1$scontact us%2$s directly. We\'re always on the lookout for fresh ideas to help make LSX even better.', 'lsx' ), '<a href="https://www.lsdev.biz/contact-us/" target="_blank">', '</a>' ); ?></p>
39
+			<h2><?php esc_html_e('Suggest a feature', 'lsx'); ?></h2>
40
+			<p><?php printf(esc_html__('If you\'d like to suggest a feature for inclusion in upcoming releases of the LSX theme, please don\'t hesitate to %1$scontact us%2$s directly. We\'re always on the lookout for fresh ideas to help make LSX even better.', 'lsx'), '<a href="https://www.lsdev.biz/contact-us/" target="_blank">', '</a>'); ?></p>
41 41
 
42 42
 			<div class="more-button">
43 43
 				<a href="https://www.lsdev.biz/contact-us/" target="_blank" class="button button-primary">
44
-					<?php esc_html_e( 'Submit a request', 'lsx' ); ?>
44
+					<?php esc_html_e('Submit a request', 'lsx'); ?>
45 45
 				</a>
46 46
 			</div>
47 47
 		</div>
Please login to merge, or discard this patch.
inc/admin/welcome-screen/component-enhance.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -10,28 +10,28 @@  discard block
 block discarded – undo
10 10
 <div class="row">
11 11
 	<div class="col-md-12">
12 12
 		<div class="box enhance">
13
-			<h2><?php esc_html_e( 'Enhance LSX', 'lsx' ); ?></h2>
14
-			<p><?php esc_html_e( 'Take a look at our range of extensions that add to the already rich functionality of the LSX WordPress theme..', 'lsx' ); ?></p>
13
+			<h2><?php esc_html_e('Enhance LSX', 'lsx'); ?></h2>
14
+			<p><?php esc_html_e('Take a look at our range of extensions that add to the already rich functionality of the LSX WordPress theme..', 'lsx'); ?></p>
15 15
 
16 16
 			<div class="row">
17 17
 				<div class="col-md-4">
18 18
 					<div class="box-clean">
19
-						<a href="https://www.lsdev.biz/product/lsx-currencies/" target="_blank"><?php esc_html_e( 'Currencies', 'lsx' ); ?> - <span class="price">$59.00</span></a>
20
-						<p><?php esc_html_e( 'The LSX Currencies extension adds currency selection functionality to sites, allowing users to view your products in whatever currencies you choose to sell in.', 'lsx' ); ?></p>
19
+						<a href="https://www.lsdev.biz/product/lsx-currencies/" target="_blank"><?php esc_html_e('Currencies', 'lsx'); ?> - <span class="price">$59.00</span></a>
20
+						<p><?php esc_html_e('The LSX Currencies extension adds currency selection functionality to sites, allowing users to view your products in whatever currencies you choose to sell in.', 'lsx'); ?></p>
21 21
 					</div>
22 22
 				</div>
23 23
 
24 24
 				<div class="col-md-4">
25 25
 					<div class="box-clean">
26
-						<a href="https://www.lsdev.biz/product/lsx-banners/" target="_blank"><?php esc_html_e( 'Banners', 'lsx' ); ?> - <span class="price">$49.00</span></a>
27
-						<p><?php esc_html_e( 'The LSX Banners extension adds advanced banner configuration options to your WordPress site running LSX theme.', 'lsx' ); ?></p>
26
+						<a href="https://www.lsdev.biz/product/lsx-banners/" target="_blank"><?php esc_html_e('Banners', 'lsx'); ?> - <span class="price">$49.00</span></a>
27
+						<p><?php esc_html_e('The LSX Banners extension adds advanced banner configuration options to your WordPress site running LSX theme.', 'lsx'); ?></p>
28 28
 					</div>
29 29
 				</div>
30 30
 
31 31
 				<div class="col-md-4">
32 32
 					<div class="box-clean">
33
-						<a href="https://www.lsdev.biz/product/lsx-currencies/" target="_blank"><?php esc_html_e( 'Testimonials', 'lsx' ); ?> - <span class="price">$29.00</span></a>
34
-						<p><?php esc_html_e( 'The LSX Testimonials extension adds the "Testimonials" post type, which you can display front-and-centre on your site.', 'lsx' ); ?></p>
33
+						<a href="https://www.lsdev.biz/product/lsx-currencies/" target="_blank"><?php esc_html_e('Testimonials', 'lsx'); ?> - <span class="price">$29.00</span></a>
34
+						<p><?php esc_html_e('The LSX Testimonials extension adds the "Testimonials" post type, which you can display front-and-centre on your site.', 'lsx'); ?></p>
35 35
 					</div>
36 36
 				</div>
37 37
 			</div>
@@ -39,22 +39,22 @@  discard block
 block discarded – undo
39 39
 			<div class="row">
40 40
 				<div class="col-md-4">
41 41
 					<div class="box-clean">
42
-						<a href="https://www.lsdev.biz/product/lsx-team/" target="_blank"><?php esc_html_e( 'Team', 'lsx' ); ?> - <span class="price">$29.00</span></a>
43
-						<p><?php esc_html_e( 'The LSX Team Extension provides a custom post type that allows you to easily show off the people that make up your business.', 'lsx' ); ?></p>
42
+						<a href="https://www.lsdev.biz/product/lsx-team/" target="_blank"><?php esc_html_e('Team', 'lsx'); ?> - <span class="price">$29.00</span></a>
43
+						<p><?php esc_html_e('The LSX Team Extension provides a custom post type that allows you to easily show off the people that make up your business.', 'lsx'); ?></p>
44 44
 					</div>
45 45
 				</div>
46 46
 
47 47
 				<div class="col-md-4">
48 48
 					<div class="box-clean">
49
-						<a href="https://www.lsdev.biz/product/lsx-mega-menus/" target="_blank"><?php esc_html_e( 'Mega Menus', 'lsx' ); ?> - <span class="price">$39.00</span></a>
50
-						<p><?php esc_html_e( 'Create custom, full-width dropdown menus that contain images, widgets and more that seamlessly tie into your LSX WordPress site.', 'lsx' ); ?></p>
49
+						<a href="https://www.lsdev.biz/product/lsx-mega-menus/" target="_blank"><?php esc_html_e('Mega Menus', 'lsx'); ?> - <span class="price">$39.00</span></a>
50
+						<p><?php esc_html_e('Create custom, full-width dropdown menus that contain images, widgets and more that seamlessly tie into your LSX WordPress site.', 'lsx'); ?></p>
51 51
 					</div>
52 52
 				</div>
53 53
 
54 54
 				<div class="col-md-4">
55 55
 					<div class="box-clean">
56
-						<a href="https://www.lsdev.biz/product/lsx-login/" target="_blank"><?php esc_html_e( 'Login', 'lsx' ); ?> - <span class="price">$59.00</span></a>
57
-						<p><?php esc_html_e( 'The LSX Login extension allows users to log into a dashboard and then see configurable content based on which users can access which content.', 'lsx' ); ?></p>
56
+						<a href="https://www.lsdev.biz/product/lsx-login/" target="_blank"><?php esc_html_e('Login', 'lsx'); ?> - <span class="price">$59.00</span></a>
57
+						<p><?php esc_html_e('The LSX Login extension allows users to log into a dashboard and then see configurable content based on which users can access which content.', 'lsx'); ?></p>
58 58
 					</div>
59 59
 				</div>
60 60
 			</div>
Please login to merge, or discard this patch.
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.