mirror of
https://github.com/proelements/proelements.git
synced 2026-04-06 04:13:48 +00:00
v3.33.1
This commit is contained in:
20
modules/theme-builder/import-export-customization/revert.php
Normal file
20
modules/theme-builder/import-export-customization/revert.php
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
namespace ElementorPro\Modules\ThemeBuilder\ImportExportCustomization;
|
||||
|
||||
use ElementorPro\Plugin;
|
||||
|
||||
class Revert {
|
||||
|
||||
public function revert_theme_builder_templates_conditions( array $data ) {
|
||||
$theme_builder_module = Plugin::instance()->modules_manager->get_modules( 'theme-builder' );
|
||||
|
||||
$theme_builder_module->get_conditions_manager()->clear_cache();
|
||||
|
||||
$old_conditions = $data['runners']['templates']['template_conditions'] ?? [];
|
||||
|
||||
foreach ( $old_conditions as $template_id => $conditions ) {
|
||||
$theme_builder_module->get_conditions_manager()->save_conditions( $template_id, $conditions );
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user