Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

LLMS_User_Certificate::get_dimension( string $dimension, boolean $with_unit = false )

Retrieves the value for either the width or height.


Parameters Parameters

$dimension

(string) (Required) Dimension key, either "width" or "height".

$with_unit

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

Default value: false


Top ↑

Return Return

(string|float) If $with_unit is true, returns a string with the unit, otherwise returns the dimension as a float.


Top ↑

Source Source

File: includes/models/model.llms.user.certificate.php

	private function get_dimension( $dimension, $with_unit = false ) {

		$ret = 0;
		if ( 'CUSTOM' === $this->get_size() ) {
			$ret = $this->get( $dimension );
		} else {
			$size_info = $this->get_registered_size_data();
			$ret       = $size_info[ $dimension ];
		}

		return $with_unit ? sprintf( '%1$s%2$s', $ret, $this->get_unit() ) : $ret;

	}


Top ↑

Changelog 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.