llms_get_certificate_sizes()
Retrieves a list of registered certificate sizes.
Return Return
({) Array of sizes. The array key is the size's unique ID. @type string $name The translated name for the size. @type float $width The portrait width dimension of the size. @type float $height The portrait height dimension of the size. @type string $unit The unit used for the dimensions of the size. Must be the ID of a unit registered via llms_get_certificate_units(). }
Source Source
File: includes/functions/llms.functions.certificate.php
function llms_get_certificate_sizes() { $sizes = array( // ISO 216 sizes. 'A3' => array( 'name' => _x( 'A3', 'Paper size name', 'lifterlms' ), 'width' => 297, 'height' => 420, 'unit' => 'mm', ), 'A4' => array( 'name' => _x( 'A4', 'Paper size name', 'lifterlms' ), 'width' => 210, 'height' => 297, 'unit' => 'mm', ), 'A5' => array( 'name' => _x( 'A5', 'Paper size name', 'lifterlms' ), 'width' => 148, 'height' => 210, 'unit' => 'mm', ), // North American sizes. 'LETTER' => array( 'name' => _x( 'Letter', 'Paper size name', 'lifterlms' ), 'width' => 8.5, 'height' => 11, 'unit' => 'in', ), 'LEGAL' => array( 'name' => _x( 'Legal', 'Paper size name', 'lifterlms' ), 'width' => 8.5, 'height' => 14, 'unit' => 'in', ), 'LEDGER' => array( 'name' => _x( 'Ledger', 'Paper size name', 'lifterlms' ), 'width' => 11, 'height' => 17, 'unit' => 'in', ), 'USER_DEFINED' => array( 'name' => __( 'User defined', 'lifterlms' ), 'width' => get_option( 'lifterlms_certificate_default_user_defined_width', 400 ), 'height' => get_option( 'lifterlms_certificate_default_user_defined_height', 400 ), 'unit' => get_option( 'lifterlms_certificate_default_user_defined_unit', 'mm' ), ), ); /** * Filters registered certificate size options. * * @since 6.0.0 * * @param array $sizes Array of registered sizes. */ return apply_filters( 'llms_certificate_sizes', $sizes ); }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
6.0.0 | Introduced. |