diff --git a/includes/class-sensei-course.php b/includes/class-sensei-course.php
index 666e3d30be..b05dc6ebbd 100755
--- a/includes/class-sensei-course.php
+++ b/includes/class-sensei-course.php
@@ -2810,7 +2810,7 @@ public static function the_course_lessons_title() {
} elseif ( empty( $none_module_lessons ) ) { // if the none module lessons are simply empty the title should not be shown
- $title = '';
+ return;
}
/**
@@ -3161,7 +3161,7 @@ public static function the_course_video() {
}
/**
- * Output the title for the single lesson page
+ * Output the title for the single course page
*
* @global $post
* @since 1.9.0
@@ -3173,23 +3173,21 @@ public static function the_title() {
}
global $post;
- ?>
-
-
-
-
- post_type ) );
- ?>
-
-
-
-
-
- post_type ) );
+ if ( $title ) :
+ ?>
+
+ ID )
&& Sensei_Utils::is_preview_lesson( $post->ID )
&& ! Sensei_Course::is_user_enrolled( $course_id, $current_user->ID );
-
- ?>
-
-
-
-
- post_type ) );
+ /**
+ * Filter documented in class-sensei-messages.php the_title
+ */
+ $title = wp_kses_post( apply_filters( 'sensei_single_title', get_the_title( $post ), $post->post_type ) );
+ if ( $title || $is_preview ) :
+ ?>
+
+
+
+
+
+ frontend->sensei_lesson_preview_title_tag( $course_id ) );
+ }
?>
-
+
frontend->sensei_lesson_preview_title_tag( $course_id ) );
- }
- ?>
-
-
-
- ID ) );
}
-
- ?>
-
-
-
-
- post_type ) );
- ?>
-
-
-
-
-
- post_type ) );
+ if ( $title ) :
+ ?>
+
+
-
-
-
+
+
-
-
-
-
-
- // lessons loaded into loop in the sensei_single_course_lessons_before hook
- if ( have_posts() ) :
+
+
+ >
+
+
- >
+
+
+ /**
+ * The hook is inside the course lesson on the single course. It is just before the lesson closing markup.
+ * It fires for each lesson.
+ *
+ * @since 1.9.0
+ */
+ do_action( 'sensei_single_course_inside_after_lesson', get_the_ID() );
-
+ ?>
-
+
-
+
-
- /**
- * Actions just before the sensei single course lessons loop begins
- *
- * @hooked Sensei_Course::reset_single_course_query
- *
- * @since 1.9.0
- */
- do_action( 'sensei_single_course_lessons_after' );
+
+/**
+ * Actions just before the sensei single course lessons loop begins
+ *
+ * @hooked Sensei_Course::reset_single_course_query
+ *
+ * @since 1.9.0
+ */
+do_action( 'sensei_single_course_lessons_after' );
-
+?>