PluginProbe
Elementor Website Builder – more than just a page builder / 3.9.2
Elementor Website Builder – more than just a page builder v3.9.2
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 4.0.7 All 451 releases
← All changes | app/modules/import-export/utils.php +3 -60 4.2.13.9.2 View file →
@@ -3,9 +3,9 @@
3 3 namespace Elementor\App\Modules\ImportExport;
4 4
5 5 use Elementor\Core\Utils\Str;
6 6 use Elementor\Modules\LandingPages\Module as Landing_Pages_Module;
7 -use Elementor\Modules\FloatingButtons\Module as Floating_Buttons_Module;
7 +use Elementor\Modules\System_Info\Reporters\Server;
8 8 use Elementor\TemplateLibrary\Source_Local;
9 9 use Elementor\Utils as ElementorUtils;
10 10
11 11 class Utils {
@@ -58,14 +58,9 @@
58 58 return $result;
59 59 }
60 60
61 61 public static function get_elementor_post_types() {
62 - $elementor_post_types = get_post_types_by_support( 'elementor' );
63 -
64 - return array_filter( $elementor_post_types, function ( $value ) {
65 - // Templates are handled in a separate process.
66 - return 'elementor_library' !== $value;
67 - } );
62 + return [ 'post', 'page', 'e-landing-page' ];
68 63 }
69 64
70 65 public static function get_builtin_wp_post_types() {
71 66 return [ 'post', 'page', 'nav_menu_item' ];
@@ -79,62 +74,10 @@
79 74 ] );
80 75
81 76 unset(
82 77 $post_types[ Landing_Pages_Module::CPT ],
83 - $post_types[ Source_Local::CPT ],
84 - $post_types[ Floating_Buttons_Module::CPT_FLOATING_BUTTONS ]
78 + $post_types[ Source_Local::CPT ]
85 79 );
86 80
87 81 return array_keys( $post_types );
88 - }
89 -
90 - /**
91 - * Transform a string name to title format.
92 - *
93 - * @param $name
94 - *
95 - * @return string
96 - */
97 - public static function transform_name_to_title( $name ): string {
98 - if ( empty( $name ) ) {
99 - return '';
100 - }
101 -
102 - $title = str_replace( [ '-', '_' ], ' ', $name );
103 -
104 - return ucwords( $title );
105 - }
106 -
107 - public static function get_import_sessions( $should_run_cleanup = false ) {
108 - $import_sessions = get_option( Module::OPTION_KEY_ELEMENTOR_IMPORT_SESSIONS, [] );
109 -
110 - if ( $should_run_cleanup ) {
111 - foreach ( $import_sessions as $session_id => $import_session ) {
112 - if ( ! isset( $import_session['runners'] ) && isset( $import_session['instance_data'] ) ) {
113 - $import_sessions[ $session_id ]['runners'] = $import_session['instance_data']['runners_import_metadata'] ?? [];
114 -
115 - unset( $import_sessions[ $session_id ]['instance_data'] );
116 - }
117 - }
118 -
119 - update_option( Module::OPTION_KEY_ELEMENTOR_IMPORT_SESSIONS, $import_sessions );
120 - }
121 -
122 - return $import_sessions;
123 - }
124 -
125 - public static function update_space_between_widgets_values( $space_between_widgets ) {
126 - $setting_exist = isset( $space_between_widgets['size'] );
127 - $already_processed = isset( $space_between_widgets['column'] );
128 -
129 - if ( ! $setting_exist || $already_processed ) {
130 - return $space_between_widgets;
131 - }
132 -
133 - $size = strval( $space_between_widgets['size'] );
134 - $space_between_widgets['column'] = $size;
135 - $space_between_widgets['row'] = $size;
136 - $space_between_widgets['isLinked'] = true;
137 -
138 - return $space_between_widgets;
139 82 }
140 83 }