llms_certificate_styles()
Outputs dynamic CSS for a single certificate template.
Description Description
Hooked to action wp_head
at priority 10.
Return Return
(void)
Source Source
File: includes/functions/llms.functions.templates.certificates.php
function llms_certificate_styles() { $certificate = llms_get_certificate( get_the_ID(), true ); if ( ! $certificate || 1 === $certificate->get_template_version() ) { return; } $image = $certificate->get_background_image(); $background_img = $image['src']; $background_color = $certificate->get( 'background' ); $padding = implode( ' ', $certificate->get_margins( true ) ); $dimensions = $certificate->get_dimensions_for_display(); $width = $dimensions['width']; $height = $dimensions['height']; $fonts = $certificate->get_custom_fonts(); llms_get_template( 'certificates/dynamic-styles.php', compact( 'certificate', 'width', 'height', 'background_color', 'background_img', 'padding', 'fonts' ) ); }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
6.0.0 | Introduced. |