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.

Top ↑

Parameters Parameters


(bool) (Optional) Whether or not to include the unit in the return.

Default value: true

Top ↑

Return Return

(array) Array of dimensions.

  • 'width'
    (string|float) The display width.
  • 'height'
    (string|float) The display height.

Top ↑

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,


Top ↑

Changelog Changelog

Version Description
6.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.