-
Notifications
You must be signed in to change notification settings - Fork 136
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2439 from actuallyakash/issues/2434
Showing number of lessons in Course Catalog and My Courses.
- Loading branch information
Showing
6 changed files
with
56 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
significance: minor | ||
type: added | ||
links: | ||
- "#2434" | ||
entry: Added a paragraph to show Number of lessons in a course at Course Catalog | ||
and My Courses. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?php | ||
/** | ||
* Template: Lessons count in a Course. | ||
* | ||
* @package LifterLMS/Templates/Course | ||
* | ||
* @since [version] | ||
* @version [version] | ||
*/ | ||
|
||
defined( 'ABSPATH' ) || exit; | ||
|
||
global $post; | ||
|
||
$course = new LLMS_Course( $post ); | ||
$lessons_count = $course->get_lessons_count(); | ||
?> | ||
|
||
<div class="llms-meta llms-lessons-count"> | ||
<p> | ||
<?php | ||
// Translators: %1$s = Lessons Count. | ||
printf( esc_html__( 'Number of lessons: %1$s', 'lifterlms' ), '<span class="lessons-count">' . $lessons_count . '</span>' ); | ||
?> | ||
</p> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters