1. Home
  2. Docs
  3. For Developer
  4. Example Fields

Example Fields

'attrs' => array (
    array(
        'type'                  => 'text',
        'param_name'            => 'section_title',
        'label'                 => __('Section Title','citybook-add-ons'),
        'desc'                  => '',
        'default'               => '',
    ),
    array(
        'type'                  => 'textarea',
        'param_name'            => 'content',
        'label'                 => __('Section Introtext (Can be use with html tags.)','citybook-add-ons'),
        'desc'                  => '',
        'default'               => '',
    ),
    array(
        'type'                  => 'select',
        'param_name'            => 'title_align',
        'label'                 => __('Section Title Alignment','citybook-add-ons'),
        'desc'                  => '',
        'default'               => 'setleft',
        'value'                 => array(
            'setleft'                       => __('Left', 'citybook-add-ons'),
            'setcenter'                     => __('Center', 'citybook-add-ons'),
            'setright'                      => __('Right', 'citybook-add-ons'),
        ),
    ),
    array(
        'type'                  => 'switch',
        'param_name'            => 'is_fullheight',
        'label'                 => __('Is Fullscreen height','citybook-add-ons'),
        'desc'                  => '',
        'default'               => '0',
        'value'                 => array(
            '1'                     => __('Yes', 'citybook-add-ons'),
            '0'                     => __('No', 'citybook-add-ons'),
        ),
    ),
    array(
        'type'                  => 'image',
        'param_name'            => 'parallax_image',
        'label'                 => __('Parallax Image','citybook-add-ons'),
        'desc'                  => __("If no image is selected, parallax will use background image from Style tab.", 'citybook-add-ons'),
        'default'               =>'',
    ),
    array(
        'type'                  => 'color',
        'param_name'            => 'overlay_color',
        'label'                 => __('Overlay Color','citybook-add-ons'),
        'desc'                  => '',
        'default'               => '',
        'rgba'          => true,
    ),
)
Was this article helpful to you? Yes No

How can we help?