| 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 ProductTaxSettings { |
| 22 |
/** |
| 23 |
* Widget Field |
| 24 |
* |
| 25 |
* @return array |
| 26 |
*/ |
| 27 |
public static function widget_fields( $widget ) { |
| 28 |
$alignment = ControlHelper::alignment(); |
| 29 |
unset( $alignment['justify'] ); |
| 30 |
$fields = [ |
| 31 |
'meta_content' => [ |
| 32 |
'mode' => 'section_start', |
| 33 |
'label' => esc_html__( 'Styles', 'shopbuilder' ), |
| 34 |
'tab' => 'content', |
| 35 |
], |
| 36 |
'show_label' => [ |
| 37 |
'label' => esc_html__( 'Label', 'shopbuilder' ), |
| 38 |
'type' => 'switch', |
| 39 |
'label_on' => esc_html__( 'Show', 'shopbuilder' ), |
| 40 |
'label_off' => esc_html__( 'Hide', 'shopbuilder' ), |
| 41 |
'default' => 'yes', |
| 42 |
'return_value' => 'yes', |
| 43 |
'separator' => 'default', |
| 44 |
], |
| 45 |
'align' => [ |
| 46 |
'mode' => 'responsive', |
| 47 |
'label' => esc_html__( 'Alignment', 'shopbuilder' ), |
| 48 |
'type' => 'choose', |
| 49 |
'options' => $alignment, |
| 50 |
'selectors' => [ |
| 51 |
$widget->selectors['align'] => 'text-align: {{VALUE}};', |
| 52 |
], |
| 53 |
], |
| 54 |
'meta_label_heading' => [ |
| 55 |
'type' => 'html', |
| 56 |
'raw' => sprintf( |
| 57 |
'<h3 class="rtsb-elementor-group-heading">%s</h3>', |
| 58 |
esc_html__( 'Label', 'shopbuilder' ) |
| 59 |
), |
| 60 |
'content_classes' => 'elementor-panel-heading-title', |
| 61 |
'separator' => 'before', |
| 62 |
'condition' => [ |
| 63 |
'show_label' => 'yes', |
| 64 |
], |
| 65 |
], |
| 66 |
'label_typo' => [ |
| 67 |
'mode' => 'group', |
| 68 |
'type' => 'typography', |
| 69 |
'selector' => $widget->selectors['label_typo'], |
| 70 |
'exclude' => [ 'text_transform', 'text_decoration', 'font_style', 'letter_spacing' ], |
| 71 |
'condition' => [ |
| 72 |
'show_label' => 'yes', |
| 73 |
], |
| 74 |
], |
| 75 |
'meta_label_color' => [ |
| 76 |
'label' => esc_html__( 'Label Color', 'shopbuilder' ), |
| 77 |
'type' => 'color', |
| 78 |
'condition' => [ |
| 79 |
'show_label' => 'yes', |
| 80 |
], |
| 81 |
'selectors' => [ |
| 82 |
$widget->selectors['meta_label_color'] => 'color: {{VALUE}};', |
| 83 |
], |
| 84 |
], |
| 85 |
'shopbuilder_meta_value_heading' => [ |
| 86 |
'type' => 'html', |
| 87 |
'raw' => sprintf( |
| 88 |
'<h3 class="rtsb-elementor-group-heading">%s</h3>', |
| 89 |
esc_html__( 'Value', 'shopbuilder' ) |
| 90 |
), |
| 91 |
'content_classes' => 'elementor-panel-heading-title', |
| 92 |
'separator' => 'before', |
| 93 |
], |
| 94 |
'value_typo' => [ |
| 95 |
'mode' => 'group', |
| 96 |
'type' => 'typography', |
| 97 |
'selector' => $widget->selectors['value_typo'], |
| 98 |
'exclude' => [ 'text_transform', 'text_decoration', 'font_style', 'letter_spacing' ], |
| 99 |
], |
| 100 |
'meta_value_color' => [ |
| 101 |
'label' => esc_html__( 'Color', 'shopbuilder' ), |
| 102 |
'type' => 'color', |
| 103 |
'selectors' => [ |
| 104 |
$widget->selectors['meta_value_color'] => 'color: {{VALUE}};', |
| 105 |
], |
| 106 |
], |
| 107 |
'meta_value_hover_color' => [ |
| 108 |
'label' => esc_html__( 'Hover Color', 'shopbuilder' ), |
| 109 |
'type' => 'color', |
| 110 |
'selectors' => [ |
| 111 |
$widget->selectors['meta_value_hover_color'] => 'color: {{VALUE}};', |
| 112 |
], |
| 113 |
], |
| 114 |
'sec_general_end' => [ |
| 115 |
'mode' => 'section_end', |
| 116 |
], |
| 117 |
]; |
| 118 |
return $fields; |
| 119 |
} |
| 120 |
|
| 121 |
|
| 122 |
} |
| 123 |
|