LLMS_User_Certificate::get_dimensions_for_display( bool $with_units = true )
Retrieve dimensions adjusted for orientation.
Description Description
The width and height are always stored as if the certificate were to be displayed in portrait mode. This method will return the dimensions as necessary to use in styling rules.
When the certificate is displaying in landscape the width and height are transposed automatically by this method.
Parameters Parameters
- $with_units
-
(bool) (Optional) Whether or not to include the unit in the return.
Default value: true
Return Return
(array) Array of dimensions.
- 'width'
(string|float) The display width. - 'height'
(string|float) The display height.
Source Source
File: includes/models/model.llms.user.certificate.php
public function get_dimensions_for_display( $with_units = true ) { $orientation = $this->get_orientation(); $width = $this->get_width( $with_units ); $height = $this->get_height( $with_units ); return array( 'width' => 'portrait' === $orientation ? $width : $height, 'height' => 'portrait' === $orientation ? $height : $width, ); }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
6.0.0 | Introduced. |