/home/techb158/public_html/wp-content/plugins/elementor/app/modules/import-export
Edit: /home/techb158/public_html/wp-content/plugins/elementor/app/modules/import-export/utils.php (3742B)
true,
'can_export' => true,
'_builtin' => false,
] );
unset(
$post_types[ Landing_Pages_Module::CPT ],
$post_types[ Source_Local::CPT ],
$post_types[ Floating_Buttons_Module::CPT_FLOATING_BUTTONS ]
);
return array_keys( $post_types );
}
/**
* Transform a string name to title format.
*
* @param $name
*
* @return string
*/
public static function transform_name_to_title( $name ): string {
if ( empty( $name ) ) {
return '';
}
$title = str_replace( [ '-', '_' ], ' ', $name );
return ucwords( $title );
}
public static function get_import_sessions( $should_run_cleanup = false ) {
$import_sessions = get_option( Module::OPTION_KEY_ELEMENTOR_IMPORT_SESSIONS, [] );
if ( $should_run_cleanup ) {
foreach ( $import_sessions as $session_id => $import_session ) {
if ( ! isset( $import_session['runners'] ) && isset( $import_session['instance_data'] ) ) {
$import_sessions[ $session_id ]['runners'] = $import_session['instance_data']['runners_import_metadata'] ?? [];
unset( $import_sessions[ $session_id ]['instance_data'] );
}
}
update_option( Module::OPTION_KEY_ELEMENTOR_IMPORT_SESSIONS, $import_sessions );
}
return $import_sessions;
}
public static function update_space_between_widgets_values( $space_between_widgets ) {
$setting_exist = isset( $space_between_widgets['size'] );
$already_processed = isset( $space_between_widgets['column'] );
if ( ! $setting_exist || $already_processed ) {
return $space_between_widgets;
}
$size = strval( $space_between_widgets['size'] );
$space_between_widgets['column'] = $size;
$space_between_widgets['row'] = $size;
$space_between_widgets['isLinked'] = true;
return $space_between_widgets;
}
}