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_REST_Fields::get_fields_for_certificates()

Retrieves an array of data used to register fields for certificates.


Return Return

(array)


Top ↑

Source Source

File: includes/class-llms-rest-fields.php

	private function get_fields_for_certificates() {

		return array(
			'size'        => array(
				'description' => __( 'Certificate size.', 'lifterlms' ),
				'type'        => 'string',
				'enum'        => array_merge(
					array_keys( llms_get_certificate_sizes() ),
					array( 'CUSTOM' )
				),
			),
			'width'       => array(
				'description' => __( 'Certificate width.', 'lifterlms' ),
				'type'        => 'number',
			),
			'height'      => array(
				'description' => __( 'Certificate height.', 'lifterlms' ),
				'type'        => 'number',
			),
			'unit'        => array(
				'description' => __( 'Certificate sizing unit applied to the width and height properties.', 'lifterlms' ),
				'type'        => 'string',
				'enum'        => array_keys( llms_get_certificate_units() ),
			),
			'orientation' => array(
				'description' => __( 'Certificate orientation.', 'lifterlms' ),
				'type'        => 'string',
				'enum'        => array_keys( llms_get_certificate_orientations() ),
			),
			'margins'     => array(
				'description' => __( 'Certificate margins.', 'lifterlms' ),
				'type'        => 'array',
				'minItems'    => 4,
				'maxItems'    => 4,
				'items'       => array(
					'type' => 'number',
				),
			),
			'background'  => array(
				'description' => __( 'Certificate background color.', 'lifterlms' ),
				'type'        => 'string',
			),
		);

	}


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.