learndash_show_parent_previous_link

apply_filters( 'learndash_show_parent_previous_link',  boolean $show_previous_link,  int $course_step_post,  int $user_id,  int $course_id )

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


Description #


Parameters #

$show_previous_link

(boolean) Whether to show parent previous 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 #

 <?php
/**
 * Example usage for learndash_show_parent_previous_link filter.
 */
add_filter(
	'learndash_show_parent_previous_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
);