Browse: Home / Hooks /

learndash_show_parent_next_link

apply_filters( 'learndash_show_parent_next_link',  bool $learndash_show_parent_next_link,  int $course_step_post,  int $user_id,  int $course_id )

Filters whether to show parent next link in the course navigation.


Description #


Parameters #

$learndash_show_parent_next_link

(bool) Whether to show parent next link.

$course_step_post

(int) ID of the lesson/topic post.

$user_id

(int) User ID.

$course_id

(int) Course ID.


Source #

File: themes/ld30/templates/modules/course-steps.php


Examples #

Note: Extended code example below not guaranteed, you may need to consult with a developer

 <?php
/**
 * Example usage for learndash_show_parent_next_link filter.
 */
add_filter(
	'learndash_show_parent_next_link',
	function( $show_previous_link, $course_step_post, $user_id, $course_id ) {
		// May add any custom logic using $show_previous_link, $course_step_post, $user_id, $course_id.

		// Always return $show_previous_link.
		return $show_previous_link;
	},
	10,
	4
);
 

Changelog #

Changelog
Version Description
3.1.0 Introduced.