| 1 |
<?php |
| 2 |
/** |
| 3 |
* Main ProductDescription class. |
| 4 |
* |
| 5 |
* @package RadiusTheme\SB |
| 6 |
*/ |
| 7 |
|
| 8 |
namespace RadiusTheme\SB\Elementor\Widgets\Controls; |
| 9 |
|
| 10 |
// Do not allow directly accessing this file. |
| 11 |
if (!defined('ABSPATH')) { |
| 12 |
exit('This script cannot be accessed directly.'); |
| 13 |
} |
| 14 |
|
| 15 |
/** |
| 16 |
* Product Description class |
| 17 |
*/ |
| 18 |
class InfoboxSettings |
| 19 |
{ |
| 20 |
/** |
| 21 |
* Widget Field |
| 22 |
* |
| 23 |
* @return array |
| 24 |
*/ |
| 25 |
public static function style_settings($widget) |
| 26 |
{ |
| 27 |
$fields = [ |
| 28 |
'infobox_style' => [ |
| 29 |
'mode' => 'section_start', |
| 30 |
'tab' => 'style', |
| 31 |
'label' => esc_html__('Infobox style', 'shopbuilder'), |
| 32 |
], |
| 33 |
|
| 34 |
'infobox_typography' => [ |
| 35 |
'mode' => 'group', |
| 36 |
'type' => 'typography', |
| 37 |
'label' => esc_html__('Typography', 'shopbuilder'), |
| 38 |
'selector' => $widget->selectors['infobox_typography'], |
| 39 |
], |
| 40 |
'infobox_bg_color' => [ |
| 41 |
'label' => esc_html__('Background Color', 'shopbuilder'), |
| 42 |
'type' => 'color', |
| 43 |
|
| 44 |
'selectors' => [ |
| 45 |
$widget->selectors['infobox_bg_color'] => 'background-color: {{VALUE}};', |
| 46 |
], |
| 47 |
], |
| 48 |
'infobox_text_color' => [ |
| 49 |
'label' => esc_html__('Color', 'shopbuilder'), |
| 50 |
'type' => 'color', |
| 51 |
|
| 52 |
'selectors' => [ |
| 53 |
$widget->selectors['infobox_text_color'] => 'color: {{VALUE}};', |
| 54 |
], |
| 55 |
], |
| 56 |
'infobox_text_link_color' => [ |
| 57 |
'label' => esc_html__('Link Color', 'shopbuilder'), |
| 58 |
'type' => 'color', |
| 59 |
|
| 60 |
'selectors' => [ |
| 61 |
$widget->selectors['infobox_text_link_color'] => 'color: {{VALUE}};', |
| 62 |
], |
| 63 |
], |
| 64 |
'infobox_border_color' => [ |
| 65 |
'label' => esc_html__('Border Color', 'shopbuilder'), |
| 66 |
'type' => 'color', |
| 67 |
|
| 68 |
'selectors' => [ |
| 69 |
$widget->selectors['infobox_border_color'] => 'border-color: {{VALUE}};', |
| 70 |
], |
| 71 |
], |
| 72 |
'infobox_icon_size' => [ |
| 73 |
'label' => esc_html__('Icon Size', 'shopbuilder'), |
| 74 |
'type' => 'slider', |
| 75 |
'range' => [ |
| 76 |
'px' => [ |
| 77 |
'min' => 10, |
| 78 |
'max' => 100, |
| 79 |
], |
| 80 |
], |
| 81 |
'selectors' => [ |
| 82 |
$widget->selectors['infobox_icon_size'] => 'font-size: {{SIZE}}{{UNIT}};', |
| 83 |
], |
| 84 |
], |
| 85 |
'infobox_icon_color' => [ |
| 86 |
'label' => esc_html__('Icon Color', 'shopbuilder'), |
| 87 |
'type' => 'color', |
| 88 |
|
| 89 |
'selectors' => [ |
| 90 |
$widget->selectors['infobox_icon_color'] => 'color: {{VALUE}};', |
| 91 |
], |
| 92 |
], |
| 93 |
'infobox_padding' => [ |
| 94 |
'label' => esc_html__('Padding (px)', 'shopbuilder'), |
| 95 |
'type' => 'dimensions', |
| 96 |
'mode' => 'responsive', |
| 97 |
'size_units' => ['px'], |
| 98 |
'selectors' => [ |
| 99 |
$widget->selectors['infobox_padding'] => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 100 |
], |
| 101 |
'separator' => 'before', |
| 102 |
], |
| 103 |
|
| 104 |
'infobox_style_end' => [ |
| 105 |
'mode' => 'section_end', |
| 106 |
], |
| 107 |
]; |
| 108 |
return $fields; |
| 109 |
} |
| 110 |
} |
| 111 |
|