← All changes
|
app/modules/import-export-customization/module.php
+1
-24
3.32.0-dev2
→
3.32.0-dev3
View file →
| @@ -167,9 +167,9 @@ | ||
| 167 | 167 | $user_date_format = get_option( 'date_format' ); |
| 168 | 168 | $user_time_format = get_option( 'time_format' ); |
| 169 | 169 | $date_format = $user_date_format . ' ' . $user_time_format; |
| 170 | 170 | |
| 171 | - $should_show_revert_section = $this->should_show_revert_section( $last_imported_kit ); | |
| 171 | + $should_show_revert_section = ! empty( $last_imported_kit ); | |
| 172 | 172 | |
| 173 | 173 | if ( $should_show_revert_section ) { |
| 174 | 174 | if ( ! empty( $penultimate_imported_kit ) ) { |
| 175 | 175 | $revert_text = sprintf( |
| @@ -666,31 +666,8 @@ | ||
| 666 | 666 | } |
| 667 | 667 | } |
| 668 | 668 | |
| 669 | 669 | return $summary_titles; |
| 670 | - } | |
| 671 | - | |
| 672 | - public function should_show_revert_section( $last_imported_kit ) { | |
| 673 | - if ( empty( $last_imported_kit ) ) { | |
| 674 | - return false; | |
| 675 | - } | |
| 676 | - | |
| 677 | - // TODO: BC - remove in the future | |
| 678 | - // The 'templates' runner was in core and moved to the Pro plugin. (Part of it still exits in the Core for BC) | |
| 679 | - // The runner that is in the core version is missing the revert functionality, | |
| 680 | - // therefore we shouldn't display the revert section if the import process done with the core version. | |
| 681 | - $is_import_templates_ran = isset( $last_imported_kit['runners']['templates'] ); | |
| 682 | - if ( $this->has_pro() && $is_import_templates_ran ) { | |
| 683 | - $has_imported_templates = ! empty( $last_imported_kit['runners']['templates'] ); | |
| 684 | - | |
| 685 | - return $has_imported_templates; | |
| 686 | - } | |
| 687 | - | |
| 688 | - return true; | |
| 689 | - } | |
| 690 | - | |
| 691 | - public function has_pro(): bool { | |
| 692 | - return ElementorUtils::has_pro(); | |
| 693 | 670 | } |
| 694 | 671 | |
| 695 | 672 | private function get_elementor_editor_home_page_url() { |
| 696 | 673 | if ( 'page' !== get_option( 'show_on_front' ) ) { |