| 1 |
<?php |
| 2 |
namespace HelloPlus\Modules\TemplateParts\Components; |
| 3 |
|
| 4 |
if ( ! defined( 'ABSPATH' ) ) { |
| 5 |
exit; // Exit if accessed directly. |
| 6 |
} |
| 7 |
|
| 8 |
use Elementor\App\Modules\ImportExport\Processes\Import as Elementor_Import; |
| 9 |
use Elementor\App\Modules\ImportExport\Processes\Export as Elementor_Export; |
| 10 |
use Elementor\App\Modules\ImportExport\Processes\Revert as Elementor_Revert; |
| 11 |
|
| 12 |
use HelloPlus\Includes\Utils; |
| 13 |
use HelloPlus\Modules\TemplateParts\Classes\Runners\Import as Ehp_Import; |
| 14 |
use HelloPlus\Modules\TemplateParts\Classes\Runners\Export as Ehp_Export; |
| 15 |
use HelloPlus\Modules\TemplateParts\Classes\Runners\Revert as Ehp_Revert; |
| 16 |
|
| 17 |
class Import_Export { |
| 18 |
public function register_import_runners( Elementor_Import $import ) { |
| 19 |
$import->register( new Ehp_Import() ); |
| 20 |
} |
| 21 |
|
| 22 |
public function register_export_runners( Elementor_Export $export ) { |
| 23 |
$export->register( new Ehp_Export() ); |
| 24 |
} |
| 25 |
|
| 26 |
public function register_revert_runners( Elementor_Revert $revert ) { |
| 27 |
$revert->register( new Ehp_Revert() ); |
| 28 |
} |
| 29 |
|
| 30 |
public function __construct() { |
| 31 |
if ( Utils::has_pro() ) { |
| 32 |
return; |
| 33 |
} |
| 34 |
|
| 35 |
add_action( 'elementor/import-export/import-kit', [ $this, 'register_import_runners' ] ); |
| 36 |
add_action( 'elementor/import-export/export-kit', [ $this, 'register_export_runners' ] ); |
| 37 |
add_action( 'elementor/import-export/revert-kit', [ $this, 'register_revert_runners' ] ); |
| 38 |
} |
| 39 |
} |
| 40 |
|