KC Element Style Join KC discussion

You can enable Style-Box for every element to edit its margin, padding, background and so on. KC Element Style

Instruction:

'css_box' => true
>> See how to register CSS-Box via Maps.

Example:

add_map(
        'mini_icon' => array(
            'name' => 'Icon',
            'description' => __('Display single icon', 'kingcomposer'),
            'icon' => 'sl-paper-plane',
            'category' => 'Content',

            'css_box' => true,
            // Set true to enable Style Box

            'params' => array(
                array(
                    'name' => 'icon',
                    'label' => 'Select Icon',
                    'type' => 'icons_picker',
                    'admin_label' => true,
                ),
                array(
                    'name' => 'icon_size',
                    'label' => 'Icon Size',
                    'type' => 'text',
                    'admin_label' => true,
                    'description' => __('Enter font-size for icon such as: 15px, 1em ..etc..', 'kingcomposer')
                ),
                array(
                    'name' => 'icon_color',
                    'label' => 'Icon Color',
                    'type' => 'color_picker',
                    'admin_label' => true,
                    'description' => __('Set color for icon', 'kingcomposer')
                )
            )
        )
    );
}

?>

Returns:

All of the custom style will be returned to "Random CSS ClassName" via parameter "CSS" of shortcode. So you just need to add the value of parameter "CSS" as a class name to the HTML tag you want.

Example kc_icon.php:


echo '
your code here
';