Bootstraps the element type by setting properties.
Description
See also
Source
File: src/db-objects/elements/element-types/base/media.php
protected function bootstrap() { $this->slug = 'media'; $this->title = __( 'Media', 'torro-forms' ); $this->description = __( 'An element to upload a file to the media library.', 'torro-forms' ); $this->icon_svg_id = 'torro-icon-media'; $this->add_description_settings_field(); $this->add_required_settings_field(); $this->settings_fields['file_type'] = array( 'section' => 'settings', 'type' => 'select', 'label' => __( 'Valid file types', 'torro-forms' ), 'description' => __( 'The file type the user is allowed to upload.', 'torro-forms' ), 'choices' => $this->get_type_dropdown_options(), 'default' => 'any', ); $this->add_css_classes_settings_field(); }
Changelog
Version | Description |
---|---|
1.0.0 | Introduced. |