apply_filters( 'ld_course_certificate', string $certificate_content, string $link, int $course_id, int $user_id )
Filters the output of course certificate shortcode.
Description #
Parameters #
- $certificate_content
-
(string) Course certificate shortcode markup.
- $link
-
(string) Certificate Link.
- $course_id
-
(int) Course ID.
- $user_id
-
(int) User ID.
Source #
Examples #
Note: Extended code example below not guaranteed, you may need to consult with a developer
<?php
/**
* Example usage for ld_course_certificate filter.
*/
add_filter(
'ld_course_certificate',
function( $certificate_content, $link, $course_id, $user_id ) {
// May add any custom logic using $certificate_content, $link, $course_id, $user_id.
// Always return $certificate_content.
return $certificate_content;
},
10,
4
);
Changelog #
| Version | Description |
|---|---|
| 2.1.0 | Introduced. |