PluginProbe
Cookie Consent – GDPR & CCPA Cookie Banner & Consent Manager / 0.0.3
Cookie Consent – GDPR & CCPA Cookie Banner & Consent Manager v0.0.3
0.0.11 0.0.10 0.0.9 0.0.8 0.0.7 0.0.6 trunk 0.0.1 0.0.2 0.0.3 0.0.4 0.0.5
cookiez / modules / elementor / classes / widget-utils.php

widget-utils.php in Cookie Consent – GDPR & CCPA Cookie Banner & Consent Manager 0.0.3, at modules/elementor/classes/widget-utils.php

29 lines 584 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Cookiez\Modules\Elementor\Classes;
4
5 if ( ! defined( 'ABSPATH' ) ) {
6 exit;
7 }
8
9 use Cookiez\Classes\Utils;
10 use Elementor\Widget_Base;
11
12 class Widget_Utils {
13
14 public const CONTROL_NAME = 'template_type';
15
16 private const OPT_IN = 'opt-in';
17 private const OPT_OUT = 'opt-out';
18
19 public static function resolve_override( Widget_Base $widget ): ?string {
20 if ( ! Utils::is_elementor_editor() ) {
21 return null;
22 }
23
24 $value = $widget->get_settings_for_display( self::CONTROL_NAME );
25
26 return ( self::OPT_IN === $value || self::OPT_OUT === $value ) ? $value : null;
27 }
28 }
29