LLMS_Form_Field::__construct( array $settings = array(), int|object $data_source = null )

Constructor


Parameters Parameters

$settings

(array) (Optional) Field settings.

Default value: array()

$data_source

(int|object) (Optional) Data source where to get field value from. Default is null. Can be a WP_User or a WP_Post, or their id. The actual object will be retrieved basing on the data_store.

Default value: null


Top ↑

Return Return

(void)


Top ↑

Source Source

File: includes/forms/class-llms-form-field.php

85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
public function __construct( $settings = array(), $data_source = null ) {
 
    /**
     * Filters the settings of a LifterLMS Form Field
     *
     * @since 5.0.0
     *
     * @param array           $settings Field settings.
     * @param LLMS_Form_Field $field    Form field class instance.
     */
    $this->settings = apply_filters( 'llms_field_settings', wp_parse_args( $settings, $this->get_defaults() ), $this );
 
    $this->define_data_source( $data_source );
 
    $this->prepare();
 
}


Top ↑

Changelog Changelog

Changelog
Version Description
5.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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