PluginProbe
Master Addons for Elementor – Elementor Addons, Widgets, Mega Menu Builder, Popup Builder, Widget Builder & Template Kits / trunk
Master Addons for Elementor – Elementor Addons, Widgets, Mega Menu Builder, Popup Builder, Widget Builder & Template Kits vtrunk
3.2.2 3.2.3 3.2.1 3.2.0 3.1.9 3.1.8 3.1.7 3.1.6 3.1.5 3.1.4 3.1.3 3.1.2 3.1.1 3.1.0 3.0.9 trunk 1.0.6 1.0.7 1.0.8 1.0.9 1.1.0 1.1.1 1.1.3 1.1.4 1.1.5 All 174 releases
master-addons / inc / classes / elementor-compat.php

elementor-compat.php in Master Addons for Elementor – Elementor Addons, Widgets, Mega Menu Builder, Popup Builder, Widget Builder & Template Kits trunk, at inc/classes/elementor-compat.php

71 lines 1.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace MasterAddons\Inc\Classes;
4
5 defined( 'ABSPATH' ) || exit;
6
7 /**
8 * Elementor Backward Compatibility
9 *
10 * Registers stub classes for deprecated Elementor Scheme_Color and Scheme_Typography
11 * that were removed in Elementor 3.15+. Prevents fatal errors from third-party
12 * themes/plugins (e.g. Brooklyn Lite) that still reference them.
13 */
14 class Elementor_Compat {
15
16 /**
17 * Register deprecated Elementor class stubs if missing.
18 */
19 public static function init() {
20 // Scheme_Color
21 if ( ! class_exists( '\Elementor\Scheme_Color' ) ) {
22 if ( class_exists( '\Elementor\Core\Schemes\Color' ) ) {
23 class_alias( '\Elementor\Core\Schemes\Color', '\Elementor\Scheme_Color' );
24 } else {
25 class_alias( __NAMESPACE__ . '\Elementor_Scheme_Color_Stub', '\Elementor\Scheme_Color' );
26 }
27 }
28
29 // Scheme_Typography
30 if ( ! class_exists( '\Elementor\Scheme_Typography' ) ) {
31 if ( class_exists( '\Elementor\Core\Schemes\Typography' ) ) {
32 class_alias( '\Elementor\Core\Schemes\Typography', '\Elementor\Scheme_Typography' );
33 } else {
34 class_alias( __NAMESPACE__ . '\Elementor_Scheme_Typography_Stub', '\Elementor\Scheme_Typography' );
35 }
36 }
37 }
38 }
39
40 /**
41 * Minimal stub for Elementor\Scheme_Color (removed in Elementor 3.15+).
42 *
43 * @internal
44 */
45 class Elementor_Scheme_Color_Stub {
46 const COLOR_1 = '1';
47 const COLOR_2 = '2';
48 const COLOR_3 = '3';
49 const COLOR_4 = '4';
50
51 public static function get_type() {
52 return 'color';
53 }
54 }
55
56 /**
57 * Minimal stub for Elementor\Scheme_Typography (removed in Elementor 3.15+).
58 *
59 * @internal
60 */
61 class Elementor_Scheme_Typography_Stub {
62 const TYPOGRAPHY_1 = '1';
63 const TYPOGRAPHY_2 = '2';
64 const TYPOGRAPHY_3 = '3';
65 const TYPOGRAPHY_4 = '4';
66
67 public static function get_type() {
68 return 'typography';
69 }
70 }
71