Completed
Push — master ( 2fcc6a...e555ed )
by
unknown
03:04
created
inc/sensei.php 1 patch
Spacing   +37 added lines, -37 removed lines patch added patch discarded remove patch
@@ -12,26 +12,26 @@  discard block
 block discarded – undo
12 12
  * Hooks
13 13
  */
14 14
 
15
-remove_action( 'sensei_before_main_content', array( $woothemes_sensei->frontend, 'sensei_output_content_wrapper' ), 10 );
16
-remove_action( 'sensei_after_main_content', array( $woothemes_sensei->frontend, 'sensei_output_content_wrapper_end' ), 10 );
15
+remove_action('sensei_before_main_content', array($woothemes_sensei->frontend, 'sensei_output_content_wrapper'), 10);
16
+remove_action('sensei_after_main_content', array($woothemes_sensei->frontend, 'sensei_output_content_wrapper_end'), 10);
17 17
 
18 18
 add_action('sensei_before_main_content', 'lsx_sensei_before_content', 10);
19 19
 add_action('sensei_after_main_content', 'lsx_sensei_after_content', 10);
20 20
 
21 21
 //Switching the course filters and the headers around
22
-remove_action('sensei_archive_before_course_loop', array( 'Sensei_Course', 'archive_header' ), 10, 0 );
23
-remove_action ( 'sensei_archive_before_course_loop' , array( 'Sensei_Course', 'course_archive_sorting' ) );
24
-remove_action ( 'sensei_archive_before_course_loop' , array( 'Sensei_Course', 'course_archive_filters' ) );
25
-add_action('sensei_archive_before_course_loop', array( 'Sensei_Course', 'archive_header' ), 11, 0 );
26
-add_action ( 'sensei_archive_before_course_loop' , array( 'Sensei_Course', 'course_archive_sorting' ),12 );
27
-add_action ( 'sensei_archive_before_course_loop' , array( 'Sensei_Course', 'course_archive_filters' ),12 );
22
+remove_action('sensei_archive_before_course_loop', array('Sensei_Course', 'archive_header'), 10, 0);
23
+remove_action('sensei_archive_before_course_loop', array('Sensei_Course', 'course_archive_sorting'));
24
+remove_action('sensei_archive_before_course_loop', array('Sensei_Course', 'course_archive_filters'));
25
+add_action('sensei_archive_before_course_loop', array('Sensei_Course', 'archive_header'), 11, 0);
26
+add_action('sensei_archive_before_course_loop', array('Sensei_Course', 'course_archive_sorting'), 12);
27
+add_action('sensei_archive_before_course_loop', array('Sensei_Course', 'course_archive_filters'), 12);
28 28
 
29 29
 // Moving course image up in DOM
30
-remove_action('sensei_course_content_inside_before', array( Sensei()->course, 'course_image' ) ,10, 1 );
31
-add_action('sensei_course_content_inside_before', array( Sensei()->course, 'course_image' ) ,1, 1 );
30
+remove_action('sensei_course_content_inside_before', array(Sensei()->course, 'course_image'), 10, 1);
31
+add_action('sensei_course_content_inside_before', array(Sensei()->course, 'course_image'), 1, 1);
32 32
 
33
-remove_action( 'sensei_single_course_content_inside_before', array( Sensei()->course , 'course_image'), 20 );
34
-add_action( 'sensei_single_course_content_inside_before', array( Sensei()->course , 'course_image'), 12 );
33
+remove_action('sensei_single_course_content_inside_before', array(Sensei()->course, 'course_image'), 20);
34
+add_action('sensei_single_course_content_inside_before', array(Sensei()->course, 'course_image'), 12);
35 35
 
36 36
 /**
37 37
  * Adds the top and primary divs for the layout.
@@ -39,22 +39,22 @@  discard block
 block discarded – undo
39 39
  * @subpackage sensei
40 40
  * @category 	layout
41 41
  */
