PluginProbe
Elementor Website Builder – more than just a page builder / 3.27.4
Elementor Website Builder – more than just a page builder v3.27.4
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 4.1.0-beta1 4.1.0-dev1 All 452 releases
← All changes | core/upgrade/upgrades.php +30 -5 4.2.43.27.4 View file →
@@ -404,9 +404,9 @@
404 404 update_metadata( 'post', $post_id, '_elementor_data', $json_value );
405 405
406 406 // Clear WP cache for next step.
407 407 wp_cache_flush();
408 - }
408 + } // End foreach().
409 409 }
410 410
411 411 /**
412 412 * @param Updater $updater
@@ -479,9 +479,9 @@
479 479 // We need the `wp_slash` in order to avoid the unslashing during the `update_post_meta`
480 480 $json_value = wp_slash( wp_json_encode( $data ) );
481 481
482 482 update_metadata( 'post', $post_id, '_elementor_data', $json_value );
483 - }
483 + } // End foreach().
484 484
485 485 return $updater->should_run_again( $post_ids );
486 486 }
487 487
@@ -515,9 +515,9 @@
515 515 continue;
516 516 }
517 517
518 518 $document->save_template_type();
519 - }
519 + } // End foreach().
520 520
521 521 return $updater->should_run_again( $post_ids );
522 522 }
523 523
@@ -529,9 +529,9 @@
529 529 add_option( 'elementor_load_fa4_shim', 'yes' );
530 530 }
531 531
532 532 /**
533 - * Migrate Icon control string value to Icons control array value
533 + * migrate Icon control string value to Icons control array value
534 534 *
535 535 * @param array $element
536 536 * @param array $args
537 537 *
@@ -581,10 +581,11 @@
581 581 /**
582 582 * Update database to separate page from post.
583 583 *
584 584 * @param Updater $updater
585 - * @param string $type
586 585 *
586 + * @param string $type
587 + *
587 588 * @return bool
588 589 */
589 590 public static function rename_document_base_to_wp( $updater, $type ) {
590 591 global $wpdb;
@@ -608,8 +609,26 @@
608 609 return $updater->should_run_again( $post_ids );
609 610 }
610 611
611 612 /**
613 + * Update database to separate page from post.
614 + *
615 + * @param Updater $updater
616 + *
617 + * @return bool
618 + */
619 + // Because the query is slow on large sites, temporary don't upgrade.
620 + /* public static function _v_2_7_0_rename_document_types_to_wp( $updater ) {
621 + return self::rename_document_base_to_wp( $updater, 'post' ) || self::rename_document_base_to_wp( $updater, 'page' );
622 + }*/
623 +
624 + // Upgrade code was fixed & moved to _v_2_7_1_remove_old_usage_data.
625 + /* public static function _v_2_7_0_remove_old_usage_data() {} */
626 +
627 + // Upgrade code moved to _v_2_7_1_recalc_usage_data.
628 + /* public static function _v_2_7_0_recalc_usage_data( $updater ) {} */
629 +
630 + /**
612 631 * Don't use the old data anymore.
613 632 * Since 2.7.1 the key was changed from `elementor_elements_usage` to `elementor_controls_usage`.
614 633 */
615 634 public static function _v_2_7_1_remove_old_usage_data() {
@@ -941,8 +960,14 @@
941 960 $logger = Plugin::$instance->logger->get_logger();
942 961 $logger->notice( $message );
943 962 }
944 963
964 + /**
965 + * @param \wpdb $wpdb
966 + * @param string $element_type
967 + *
968 + * @return array
969 + */
945 970 public static function get_post_ids_by_element_type( $updater, string $element_type ): array {
946 971 global $wpdb;
947 972
948 973 return $updater->query_col(