SFWD_LMS::get_template( string $name, array|null $args, bool|null $echo = false, bool $return_file_path = false )
Get LearnDash template and pass data to be used in template
Description #
Checks to see if user has a ‘learndash’ directory in their current theme and uses the template if it exists.
Parameters #
- $name
-
(string) (Required) Template name.
- $args
-
(array|null) (Required) Data for template.
- $echo
-
(bool|null) (Optional) echo or return.
Default value: false
- $return_file_path
-
(bool) (Optional) Return just file path instead of output.
Default value: false
Source #
Changelog #
Version | Description |
---|---|
2.1.0 | Introduced. |
Related #
@package #
Uses #
Uses | Description |
---|---|
includes/ld-misc-functions.php: learndash_ob_get_clean () |
Helper function for PHP output buffering. |
includes/class-ld-lms.php: SFWD_LMS::get_template_paths () |
Get template paths |
includes/class-ld-lms.php: learndash_template |
Filters file path for the learndash template being called. |
includes/class-ld-lms.php: ld_template_args_{$name} |
Filters template arguments. |
Used By #
Used By | Description |
---|---|
includes/shortcodes/ld_infobar.php: learndash_infobar_shortcode () |
Builds the |
includes/shortcodes/ld_navigation.php: learndash_navigation_shortcode () |
Builds the |
includes/shortcodes/ld_quiz.php: learndash_quiz_shortcode_function () |
Builds the |
includes/gutenberg/blocks/ld-exam/index.php: LearnDash_Gutenberg_Block_Exam::render_block_exam_question () |
Render Exam Question Block |
includes/gutenberg/blocks/ld-exam/index.php: LearnDash_Gutenberg_Block_Exam::render_block_exam_question_description () |
Render Exam Question Description Block |
includes/gutenberg/blocks/ld-exam/index.php: LearnDash_Gutenberg_Block_Exam::render_block_exam_question_answers () |
Render Exam Question Answers Block |
includes/gutenberg/blocks/ld-exam/index.php: LearnDash_Gutenberg_Block_Exam::render_block_exam_question_correct_message () |
Render Exam Question Correct Message Block |
includes/gutenberg/blocks/ld-exam/index.php: LearnDash_Gutenberg_Block_Exam::render_block_exam_question_incorrect_message () |
Render Exam Question Incorrect Block |
includes/classes/class-ldlms-model-exam.php: LDLMS_Model_Exam::get_front_content () |
Show the Exam front. |
includes/course/ld-course-info-widget.php: learndash_ajax_course_registered_pager () |
Handles the AJAX pagination for the courses registered. |
includes/course/ld-course-info-widget.php: learndash_ajax_course_progress_pager () |
Handles the AJAX pagination for the course progress. |
includes/course/ld-course-info-widget.php: learndash_ajax_quiz_progress_pager () |
Handles the AJAX pagination for the quiz progress. |
includes/lib/wp-pro-quiz/lib/view/WpProQuiz_View_FrontQuiz.php: WpProQuiz_View_FrontQuiz::showReviewQuestions () | |
includes/lib/wp-pro-quiz/lib/view/WpProQuiz_View_FrontQuiz.php: WpProQuiz_View_FrontQuiz::showReviewLegend () | |
includes/lib/wp-pro-quiz/lib/view/WpProQuiz_View_FrontQuiz.php: WpProQuiz_View_FrontQuiz::showReviewButtons () | |
includes/widgets/ld_user_status.php: LearnDash_User_Status_Widget::widget () |
Displays widget |
themes/ld30/includes/helpers.php: learndash_30_focus_mode () |
Returns the focus template path if the focus mode is enabled. |
themes/ld30/includes/helpers.php: learndash_get_template_part () |
Gets the template Part. |
includes/shortcodes/learndash_user_status.php: learndash_user_status_shortcode () |
Builds the |
includes/class-ld-cpt.php: SFWD_CPT::loop_shortcode () |
Shortcode that generates a list of items in this post type |
includes/class-ld-lms.php: SFWD_LMS::get_course_info () |
Returns output of users course information for bottom of profile |
includes/class-ld-lms.php: SFWD_LMS::load_template_functions () |
Load functions used for templates |
includes/class-ld-semper-fi-module.php: Semper_Fi_Module::enqueue_scripts () |
Load scripts for module, can pass data to module script. |
includes/shortcodes/ld_user_groups.php: learndash_user_groups () |
Builds the |
includes/ld-scripts.php: learndash_load_resources () |
Enqueues styles for front-end. |
includes/class-ld-cpt-instance.php: SFWD_CPT_Instance::template_content () |
Generate output for courses, lessons, topics, quizzes Filter callback for ‘the_content’ (wp core filter) |
includes/shortcodes/ld_certificate.php: ld_certificate_shortcode () |
Builds the |
includes/settings/settings-sections/class-ld-settings-section-support-templates.php: LearnDash_Settings_Section_Support_Templates::load_templates () |
Load template files in preparation for processing. |
includes/quiz/ld-quiz-pro.php: LD_QuizPro::certificate_details () |
Echoes the HTML with inline javascript that contains the JSON representation of the certificate details and continue link details |
includes/quiz/ld-quiz-pro.php: LD_QuizPro::certificate_link () |
Returns the certificate link appended to input HTML content if the Post ID is set, else it only returns the input HTML content |
includes/quiz/ld-quiz-functions.php: learndash_quiz_navigation_admin () |
Prints the quiz navigation admin template for the widget. |
includes/quiz/ld-quiz-functions.php: learndash_quiz_switcher_admin () |
Prints the quiz switcher within the quiz questions in the admin meta box. |
includes/lib/wp-pro-quiz/lib/view/WpProQuiz_View_FrontQuiz.php: WpProQuiz_View_FrontQuiz::showStartOnlyRegisteredUserBox () | |
includes/lib/wp-pro-quiz/lib/view/WpProQuiz_View_FrontQuiz.php: WpProQuiz_View_FrontQuiz::showPrerequisiteBox () | |
includes/lib/wp-pro-quiz/lib/view/WpProQuiz_View_FrontQuiz.php: WpProQuiz_View_FrontQuiz::showCheckPageBox () | |
includes/lib/wp-pro-quiz/lib/view/WpProQuiz_View_FrontQuiz.php: WpProQuiz_View_FrontQuiz::showInfoPageBox () | |
includes/lib/wp-pro-quiz/lib/view/WpProQuiz_View_FrontQuiz.php: WpProQuiz_View_FrontQuiz::showStartQuizBox () | |
includes/lib/wp-pro-quiz/lib/view/WpProQuiz_View_FrontQuiz.php: WpProQuiz_View_FrontQuiz::showUserQuizStatisticsBox () | |
includes/lib/wp-pro-quiz/lib/view/WpProQuiz_View_FrontQuiz.php: WpProQuiz_View_FrontQuiz::showTimeLimitBox () | |
includes/lib/wp-pro-quiz/lib/view/WpProQuiz_View_FrontQuiz.php: WpProQuiz_View_FrontQuiz::showReviewBox () | |
includes/lib/wp-pro-quiz/lib/view/WpProQuiz_View_FrontQuiz.php: WpProQuiz_View_FrontQuiz::showResultBox () | |
includes/lib/wp-pro-quiz/lib/view/WpProQuiz_View_FrontQuiz.php: WpProQuiz_View_FrontQuiz::showToplistInButtonBox () | |
includes/lib/wp-pro-quiz/lib/view/WpProQuiz_View_FrontQuiz.php: WpProQuiz_View_FrontQuiz::showQuizBox () | |
includes/lib/wp-pro-quiz/lib/view/WpProQuiz_View_FrontQuiz.php: WpProQuiz_View_FrontQuiz::showLoadQuizBox () | |
includes/lib/wp-pro-quiz/lib/view/WpProQuiz_View_StatisticsAjax.php: WpProQuiz_View_StatisticsAjax::showUserTable () | |
includes/lib/wp-pro-quiz/lib/view/WpProQuiz_View_FrontQuiz.php: WpProQuiz_View_FrontQuiz::script () | |
includes/lib/wp-pro-quiz/lib/view/WpProQuiz_View_FrontQuiz.php: WpProQuiz_View_FrontQuiz::max_question_script () | |
includes/lib/wp-pro-quiz/lib/view/WpProQuiz_View_FrontQuiz.php: WpProQuiz_View_FrontQuiz::showQuizAnker () | |
includes/lib/wp-pro-quiz/lib/view/WpProQuiz_View_FrontQuiz.php: WpProQuiz_View_FrontQuiz::showAddToplist () | |
includes/lib/wp-pro-quiz/lib/view/WpProQuiz_View_FrontQuiz.php: WpProQuiz_View_FrontQuiz::showFormBox () | |
includes/lib/wp-pro-quiz/lib/view/WpProQuiz_View_FrontQuiz.php: WpProQuiz_View_FrontQuiz::showLockBox () | |
includes/lib/wp-pro-quiz/lib/view/WpProQuiz_View_QuizOverall.php: WpProQuiz_View_QuizOverall::show () | |
includes/lib/wp-pro-quiz/lib/controller/WpProQuiz_Controller_Preview.php: WpProQuiz_Controller_Preview::route () | |
includes/lib/wp-pro-quiz/lib/controller/WpProQuiz_Controller_Front.php: WpProQuiz_Controller_Front::loadDefaultScripts () | |
includes/lib/wp-pro-quiz/lib/controller/WpProQuiz_Controller_QuizCompleted.php: WpProQuiz_Controller_QuizCompleted::setCategoryOverview () | |
includes/lib/wp-pro-quiz/lib/controller/WpProQuiz_Controller_Quiz.php: WpProQuiz_Controller_Quiz::setCategoryOverview () | |
includes/lib/wp-pro-quiz/lib/controller/WpProQuiz_Controller_StyleManager.php: WpProQuiz_Controller_StyleManager::show () | |
includes/gutenberg/lib/enqueue-scripts.php: learndash_editor_scripts () |
Enqueues block editor styles and scripts. |
includes/shortcodes/ld_course_content.php: learndash_course_content_shortcode () |
Builds the |
includes/course/ld-course-navigation.php: learndash_get_course_lessons_list () |
Gets the lesson list output for a course. |
includes/shortcodes/ld_course_progress.php: learndash_course_progress () |
Builds the |
includes/course/ld-course-progress.php: learndash_mark_complete () |
Outputs the HTML output to mark a course complete. |
includes/shortcodes/ld_profile.php: learndash_profile () |
Builds the |
includes/shortcodes/ld_user_course_points.php: learndash_user_course_points_shortcode () |
Builds the |
includes/course/ld-course-video.php: Learndash_Course_Video::add_video_to_content () |
Hook into the LearnDash template logic to insert the Video Progression output |
includes/course/ld-course-info-widget.php: learndash_course_navigation () |
Outputs the course navigation template for widget. |
includes/course/ld-course-info-widget.php: learndash_course_navigation_admin () |
Outputs the course navigation admin template for the widget. |
includes/course/ld-course-info-widget.php: learndash_course_switcher_admin () |
Includes the course navigation switcher admin template. |
includes/course/ld-course-info-widget.php: learndash_course_step_edit_init () |
Enqueues the scripts and styles needed to handle pagination. |
includes/shortcodes/ld_course_expire_status.php: learndash_course_expire_status_shortcode () |
Builds the |
includes/shortcodes/ld_course_inprogress.php: learndash_course_inprogress_shortcode () |
Builds the |
includes/shortcodes/ld_course_notstarted.php: learndash_course_notstarted_shortcode () |
Builds the |
includes/shortcodes/ld_course_complete.php: learndash_course_complete_shortcode () |
Builds the |
includes/shortcodes/ld_group.php: learndash_ld_group_check_shortcode () |
Builds the |
includes/shortcodes/ld_student.php: learndash_student_check_shortcode () |
Builds the |
includes/shortcodes/ld_visitor.php: learndash_visitor_check_shortcode () |
Builds the |
includes/shortcodes/ld_course_list.php: ld_course_list () |
Builds the |
includes/admin/class-learndash-admin-groups-users-list.php: Learndash_Admin_Groups_Users_List::on_load () |
On page load |
includes/admin/class-learndash-admin-posts-edit.php: Learndash_Admin_Post_Edit::on_load () |
On Load handler function for this post type edit. |
includes/admin/class-learndash-admin-user-profile-edit.php: Learndash_Admin_User_Profile_Edit::on_load_user_profile () |
Function called when WP load the page. |