42
-function lsx_sensei_wp_head(){
42
+function lsx_sensei_wp_head() {
43 43
 
44
-	$layout = get_theme_mod('lsx_layout','2cr');
45
-	$layout = apply_filters( 'lsx_layout', $layout );
44
+	$layout = get_theme_mod('lsx_layout', '2cr');
45
+	$layout = apply_filters('lsx_layout', $layout);
46 46
 
47
-	if('1c' === $layout && is_post_type_archive(array('course','lesson'))) {
48
-		add_action('sensei_archive_before_course_loop', 'lsx_breadcrumbs', 11 );
47
+	if ('1c' === $layout && is_post_type_archive(array('course', 'lesson'))) {
48
+		add_action('sensei_archive_before_course_loop', 'lsx_breadcrumbs', 11);
49 49
 	}
50 50
 	
51
-	if('1c' === $layout && is_tax(array('module','course-category'))) {
51
+	if ('1c' === $layout && is_tax(array('module', 'course-category'))) {
52 52
 		remove_action('lsx_content_top', 'lsx_breadcrumbs');
53
-		add_action( 'sensei_loop_course_before', 'lsx_breadcrumbs', 80 , 1 );
53
+		add_action('sensei_loop_course_before', 'lsx_breadcrumbs', 80, 1);
54 54
 		
55
-		if(is_tax('module')){
56
-			remove_action( 'sensei_content_lesson_inside_before', array( 'Sensei_Lesson', 'the_lesson_meta' ), 20 );
57
-			add_action( 'sensei_content_lesson_inside_before', array( 'Sensei_Lesson', 'the_lesson_meta' ), 40 );
55
+		if (is_tax('module')) {
56
+			remove_action('sensei_content_lesson_inside_before', array('Sensei_Lesson', 'the_lesson_meta'), 20);
57
+			add_action('sensei_content_lesson_inside_before', array('Sensei_Lesson', 'the_lesson_meta'), 40);
58 58
 			
59 59
 			remove_action('sensei_content_lesson_inside_before', array('Sensei_Core_Modules', 'module_archive_description'), 11);
60 60
 		}
@@ -73,10 +73,10 @@  discard block
 block discarded – undo
73 73
  * @subpackage sensei
74 74
  * @category 	layout
75 75
  */
76
-function lsx_sensei_before_content(){ ?>
76
+function lsx_sensei_before_content() { ?>
77 77
 	<?php lsx_content_wrap_before(); ?>
78 78
 
79
-	<div id="primary" class="content-area <?php echo esc_attr( lsx_main_class() ); ?>">
79
+	<div id="primary" class="content-area <?php echo esc_attr(lsx_main_class()); ?>">
80 80
 
81 81
 		<?php lsx_content_before(); ?>
82 82
 
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
  * @subpackage sensei
93 93
  * @category 	layout
94 94
  */
95
-function lsx_sensei_after_content(){ ?>
95
+function lsx_sensei_after_content() { ?>
96 96
 		<?php lsx_content_bottom(); ?>
97 97
 
98 98
 		</main><!-- #main -->
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
  * @subpackage sensei
117 117
  * @category redirect
118 118
  */
119
-add_filter( 'sensei_disable_styles', '__return_true' );
119
+add_filter('sensei_disable_styles', '__return_true');
120 120
 
121 121
 /**
122 122
  * Includes the sensei specific styles.
@@ -125,9 +125,9 @@  discard block
 block discarded – undo
125 125
  * @category styles
126 126
  */
127 127
 function lsx_sensei_styles() {
128
-    wp_enqueue_style( 'sensei', get_template_directory_uri() . '/css/sensei.css' );
128
+    wp_enqueue_style('sensei', get_template_directory_uri() . '/css/sensei.css');
129 129
 }
130
-add_action( 'wp_enqueue_scripts', 'lsx_sensei_styles' );
130
+add_action('wp_enqueue_scripts', 'lsx_sensei_styles');
131 131
 
132 132
 /**
133 133
  * Redirects Lessons Archive to Courses Overview
@@ -135,13 +135,13 @@  discard block
 block discarded – undo
135 135
  * @subpackage woocommerce
136 136
  * @category 	styles
137 137
  */
138
-function lsx_sensei_redirect_to_home( $query ){
139
-    if(!is_admin() && is_post_type_archive( 'lesson' ) ) {
140
-         wp_redirect( home_url() . '/courses-overview' );
138
+function lsx_sensei_redirect_to_home($query) {
139
+    if ( ! is_admin() && is_post_type_archive('lesson')) {
140
+         wp_redirect(home_url() . '/courses-overview');
141 141
          exit;
142 142
      }
143 143
 }
144
-add_action( 'parse_query', 'lsx_sensei_redirect_to_home' );
144
+add_action('parse_query', 'lsx_sensei_redirect_to_home');
145 145
 
146 146
 /**
147 147
  * Filters the archive title
@@ -149,10 +149,10 @@  discard block
 block discarded – undo
149 149
  * @subpackage woocommerce
150 150
  * @category 	styles
151 151
  */
152
-function lsx_sensei_category_title( $html,$term_id ){
153
-	$html = str_replace('h2','h1',$html);
154
-	$html = str_replace('sensei-category-title','archive-title',$html);
152
+function lsx_sensei_category_title($html, $term_id) {
153
+	$html = str_replace('h2', 'h1', $html);
154
+	$html = str_replace('sensei-category-title', 'archive-title', $html);
155 155
 	
156
-	return '<header class="archive-header">'.$html.'</header>';
156
+	return '<header class="archive-header">' . $html . '</header>';
157 157
 }
158
-add_filter( 'course_category_title', 'lsx_sensei_category_title',1,10 );
159 158
\ No newline at end of file
159
+add_filter('course_category_title', 'lsx_sensei_category_title', 1, 10);
160 160
\ No newline at end of file
Please login to merge, or discard this patch.
author.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  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
 
@@ -19,25 +19,25 @@  discard block
 block discarded – undo
19 19
 
20 20
 		<?php lsx_content_top(); ?>
21 21
 
22
-		<?php if ( have_posts() ) : ?>
22
+		<?php if (have_posts()) : ?>
23 23
 
24 24
 			<?php 
25
-			$layout = get_theme_mod('lsx_layout','2cr');
26
-			$layout = apply_filters( 'lsx_layout', $layout );
27
-			if('1c' === $layout){
25
+			$layout = get_theme_mod('lsx_layout', '2cr');
26
+			$layout = apply_filters('lsx_layout', $layout);
27
+			if ('1c' === $layout) {
28 28
 				lsx_breadcrumbs();
29 29
 			}
30 30
 			?>			
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.
image.php 1 patch
Spacing   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
 
11 11
     <?php lsx_content_wrap_before(); ?>
12 12
  
13
-	<div id="primary" class="content-area <?php echo esc_attr( lsx_main_class() ); ?>">
13
+	<div id="primary" class="content-area <?php echo esc_attr(lsx_main_class()); ?>">
14 14
 
15 15
 		<?php lsx_content_before(); ?>
16 16
 
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
 
19 19
 			<?php lsx_content_top(); ?>
20 20
  
21
-            <?php while ( have_posts() ) : the_post(); ?>
21
+            <?php while (have_posts()) : the_post(); ?>
22 22
  
23 23
  				<?php lsx_entry_before(); ?>
24 24
  				
@@ -32,22 +32,22 @@  discard block
 block discarded – undo
32 32
                         <div class="entry-meta">
33 33
                             <?php
34 34
                                 $metadata = wp_get_attachment_metadata();
35
-                                printf( __( 'Published <span class="entry-date"><time class="entry-date" datetime="%1$s" pubdate>%2$s</time></span> at <a href="%3$s" title="Link to full-size image">%4$s &times; %5$s</a> in <a href="%6$s" title="Return to %7$s" rel="gallery">%7$s</a>', 'lsx' ),
36
-                                    esc_attr( get_the_date( 'c' ) ),
37
-                                    esc_html( get_the_date() ),
35
+                                printf(__('Published <span class="entry-date"><time class="entry-date" datetime="%1$s" pubdate>%2$s</time></span> at <a href="%3$s" title="Link to full-size image">%4$s &times; %5$s</a> in <a href="%6$s" title="Return to %7$s" rel="gallery">%7$s</a>', 'lsx'),
36
+                                    esc_attr(get_the_date('c')),
37
+                                    esc_html(get_the_date()),
38 38
                                     wp_get_attachment_url(),
39 39
                                     $metadata['width'],
40 40
                                     $metadata['height'],
41
-                                    get_permalink( $post->post_parent ),
42
-                                    get_the_title( $post->post_parent )
41
+                                    get_permalink($post->post_parent),
42
+                                    get_the_title($post->post_parent)
43 43
                                 );
44 44
                             ?>
45
-                            <?php edit_post_link( __( 'Edit', 'lsx' ), '<span class="sep"> | </span> <span class="edit-link">', '</span>' ); ?>
45
+                            <?php edit_post_link(__('Edit', 'lsx'), '<span class="sep"> | </span> <span class="edit-link">', '</span>'); ?>
46 46
                         </div><!-- .entry-meta -->
47 47
  
48 48
                         <nav id="image-navigation" class="site-navigation">
49
-                            <span class="previous-image"><?php previous_image_link( false, '&larr; '.__( 'Previous', 'lsx' ) ); ?></span>
50
-                            <span class="next-image"><?php next_image_link( false, __( 'Next', 'lsx' ).' &rarr;' ); ?></span>
49
+                            <span class="previous-image"><?php previous_image_link(false, '&larr; ' . __('Previous', 'lsx')); ?></span>
50
+                            <span class="next-image"><?php next_image_link(false, __('Next', 'lsx') . ' &rarr;'); ?></span>
51 51
                         </nav><!-- #image-navigation -->
52 52
                     </header><!-- .entry-header -->
53 53
  
@@ -60,33 +60,33 @@  discard block
 block discarded – undo
60 60
                                      * Grab the IDs of all the image attachments in a gallery so we can get the URL of the next adjacent image in a gallery,
61 61
                                      * or the first image (if we're looking at the last image in a gallery), or, in a gallery of one, just the link to that image file
62 62
                                      */
63
-                                    $attachments = array_values( get_children( array( 'post_parent' => $post->post_parent, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => 'ASC', 'orderby' => 'menu_order ID' ) ) );
64
-                                    foreach ( $attachments as $k => $attachment ) {
65
-                                        if ( $attachment->ID == $post->ID )
63
+                                    $attachments = array_values(get_children(array('post_parent' => $post->post_parent, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => 'ASC', 'orderby' => 'menu_order ID')));
64
+                                    foreach ($attachments as $k => $attachment) {
65
+                                        if ($attachment->ID == $post->ID)
66 66
                                             break;
67 67
                                     }
68 68
                                     $k++;
69 69
                                     // If there is more than 1 attachment in a gallery
70
-                                    if ( count( $attachments ) > 1 ) {
71
-                                        if ( isset( $attachments[ $k ] ) )
70
+                                    if (count($attachments) > 1) {
71
+                                        if (isset($attachments[$k]))
72 72
                                             // get the URL of the next image attachment
73
-                                            $next_attachment_url = get_attachment_link( $attachments[ $k ]->ID );
73
+                                            $next_attachment_url = get_attachment_link($attachments[$k]->ID);
74 74
                                         else
75 75
                                             // or get the URL of the first image attachment
76
-                                            $next_attachment_url = get_attachment_link( $attachments[ 0 ]->ID );
76
+                                            $next_attachment_url = get_attachment_link($attachments[0]->ID);
77 77
                                     } else {
78 78
                                         // or, if there's only 1 image, get the URL of the image
79 79
                                         $next_attachment_url = wp_get_attachment_url();
80 80
                                     }
81 81
                                 ?>
82 82
  
83
-                                <a href="<?php echo $next_attachment_url; ?>" title="<?php echo esc_attr( get_the_title() ); ?>" rel="attachment"><?php
84
-                                    $attachment_size = apply_filters( 'shape_attachment_size', array( 1200, 1200 ) ); // Filterable image size.
85
-                                    echo wp_get_attachment_image( $post->ID, $attachment_size );
83
+                                <a href="<?php echo $next_attachment_url; ?>" title="<?php echo esc_attr(get_the_title()); ?>" rel="attachment"><?php
84
+                                    $attachment_size = apply_filters('shape_attachment_size', array(1200, 1200)); // Filterable image size.
85
+                                    echo wp_get_attachment_image($post->ID, $attachment_size);
86 86
                                 ?></a>
87 87
                             </div><!-- .attachment -->
88 88
  
89
-                            <?php if ( ! empty( $post->post_excerpt ) ) : ?>
89
+                            <?php if ( ! empty($post->post_excerpt)) : ?>
90 90
                             <div class="entry-caption">
91 91
                                 <?php the_excerpt(); ?>
92 92
                             </div><!-- .entry-caption -->
@@ -96,27 +96,27 @@  discard block
 block discarded – undo
96 96
                         <?php
97 97
                             the_content();
98 98
 
99
-                            wp_link_pages( array(
99
+                            wp_link_pages(array(
100 100
                                 'before' => '<div class="lsx-postnav-wrapper"><div class="lsx-postnav">',
101 101
                                 'after' => '</div></div>',
102 102
                                 'link_before' => '<span>',
103 103
                                 'link_after' => '</span>'
104
-                            ) );
104
+                            ));
105 105
                         ?>
106 106
  
107 107
                     </div><!-- .entry-content -->
108 108
                     
109 109
 					<footer class="entry-meta">
110 110
 						
111
-						<?php if ( ! is_single() ) : ?>
111
+						<?php if ( ! is_single()) : ?>
112 112
 							<a class="read-more" href="<?php the_permalink(); ?>">Read More</a>
113 113
 						<?php endif ?>
114 114
 				
115
-						<?php if ( ! post_password_required() && ( comments_open() || '0' != get_comments_number() ) ) : ?>
116
-						<span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'lsx' ), __( '1 Comment', 'lsx' ), __( '% Comments', 'lsx' ) ); ?></span>
115
+						<?php if ( ! post_password_required() && (comments_open() || '0' != get_comments_number())) : ?>
116
+						<span class="comments-link"><?php comments_popup_link(__('Leave a comment', 'lsx'), __('1 Comment', 'lsx'), __('% Comments', 'lsx')); ?></span>
117 117
 						<?php endif; ?>			
118 118
 				
119
-						<?php edit_post_link( __( 'Edit', 'lsx' ), '<span class="edit-link">', '</span>' ); ?>
119
+						<?php edit_post_link(__('Edit', 'lsx'), '<span class="edit-link">', '</span>'); ?>
120 120
 					</footer><!-- .entry-meta -->                    
121 121
  
122 122
  				<?php lsx_entry_bottom(); ?>
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
  
126 126
 				<?php
127 127
 					// If comments are open or we have at least one comment, load up the comment template
128
-					if ( comments_open() || '0' != get_comments_number() ) :
128
+					if (comments_open() || '0' != get_comments_number()) :
129 129
 						comments_template();
130 130
 					endif;
131 131
 				?>	
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.
index.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
 
16 16
 	<?php lsx_content_wrap_before(); ?>
17 17
 
18
-	<div id="primary" class="content-area <?php echo esc_attr( lsx_main_class() ); ?>">
18
+	<div id="primary" class="content-area <?php echo esc_attr(lsx_main_class()); ?>">
19 19
 
20 20
 		<?php lsx_content_before(); ?>
21 21
 
@@ -23,17 +23,17 @@  discard block
 block discarded – undo
23 23
 		
24 24
 		<?php lsx_content_top(); ?>
25 25
 
26
-		<?php if ( have_posts() ) : ?>
26
+		<?php if (have_posts()) : ?>
27 27
 
28 28
 			<?php /* Start the Loop */ ?>
29
-			<?php while ( have_posts() ) : the_post(); ?>
29
+			<?php while (have_posts()) : the_post(); ?>
30 30
 
31 31
 				<?php
32 32
 					/* Include the Post-Format-specific template for the content.
33 33
 					 * If you want to override this in a child theme, then include a file
34 34
 					 * called content-___.php (where ___ is the Post Format name) and that will be used instead.
35 35
 					 */
36
-					get_template_part( 'content', get_post_format() );
36
+					get_template_part('content', get_post_format());
37 37
 				?>
38 38
 
39 39
 			<?php endwhile; ?>
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
 			
43 43
 		<?php else : ?>
44 44
 
45
-			<?php get_template_part( 'content', 'none' ); ?>
45
+			<?php get_template_part('content', 'none'); ?>
46 46
 
47 47
 		<?php endif; ?>
48 48
 
@@ -56,5 +56,5 @@  discard block
 block discarded – undo
56 56
 
57 57
 	<?php lsx_content_wrap_after(); ?>
58 58
 
59
-<?php get_sidebar( 'sidebar' ); ?>
59
+<?php get_sidebar('sidebar'); ?>
60 60
 <?php get_footer();
61 61
\ No newline at end of file
Please login to merge, or discard this patch.