| @@ -1,32 +1,32 @@ discard block | ||
| 1 | 1 | <?php | 
| 2 | 2 | if ( ! defined( 'ABSPATH' ) ) exit; | 
| 3 | 3 | /** | 
| 4 | - * List the Course Modules and Lesson in these modules | |
| 5 | - * | |
| 6 | - * Template is hooked into Single Course sensei_single_main_content. It will | |
| 7 | - * only be shown if the course contains modules. | |
| 8 | - * | |
| 9 | - * All lessons shown here will not be included in the list of other lessons. | |
| 10 | - * | |
| 11 | - * @author Automattic | |
| 12 | - * @package Sensei | |
| 13 | - * @category Templates | |
| 14 | - * @version 1.9.0 | |
| 15 | - */ | |
| 4 | + * List the Course Modules and Lesson in these modules | |
| 5 | + * | |
| 6 | + * Template is hooked into Single Course sensei_single_main_content. It will | |
| 7 | + * only be shown if the course contains modules. | |
| 8 | + * | |
| 9 | + * All lessons shown here will not be included in the list of other lessons. | |
| 10 | + * | |
| 11 | + * @author Automattic | |
| 12 | + * @package Sensei | |
| 13 | + * @category Templates | |
| 14 | + * @version 1.9.0 | |
| 15 | + */ | |
| 16 | 16 | ?> | 
| 17 | 17 | |
| 18 | 18 | <?php | 
| 19 | 19 | |
| 20 | - /** | |
| 21 | - * Hook runs inside single-course/course-modules.php | |
| 22 | - * | |
| 23 | - * It runs before the modules are shown. This hook fires on the single course page. It will show | |
| 24 | - * irrespective of irrespective the course has any modules or not. | |
| 25 | - * | |
| 26 | - * @since 1.8.0 | |
| 27 | - * | |
| 28 | - */ | |
| 29 | -    do_action('sensei_single_course_modules_before'); | |
| 20 | + /** | |
| 21 | + * Hook runs inside single-course/course-modules.php | |
| 22 | + * | |
| 23 | + * It runs before the modules are shown. This hook fires on the single course page. It will show | |
| 24 | + * irrespective of irrespective the course has any modules or not. | |
| 25 | + * | |
| 26 | + * @since 1.8.0 | |
| 27 | + * | |
| 28 | + */ | |
| 29 | +	do_action('sensei_single_course_modules_before'); | |
| 30 | 30 | |
| 31 | 31 | ?> | 
| 32 | 32 | |
| @@ -39,19 +39,19 @@ discard block | ||
| 39 | 39 | |
| 40 | 40 | <?php | 
| 41 | 41 | |
| 42 | - /** | |
| 43 | - * Hook runs inside single-course/course-modules.php | |
| 44 | - * | |
| 45 | - * It runs inside the if statement after the article tag opens just before the modules are shown. This hook will NOT fire if there | |
| 46 | - * are no modules to show. | |
| 47 | - * | |
| 48 | - * @since 1.9.0 | |
| 49 | - * | |
| 50 | - * @hooked Sensei()->modules->course_modules_title - 20 | |
| 51 | - */ | |
| 52 | -                do_action('sensei_single_course_modules_inside_before'); | |
| 42 | + /** | |
| 43 | + * Hook runs inside single-course/course-modules.php | |
| 44 | + * | |
| 45 | + * It runs inside the if statement after the article tag opens just before the modules are shown. This hook will NOT fire if there | |
| 46 | + * are no modules to show. | |
| 47 | + * | |
| 48 | + * @since 1.9.0 | |
| 49 | + * | |
| 50 | + * @hooked Sensei()->modules->course_modules_title - 20 | |
| 51 | + */ | |
| 52 | +				do_action('sensei_single_course_modules_inside_before'); | |
| 53 | 53 | |
| 54 | - ?> | |
| 54 | + ?> | |
| 55 | 55 | |
| 56 | 56 | <header> | 
| 57 | 57 | |
| @@ -90,8 +90,8 @@ discard block | ||
| 90 | 90 | <?php the_title(); ?> | 
| 91 | 91 | |
| 92 | 92 | <?php | 
| 93 | - $course_id = Sensei()->lesson->get_course_id( get_the_ID() ); | |
| 94 | -	                                    if ( Sensei_Utils::is_preview_lesson( get_the_ID() ) && ! Sensei_Utils::user_started_course( $course_id, get_current_user_id() )  ) { ?> | |
| 93 | + $course_id = Sensei()->lesson->get_course_id( get_the_ID() ); | |
| 94 | +										if ( Sensei_Utils::is_preview_lesson( get_the_ID() ) && ! Sensei_Utils::user_started_course( $course_id, get_current_user_id() )  ) { ?> | |
| 95 | 95 | |
| 96 | 96 | <span class="preview-label">Free Preview</span> | 
| 97 | 97 | |
| @@ -111,18 +111,18 @@ discard block | ||
| 111 | 111 | |
| 112 | 112 | <?php | 
| 113 | 113 | |
| 114 | - /** | |
| 115 | - * Hook runs inside single-course/course-modules.php | |
| 116 | - * | |
| 117 | - * It runs inside the if statement before the closing article tag directly after the modules were shown. | |
| 118 | - * This hook will not trigger if there are no modules to show. | |
| 119 | - * | |
| 120 | - * @since 1.9.0 | |
| 121 | - * | |
| 122 | - */ | |
| 123 | -                do_action('sensei_single_course_modules_inside_after'); | |
| 124 | - | |
| 125 | - ?> | |
| 114 | + /** | |
| 115 | + * Hook runs inside single-course/course-modules.php | |
| 116 | + * | |
| 117 | + * It runs inside the if statement before the closing article tag directly after the modules were shown. | |
| 118 | + * This hook will not trigger if there are no modules to show. | |
| 119 | + * | |
| 120 | + * @since 1.9.0 | |
| 121 | + * | |
| 122 | + */ | |
| 123 | +				do_action('sensei_single_course_modules_inside_after'); | |
| 124 | + | |
| 125 | + ?> | |
| 126 | 126 | |
| 127 | 127 | </article> | 
| 128 | 128 | |
| @@ -1,5 +1,5 @@ discard block | ||
| 1 | 1 | <?php | 
| 2 | -if ( ! defined( 'ABSPATH' ) ) exit; | |
| 2 | +if ( ! defined('ABSPATH')) exit; | |
| 3 | 3 | /** | 
| 4 | 4 | * List the Course Modules and Lesson in these modules | 
| 5 | 5 | * | 
| @@ -30,10 +30,10 @@ discard block | ||
| 30 | 30 | |
| 31 | 31 | ?> | 
| 32 | 32 | |
| 33 | -<?php if( sensei_have_modules() ): ?> | |
| 33 | +<?php if (sensei_have_modules()): ?> | |
| 34 | 34 | |
| 35 | - <?php while ( sensei_have_modules() ): sensei_setup_module(); ?> | |
| 36 | - <?php if( sensei_module_has_lessons() ): ?> | |
| 35 | + <?php while (sensei_have_modules()): sensei_setup_module(); ?> | |
| 36 | + <?php if (sensei_module_has_lessons()): ?> | |
| 37 | 37 | |
| 38 | 38 | <article class="module"> | 
| 39 | 39 | |
| @@ -57,7 +57,7 @@ discard block | ||
| 57 | 57 | |
| 58 | 58 | <h2> | 
| 59 | 59 | |
| 60 | - <a href="<?php sensei_the_module_permalink(); ?>" title="<?php sensei_the_module_title_attribute();?>"> | |
| 60 | + <a href="<?php sensei_the_module_permalink(); ?>" title="<?php sensei_the_module_title_attribute(); ?>"> | |
| 61 | 61 | |
| 62 | 62 | <?php sensei_the_module_title(); ?> | 
| 63 | 63 | |
| @@ -81,17 +81,17 @@ discard block | ||
| 81 | 81 | |
| 82 | 82 | <ul class="lessons-list" > | 
| 83 | 83 | |
| 84 | - <?php while( sensei_module_has_lessons() ): the_post(); ?> | |
| 84 | + <?php while (sensei_module_has_lessons()): the_post(); ?> | |
| 85 | 85 | |
| 86 | - <li class="<?php sensei_the_lesson_status_class();?>"> | |
| 86 | + <li class="<?php sensei_the_lesson_status_class(); ?>"> | |
| 87 | 87 | |
| 88 | 88 | <a href="<?php the_permalink(); ?>" title="<?php the_title_attribute() ?>" > | 
| 89 | 89 | |
| 90 | 90 | <?php the_title(); ?> | 
| 91 | 91 | |
| 92 | 92 | <?php | 
| 93 | - $course_id = Sensei()->lesson->get_course_id( get_the_ID() ); | |
| 94 | -	                                    if ( Sensei_Utils::is_preview_lesson( get_the_ID() ) && ! Sensei_Utils::user_started_course( $course_id, get_current_user_id() )  ) { ?> | |
| 93 | + $course_id = Sensei()->lesson->get_course_id(get_the_ID()); | |
| 94 | +	                                    if (Sensei_Utils::is_preview_lesson(get_the_ID()) && ! Sensei_Utils::user_started_course($course_id, get_current_user_id())) { ?> | |
| 95 | 95 | |
| 96 | 96 | <span class="preview-label">Free Preview</span> | 
| 97 | 97 | |