LLMS_Metabox_Instructors::get_fields()

Define metabox fields


Return Return

(array)


Top ↑

Source Source

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

44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
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.