You appear to be a bot. Output may be restricted
Description
Map default and values to type and optionsThe source structure for $data is fairly free form. Created using the bw_skv helper function
- $data['default'] – the default value – may be null, a literal, the result of a function call or a current piece of data
- $data['notes'] – free form text not used in this function The target array for each attr in the attrs array is
- array(
- 'label' => 'Alignement',
- 'attr' => 'float',
- 'type' => 'select',
- 'placeholder' => 'right' // default value - for text and textarea fields, perhaps other types
- 'value' => 'right', // default value
- 'options' => array( // List of options value => label
- 'left' => 'Left',
- 'right' => 'Right',
- 'none' => 'None'
- ),
- ),
- 'text' => array(),
- 'textarea' => array( 'template' => 'shortcode-ui-field-textarea',
- 'url' => array( 'template' => 'shortcode-ui-field-url',
- 'select' => array( 'template' => 'shortcode-ui-field-select',
- 'checkbox' => array( 'template' => 'shortcode-ui-field-checkbox',
- 'radio' => array( 'template' => 'shortcode-ui-field-radio',
- 'email' => array( 'template' => 'shortcode-ui-field-email',
- 'number' => array( 'template' => 'shortcode-ui-field-number',
- 'date' => array( 'template' => 'shortcode-ui-field-date',
- $attr
- ( array ) required – the field we're building for the parameter
- $shortcode
- ( string ) required – looks like it's not needed here yet!
- $help
- ( string ) required – ditto
- $parameter
- ( string ) required – ditto
- $data
- ( array ) required – see above
– $data[‘values’] – | separated values which may be enclosed in italics |
---|