LLMS_Meta_Box_Certificate::get_fields()

Builds array of metabox options.


Description Description

Array is called in output method to display options. Appropriate fields are generated based on type.


Top ↑

Return Return

(array) Array of metabox fields.


Top ↑

Source Source

File: includes/admin/post-types/meta-boxes/class.llms.meta.box.certificate.php

	public function get_fields() {

		$next_id = llms_get_certificate_sequential_id( $this->post->ID );

		$fields = array(
			array(
				'label'      => __( 'Certificate Title', 'lifterlms' ),
				'id'         => $this->prefix . 'certificate_title',
				'type'       => 'text',
				'class'      => 'input-full',
				'desc_class' => 'd-all',
				'sanitize'   => 'no_encode_quotes',
			),
			array(
				'label'      => __( 'Next Sequential ID', 'lifterlms' ),
				'id'         => $this->prefix . 'sequential_id',
				'type'       => 'number',
				'class'      => 'input-full',
				'desc_class' => 'd-all',
				'value'      => $next_id,
				'min'        => $next_id,
				'step'       => 1,
			),
		);

		return array(
			array(
				'title'  => __( 'General', 'lifterlms' ),
				'fields' => $fields,
			),
		);
	}


Top ↑

Changelog Changelog

Changelog
Version Description
6.0.0 Remove the background image option (in favor of featured image metabox). Expose the "Next Sequential ID" option.
3.37.12 Allow the certificate title field to store text with quotes.
3.17.4 Unknown.
1.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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