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 / reset-themes.php

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

81 lines 2.1 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 if (!defined('ABSPATH')) {
6 exit; // Exit if accessed directly
7 }
8
9 use MasterAddons\Inc\Classes\Helper;
10
11 /**
12 * Author Name: Liton Arefin
13 * Author URL: https://jeweltheme.com
14 * Date: 8/6/20
15 */
16
17 class Jltma_Reset_Themes_Conflicts
18 {
19
20 private static $instance = null;
21
22 public function __construct()
23 {
24 add_action('wp_enqueue_scripts', [$this, 'jltma_reset_theme_conflicts']);
25 // add_action('wp_enqueue_scripts', [$this, 'jltma_reset_theme_dequeue_script'], 100);
26 // add_action('wp_print_scripts', [$this, 'jltma_reset_theme_dequeue_script'], 100);
27 }
28
29 function jltma_reset_theme_dequeue_script()
30 {
31 $theme = wp_get_theme();
32
33 // wp_dequeue_script( 'scriptname' );
34
35 //Stratus
36 if ('Stratus' == $theme->name || 'Stratus' == $theme->parent_theme) {
37 wp_dequeue_style('jltma-bootstrap');
38 }
39
40 //OceanWP
41 if ('OceanWP' == $theme->name || 'OceanWP' == $theme->parent_theme) {
42 wp_dequeue_style('jltma-bootstrap');
43 }
44 }
45
46 public function jltma_reset_theme_conflicts()
47 {
48
49 $jltma_custom_css = "";
50
51 // gets the current theme
52 $theme = wp_get_theme();
53
54 //Twenty Twelve
55 if ('Twenty Twelve' == $theme->name || 'Twenty Twelve' == $theme->parent_theme) {
56 // Twenty Twelve is the current active theme or parent theme
57 }
58
59 //Airi Theme Reset Styles
60 if ('Airi' == $theme->name || 'Airi' == $theme->parent_theme) {
61 $jltma_custom_css .= "
62 @media (max-width: 1199px){
63 .header-mobile-menu .mobile-menu-toggle{ outline: none; }
64 .main-navigation { position: fixed !important; max-width: 100% !important; }
65 }";
66
67 wp_add_inline_style('airi-bootstrap', $jltma_custom_css);
68 }
69 }
70
71 public static function get_instance()
72 {
73 if (!self::$instance) {
74 self::$instance = new self;
75 }
76 return self::$instance;
77 }
78 }
79
80 Jltma_Reset_Themes_Conflicts::get_instance();
81