Clone wiki

Shortcode Ultimate V2 / Available Options Type

Example

<?php 

static function get_config() {

        return array(
            'name'  => 'New Heading',
            'type'  => 'wrap',
            'group' => 'content',
            'content' => 'Your heading text here',
            'desc'    => "This is new Custom Heading Shortcode.",
            'icon'    => 'h-square',
            'atts'  => array(               

                'size' => array(
                    'type'    => 'slider',
                    'min'     => 7,
                    'max'     => 48,
                    'step'    => 1,
                    'default' => 16,
                    'name'    => 'Size',
                    'desc'    => 'Select Your Font Size from here'
                ),

                'class' => array(
                    'default' => '',
                    'name'    => 'Class',
                    'desc'    => 'If you want to add extra CSS class for this element so type here'
                )
            )
        );
    }

?>

Available Attribute Type(I mean that Array => atts => size => type) There are some type that you can use like- slider(for set number that will set by dragging),color(for color selection),icon(for icon selection),select(for certain value select), border(for border assignment),shadow(for shadow), bool(for switch button). Note: if you do not want to use any type(like class attribute). you will get a text box where you can add anything.

Details of Type

  • Example for not using any type:
<?php 
'class' => array(
    'default' => '',
    'name'    => 'Class',
    'desc'    => 'If you want to add extra CSS class for this element so type here'
)
?>
  • Example for type bool:
<?php 

'inline' => array(
    'type'    => 'bool',
    'default' => 'no',
    'name'    => 'Inline',
    'desc'    => 'description here'
),
?>
  • Example for type color:
<?php 
'box_color' => array(
    'type'    => 'color',
    'values'  => array( ),
    'default' => '#333333',
    'name'    => 'Box Color',
    'desc'    => 'This color will be applied to the content'
),
?>
  • Example for type select:
<?php 
'align' => array(
    'type'   => 'select',
    'values' => array(
        'center'=> 'center',
        'left'  => 'left',
        'right' => 'right'
    ),
    'default' => 'center',
    'name'    => 'Align', 
    'desc'    => 'You can set alignment from here.'
)
?>
  • Example for type slider:
<?php 
'size' => array(
    'type'    => 'slider',
    'min'     => 7,
    'max'     => 48,
    'step'    => 1,
    'default' => 16,
    'name'    => 'Size',
    'desc'    => 'Select Your Font Size from here'
)
?>
  • Example for type icon:
<?php 
'icon' => array(
    'type'    => 'icon',
    'default' => '',
    'name'    => 'Icon',
    'desc'    => 'Select Icon from here.'
)
?>
  • Example for type border :
<?php 
'border' => array(
    'type'    => 'border',
    'default' => '0px solid #444444',
    'name'    => 'Border',
    'desc'    => 'You can set content border from here'
)
?>
  • Example for type shadow :
<?php 
'icon_shadow' => array(
    'type'    => 'shadow',
    'default' => '0 0 0 #444444',
    'name'    => 'Icon Shadow'
    'desc'    => 'You can set object shadow from here'
),
?>
  • Example for type upload:
<?php 
'photo' => array(
    'type'    => 'upload',
    'default' => '',
    'name'    => 'Photo'
    'desc'    => 'Select the member photo from here'
)
?>
  • Example for type source:
<?php 
'source' => array(
    'type'    => 'source',
    'default' => 'none',
    'name'    => 'Source',
    'desc'    => 'Choose images source. You can use images from media manager or retrieve it from article posted under specified blog category. You can also pick any custom taxonomy'
),
?>

Updated