| Server IP : 69.72.244.102 / Your IP : 216.73.216.164 Web Server : LiteSpeed System : Linux s3434.fra1.stableserver.net 4.18.0-513.24.1.lve.2.el8.x86_64 #1 SMP Fri May 24 12:42:50 UTC 2024 x86_64 User : konzalta ( 1271) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /proc/thread-self/cwd/wp-content/plugins/master-addons/inc/classes/ |
Upload File : |
<?php
namespace MasterAddons\Inc\Classes;
use MasterAddons\Inc\Helper\Master_Addons_Helper;
/**
* Author Name: Liton Arefin
* Author URL: https://jeweltheme.com
* Date: 8/6/20
*/
class Jltma_Reset_Themes_Conflicts
{
private static $instance = null;
public function __construct()
{
add_action('wp_enqueue_scripts', [$this, 'jltma_reset_theme_conflicts']);
// add_action('wp_enqueue_scripts', [$this, 'jltma_reset_theme_dequeue_script'], 100);
// add_action('wp_print_scripts', [$this, 'jltma_reset_theme_dequeue_script'], 100);
}
function jltma_reset_theme_dequeue_script()
{
$theme = wp_get_theme();
// wp_dequeue_script( 'scriptname' );
//Stratus
if ('Stratus' == $theme->name || 'Stratus' == $theme->parent_theme) {
wp_dequeue_style('jltma-bootstrap');
}
//OceanWP
if ('OceanWP' == $theme->name || 'OceanWP' == $theme->parent_theme) {
wp_dequeue_style('jltma-bootstrap');
}
}
public function jltma_reset_theme_conflicts()
{
$jltma_custom_css = "";
// gets the current theme
$theme = wp_get_theme();
//Twenty Twelve
if ('Twenty Twelve' == $theme->name || 'Twenty Twelve' == $theme->parent_theme) {
// Twenty Twelve is the current active theme or parent theme
}
//Airi Theme Reset Styles
if ('Airi' == $theme->name || 'Airi' == $theme->parent_theme) {
$jltma_custom_css .= "
@media (max-width: 1199px){
.header-mobile-menu .mobile-menu-toggle{ outline: none; }
.main-navigation { position: fixed !important; max-width: 100% !important; }
}";
wp_add_inline_style('airi-bootstrap', $jltma_custom_css);
}
}
public static function get_instance()
{
if (!self::$instance) {
self::$instance = new self;
}
return self::$instance;
}
}
Jltma_Reset_Themes_Conflicts::get_instance();