Completed
Push — master ( ec0479...7d92ba )
by Dwain
11:56
created
templates/single-quiz.php 3 patches
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
  */
12 12
 ?>
13 13
 
14
-<?php  get_sensei_header();  ?>
14
+<?php  get_sensei_header(); ?>
15 15
 
16 16
 <article <?php post_class(); ?>>
17 17
 
@@ -27,15 +27,15 @@  discard block
 block discarded – undo
27 27
          * @param $quiz_id
28 28
          *
29 29
          */
30
-        do_action( 'sensei_single_quiz_content_inside_before', get_the_ID() );
30
+        do_action('sensei_single_quiz_content_inside_before', get_the_ID());
31 31
 
32 32
     ?>
33 33
 
34 34
     <section class="entry quiz-questions">
35 35
 
36
-        <?php if ( sensei_quiz_has_questions() ): ?>
36
+        <?php if (sensei_quiz_has_questions()): ?>
37 37
 
38
-            <form method="POST" action="<?php echo esc_url_raw( get_permalink() ); ?>" enctype="multipart/form-data">
38
+            <form method="POST" action="<?php echo esc_url_raw(get_permalink()); ?>" enctype="multipart/form-data">
39 39
 
40 40
                 <?php
41 41
 
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
                      *
47 47
                      * @param string $the_quiz_id
48 48
                      */
49
-                    do_action( 'sensei_single_quiz_questions_before', get_the_id() );
49
+                    do_action('sensei_single_quiz_questions_before', get_the_id());
50 50
 
51 51
                 ?>
52 52
 
@@ -54,9 +54,9 @@  discard block
 block discarded – undo
54 54
 
55 55
                 <ol id="sensei-quiz-list">
56 56
 
57
-                <?php while ( sensei_quiz_has_questions() ): sensei_setup_the_question(); ?>
57
+                <?php while (sensei_quiz_has_questions()): sensei_setup_the_question(); ?>
58 58
 
59
-                    <li class="<?php sensei_the_question_class();?>">
59
+                    <li class="<?php sensei_the_question_class(); ?>">
60 60
 
61 61
                         <?php
62 62
 
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
                              * @since 1.9.0
72 72
                              * @param string $the_question_id
73 73
                              */
74
-                            do_action( 'sensei_quiz_question_inside_before', sensei_get_the_question_id() );
74
+                            do_action('sensei_quiz_question_inside_before', sensei_get_the_question_id());
75 75
 
76 76
                         ?>
77 77
 
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
                              *
87 87
                              * @param string $the_question_id
88 88
                              */
89
-                            do_action( 'sensei_quiz_question_inside_after', sensei_get_the_question_id() );
89
+                            do_action('sensei_quiz_question_inside_after', sensei_get_the_question_id());
90 90
 
91 91
                         ?>
92 92
 
@@ -103,21 +103,21 @@  discard block
 block discarded – undo
103 103
                      *
104 104
                      * @param string $the_quiz_id
105 105
                      */
106
-                    do_action( 'sensei_single_quiz_questions_after', get_the_id() );
106
+                    do_action('sensei_single_quiz_questions_after', get_the_id());
107 107
 
108 108
                 ?>
109 109
 
110 110
             </form>
111 111
         <?php else:  ?>
112 112
 
113
-            <div class="sensei-message alert"> <?php _e( 'There are no questions for this Quiz yet. Check back soon.', 'woothemes-sensei' ); ?></div>
113
+            <div class="sensei-message alert"> <?php _e('There are no questions for this Quiz yet. Check back soon.', 'woothemes-sensei'); ?></div>
114 114
 
115 115
         <?php endif; // End If have questions ?>
116 116
 
117 117
 
118 118
         <?php
119 119
             $quiz_lesson = Sensei()->quiz->data->quiz_lesson;
120
-            do_action( 'sensei_quiz_back_link', $quiz_lesson  );
120
+            do_action('sensei_quiz_back_link', $quiz_lesson);
121 121
         ?>
122 122
 
123 123
     </section>
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
      * @hooked
133 133
      *
134 134
      */
135
-    do_action( 'sensei_single_quiz_content_inside_after' );
135
+    do_action('sensei_single_quiz_content_inside_after');
136 136
 
137 137
     ?>
138 138
 
Please login to merge, or discard this patch.
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -108,9 +108,12 @@
 block discarded – undo
108 108
                 ?>
109 109
 
110 110
             </form>
