rebase from live enviornment

This commit is contained in:
Rachit Bhargava
2024-01-09 22:14:20 -05:00
parent ff0b49a046
commit 3a22fcaa4a
15968 changed files with 2344674 additions and 45234 deletions

View File

@@ -0,0 +1,57 @@
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
}
/**
* Theme Compatibility for Virtue theme
* @see https://wordpress.org/themes/virtue/
* @since 1.0
*/
class ET_Builder_Theme_Compat_Virtue {
/**
* Unique instance of class
*/
public static $instance;
/**
* Constructor
*/
private function __construct(){
$this->init_hooks();
}
/**
* Gets the instance of the class
*/
public static function init(){
if ( null === self::$instance ){
self::$instance = new self();
}
return self::$instance;
}
/**
* Hook methods to WordPress
* @return void
*/
function init_hooks() {
$theme = wp_get_theme();
$version = isset( $theme['Version'] ) ? $theme['Version'] : false;
// Bail if no theme version found
if ( ! $version ) {
return;
}
// Fixing Virtue v2.5.6 below compatibility issue
// @todo once this issue is fixed in future version, run version_compare() to limit the scope of this fix
// Remove Virtue's template wrapper on preview screen
if ( is_et_pb_preview() ) {
remove_filter( 'template_include', array( 'Kadence_Wrapping', 'wrap' ), 101 );
}
}
}
ET_Builder_Theme_Compat_Virtue::init();