apply_filters( 'learndash_next_post_link', string $link, string $permalink, string $link_label, WP_Post $post, WP_Post $next_post )
Filters next post link output for the course.
Description #
Parameters #
Return #
(string) Next post link output.
Source #
Examples #
Note: Extended code example below not guaranteed, you may need to consult with a developer
<?php
/**
* Example usage for learndash_next_post_link filter.
*/
add_filter(
'learndash_next_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 #
| Version | Description |
|---|---|
| 4.11.0 | Added $next_post parameter. |
| 2.1.0 | Introduced. |