111
-        <?php else:  ?>
111
+        <?php else {
112
+	:  ?>
112 113
 
113
-            <div class="sensei-message alert"> <?php _e( 'There are no questions for this Quiz yet. Check back soon.', 'woothemes-sensei' ); ?></div>
114
+            <div class="sensei-message alert"> <?php _e( 'There are no questions for this Quiz yet. Check back soon.', 'woothemes-sensei' );
115
+}
116
+?></div>
114 117
 
115 118
         <?php endif; // End If have questions ?>
116 119
 
Please login to merge, or discard this patch.
Indentation   +74 added lines, -74 removed lines patch added patch discarded remove patch
@@ -1,14 +1,14 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * The Template for displaying all Quiz Questions.
4
- *
5
- * Override this template by copying it to yourtheme/sensei/single-quiz.php
6
- *
7
- * @author 		Automattic
8
- * @package 	Sensei
9
- * @category    Templates
10
- * @version     1.9.0
11
- */
3
+	 * The Template for displaying all Quiz Questions.
4
+	 *
5
+	 * Override this template by copying it to yourtheme/sensei/single-quiz.php
6
+	 *
7
+	 * @author 		Automattic
8
+	 * @package 	Sensei
9
+	 * @category    Templates
10
+	 * @version     1.9.0
11
+	 */
12 12
 ?>
13 13
 
14 14
 <?php  get_sensei_header();  ?>
@@ -17,19 +17,19 @@  discard block
 block discarded – undo
17 17
 
18 18
     <?php
19 19
 
20
-        /**
21
-         * Hook inside the single quiz post above the content
22
-         *
23
-         * @since 1.9.0
24
-         *
25
-         * @hooked Sensei_Quiz::the_title               - 20
26
-         * @hooked Sensei_Quiz::the_user_status_message - 40
27
-         * @param $quiz_id
28
-         *
29
-         */
30
-        do_action( 'sensei_single_quiz_content_inside_before', get_the_ID() );
20
+		/**
21
+		 * Hook inside the single quiz post above the content
22
+		 *
23
+		 * @since 1.9.0
24
+		 *
25
+		 * @hooked Sensei_Quiz::the_title               - 20
26
+		 * @hooked Sensei_Quiz::the_user_status_message - 40
27
+		 * @param $quiz_id
28
+		 *
29
+		 */
30
+		do_action( 'sensei_single_quiz_content_inside_before', get_the_ID() );
31 31
 
32
-    ?>
32
+	?>
33 33
 
34 34
     <section class="entry quiz-questions">
35 35
 
@@ -39,16 +39,16 @@  discard block
 block discarded – undo
39 39
 
40 40
                 <?php
41 41
 
42
-                    /**
43
-                     * Action inside before the question content on single-quiz page
44
-                     *
45
-                     * @hooked WooThemes_Sensei_Quiz::the_user_status_message  - 10
46
-                     *
47
-                     * @param string $the_quiz_id
48
-                     */
49
-                    do_action( 'sensei_single_quiz_questions_before', get_the_id() );
42
+					/**
43
+					 * Action inside before the question content on single-quiz page
44
+					 *
45
+					 * @hooked WooThemes_Sensei_Quiz::the_user_status_message  - 10
46
+					 *
47
+					 * @param string $the_quiz_id
48
+					 */
49
+					do_action( 'sensei_single_quiz_questions_before', get_the_id() );
50 50
 
51
-                ?>
51
+				?>
52 52
 
53 53
 
54 54
 
@@ -60,35 +60,35 @@  discard block
 block discarded – undo
60 60
 
61 61
                         <?php
62 62
 
63
-                            /**
64
-                             * Action inside before the question content on single-quiz page
65
-                             *
66
-                             * @hooked WooThemes_Sensei_Question::the_question_title        - 10
67
-                             * @hooked WooThemes_Sensei_Question::the_question_description  - 20
68
-                             * @hooked WooThemes_Sensei_Question::the_question_media        - 30
69
-                             * @hooked WooThemes_Sensei_Question::the_question_hidden_field - 40
70
-                             *
71
-                             * @since 1.9.0
72
-                             * @param string $the_question_id
73
-                             */
74
-                            do_action( 'sensei_quiz_question_inside_before', sensei_get_the_question_id() );
75
-
76
-                        ?>
63
+							/**
64
+							 * Action inside before the question content on single-quiz page
65
+							 *
66
+							 * @hooked WooThemes_Sensei_Question::the_question_title        - 10
67
+							 * @hooked WooThemes_Sensei_Question::the_question_description  - 20
68
+							 * @hooked WooThemes_Sensei_Question::the_question_media        - 30
69
+							 * @hooked WooThemes_Sensei_Question::the_question_hidden_field - 40
70
+							 *
71
+							 * @since 1.9.0
72
+							 * @param string $the_question_id
73
+							 */
74
+							do_action( 'sensei_quiz_question_inside_before', sensei_get_the_question_id() );
75
+
76
+						?>
77 77
 
