learndash_next_step_id

apply_filters( 'learndash_next_step_id',  int $learndash_next_step_id,  int $course_step_post,  int $course_id,  int $user_id )

Filters to override next step post ID.


Description #


Parameters #

$learndash_next_step_id

(int) The next step post ID.

$course_step_post

(int) The current step WP_Post ID.

$course_id

(int) The current Course ID.

$user_id

(int) The current User ID.


Return #

(int) $learndash_next_step_id


Source #

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


Examples #

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

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

Changelog #

Changelog
Version Description
3.1.2 Introduced.