PluginProbe
Elementor Website Builder – more than just a page builder / 4.2.1
Elementor Website Builder – more than just a page builder v4.2.1
4.3.1 4.3.0 4.3.0-beta3 4.3.0-beta2 4.3.0-beta1 4.2.4 4.2.3 4.2.2 4.2.1 4.2.0 4.1.5 4.2.0-beta2 4.2.0-dev2 4.2.0-beta1 4.1.4 4.1.3 4.1.2 4.1.1 4.1.0 4.1.0-beta3 4.1.0-dev3 4.0.9 4.1.0-beta2 4.1.0-dev2 4.0.8 All 454 releases
← All changes | modules/global-classes/global-class-post.php +5 -9 4.3.04.2.1 View file →
@@ -100,8 +100,12 @@
100 100 return $data;
101 101 }
102 102
103 103 private function migrate_data( array &$data, string $meta_key ): void {
104 + if ( ! Migrations_Orchestrator::is_active() ) {
105 + return;
106 + }
107 +
104 108 $post_id = $this->post->ID;
105 109
106 110 Migrations_Orchestrator::make()->migrate(
107 111 $data,
@@ -269,13 +273,9 @@
269 273
270 274 return false !== $result;
271 275 }
272 276
273 - public function clone( Kit $target_kit ): ?self {
274 - return self::clone_to_kit( $this->get_class_id(), $this, $target_kit );
275 - }
276 -
277 - public static function clone_to_other_kit( string $style_id, Kit $source_kit, Kit $target_kit ): ?self {
277 + public static function clone_to_other_kit( string $style_id, Kit $source_kit, Kit $target_kit ): ?Global_Class_Post {
278 278 $source_post = self::find_by_class_id( $style_id, false, $source_kit );
279 279
280 280 if ( ! $source_post ) {
281 281 return null;
@@ -280,12 +280,8 @@
280 280 if ( ! $source_post ) {
281 281 return null;
282 282 }
283 283
284 - return self::clone_to_kit( $style_id, $source_post, $target_kit );
285 - }
286 -
287 - private static function clone_to_kit( string $style_id, self $source_post, Kit $target_kit ): ?self {
288 284 $new_post_id = wp_insert_post( [
289 285 'post_type' => Global_Class_Post_Type::CPT,
290 286 'post_title' => $source_post->get_label(),
291 287 'post_status' => 'publish',