78 78
                         <?php sensei_the_question_content(); ?>
79 79
 
80 80
                         <?php
81 81
 
82
-                            /**
83
-                             * Action inside before the question content on single-quiz page
84
-                             *
85
-                             * @hooked WooThemes_Sensei_Question::answer_feedback_notes
86
-                             *
87
-                             * @param string $the_question_id
88
-                             */
89
-                            do_action( 'sensei_quiz_question_inside_after', sensei_get_the_question_id() );
82
+							/**
83
+							 * Action inside before the question content on single-quiz page
84
+							 *
85
+							 * @hooked WooThemes_Sensei_Question::answer_feedback_notes
86
+							 *
87
+							 * @param string $the_question_id
88
+							 */
89
+							do_action( 'sensei_quiz_question_inside_after', sensei_get_the_question_id() );
90 90
 
91
-                        ?>
91
+						?>
92 92
 
93 93
                     </li>
94 94
 
@@ -98,14 +98,14 @@  discard block
 block discarded – undo
98 98
 
99 99
                 <?php
100 100
 
101
-                    /**
102
-                     * Action inside before the question content on single-quiz page
103
-                     *
104
-                     * @param string $the_quiz_id
105
-                     */
106
-                    do_action( 'sensei_single_quiz_questions_after', get_the_id() );
101
+					/**
102
+					 * Action inside before the question content on single-quiz page
103
+					 *
104
+					 * @param string $the_quiz_id
105
+					 */
106
+					do_action( 'sensei_single_quiz_questions_after', get_the_id() );
107 107
 
108
-                ?>
108
+				?>
109 109
 
110 110
             </form>
111 111
         <?php else:  ?>
@@ -116,25 +116,25 @@  discard block
 block discarded – undo
116 116
 
117 117
 
118 118
         <?php
119
-            $quiz_lesson = Sensei()->quiz->data->quiz_lesson;
120
-            do_action( 'sensei_quiz_back_link', $quiz_lesson  );
121
-        ?>
119
+			$quiz_lesson = Sensei()->quiz->data->quiz_lesson;
120
+			do_action( 'sensei_quiz_back_link', $quiz_lesson  );
121
+		?>
122 122
 
123 123
     </section>
124 124
 
125 125
     <?php
126 126
 
127
-    /**
128
-     * Hook inside the single quiz post above the content
129
-     *
130
-     * @since 1.9.0
131
-     *
132
-     * @hooked
133
-     *
134
-     */
135
-    do_action( 'sensei_single_quiz_content_inside_after' );
136
-
137
-    ?>
127
+	/**
128
+	 * Hook inside the single quiz post above the content
129
+	 *
130
+	 * @since 1.9.0
131
+	 *
132
+	 * @hooked
133
+	 *
134
+	 */
135
+	do_action( 'sensei_single_quiz_content_inside_after' );
136
+
137
+	?>
138 138
 
139 139
 </article><!-- .quiz -->
140 140
 
Please login to merge, or discard this patch.
templates/course-results.php 2 patches
Indentation   +43 added lines, -43 removed lines patch added patch discarded remove patch
@@ -1,26 +1,26 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * The Template for displaying course archives, including the course page template.
4
- *
5
- * Override this template by copying it to yourtheme/sensei/archive-course.php
6
- *
7
- * @author 		Automattic
8
- * @package 	Sensei
9
- * @category    Templates
10
- * @version     1.9.0
11
- */
3
+	 * The Template for displaying course archives, including the course page template.
4
+	 *
5
+	 * Override this template by copying it to yourtheme/sensei/archive-course.php
6
+	 *
7
+	 * @author 		Automattic
8
+	 * @package 	Sensei
9
+	 * @category    Templates
10
+	 * @version     1.9.0
11
+	 */
12 12
 ?>
13 13
 
14 14
 <?php  get_sensei_header();  ?>
15 15
 
16 16
 <?php
17 17
 /**
18
- * This hook fire inside learner-profile.php before the content
19
- *
20
- * @since 1.9.0
21
- *
22
- * @hooked Sensei_Course_Results::deprecate_sensei_course_results_content_hook() - 20
23
- */
18
+	 * This hook fire inside learner-profile.php before the content
19
+	 *
20
+	 * @since 1.9.0
21
+	 *
22
+	 * @hooked Sensei_Course_Results::deprecate_sensei_course_results_content_hook() - 20
23
+	 */
24 24
 do_action( 'sensei_course_results_content_before' );
