| 1 |
<?php |
| 2 |
|
| 3 |
namespace Elementor\Modules\AtomicWidgets\Elements\Promotions; |
| 4 |
|
| 5 |
use Elementor\Plugin; |
| 6 |
|
| 7 |
if ( ! defined( 'ABSPATH' ) ) { |
| 8 |
exit; |
| 9 |
} |
| 10 |
|
| 11 |
trait Preserves_Children_Subtree { |
| 12 |
|
| 13 |
protected function _get_default_child_type( array $element_data ) { |
| 14 |
$document = Plugin::$instance->documents->get_current(); |
| 15 |
|
| 16 |
if ( $document && $document->is_saving() ) { |
| 17 |
return new Preserved_Element(); |
| 18 |
} |
| 19 |
|
| 20 |
return null; |
| 21 |
} |
| 22 |
} |
| 23 |
|