# shopbuilder/2.0.1/app/Elementor/Widgets/Controls/NoticeSettings.php

ShopBuilder – WooCommerce Builder For Elementor, version 2.0.1. 145 lines.

- Page: https://pluginprobe.com/plugins/shopbuilder/2.0.1/code/app/Elementor/Widgets/Controls/NoticeSettings.php
- Raw: https://pluginprobe.com/plugins/shopbuilder/2.0.1/raw/app/Elementor/Widgets/Controls/NoticeSettings.php
- Modified: 2023-11-13T05:30:08+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/shopbuilder/2.0.1/code/app/Elementor/Widgets/Controls/NoticeSettings.php#L10-L20`.

```php
<?php
/**
 * Main ProductDescription class.
 *
 * @package RadiusTheme\SB
 */

namespace RadiusTheme\SB\Elementor\Widgets\Controls;

use Elementor\Controls_Manager;

// Do not allow directly accessing this file.
if ( ! defined( 'ABSPATH' ) ) {
	exit( 'This script cannot be accessed directly.' );
}

/**
 * Product Description class
 */
class NoticeSettings {
	/**
	 * Widget Control Selectors
	 *
	 * @var array
	 */
	private static $selectors = [];
	/**
	 * Widget
	 *
	 * @var array
	 */
	private static $widget;
	/**
	 * Widget Field
	 *
	 * @return array
	 */
	public static function widget_fields( $widget ) {
		self::$widget    = $widget;
		self::$selectors = $widget->selectors;
		return self::notice_style() + self::button_style();
	}
	/**
	 * Widget Field
	 *
	 * @return array
	 */
	public static function notice_style() {
		return [
			'notice_section'      => [
				'mode'  => 'section_start',
				'label' => esc_html__( 'Notice', 'shopbuilder' ),
			],
			'notice_typography'   => [
				'mode'     => 'group',
				'type'     => 'typography',
				'label'    => esc_html__( 'Typography', 'shopbuilder' ),
				'selector' => self::$selectors['notice_typography'],
			],
			'notice_bg_color'     => [
				'label'     => esc_html__( 'Background Color', 'shopbuilder' ),
				'type'      => 'color',

				'selectors' => [
					self::$selectors['notice_bg_color'] => 'background-color: {{VALUE}};',
				],
			],
			'notice_text_color'   => [
				'label'     => esc_html__( 'Color', 'shopbuilder' ),
				'type'      => 'color',

				'selectors' => [
					self::$selectors['notice_text_color'] => 'color: {{VALUE}};',
				],
			],
			'notice_border_color' => [
				'label'     => esc_html__( 'Border Color', 'shopbuilder' ),
				'type'      => 'color',

				'selectors' => [
					self::$selectors['notice_border_color'] => 'border-color: {{VALUE}};',
				],
			],
			'notice_icon_size'    => [
				'label'     => esc_html__( 'Icon Size', 'shopbuilder' ),
				'type'      => 'slider',
				'range'     => [
					'px' => [
						'min' => 10,
						'max' => 100,
					],
				],
				'selectors' => [
					self::$selectors['notice_icon_size'] => 'font-size: {{SIZE}}{{UNIT}};',
				],
			],
			'notice_icon_color'   => [
				'label'     => esc_html__( 'Icon Color', 'shopbuilder' ),
				'type'      => 'color',
				'selectors' => [
					self::$selectors['notice_icon_color'] => 'color: {{VALUE}};',
				],
			],
			'notice_padding'      => [
				'label'      => esc_html__( 'Padding (px)', 'shopbuilder' ),
				'type'       => 'dimensions',
				'mode'       => 'responsive',
				'size_units' => [ 'px' ],
				'selectors'  => [
					self::$selectors['notice_padding'] => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
				],
				'separator'  => 'before',
			],
			'notice_gap_multiple' => [
				'label'       => esc_html__( ' Gap for Multiple Notice', 'shopbuilder' ),
				'description' => esc_html__( 'This gap will apply between two notices.', 'shopbuilder' ),
				'type'        => 'slider',
				'range'       => [
					'px' => [
						'min' => 0,
						'max' => 100,
					],
				],

				'selectors'   => [
					self::$selectors['notice_gap_multiple'] => 'gap: {{SIZE}}{{UNIT}};',
				],
			],
			'notice_section_end'  => [
				'mode' => 'section_end',
			],
		];
	}
	/**
	 * Widget Field
	 *
	 * @return array
	 */
	public static function button_style() {
		$fields = ButtonSettings::style_settings( self::$widget );
		unset( $fields['button_section_start']['tab'] );
		return $fields;
	}
}

```
