| 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\Helpers\Fns; |
| 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 CheckoutLoginFormSettings { |
| 21 |
/** |
| 22 |
* Widget Control Selectors |
| 23 |
* |
| 24 |
* @var object |
| 25 |
*/ |
| 26 |
private static $widget = []; |
| 27 |
/** |
| 28 |
* Widget Control Selectors |
| 29 |
* |
| 30 |
* @var array |
| 31 |
*/ |
| 32 |
private static $selectors = []; |
| 33 |
/** |
| 34 |
* Controls Settings |
| 35 |
* |
| 36 |
* @param object $widget widget object. |
| 37 |
* @return array |
| 38 |
*/ |
| 39 |
public static function widget_fields( $widget ) { |
| 40 |
self::$widget = $widget; |
| 41 |
self::$selectors = self::$widget->selectors; |
| 42 |
$fields = CheckoutInfoBoxSettings::widget_fields( $widget ); |
| 43 |
$fields = self::form_fields_others_control( $fields ); |
| 44 |
return $fields; |
| 45 |
} |
| 46 |
|
| 47 |
/** |
| 48 |
* Widget Field |
| 49 |
* |
| 50 |
* @return array |
| 51 |
*/ |
| 52 |
public static function form_fields_others_control( $fields ) { |
| 53 |
$insert_array = [ |
| 54 |
'others_heading' => [ |
| 55 |
'type' => 'html', |
| 56 |
'raw' => sprintf( |
| 57 |
'<h3 class="rtsb-elementor-group-heading">%s</h3>', |
| 58 |
esc_html__( 'Others Settings', 'shopbuilder' ) |
| 59 |
), |
| 60 |
'content_classes' => 'elementor-panel-heading-title', |
| 61 |
'separator' => 'default', |
| 62 |
], |
| 63 |
'label_gap' => [ |
| 64 |
'label' => esc_html__( 'Fields & Label Gap', 'shopbuilder' ), |
| 65 |
'type' => 'dimensions', |
| 66 |
'mode' => 'responsive', |
| 67 |
'size_units' => [ 'px' ], |
| 68 |
'selectors' => [ |
| 69 |
self::$selectors['label_gap'] => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 70 |
], |
| 71 |
], |
| 72 |
]; |
| 73 |
$fields = Fns::insert_controls( 'form_margin', $fields, $insert_array ); |
| 74 |
return $fields; |
| 75 |
} |
| 76 |
} |
| 77 |
|