| 1 |
<?php |
| 2 |
/** |
| 3 |
* Main ProductDescription class. |
| 4 |
* |
| 5 |
* @package RadiusTheme\SB |
| 6 |
*/ |
| 7 |
|
| 8 |
namespace RadiusTheme\SB\Elementor\Widgets\Controls; |
| 9 |
|
| 10 |
use Elementor\Controls_Manager; |
| 11 |
use RadiusTheme\SB\Elementor\Helper\ControlHelper; |
| 12 |
|
| 13 |
// Do not allow directly accessing this file. |
| 14 |
if ( ! defined( 'ABSPATH' ) ) { |
| 15 |
exit( 'This script cannot be accessed directly.' ); |
| 16 |
} |
| 17 |
|
| 18 |
/** |
| 19 |
* Product Description class |
| 20 |
*/ |
| 21 |
class ArchiveTitleSettings { |
| 22 |
/** |
| 23 |
* Widget Field |
| 24 |
* |
| 25 |
* @return array |
| 26 |
*/ |
| 27 |
public static function widget_fields( $widget ) { |
| 28 |
$fields = [ |
| 29 |
'sec_general' => [ |
| 30 |
'mode' => 'section_start', |
| 31 |
'label' => esc_html__( 'General', 'shopbuilder' ), |
| 32 |
], |
| 33 |
'archive_title_html_tag' => [ |
| 34 |
'label' => esc_html__( 'Title HTML Tag', 'shopbuilder' ), |
| 35 |
'type' => 'select', |
| 36 |
'options' => ControlHelper::heading_tags(), |
| 37 |
'default' => 'h2', |
| 38 |
'separator' => 'default', |
| 39 |
], |
| 40 |
'archive_title_align' => [ |
| 41 |
'mode' => 'responsive', |
| 42 |
'label' => esc_html__( 'Alignment', 'shopbuilder' ), |
| 43 |
'type' => 'choose', |
| 44 |
'options' => ControlHelper::alignment(), |
| 45 |
'default' => '', |
| 46 |
'selectors' => [ |
| 47 |
$widget->selectors['archive_title_align'] => 'text-align: {{VALUE}};', |
| 48 |
], |
| 49 |
], |
| 50 |
'sec_general_end' => [ |
| 51 |
'mode' => 'section_end', |
| 52 |
], |
| 53 |
'general_style' => [ |
| 54 |
'mode' => 'section_start', |
| 55 |
'tab' => 'style', |
| 56 |
'label' => esc_html__( 'Style', 'shopbuilder' ), |
| 57 |
], |
| 58 |
|
| 59 |
'title_typo' => [ |
| 60 |
'mode' => 'group', |
| 61 |
'type' => 'typography', |
| 62 |
'label' => esc_html__( 'Typography', 'shopbuilder' ), |
| 63 |
'selector' => $widget->selectors['title_typo'], |
| 64 |
], |
| 65 |
|
| 66 |
'archive_title_color' => [ |
| 67 |
'label' => esc_html__( 'Title Color', 'shopbuilder' ), |
| 68 |
'type' => 'color', |
| 69 |
'selectors' => [ |
| 70 |
$widget->selectors['archive_title_color'] => 'color: {{VALUE}} !important;', |
| 71 |
], |
| 72 |
], |
| 73 |
'text_stroke' => [ |
| 74 |
'mode' => 'group', |
| 75 |
'type' => 'text-stroke', |
| 76 |
'selector' => $widget->selectors['text_stroke'], |
| 77 |
], |
| 78 |
'text_shadow' => [ |
| 79 |
'mode' => 'group', |
| 80 |
'type' => 'text-shadow', |
| 81 |
'selector' => $widget->selectors['text_shadow'], |
| 82 |
], |
| 83 |
'general_style_end' => [ |
| 84 |
'mode' => 'section_end', |
| 85 |
], |
| 86 |
]; |
| 87 |
return $fields; |
| 88 |
} |
| 89 |
} |
| 90 |
|