LLMS_Metabox_Instructors::get_fields()

Define metabox fields


Description Description


Return Return

(array)


Top ↑

Source Source

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

	public function get_fields() {

		$post = llms_get_post( $this->post );
		$defaults = llms_get_instructors_defaults();

		return array(
			array(
				'title' => __( 'Instructors', 'lifterlms' ),
				'fields' => array(
					array(
						'button' => array(
							'text' => __( 'Add Instructor', 'lifterlms' ),
						),
						'handler' => 'instructors_mb_store',
						'header' => array(
							'default' => __( 'New Instructor', 'lifterlms' ),
						),
						'id' => $this->prefix . 'instructors_data',
						'label' => '',
						'type' => 'repeater',
						'fields' => array(
							array(
								'allow_null' => false,
								'data_attributes' => array(
									'placeholder' => esc_attr__( 'Select an Instructor', 'lifterlms' ),
									'roles' => 'administrator,lms_manager,instructor,instructors_assistant',
								),
								'class' => 'llms-select2-student',
								'group' => 'd-2of3',
								'id' => $this->prefix . 'id',
								'type' => 'select',
								'label' => __( 'Instructor', 'lifterlms' ),
							),
							array(
								'group' => 'd-1of6',
								'class' => 'input-full',
								'default' => $defaults['label'],
								'id' => $this->prefix . 'label',
								'type' => 'text',
								'label' => __( 'Label', 'lifterlms' ),
							),
							array(
								'allow_null' => false,
								'class' => 'llms-select2',
								'default' => $defaults['visibility'],
								'group' => 'd-1of6',
								'id' => $this->prefix . 'visibility',
								'type' => 'select',
								'label' => __( 'Visibility', 'lifterlms' ),
								'value' => array(
									'visible' => esc_html__( 'Visible', 'lifterlms' ),
									'hidden' => esc_html__( 'Hidden', 'lifterlms' ),
								),
							),
						),
					),
				),
			),
		);

	}

Top ↑

Changelog Changelog

Changelog
Version Description
3.13.0 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

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





Permalink: