Browse: Home / Hooks /

learndash_post_link_course_id

apply_filters( 'learndash_post_link_course_id',  int $course_id,  string $post_link,  WP_Post $post )

Filters course link post ID.


Description #


Parameters #

$course_id

(int) Course ID.

$post_link

(string) Post Link.

$post

(WP_Post) Post Object.


Source #

File: includes/class-ld-permalinks.php


Examples #

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

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

		// Always return $course_id.
		return $course_id;
	},
	10,
	3
);