| 1 |
<?php |
| 2 |
/** |
| 3 |
* Main ProductDescription class. |
| 4 |
* |
| 5 |
* @package RadiusTheme\SB |
| 6 |
*/ |
| 7 |
|
| 8 |
namespace RadiusTheme\SB\Elementor\Widgets\Controls; |
| 9 |
|
| 10 |
use RadiusTheme\SB\Elementor\Helper\ControlHelper; |
| 11 |
|
| 12 |
// Do not allow directly accessing this file. |
| 13 |
if ( ! defined( 'ABSPATH' ) ) { |
| 14 |
exit( 'This script cannot be accessed directly.' ); |
| 15 |
} |
| 16 |
|
| 17 |
/** |
| 18 |
* Product Description class |
| 19 |
*/ |
| 20 |
class TextStyleSettings { |
| 21 |
/** |
| 22 |
* Widget Field |
| 23 |
* |
| 24 |
* @return array |
| 25 |
*/ |
| 26 |
public static function widget_fields( $widget ) { |
| 27 |
$fields = [ |
| 28 |
'section_style' => [ |
| 29 |
'mode' => 'section_start', |
| 30 |
'label' => esc_html__( 'Style', 'shopbuilder' ), |
| 31 |
], |
| 32 |
'typo' => [ |
| 33 |
'mode' => 'group', |
| 34 |
'type' => 'typography', |
| 35 |
'label' => esc_html__( 'Typography', 'shopbuilder' ), |
| 36 |
'selector' => $widget->selectors['typo'], |
| 37 |
], |
| 38 |
'align' => [ |
| 39 |
'mode' => 'responsive', |
| 40 |
'label' => esc_html__( 'Alignment', 'shopbuilder' ), |
| 41 |
'type' => 'choose', |
| 42 |
'options' => ControlHelper::alignment(), |
| 43 |
'selectors' => [ |
| 44 |
$widget->selectors['align'] => 'text-align: {{VALUE}};', |
| 45 |
], |
| 46 |
], |
| 47 |
'text_color' => [ |
| 48 |
'label' => esc_html__( 'Text Color', 'shopbuilder' ), |
| 49 |
'type' => 'color', |
| 50 |
'default' => '', |
| 51 |
'selectors' => [ |
| 52 |
$widget->selectors['text_color'] => 'color: {{VALUE}};', |
| 53 |
], |
| 54 |
], |
| 55 |
'text_shadow' => [ |
| 56 |
'mode' => 'group', |
| 57 |
'type' => 'text-shadow', |
| 58 |
'selector' => $widget->selectors['text_shadow'], |
| 59 |
], |
| 60 |
'section_style_end' => [ |
| 61 |
'mode' => 'section_end', |
| 62 |
], |
| 63 |
]; |
| 64 |
return $fields; |
| 65 |
} |
| 66 |
|
| 67 |
|
| 68 |
} |
| 69 |
|