PluginProbe
ShopBuilder – WooCommerce Builder For Elementor / 1.1.4
ShopBuilder – WooCommerce Builder For Elementor v1.1.4
3.4.2 3.4.1 3.4.0 2.0.1 2.0.2 2.0.3 2.1.0 2.1.1 2.1.10 2.1.11 2.1.12 2.1.13 2.1.14 2.1.15 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 2.1.7 2.1.8 2.1.9 2.2.0 2.2.1 2.2.2 All 63 releases
shopbuilder / app / Elementor / Widgets / General / Notice.php

Notice.php in ShopBuilder – WooCommerce Builder For Elementor 1.1.4, at app/Elementor/Widgets/General/Notice.php

86 lines 2.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Main ProductDescription class.
4 *
5 * @package RadiusTheme\SB
6 */
7
8 namespace RadiusTheme\SB\Elementor\Widgets\General;
9
10 use RadiusTheme\SB\Helpers\Fns;
11 use RadiusTheme\SB\Abstracts\ElementorWidgetBase;
12 use RadiusTheme\SB\Elementor\Widgets\Controls\NoticeSettings;
13 use RadiusTheme\SB\Helpers\BuilderFns;
14
15 // Do not allow directly accessing this file.
16 if ( ! defined( 'ABSPATH' ) ) {
17 exit( 'This script cannot be accessed directly.' );
18 }
19
20 /**
21 * Product Description class
22 */
23 class Notice extends ElementorWidgetBase {
24 /**
25 * Construct function
26 *
27 * @param array $data default array.
28 * @param mixed $args default arg.
29 */
30 public function __construct( $data = [], $args = null ) {
31 $this->rtsb_name = esc_html__( 'Notice', 'shopbuilder' );
32 $this->rtsb_base = 'rtsb-wc-notice';
33 parent::__construct( $data, $args );
34 $this->rtsb_category = 'rtsb-shopbuilder-general';
35 }
36 /**
37 * Widget Field
38 *
39 * @return array
40 */
41 public function widget_fields() {
42 $fields = NoticeSettings::widget_fields( $this );
43 return apply_filters( 'rtsb/elements/elementor/single/' . $this->rtsb_base, $fields, $this );
44 }
45 /**
46 * Set Widget Keyword.
47 *
48 * @return array
49 */
50 public function get_keywords() {
51 return [ 'Notice' ] + parent::get_keywords();
52 }
53 /**
54 * Render Function
55 *
56 * @return void
57 */
58 protected function render() {
59 $controllers = $this->get_settings_for_display();
60 $this->theme_support();
61 $data = [
62 'template' => 'elementor/general/notice',
63 'controllers' => $controllers,
64 ];
65 if ( $this->is_builder_mode() ) { //$type = BuilderFns::builder_type( get_the_ID() ); ?>
66 <div class="rtsb-notice">
67 <div class="woocommerce-notices-wrapper">
68 <div class="woocommerce-message" role="alert">
69 <a href="#" tabindex="1" class="button wc-forward">
70 <?php esc_html_e( 'Demo Button', 'shopbuilder' ); ?>
71 </a>
72 <?php esc_html_e( '“Demo” This is demo preview for message notice.', 'shopbuilder' ); ?>
73 </div>
74 <ul class="woocommerce-error" role="alert">
75 <li> <strong>Error:</strong> This is demo preview for error notice</li>
76 </ul>
77 </div>
78 </div>
79 <?php } else {
80 Fns::load_template( $data['template'], $data );
81 };
82 $this->theme_support( 'render_reset' );
83 }
84
85 }
86