A Box-shadow input field
Parameter | Type | Value |
---|---|---|
type | required |
Predefined String (boxshadow) |
title | optional |
String |
desc | optional |
String |
std | optional |
Array |
selector | optional |
String / Array |
tab | optional |
String(style) |
section | optional |
String |
Always return object
'widget_boxshadow' => array(
'type' => 'boxshadow',
'title' => __('Boxshadow Field','your-textdomain'),
'std' => array(
'shadowValue'=> array( 'top' => '120px', 'right' => '0px', 'bottom' => '0px', 'left' => '0px' ),
'shadowColor' => '#ffffff'
),
'selector' => '{{SELECTOR}} .example-boxshadow'
)
Support 'selector' parameters.
Inside the rander()
method-
echo '<div>'.$data["settings"]["widget_boxshadow"]["shadowValue"]["top"].'</div>';
echo '<div>'.$data["settings"]["widget_boxshadow"]["shadowColor"].'</div>';
echo '<div class="example-boxshadow">Example Boxshadow</div>';
Inside the getTemplate()
method-
<div>{{data.widget_border.shadowValue.top}}</div>
<div>{{data.widget_border.shadowColor}}</div>
<div class="example-boxshadow">Example Boxshadow</div>