25 25
 ?>
26 26
 
@@ -34,15 +34,15 @@  discard block
 block discarded – undo
34 34
     <section class="entry fix">
35 35
 
36 36
         <?php
37
-        /**
38
-         * This hook fire inside learner-profile.php inside directly before the content
39
-         *
40
-         * @since 1.9.0
41
-         *
42
-         * @hooked Sensei_Course_Results::fire_sensei_message_hook() - 20
43
-         */
44
-        do_action( 'sensei_course_results_content_inside_before' );
45
-        ?>
37
+		/**
38
+		 * This hook fire inside learner-profile.php inside directly before the content
39
+		 *
40
+		 * @since 1.9.0
41
+		 *
42
+		 * @hooked Sensei_Course_Results::fire_sensei_message_hook() - 20
43
+		 */
44
+		do_action( 'sensei_course_results_content_inside_before' );
45
+		?>
46 46
 
47 47
         <header>
48 48
 
@@ -56,27 +56,27 @@  discard block
 block discarded – undo
56 56
 
57 57
             <section class="course-results-lessons">
58 58
                 <?php
59
-                $started_course = WooThemes_Sensei_Utils::user_started_course( $course->ID, get_current_user_id() );
60
-                if( $started_course ) {
59
+				$started_course = WooThemes_Sensei_Utils::user_started_course( $course->ID, get_current_user_id() );
60
+				if( $started_course ) {
61 61
 
62
-                    sensei_the_course_results_lessons();
62
+					sensei_the_course_results_lessons();
63 63
 
64
-                }
65
-                ?>
64
+				}
65
+				?>
66 66
             </section>
67 67
 
68 68
         <?php endif; ?>
69 69
 
70 70
         <?php
71
-        /**
72
-         * This hook fire inside learner-profile.php inside directly after the content
73
-         *
74
-         * @since 1.9.0
75
-         *
76
-         * @hooked Sensei()->course_results->course_info - 20
77
-         */
78
-        do_action( 'sensei_course_results_content_inside_after' );
79
-        ?>
71
+		/**
72
+		 * This hook fire inside learner-profile.php inside directly after the content
73
+		 *
74
+		 * @since 1.9.0
75
+		 *
76
+		 * @hooked Sensei()->course_results->course_info - 20
77
+		 */
78
+		do_action( 'sensei_course_results_content_inside_after' );
79
+		?>
80 80
 
81 81
     </section>
82 82
 
@@ -84,11 +84,11 @@  discard block
 block discarded – undo
84 84
 
85 85
 <?php
86 86
 /**
87
- * This hook fire inside course-results.php before the content
88
- *
89
- * @since 1.9.0
90
- *
91
- */
87
+		 * This hook fire inside course-results.php before the content
88
+		 *
89
+		 * @since 1.9.0
90
+		 *
91
+		 */
92 92
 do_action( 'sensei_course_results_content_after' );
93 93
 ?>
94 94
 
Please login to merge, or discard this patch.
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
  */
12 12
 ?>
13 13
 
14
-<?php  get_sensei_header();  ?>
14
+<?php  get_sensei_header(); ?>
15 15
 
16 16
 <?php
17 17
 /**
@@ -21,15 +21,15 @@  discard block
 block discarded – undo
21 21
  *
22 22
  * @hooked Sensei_Course_Results::deprecate_sensei_course_results_content_hook() - 20
23 23
  */
24
-do_action( 'sensei_course_results_content_before' );
24
+do_action('sensei_course_results_content_before');
25 25
 ?>
26 26
 
27 27
 <?php
28 28
 global $course;
29
-$course = get_page_by_path( $wp_query->query_vars['course_results'], OBJECT, 'course' );
29
+$course = get_page_by_path($wp_query->query_vars['course_results'], OBJECT, 'course');
30 30
 ?>
31 31
 
32
-<article <?php post_class( array( 'course', 'post','course-results' ) ); ?> >
32
+<article <?php post_class(array('course', 'post', 'course-results')); ?> >
33 33
 
34 34
     <section class="entry fix">
35 35
 
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
          *
42 42
          * @hooked Sensei_Course_Results::fire_sensei_message_hook() - 20
43 43
          */
44
-        do_action( 'sensei_course_results_content_inside_before' );
44
+        do_action('sensei_course_results_content_inside_before');
45 45
         ?>
46 46
 
47 47
         <header>
@@ -52,12 +52,12 @@  discard block
 block discarded – undo
