apply_filters( 'ld_after_course_status_template_container', string $content, string $course_status_index, int $course_id, int $user_id )
Filters the content to be echoed after the course status section of the course template output.
Description #
Parameters #
- $content
-
(string) Custom content showed after the course status section. Can be empty.
- $course_status_index
-
(string) Course status index from the course status label
- $course_id
-
(int) Course ID.
- $user_id
-
(int) User ID.
Source #
Examples #
Note: Extended code example below not guaranteed, you may need to consult with a developer
<?php /** * Example usage for ld_after_course_status_template_container filter. */ add_filter( 'ld_after_course_status_template_container', 'add_content_after_course_status', 10, 4 ); function add_content_after_course_status( $output = '', $course_status = 'not_started', $course_id = 0, $user_id = 0 ) { if ( $course_status == 'not_started' ) { $output .= '<p>Today is a good day to start learning.</p>'; } elseif ( $course_status == 'in_progress' ) { $output .= '<p>Continue the Course and continue learning.</p>'; } elseif ( $course_status == 'complete' ) { $output .= '<p>Thank You for completing this Course.</p>'; } return $output; }
Changelog #
Version | Description |
---|---|
2.3.0 | Introduced. See <a href="https://developers.learndash.com/hook/ld_after_course_status_template_container/">https://developers.learndash.com/hook/ld_after_course_status_template_container/</a> for example use of this filter. |