@@ -103,7 +103,7 @@ |
||
| 103 | 103 | * @param array $instance The settings for this instance. |
| 104 | 104 | * @return void |
| 105 | 105 | */ |
| 106 | - public function form( $instance ) {
|
|
| 106 | + public function form( $instance ) {
|
|
| 107 | 107 | |
| 108 | 108 | /* Set up some default widget settings. */ |
| 109 | 109 | /* Make sure all keys are added here, even with empty string values. */ |
@@ -114,7 +114,7 @@ discard block |
||
| 114 | 114 | * @param array $instance The settings for this instance. |
| 115 | 115 | * @return void |
| 116 | 116 | */ |
| 117 | - public function form( $instance ) {
|
|
| 117 | + public function form( $instance ) {
|
|
| 118 | 118 | |
| 119 | 119 | /* Set up some default widget settings. */ |
| 120 | 120 | /* Make sure all keys are added here, even with empty string values. */ |
@@ -168,8 +168,8 @@ discard block |
||
| 168 | 168 | $post_args = array( 'post_type' => 'lesson', |
| 169 | 169 | 'posts_per_page' => intval( $instance[ 'limit' ] ), |
| 170 | 170 | 'orderby' => 'menu_order date', |
| 171 | - 'order' => 'DESC', |
|
| 172 | - 'post_status' => 'publish', |
|
| 171 | + 'order' => 'DESC', |
|
| 172 | + 'post_status' => 'publish', |
|
| 173 | 173 | 'suppress_filters' => 0 |
| 174 | 174 | ); |
| 175 | 175 | $posts_array = get_posts( $post_args ); |
@@ -177,14 +177,14 @@ discard block |
||
| 177 | 177 | if ( count( $posts_array ) > 0 ) { ?>
|
| 178 | 178 | <ul> |
| 179 | 179 | <?php foreach ($posts_array as $post_item){
|
| 180 | - $post_id = absint( $post_item->ID ); |
|
| 181 | - $post_title = $post_item->post_title; |
|
| 182 | - $user_info = get_userdata( absint( $post_item->post_author ) ); |
|
| 183 | - $author_link = get_author_posts_url( absint( $post_item->post_author ) ); |
|
| 184 | - $author_display_name = $user_info->display_name; |
|
| 185 | - $author_id = $post_item->post_author; |
|
| 186 | - $lesson_course_id = get_post_meta( $post_id, '_lesson_course', true ); |
|
| 187 | - ?> |
|
| 180 | + $post_id = absint( $post_item->ID ); |
|
| 181 | + $post_title = $post_item->post_title; |
|
| 182 | + $user_info = get_userdata( absint( $post_item->post_author ) ); |
|
| 183 | + $author_link = get_author_posts_url( absint( $post_item->post_author ) ); |
|
| 184 | + $author_display_name = $user_info->display_name; |
|
| 185 | + $author_id = $post_item->post_author; |
|
| 186 | + $lesson_course_id = get_post_meta( $post_id, '_lesson_course', true ); |
|
| 187 | + ?> |
|
| 188 | 188 | <li class="fix"> |
| 189 | 189 | <?php do_action( 'sensei_lesson_image', $post_id, '100', '100', false, true ); ?> |
| 190 | 190 | <a href="<?php echo esc_url( get_permalink( $post_id ) ); ?>" title="<?php echo esc_attr( $post_title ); ?>"><?php echo $post_title; ?></a> |
@@ -106,7 +106,7 @@ discard block |
||
| 106 | 106 | * @param array $instance The settings for this instance. |
| 107 | 107 | * @return void |
| 108 | 108 | */ |
| 109 | - public function form( $instance ) {
|
|
| 109 | + public function form( $instance ) {
|
|
| 110 | 110 | |
| 111 | 111 | /* Set up some default widget settings. */ |
| 112 | 112 | /* Make sure all keys are added here, even with empty string values. */ |
@@ -153,8 +153,8 @@ discard block |
||
| 153 | 153 | $post_args = array( 'post_type' => 'course', |
| 154 | 154 | 'posts_per_page' => intval( $instance[ 'limit' ] ), |
| 155 | 155 | 'orderby' => 'menu_order date', |
| 156 | - 'order' => 'ASC', |
|
| 157 | - 'post_status' => 'publish', |
|
| 156 | + 'order' => 'ASC', |
|
| 157 | + 'post_status' => 'publish', |
|
| 158 | 158 | 'suppress_filters' => 0, |
| 159 | 159 | ); |
| 160 | 160 | |
@@ -171,13 +171,13 @@ discard block |
||
| 171 | 171 | if ( count( $posts_array ) > 0 ) { ?>
|
| 172 | 172 | <ul> |
| 173 | 173 | <?php foreach ($posts_array as $post_item){
|
| 174 | - $post_id = absint( $post_item->ID ); |
|
| 175 | - $post_title = $post_item->post_title; |
|
| 176 | - $user_info = get_userdata( absint( $post_item->post_author ) ); |
|
| 177 | - $author_link = get_author_posts_url( absint( $post_item->post_author ) ); |
|
| 178 | - $author_display_name = $user_info->display_name; |
|
| 179 | - $author_id = $post_item->post_author; |
|
| 180 | - ?> |
|
| 174 | + $post_id = absint( $post_item->ID ); |
|
| 175 | + $post_title = $post_item->post_title; |
|
| 176 | + $user_info = get_userdata( absint( $post_item->post_author ) ); |
|
| 177 | + $author_link = get_author_posts_url( absint( $post_item->post_author ) ); |
|
| 178 | + $author_display_name = $user_info->display_name; |
|
| 179 | + $author_id = $post_item->post_author; |
|
| 180 | + ?> |
|
| 181 | 181 | <li class="fix"> |
| 182 | 182 | <?php do_action( 'sensei_course_image', $post_id ); ?> |
| 183 | 183 | <a href="<?php echo esc_url( get_permalink( $post_id ) ); ?>" title="<?php echo esc_attr( $post_title ); ?>"><?php echo $post_title; ?></a> |
@@ -64,11 +64,11 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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. |
@@ -1,17 +1,17 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | if ( ! defined( 'ABSPATH' ) ) exit; |
| 3 | 3 | /** |
| 4 | - * Content-lesson.php template file |
|
| 5 | - * |
|
| 6 | - * responsible for content on archive like pages. Only shows the lesson excerpt. |
|
| 7 | - * |
|
| 8 | - * For single lesson content please see single-lesson.php |
|
| 9 | - * |
|
| 10 | - * @author Automattic |
|
| 11 | - * @package Sensei |
|
| 12 | - * @category Templates |
|
| 13 | - * @version 1.9.0 |
|
| 14 | - */ |
|
| 4 | + * Content-lesson.php template file |
|
| 5 | + * |
|
| 6 | + * responsible for content on archive like pages. Only shows the lesson excerpt. |
|
| 7 | + * |
|
| 8 | + * For single lesson content please see single-lesson.php |
|
| 9 | + * |
|
| 10 | + * @author Automattic |
|
| 11 | + * @package Sensei |
|
| 12 | + * @category Templates |
|
| 13 | + * @version 1.9.0 |
|
| 14 | + */ |
|
| 15 | 15 | ?> |
| 16 | 16 | |
| 17 | 17 | <article <?php post_class( get_the_ID() ); ?> > |
@@ -19,32 +19,32 @@ discard block |
||
| 19 | 19 | <section class="lesson-content"> |
| 20 | 20 | |
| 21 | 21 | <?php |
| 22 | - /** |
|
| 23 | - * sensei_content_lesson_before |
|
| 24 | - * action that runs before the sensei {post_type} content. It runs inside the sensei |
|
| 25 | - * content.php template. This applies to the specific post type that you've targeted. |
|
| 26 | - * |
|
| 27 | - * @since 1.9.0 |
|
| 28 | - * @param string $post_id |
|
| 29 | - */ |
|
| 30 | - do_action( 'sensei_content_lesson_before', get_the_ID() ); |
|
| 31 | - ?> |
|
| 22 | + /** |
|
| 23 | + * sensei_content_lesson_before |
|
| 24 | + * action that runs before the sensei {post_type} content. It runs inside the sensei |
|
| 25 | + * content.php template. This applies to the specific post type that you've targeted. |
|
| 26 | + * |
|
| 27 | + * @since 1.9.0 |
|
| 28 | + * @param string $post_id |
|
| 29 | + */ |
|
| 30 | + do_action( 'sensei_content_lesson_before', get_the_ID() ); |
|
| 31 | + ?> |
|
| 32 | 32 | |
| 33 | 33 | <section class="entry"> |
| 34 | 34 | |
| 35 | 35 | <?php |
| 36 | - /** |
|
| 37 | - * Fires just before the post content in the content-lesson.php file. |
|
| 38 | - * |
|
| 39 | - * @since 1.9.0 |
|
| 40 | - * |
|
| 41 | - * @hooked Sensei()->modules->module_archive_description - 11 |
|
| 42 | - * @hooked Sensei_Lesson::the_lesson_meta - 20 |
|
| 43 | - * |
|
| 44 | - * @param string $post_id |
|
| 45 | - */ |
|
| 46 | - do_action('sensei_content_lesson_inside_before', get_the_ID()); |
|
| 47 | - ?> |
|
| 36 | + /** |
|
| 37 | + * Fires just before the post content in the content-lesson.php file. |
|
| 38 | + * |
|
| 39 | + * @since 1.9.0 |
|
| 40 | + * |
|
| 41 | + * @hooked Sensei()->modules->module_archive_description - 11 |
|
| 42 | + * @hooked Sensei_Lesson::the_lesson_meta - 20 |
|
| 43 | + * |
|
| 44 | + * @param string $post_id |
|
| 45 | + */ |
|
| 46 | + do_action('sensei_content_lesson_inside_before', get_the_ID()); |
|
| 47 | + ?> |
|
| 48 | 48 | |
| 49 | 49 | <p class="lesson-excerpt"> |
| 50 | 50 | |
@@ -53,28 +53,28 @@ discard block |
||
| 53 | 53 | </p> |
| 54 | 54 | |
| 55 | 55 | <?php |
| 56 | - /** |
|
| 57 | - * Fires just after the post content in the lesson-content.php file. |
|
| 58 | - * |
|
| 59 | - * @since 1.9.0 |
|
| 60 | - * |
|
| 61 | - * @param string $post_id |
|
| 62 | - */ |
|
| 63 | - do_action('sensei_content_lesson_inside_after', get_the_ID()); |
|
| 64 | - ?> |
|
| 56 | + /** |
|
| 57 | + * Fires just after the post content in the lesson-content.php file. |
|
| 58 | + * |
|
| 59 | + * @since 1.9.0 |
|
| 60 | + * |
|
| 61 | + * @param string $post_id |
|
| 62 | + */ |
|
| 63 | + do_action('sensei_content_lesson_inside_after', get_the_ID()); |
|
| 64 | + ?> |
|
| 65 | 65 | |
| 66 | 66 | </section> <!-- section .entry --> |
| 67 | 67 | |
| 68 | 68 | <?php |
| 69 | - /** |
|
| 70 | - * This action runs after the sensei lesson content. It runs inside the sensei |
|
| 71 | - * lesson-content.php template. |
|
| 72 | - * |
|
| 73 | - * @since 1.9.0 |
|
| 74 | - * @param string $post_id |
|
| 75 | - */ |
|
| 76 | - do_action( 'sensei_content_lesson_after', get_the_ID() ); |
|
| 77 | - ?> |
|
| 69 | + /** |
|
| 70 | + * This action runs after the sensei lesson content. It runs inside the sensei |
|
| 71 | + * lesson-content.php template. |
|
| 72 | + * |
|
| 73 | + * @since 1.9.0 |
|
| 74 | + * @param string $post_id |
|
| 75 | + */ |
|
| 76 | + do_action( 'sensei_content_lesson_after', get_the_ID() ); |
|
| 77 | + ?> |
|
| 78 | 78 | |
| 79 | 79 | </section> <!-- article .lesson-content --> |
| 80 | 80 | |
@@ -1,14 +1,14 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 | |
@@ -1,29 +1,29 @@ discard block |
||
| 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 |
||
| 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(); ?> |
@@ -1,65 +1,65 @@ |
||
| 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' ); |
@@ -42,25 +42,25 @@ |
||
| 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 : |