learndash_previous_post_link

apply_filters( 'learndash_previous_post_link',  string $link,  string $permalink,  string $link_name,  WP_Post $post )

Filters course navigation previous post link output.


Description #


Parameters #

$link

(string) Previous post link output.

$permalink

(string) Previous post permalink.

$link_name

(string) Text shown inside previous post link.

$post

(WP_Post) Post object.


Source #

File: includes/course/ld-course-navigation.php


Examples #

 <?php
/**
 * Example usage for learndash_previous_post_link filter.
 */
add_filter(
	'learndash_previous_post_link',
	function( $link, $permalink, $link_name, $post ) {
		// May add any custom logic using $link, $permalink, $link_name, $post.

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

Changelog #

Changelog
Version Description
2.1.0 Introduced.