apply_filters( 'learndash_certificate_params', array $tcpdf_params, int $cert_id )
Filters certificate tcpdf parameters.
Description #
Parameters #
- $tcpdf_params
-
(array) An array of tcpdf parameters.
- $cert_id
-
(int) Certificate post ID.
Source #
Examples #
Note: Extended code example below not guaranteed, you may need to consult with a developer
<?php /** * Example usage for learndash_certificate_params filter. */ add_filter( 'learndash_certificate_params', function ( $tcpdf_params = array(), $post_id = 0 ) { if ( ( isset( $tcpdf_params['margins'] ) ) && ( is_array( $tcpdf_params['margins'] ) ) ) { $tcpdf_params['margins']['top'] = 0; $tcpdf_params['margins']['right'] = 0; $tcpdf_params['margins']['bottom'] = 0; $tcpdf_params['margins']['left'] = 0; } // Always return $tcpdf_params return $tcpdf_params; }, 30, 2 );
Changelog #
Version | Description |
---|---|
2.4.7 | Introduced. |