Options framework

Site Editor Options Framework

Site Editor offers a simple and advanced way to create options inside modules, theme options and plugin options on the front end editor.

The options framework consists of a PHP array format that the system uses to parse and handle the options in a variety of ways. This allows us to abstract the complexities of option handling and gives you a simple consistent code interface for adding your options.

Panels

Panels are UI containers for options, to improve their organization. they can be in nesting level. The general parameters of the panels are the following:

Note: firstly, you need to create an array key for a panel as a panel Id.

  • title: the title of the panel.
  • description: a description of the panel to the user guide
  • type:  type of the panel that can be “default”, “inner_box” and “expanded”
  • priority: priority of the panel to appear in UI
  • capability: what type of users can access this panel(WordPress Capability)
  • option_group: type of dialog settings that this panel can appear on it.
  • theme_supports: related to theme features that this theme support.
  • parent_id: parent panel ID that this panel appears on it. the default is “root”
  • atts: HTML attributes for panel container HTML tag
  • dependency: an array of fields that this panel depended on them.
  • has_border_box: this panel can consist of border or no.
  • btn_style: button style for “inner_box” type that can be “default” and “menu”
  • field_spacing: the spacing around container button panel that can be “sm” and “lg”

Example

 

Options

The general parameters of the options are the following:

Our Options Framework have +30 type of option, these include:

  • text
  • tel
  • password
  • search
  • url
  • email
  • dimension
  • date
  • textarea
  • checkbox
  • multi-check
  • toggle
  • switch
  • code
  • wp-editor
  • color
  • multi-color
  • radio
  • radio-buttonset
  • radio-image
  • select
  • multi-select
  • number
  • slider
  • icon
  • multi-icon
  • image
  • multi-image
  • file
  • audio
  • video

And etc.

Example For Theme options and plugin options

 

Example For Module Settings