52 52
 
53 53
         </header>
54 54
 
55
-        <?php if ( is_user_logged_in() ):?>
55
+        <?php if (is_user_logged_in()):?>
56 56
 
57 57
             <section class="course-results-lessons">
58 58
                 <?php
59
-                $started_course = WooThemes_Sensei_Utils::user_started_course( $course->ID, get_current_user_id() );
60
-                if( $started_course ) {
59
+                $started_course = WooThemes_Sensei_Utils::user_started_course($course->ID, get_current_user_id());
60
+                if ($started_course) {
61 61
 
62 62
                     sensei_the_course_results_lessons();
63 63
 
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
          *
76 76
          * @hooked Sensei()->course_results->course_info - 20
77 77
          */
78
-        do_action( 'sensei_course_results_content_inside_after' );
78
+        do_action('sensei_course_results_content_inside_after');
79 79
         ?>
80 80
 
81 81
     </section>
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
  * @since 1.9.0
90 90
  *
91 91
  */
92
-do_action( 'sensei_course_results_content_after' );
92
+do_action('sensei_course_results_content_after');
93 93
 ?>
94 94
 
95 95
 
Please login to merge, or discard this patch.
templates/teacher-archive.php 3 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
  */
13 13
 ?>
14 14
 
15
-<?php  get_sensei_header();  ?>
15
+<?php  get_sensei_header(); ?>
16 16
 
17 17
     <?php
18 18
 
@@ -23,17 +23,17 @@  discard block
 block discarded – undo
23 23
          * @since 1.9.0
24 24
          *
25 25
          */
26
-        do_action( 'sensei_teacher_archive_course_loop_before' );
26
+        do_action('sensei_teacher_archive_course_loop_before');
27 27
 
28 28
     ?>
29 29
 
30
-    <?php if ( have_posts() ): ?>
30
+    <?php if (have_posts()): ?>
31 31
 
32
-        <?php sensei_load_template( 'loop-course.php' ); ?>
32
+        <?php sensei_load_template('loop-course.php'); ?>
33 33
 
34 34
     <?php else: ?>
35 35
 
36
-        <p><?php _e( 'There are no courses for this teacher.', 'woothemes-sensei' ); ?></p>
36
+        <p><?php _e('There are no courses for this teacher.', 'woothemes-sensei'); ?></p>
37 37
 
38 38
     <?php  endif; // End If Statement ?>
39 39
 
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
          *
46 46
          * @since 1.9.0
47 47
          */
48
-        do_action( 'sensei_teacher_archive_course_loop_after' );
48
+        do_action('sensei_teacher_archive_course_loop_after');
49 49
 
50 50
     ?>
51 51
 
Please login to merge, or discard this patch.
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -31,9 +31,12 @@
 block discarded – undo
31 31
 
32 32
         <?php sensei_load_template( 'loop-course.php' ); ?>
33 33
 
34
-    <?php else: ?>
34
+    <?php else {
35
+	: ?>
35 36
 
36
-        <p><?php _e( 'There are no courses for this teacher.', 'woothemes-sensei' ); ?></p>
37
+        <p><?php _e( 'There are no courses for this teacher.', 'woothemes-sensei' );
38
+}
39
+?></p>
37 40
 
38 41
     <?php  endif; // End If Statement ?>
39 42
 
Please login to merge, or discard this 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 3 patches
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.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
  */
13 13
 ?>
14 14
 
15
-<?php  get_sensei_header();  ?>
15
+<?php  get_sensei_header(); ?>
16 16
 
17 17
     <?php
18 18
 
@@ -21,17 +21,17 @@  discard block
 block discarded – undo
21 21
          *
22 22
          * It will be executed even if there are no posts on the archive page.
23 23
          */
24
-        do_action( 'sensei_archive_before_lesson_loop' );
24
+        do_action('sensei_archive_before_lesson_loop');
25 25
 
26 26
     ?>
27 27
 
28
-    <?php if ( have_posts() ): ?>
28
+    <?php if (have_posts()): ?>
29 29
 
30
-        <?php sensei_load_template( 'loop-lesson.php' ); ?>
30
+        <?php sensei_load_template('loop-lesson.php'); ?>
31 31
 
32 32
     <?php else: ?>
33 33
 
34
-        <p><?php _e( 'No lessons found that match your selection.', 'woothemes-sensei' ); ?></p>
34
+        <p><?php _e('No lessons found that match your selection.', 'woothemes-sensei'); ?></p>
35 35
 
36 36
     <?php  endif; // End If Statement ?>
37 37
 
@@ -43,6 +43,6 @@  discard block
 block discarded – undo
43 43
          *
44 44
          * @since 1.9.0
45 45
          */
46
-        do_action( 'sensei_archive_after_lesson_loop' );
46
+        do_action('sensei_archive_after_lesson_loop');
47 47
     ?>
48 48
 <?php get_sensei_footer(); ?>
Please login to merge, or discard this patch.
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,9 +29,12 @@
 block discarded – undo
29 29
 
30 30
         <?php sensei_load_template( 'loop-lesson.php' ); ?>
31 31
 
32
-    <?php else: ?>
32
+    <?php else {
33
+	: ?>
33 34
 
34
-        <p><?php _e( 'No lessons found that match your selection.', 'woothemes-sensei' ); ?></p>
35
+        <p><?php _e( 'No lessons found that match your selection.', 'woothemes-sensei' );
36
+}
37
+?></p>
35 38
 
36 39
     <?php  endif; // End If Statement ?>
37 40
 
Please login to merge, or discard this patch.
templates/loop-lesson.php 3 patches
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.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if ( ! defined( 'ABSPATH' ) ) exit;
2
+if ( ! defined('ABSPATH')) exit;
3 3
 /**
4 4
  * The Template for outputting Lesson Archive items
5 5
  *
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
  *
19 19
  * @since 1.9
20 20
  */
21
-do_action( 'sensei_loop_lesson_before' );
21
+do_action('sensei_loop_lesson_before');
22 22
 ?>
23 23
 
24 24
 <section class="lesson-container" >
@@ -32,15 +32,15 @@  discard block
 block discarded – undo
32 32
      * @hooked Sensei()->lesson->lesson_tag_archive_description - 11
33 33
      * @hooked Sensei()->lesson->the_archive_header - 20
34 34
      */
35
-    do_action( 'sensei_loop_lesson_inside_before' );
35
+    do_action('sensei_loop_lesson_inside_before');
36 36
     ?>
37 37
 
38 38
 
39 39
     <?php
40 40
     //Loop through all lessons
41
-    while ( have_posts() ) { the_post();
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 45
     }
46 46
     ?>
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
      *
52 52
      * @since 1.9.0
53 53
      */
54
-    do_action( 'sensei_loop_lesson_inside_after' );
54
+    do_action('sensei_loop_lesson_inside_after');
55 55
     ?>
56 56
 
57 57
 </section>
@@ -62,4 +62,4 @@  discard block
 block discarded – undo
62 62
  *
63 63
  * @since 1.9.0
64 64
  */
65
-do_action( 'sensei_loop_lesson_after' );
65
+do_action('sensei_loop_lesson_after');
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,7 @@
 block discarded – undo
1 1
 <?php
2
-if ( ! defined( 'ABSPATH' ) ) exit;
2
+if ( ! defined( 'ABSPATH' ) ) {
3
+	exit;
4
+}
3 5
 /**
4 6
  * The Template for displaying the my course page data.
5 7
  *
Please login to merge, or discard this patch.
templates/globals/pagination-lesson.php 3 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,13 +1,13 @@
 block discarded – undo
1 1
 <?php
2 2
 if ( ! defined( 'ABSPATH' ) ) exit;
3 3
 /**
4
- * Pagination - Lesson
5
- *
6
- * @author 		Automattic
7
- * @package 	Sensei
8
- * @category    Templates
9
- * @version     1.9.0
10
- */
4
+	 * Pagination - Lesson
5
+	 *
6
+	 * @author 		Automattic
7
+	 * @package 	Sensei
8
+	 * @category    Templates
9
+	 * @version     1.9.0
10
+	 */
11 11
 
12 12
 global $post;
13 13
 $nav_id_array = sensei_get_prev_next_lessons( $post->ID );
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if ( ! defined( 'ABSPATH' ) ) exit;
2
+if ( ! defined('ABSPATH')) exit;
3 3
 /**
4 4
  * Pagination - Lesson
5 5
  *
@@ -10,13 +10,13 @@  discard block
 block discarded – undo
10 10
  */
11 11
 
12 12
 global $post;
13
-$nav_id_array = sensei_get_prev_next_lessons( $post->ID );
14
-$previous_lesson_id = absint( $nav_id_array['prev_lesson'] );
15
-$next_lesson_id = absint( $nav_id_array['next_lesson'] );
13
+$nav_id_array = sensei_get_prev_next_lessons($post->ID);
14
+$previous_lesson_id = absint($nav_id_array['prev_lesson']);
15
+$next_lesson_id = absint($nav_id_array['next_lesson']);
16 16
 // Output HTML
17
-if ( ( 0 < $previous_lesson_id ) || ( 0 < $next_lesson_id ) ) { ?>
17
+if ((0 < $previous_lesson_id) || (0 < $next_lesson_id)) { ?>
18 18
 	<nav id="post-entries" class="post-entries fix">
19
-        <?php if ( 0 < $previous_lesson_id ) { ?><div class="nav-prev fl"><a href="<?php echo esc_url( get_permalink( $previous_lesson_id ) ); ?>" rel="prev"><span class="meta-nav"></span> <?php echo get_the_title( $previous_lesson_id ); ?></a></div><?php } ?>
20
-        <?php if ( 0 < $next_lesson_id ) { ?><div class="nav-next fr"><a href="<?php echo esc_url( get_permalink( $next_lesson_id ) ); ?>" rel="prev"><span class="meta-nav"></span> <?php echo get_the_title( $next_lesson_id ); ?></a></div><?php } ?>
19
+        <?php if (0 < $previous_lesson_id) { ?><div class="nav-prev fl"><a href="<?php echo esc_url(get_permalink($previous_lesson_id)); ?>" rel="prev"><span class="meta-nav"></span> <?php echo get_the_title($previous_lesson_id); ?></a></div><?php } ?>
20
+        <?php if (0 < $next_lesson_id) { ?><div class="nav-next fr"><a href="<?php echo esc_url(get_permalink($next_lesson_id)); ?>" rel="prev"><span class="meta-nav"></span> <?php echo get_the_title($next_lesson_id); ?></a></div><?php } ?>
21 21
     </nav><!-- #post-entries -->
22 22
 <?php } ?>
23 23
\ No newline at end of file
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,7 @@
 block discarded – undo
1 1
 <?php
2
-if ( ! defined( 'ABSPATH' ) ) exit;
2
+if ( ! defined( 'ABSPATH' ) ) {
3
+	exit;
4
+}
3 5
 /**
4 6
  * The Template for displaying the my course page data.
5 7
  *
Please login to merge, or discard this patch.
templates/globals/wrapper-end.php 3 patches
Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -42,25 +42,25 @@
 block discarded – undo
42 42
 	<?php
43 43
 		break;
44 44
 
45
-    // IF Twenty Fifteen
46
-    case 'twentyfifteen' :
47
-        echo '</main> <!-- main-site -->'
48
-            . '</div> <!-- content-area -->';
49
-            get_sidebar();
50
-        break;
45
+	// IF Twenty Fifteen
46
+	case 'twentyfifteen' :
47
+		echo '</main> <!-- main-site -->'
48
+			. '</div> <!-- content-area -->';
49
+			get_sidebar();
50
+		break;
51 51
 
52
-    // IF Twenty Sixteen
53
-    case 'twentysixteen' :
54
-        echo '</main> <!-- main-site -->'
55
-            . '</div> <!-- content-area -->';
56
-            get_sidebar();
57
-        break;
58
-    // IF Storefront
59
-    case 'storefront' :
60
-        echo '</main> <!-- main-site -->'
61
-            . '</div> <!-- content-area -->';
62
-            get_sidebar();
63
-        break;
52
+	// IF Twenty Sixteen
53
+	case 'twentysixteen' :
54
+		echo '</main> <!-- main-site -->'
55
+			. '</div> <!-- content-area -->';
56
+			get_sidebar();
57
+		break;
58
+	// IF Storefront
59
+	case 'storefront' :
60
+		echo '</main> <!-- main-site -->'
61
+			. '</div> <!-- content-area -->';
62
+			get_sidebar();
63
+		break;
64 64
 
65 65
 	// Default
66 66
 	default :
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if ( ! defined( 'ABSPATH' ) ) exit;
2
+if ( ! defined('ABSPATH')) exit;
3 3
 /**
4 4
  * Content wrappers
5 5
  *
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
 
12 12
 $template = get_option('template');
13 13
 
14
-switch( $template ) {
14
+switch ($template) {
15 15
 
16 16
 	// IF Twenty Eleven
17 17
 	case 'twentyeleven' :
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,7 @@
 block discarded – undo
1 1
 <?php
2
-if ( ! defined( 'ABSPATH' ) ) exit;
2
+if ( ! defined( 'ABSPATH' ) ) {
3
+	exit;
4
+}
3 5
 /**
4 6
  * The Template for displaying the my course page data.
5 7
  *
Please login to merge, or discard this patch.
templates/globals/wrapper-start.php 3 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if ( ! defined( 'ABSPATH' ) ) exit;
2
+if ( ! defined('ABSPATH')) exit;
3 3
 /**
4 4
  * Content wrappers
5 5
  *
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
 
12 12
 $template = get_option('template');
13 13
 
14
-switch( $template ) {
14
+switch ($template) {
15 15
 
16 16
 	// IF Twenty Eleven
17 17
 	case 'twentyeleven' :
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,7 @@
 block discarded – undo
1 1
 <?php
2
-if ( ! defined( 'ABSPATH' ) ) exit;
2
+if ( ! defined( 'ABSPATH' ) ) {
3
+	exit;
4
+}
3 5
 /**
4 6
  * The Template for displaying the my course page data.
5 7
  *
Please login to merge, or discard this patch.
Indentation   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -28,11 +28,11 @@  discard block
 block discarded – undo
28 28
 		echo '<div id="main-content" class="main-content"><div id="primary" class="content-area"><div id="content" class="site-content" role="main"><div class="entry-content">';
29 29
 		break;
30 30
 
31
-    // IF Twenty Fifteen
32
-    case 'twentyfifteen':
33
-        echo '<div id="primary" class="content-area">'
34
-            .'<main id="main" class="site-main" role="main">';
35
-            ?>
31
+	// IF Twenty Fifteen
32
+	case 'twentyfifteen':
33
+		echo '<div id="primary" class="content-area">'
34
+			.'<main id="main" class="site-main" role="main">';
35
+			?>
36 36
             <style>
37 37
                 @media screen and (min-width: 59.6875em){
38 38
                     #main article.lesson,
@@ -61,19 +61,19 @@  discard block
 block discarded – undo
61 61
                 }
62 62
             </style>
63 63
             <?php
64
-        break;
64
+		break;
65 65
 
66
-    // IF Twenty Sixteen
67
-    case 'twentysixteen' :
68
-        echo '<div id="primary" class="content-area">'
69
-	        .'<main id="main" class="site-main" role="main">';
70
-        break;
66
+	// IF Twenty Sixteen
67
+	case 'twentysixteen' :
68
+		echo '<div id="primary" class="content-area">'
69
+			.'<main id="main" class="site-main" role="main">';
70
+		break;
71 71
 
72
-    // IF Storefront
73
-    case 'storefront' :
74
-        echo '<div id="primary" class="content-area">'
75
-            .'<main id="main" class="site-main" role="main">';
76
-        break;
72
+	// IF Storefront
73
+	case 'storefront' :
74
+		echo '<div id="primary" class="content-area">'
75
+			.'<main id="main" class="site-main" role="main">';
76
+		break;
77 77
 
78 78
 	// Default
79 79
 	default :
Please login to merge, or discard this patch.
templates/globals/pagination-posts.php 3 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -7,10 +7,10 @@
 block discarded – undo
7 7
  * @version     1.1.0
8 8
  */
9 9
 
10
-if ( ! defined( 'ABSPATH' ) ) exit;
10
+if ( ! defined('ABSPATH')) exit;
11 11
 
12 12
 ?>
13 13
 <nav id="post-entries" class="post-entries fix">
14
-    <div class="nav-prev fl"><?php previous_post_link( '%link', '<span class="meta-nav"></span> %title' ); ?></div>
15
-    <div class="nav-next fr"><?php next_post_link( '%link', '%title <span class="meta-nav"></span>' ); ?></div>
14
+    <div class="nav-prev fl"><?php previous_post_link('%link', '<span class="meta-nav"></span> %title'); ?></div>
15
+    <div class="nav-next fr"><?php next_post_link('%link', '%title <span class="meta-nav"></span>'); ?></div>
16 16
 </nav><!-- #post-entries -->
17 17
\ No newline at end of file
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,7 @@
 block discarded – undo
1 1
 <?php
2
-if ( ! defined( 'ABSPATH' ) ) exit;
2
+if ( ! defined( 'ABSPATH' ) ) {
3
+	exit;
4
+}
3 5
 /**
4 6
  * The Template for displaying the my course page data.
5 7
  *
Please login to merge, or discard this patch.
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,11 +1,11 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Pagination - Posts
4
- *
5
- * @author 		WooThemes
6
- * @package 	Sensei/Templates
7
- * @version     1.1.0
8
- */
3
+	 * Pagination - Posts
4
+	 *
5
+	 * @author 		WooThemes
6
+	 * @package 	Sensei/Templates
7
+	 * @version     1.1.0
8
+	 */
9 9
 
10 10
 if ( ! defined( 'ABSPATH' ) ) exit;
11 11
 
Please login to merge, or discard this patch.