Completed
Push — master ( 6f9e7a...de5671 )
by Dwain
09:23
created
widgets/widget-woothemes-sensei-course-component.php 1 patch
Indentation   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -64,11 +64,11 @@  discard block
 block discarded – undo
64 64
 		remove_filter( 'pre_get_posts', 'sensei_course_archive_filter', 10, 1 );
65 65
 
66 66
 		if ( in_array( $instance['component'], array_keys( $this->woo_widget_componentslist ) )
67
-            && ( 'activecourses' == $instance['component'] || 'completedcourses' == $instance['component'] )
68
-            && !is_user_logged_in() ) {
67
+			&& ( 'activecourses' == $instance['component'] || 'completedcourses' == $instance['component'] )
68
+			&& !is_user_logged_in() ) {
69 69
 
70 70
 			// No Output
71
-            return;
71
+			return;
72 72
 
73 73
 		} else {
74 74
 			/* Our variables from the widget settings. */
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
 	 * @param  array $instance The settings for this instance.
131 131
 	 * @return void
132 132
 	 */
133
-    public function form( $instance ) {
133
+	public function form( $instance ) {
134 134
 
135 135
 		/* Set up some default widget settings. */
136 136
 		/* Make sure all keys are added here, even with empty string values. */
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
 	/**
169 169
 	 * Load the desired component, if a method is available for it.
170 170
 	 * @param  string $component The component to potentially be loaded.
171
-     *
171
+	 *
172 172
 	 * @since  1.0.0
173 173
 	 * @return void
174 174
 	 */
@@ -207,24 +207,24 @@  discard block
 block discarded – undo
207 207
 
208 208
 		}
209 209
 
210
-        if ( ! empty( $course_ids ) ) {
210
+		if ( ! empty( $course_ids ) ) {
211 211
 
212
-            $posts_array = Sensei()->course->course_query( intval( $instance['limit'] ), esc_attr( $instance['component'] ), $course_ids );
212
+			$posts_array = Sensei()->course->course_query( intval( $instance['limit'] ), esc_attr( $instance['component'] ), $course_ids );
213 213
 
214 214
 		} else {
215 215
 
216
-            if ( 'activecourses' == esc_attr( $instance['component'] ) || 'completedcourses' == esc_attr( $instance['component'] ) ) {
216
+			if ( 'activecourses' == esc_attr( $instance['component'] ) || 'completedcourses' == esc_attr( $instance['component'] ) ) {
217 217
 				$posts_array = array();
218 218
 
219
-            } else {
219
+			} else {
220 220
 
221
-                $course_args = array(
222
-                    'post_type' => 'course',
223
-                    'orderby'         	=> 'date',
224
-                    'order'           	=> 'DESC',
225
-                    'post_status'      	=> 'publish',
226
-                    'posts_per_page' => $instance['limit'],
227
-                );
221
+				$course_args = array(
222
+					'post_type' => 'course',
223
+					'orderby'         	=> 'date',
224
+					'order'           	=> 'DESC',
225
+					'post_status'      	=> 'publish',
226
+					'posts_per_page' => $instance['limit'],
227
+				);
228 228
 
229 229
 				$posts_array = get_posts( $course_args );
230 230
 			}
@@ -234,13 +234,13 @@  discard block
 block discarded – undo
234 234
 		if ( count( $posts_array ) > 0 ) { ?>
235 235
 			<ul>
236 236
 			<?php foreach ($posts_array as $post_item){
237
-		    	$post_id = absint( $post_item->ID );
238
-		    	$post_title = $post_item->post_title;
239
-		    	$user_info = get_userdata( absint( $post_item->post_author ) );
240
-		    	$author_link = get_author_posts_url( absint( $post_item->post_author ) );
241
-		    	$author_display_name = $user_info->display_name;
242
-		    	$author_id = $post_item->post_author;
243
-		    ?>
237
+				$post_id = absint( $post_item->ID );
238
+				$post_title = $post_item->post_title;
239
+				$user_info = get_userdata( absint( $post_item->post_author ) );
240
+				$author_link = get_author_posts_url( absint( $post_item->post_author ) );
241
+				$author_display_name = $user_info->display_name;
242
+				$author_id = $post_item->post_author;
243
+			?>
244 244
 		    	<li class="fix">
245 245
 		    		<?php do_action( 'sensei_course_image', $post_id ); ?>
246 246
 		    		<a href="<?php echo esc_url( get_permalink( $post_id ) ); ?>" title="<?php echo esc_attr( $post_title ); ?>"><?php echo $post_title; ?></a>
@@ -255,9 +255,9 @@  discard block
 block discarded – undo
255 255
 		    	</li>
256 256
 		    <?php } // End For Loop ?>
257 257
 		    <?php if ( 'activecourses' == esc_attr( $instance['component'] ) || 'completedcourses' == esc_attr( $instance['component'] ) ) {
258
-		    	$my_account_page_id = intval( Sensei()->settings->settings[ 'my_course_page' ] );
259
-		    	echo '<li class="my-account fix"><a href="'. esc_url( get_permalink( $my_account_page_id ) ) .'">'.__('My Courses', 'woothemes-sensei').' <span class="meta-nav"></span></a></li>';
260
-		    } // End If Statement ?>
258
+				$my_account_page_id = intval( Sensei()->settings->settings[ 'my_course_page' ] );
259
+				echo '<li class="my-account fix"><a href="'. esc_url( get_permalink( $my_account_page_id ) ) .'">'.__('My Courses', 'woothemes-sensei').' <span class="meta-nav"></span></a></li>';
260
+			} // End If Statement ?>
261 261
 		</ul>
262 262
 		<?php } else {
263 263
 			// No posts returned. This means the user either has no active or no completed courses.
Please login to merge, or discard this patch.
templates/teacher-archive.php 1 patch
Indentation   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -1,31 +1,31 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * The Template for displaying teacher author archives, this template wil show the teacher
4
- * and all course that belong to to them.
5
- *
6
- * Override this template by copying it to your_theme/sensei/teacher-archive.php
7
- *
8
- * @author 		Automattic
9
- * @package 	Sensei
10
- * @category    Templates
11
- * @version     1.9.0
12
- */
3
+		 * The Template for displaying teacher author archives, this template wil show the teacher
4
+		 * and all course that belong to to them.
5
+		 *
6
+		 * Override this template by copying it to your_theme/sensei/teacher-archive.php
7
+		 *
8
+		 * @author 		Automattic
9
+		 * @package 	Sensei
10
+		 * @category    Templates
11
+		 * @version     1.9.0
12
+		 */
13 13
 ?>
14 14
 
15 15
 <?php  get_sensei_header();  ?>
16 16
 
17 17
     <?php
18 18
 
19
-        /**
20
-         * This action before teacher courses loop. This hook fires within the archive-course.php
21
-         * It fires even if the current archive has no posts.
22
-         *
23
-         * @since 1.9.0
24
-         *
25
-         */
26
-        do_action( 'sensei_teacher_archive_course_loop_before' );
19
+		/**
20
+		 * This action before teacher courses loop. This hook fires within the archive-course.php
21
+		 * It fires even if the current archive has no posts.
22
+		 *
23
+		 * @since 1.9.0
24
+		 *
25
+		 */
26
+		do_action( 'sensei_teacher_archive_course_loop_before' );
27 27
 
28
-    ?>
28
+	?>
29 29
 
30 30
     <?php if ( have_posts() ): ?>
31 31
 
@@ -39,14 +39,14 @@  discard block
 block discarded – undo
39 39
 
40 40
     <?php
41 41
 
42
-        /**
43
-         * This action runs after including the teacher archive loop. This hook fires within the teacher-archive.php
44
-         * It fires even if the current archive has no posts.
45
-         *
46
-         * @since 1.9.0
47
-         */
48
-        do_action( 'sensei_teacher_archive_course_loop_after' );
42
+		/**
43
+		 * This action runs after including the teacher archive loop. This hook fires within the teacher-archive.php
44
+		 * It fires even if the current archive has no posts.
45
+		 *
46
+		 * @since 1.9.0
47
+		 */
48
+		do_action( 'sensei_teacher_archive_course_loop_after' );
49 49
 
50
-    ?>
50
+	?>
51 51
 
52 52
 <?php get_sensei_footer(); ?>
Please login to merge, or discard this patch.
templates/archive-lesson.php 1 patch
Indentation   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -1,29 +1,29 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * The Template for displaying lesson archives, including the lesson page template.
4
- * This template also handels the lesson modules taxonomy and the lessons_tag taxonomy.
5
- *
6
- * Override this template by copying it to your_theme/sensei/archive-lesson.php
7
- *
8
- * @author 		Automattic
9
- * @package 	Sensei
10
- * @category    Templates
11
- * @version     1.9.0
12
- */
3
+	 * The Template for displaying lesson archives, including the lesson page template.
4
+	 * This template also handels the lesson modules taxonomy and the lessons_tag taxonomy.
5
+	 *
6
+	 * Override this template by copying it to your_theme/sensei/archive-lesson.php
7
+	 *
8
+	 * @author 		Automattic
9
+	 * @package 	Sensei
10
+	 * @category    Templates
11
+	 * @version     1.9.0
12
+	 */
13 13
 ?>
14 14
 
15 15
 <?php  get_sensei_header();  ?>
16 16
 
17 17
     <?php
18 18
 
19
-        /**
20
-         * Action before lesson archive loop. This action runs within the archive-lesson.php.
21
-         *
22
-         * It will be executed even if there are no posts on the archive page.
23
-         */
24
-        do_action( 'sensei_archive_before_lesson_loop' );
19
+		/**
20
+		 * Action before lesson archive loop. This action runs within the archive-lesson.php.
21
+		 *
22
+		 * It will be executed even if there are no posts on the archive page.
23
+		 */
24
+		do_action( 'sensei_archive_before_lesson_loop' );
25 25
 
26
-    ?>
26
+	?>
27 27
 
28 28
     <?php if ( have_posts() ): ?>
29 29
 
@@ -37,12 +37,12 @@  discard block
 block discarded – undo
37 37
 
38 38
     <?php
39 39
 
40
-        /**
41
-         * Action after lesson archive  loop on the archive-lesson.php template file
42
-         * It will be executed even if there are no posts on the archive page.
43
-         *
44
-         * @since 1.9.0
45
-         */
46
-        do_action( 'sensei_archive_after_lesson_loop' );
47
-    ?>
40
+		/**
41
+		 * Action after lesson archive  loop on the archive-lesson.php template file
42
+		 * It will be executed even if there are no posts on the archive page.
43
+		 *
44
+		 * @since 1.9.0
45
+		 */
46
+		do_action( 'sensei_archive_after_lesson_loop' );
47
+	?>
48 48
 <?php get_sensei_footer(); ?>
Please login to merge, or discard this patch.
templates/loop-lesson.php 1 patch
Indentation   +39 added lines, -39 removed lines patch added patch discarded remove patch
@@ -1,65 +1,65 @@
 block discarded – undo
1 1
 <?php
2 2
 if ( ! defined( 'ABSPATH' ) ) exit;
3 3
 /**
4
- * The Template for outputting Lesson Archive items
5
- *
6
- * Override this template by copying it to yourtheme/sensei/loop-lesson.php
7
- *
8
- * @author 		Automattic
9
- * @package 	Sensei
10
- * @category    Templates
11
- * @version     1.9.0
12
- */
4
+	 * The Template for outputting Lesson Archive items
5
+	 *
6
+	 * Override this template by copying it to yourtheme/sensei/loop-lesson.php
7
+	 *
8
+	 * @author 		Automattic
9
+	 * @package 	Sensei
10
+	 * @category    Templates
11
+	 * @version     1.9.0
12
+	 */
13 13
 ?>
14 14
 
15 15
 <?php
16 16
 /**
17
- * This runs before the post type items in the loop-lesson.php template.
18
- *
19
- * @since 1.9
20
- */
17
+	 * This runs before the post type items in the loop-lesson.php template.
18
+	 *
19
+	 * @since 1.9
20
+	 */
21 21
 do_action( 'sensei_loop_lesson_before' );
22 22
 ?>
23 23
 
24 24
 <section class="lesson-container" >
25 25
 
26 26
     <?php
27
-    /**
28
-     * This runs before the lesson items in the loop-lesson.php template.
29
-     *
30
-     * @since 1.9.0
31
-     *
32
-     * @hooked Sensei()->lesson->lesson_tag_archive_description - 11
33
-     * @hooked Sensei()->lesson->the_archive_header - 20
34
-     */
35
-    do_action( 'sensei_loop_lesson_inside_before' );
36
-    ?>
27
+	/**
28
+	 * This runs before the lesson items in the loop-lesson.php template.
29
+	 *
30
+	 * @since 1.9.0
31
+	 *
32
+	 * @hooked Sensei()->lesson->lesson_tag_archive_description - 11
33
+	 * @hooked Sensei()->lesson->the_archive_header - 20
34
+	 */
35
+	do_action( 'sensei_loop_lesson_inside_before' );
36
+	?>
37 37
 
38 38
 
39 39
     <?php
40
-    //Loop through all lessons
41
-    while ( have_posts() ) { the_post();
40
+	//Loop through all lessons
41
+	while ( have_posts() ) { the_post();
42 42
 
43
-        sensei_load_template_part( 'content', 'lesson' );
43
+		sensei_load_template_part( 'content', 'lesson' );
44 44
 
45
-    }
46
-    ?>
45
+	}
46
+	?>
47 47
 
48 48
     <?php
49
-    /**
50
-     * This runs inside the <ul> after the lesson items in the loop-lesson.php template.
51
-     *
52
-     * @since 1.9.0
53
-     */
54
-    do_action( 'sensei_loop_lesson_inside_after' );
55
-    ?>
49
+	/**
50
+	 * This runs inside the <ul> after the lesson items in the loop-lesson.php template.
51
+	 *
52
+	 * @since 1.9.0
53
+	 */
54
+	do_action( 'sensei_loop_lesson_inside_after' );
55
+	?>
56 56
 
57 57
 </section>
58 58
 
59 59
 <?php
60 60
 /**
61
- * This runs after the lesson items <ul> in the loop-lesson.php template.
62
- *
63
- * @since 1.9.0
64
- */
61
+	 * This runs after the lesson items <ul> in the loop-lesson.php template.
62
+	 *
63
+	 * @since 1.9.0
64
+	 */
65 65
 do_action( 'sensei_loop_lesson_after' );
Please login to merge, or discard this patch.
templates/globals/pagination.php 1 patch
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -13,23 +13,23 @@
 block discarded – undo
13 13
 global $wp_query;
14 14
 
15 15
 if ( $wp_query->max_num_pages <= 1 ) {
16
-    return;
16
+	return;
17 17
 }
18 18
 
19 19
 ?>
20 20
 <nav class="sensei-pagination">
21 21
     <?php
22
-    echo paginate_links( apply_filters( 'sensei_pagination_args', array(
23
-        'base'         => esc_url_raw( str_replace( 999999999, '%#%', get_pagenum_link( 999999999, false ) ) ),
24
-        'format'       => '',
25
-        'add_args'     => '',
26
-        'current'      => max( 1, get_query_var( 'paged' ) ),
27
-        'total'        => $wp_query->max_num_pages,
28
-        'prev_text'    => '&larr;',
29
-        'next_text'    => '&rarr;',
30
-        'type'         => 'list',
31
-        'end_size'     => 3,
32
-        'mid_size'     => 3
33
-    ) ) );
34
-    ?>
22
+	echo paginate_links( apply_filters( 'sensei_pagination_args', array(
23
+		'base'         => esc_url_raw( str_replace( 999999999, '%#%', get_pagenum_link( 999999999, false ) ) ),
24
+		'format'       => '',
25
+		'add_args'     => '',
26
+		'current'      => max( 1, get_query_var( 'paged' ) ),
27
+		'total'        => $wp_query->max_num_pages,
28
+		'prev_text'    => '&larr;',
29
+		'next_text'    => '&rarr;',
30
+		'type'         => 'list',
31
+		'end_size'     => 3,
32
+		'mid_size'     => 3
33
+	) ) );
34
+	?>
35 35
 </nav>
Please login to merge, or discard this patch.
templates/emails/header.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -107,11 +107,11 @@
 block discarded – undo
107 107
             	<tr>
108 108
                 	<td align="center" valign="top">
109 109
                 		<?php
110
-                			if ( isset( Sensei()->settings->settings['email_header_image'] ) && '' != Sensei()->settings->settings['email_header_image'] ) {
111
-                				$img = Sensei()->settings->settings['email_header_image'];
112
-                				echo '<p style="margin-top:0;"><img src="' . esc_url( $img ) . '" alt="' . get_bloginfo( 'name' ) . '" /></p>';
113
-                			}
114
-                		?>
110
+							if ( isset( Sensei()->settings->settings['email_header_image'] ) && '' != Sensei()->settings->settings['email_header_image'] ) {
111
+								$img = Sensei()->settings->settings['email_header_image'];
112
+								echo '<p style="margin-top:0;"><img src="' . esc_url( $img ) . '" alt="' . get_bloginfo( 'name' ) . '" /></p>';
113
+							}
114
+						?>
115 115
                     	<table border="0" cellpadding="0" cellspacing="0" width="600" id="template_container" style="<?php echo $template_container; ?>">
116 116
                         	<tr>
117 117
                             	<td align="center" valign="top">
Please login to merge, or discard this patch.
templates/emails/admin-teacher-new-course-created.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -35,9 +35,9 @@
 block discarded – undo
35 35
 <p style="<?php echo esc_attr( $style_small ); ?>">
36 36
     <?php
37 37
 
38
-    echo __( 'You can review and publish the new course here:  ', 'woothemes-sensei' ) . '<a href="' . esc_url( $sensei_email_data['course_edit_link'] ) . '">'. $sensei_email_data['course_name']. '</a>';
38
+	echo __( 'You can review and publish the new course here:  ', 'woothemes-sensei' ) . '<a href="' . esc_url( $sensei_email_data['course_edit_link'] ) . '">'. $sensei_email_data['course_name']. '</a>';
39 39
 
40
-    ?>
40
+	?>
41 41
 </p>
42 42
 
43 43
 <?php
Please login to merge, or discard this patch.
templates/emails/teacher-new-course-assignment.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -35,9 +35,9 @@
 block discarded – undo
35 35
 <p style="<?php echo esc_attr( $style_small ); ?>">
36 36
     <?php
37 37
 
38
-    echo __( 'You can edit the assigned course here: ', 'woothemes-sensei' ) . '<a href="' . esc_url( $sensei_email_data['course_edit_link'] ) . '">'. $sensei_email_data['course_name'] . '</a>';
38
+	echo __( 'You can edit the assigned course here: ', 'woothemes-sensei' ) . '<a href="' . esc_url( $sensei_email_data['course_edit_link'] ) . '">'. $sensei_email_data['course_name'] . '</a>';
39 39
 
40
-    ?>
40
+	?>
41 41
 </p>
42 42
 
43 43
 <?php
Please login to merge, or discard this patch.
templates/emails/footer.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -15,14 +15,14 @@
 block discarded – undo
15 15
 // Load colours
16 16
 $base = '#557da1';
17 17
 if( isset( Sensei()->settings->settings['email_base_color'] ) && '' != Sensei()->settings->settings['email_base_color'] ) {
18
-    $base = Sensei()->settings->settings['email_base_color'];
18
+	$base = Sensei()->settings->settings['email_base_color'];
19 19
 }
20 20
 
21 21
 $base_lighter_40 = sensei_hex_lighter( $base, 40 );
22 22
 
23 23
 $footer_text = sprintf( __( '%1$s - Powered by Sensei', 'woothemes-sensei' ), get_bloginfo( 'name' ) );
24 24
 if( isset( Sensei()->settings->settings['email_footer_text'] ) ) {
25
-    $footer_text = Sensei()->settings->settings['email_footer_text'];
25
+	$footer_text = Sensei()->settings->settings['email_footer_text'];
26 26
 }
27 27
 
28 28
 // For gmail compatibility, including CSS styles in head/body are stripped out therefore styles need to be inline. These variables contain rules which are added to the template inline.
Please login to merge, or discard this patch.