Skip to content

Module Settings Groups

Vintage

Source category: modules Last updated: 2018-04-27

Note: This tutorial series is intended for advanced users. At least a basic understanding of coding in PHP and JavaScript is required.

When editing modules inside the Divi Builder, their settings appear in collapsable groups . You can assign a setting to a specific group using the toggle_slug parameter in the setting definition. You can use one of the builder’s predefined settings groups or you can use a custom group.

Predefined Settings Groups

The following groups are predefined and can be used by simply including one of their slugs as the toggle_slug parameter in a setting definition.

Display NameSlug
Admin Labeladmin_label
Alignmentalignment
Animationanimation
Arrows Colorarrows_color
Attributesattributes
Audioaudio
Backgroundbackground
Bar Counterbar
Body Textbody
Borderborder
Box Shadowbox_shadow
Bulletbullet
Button Onebutton_one
Button Twobutton_two
Buttonbutton
CSS ID & Classesclasses
Caption Textcaption
Categoriescategories
Circlecircle
Colorcolor
Conditional Logicconditional_logic
Content Textcontent
Controls Colorscolors
Controlscontrols
Currency & Frequency Textcurrency_frequency
Custom CSScustom_css
Dividersdividers
Dropdown Menudropdown
Elementselements
Email Accountprovider
Emailemail
Exceptionsexceptions
Excluded Itemexcluded
Featured Imagefeatured_image
Field Optionsfield_options
Field Textform_field
Fieldsfields
Filter Criteria Textfilter
Filtersfilters
Iconicon
Image & Iconicon_settings
Image & Videoimage_video
Imagesimages
Imageimage
Input Textinput
Label Textlabel
Layoutlayout
Linkslinks
Linklink
Mapchild_filters
Mapmap
Menu Textmenu
Meta Textmeta
Module Textmodule
Navigationnavigation
Number Textnumber
Numbers Textnumbers
Overlayoverlay
Pagination Textpagination
Percentage Textpercent
Play Iconplay_icon
Player Pauseplayer_pause
Portfolio Title Textportfolio_header
Price Textprice
Redirectredirect
Result Message Textresult_message
Rotationrotation
Sale Badgebadge
Scroll Down Iconscroll_down
Search Fieldfield
Sizingwidth
Spacingmargin_padding
Statestate
Stylesstyles
Subhead Textsubhead
Subheader Textsubheader
Success Actionsuccess_action
Tab Texttab
Textmain_content
Texttext
Title Textheader
Title Texttitle
Toggle Texttoggle
Visibilityvisibility

Custom Settings Groups

Settings can be assigned to a custom group in the same way that you would assign them to predefined groups. However, you must also define all custom groups in the get_settings_modal_toggles() method of your module’s PHP class.

Settings Group Definition

  • tab_slug (array)
    • toggles (array) — All settings group definitions for the tab
      • toggle_slug (array) — Settings group definition
        • priority (int) — Groups are sorted based on this number (from lowest to highest)
        • sub_toggles (array) — Sub groups for this group (optional)
          • sub_toggle_slug (array) — Sub group definition
            • icon (string) — The slug of a predefined icon (optional)
            • icon_svg (string) — Raw SVG icon (optional)
            • name (string) — Display Name (only shown when no icon is defined)
        • tabbed_subtoggles (bool) — Whether or not to display sub groups as tabs
        • title (string) — Display name (localized)

Custom Settings Groups Example

Reference compiled from publicly available Divi developer documentation.