| Server IP : 62.60.133.156 / Your IP : 216.73.217.51 Web Server : LiteSpeed System : Linux linux24.centraldnserver.com 4.18.0-553.141.2.lve.el8.x86_64 #1 SMP Wed Jul 8 16:10:02 UTC 2026 x86_64 User : mimradmin ( 1166) PHP Version : 7.4.33 Disable Function : show_source, system, shell_exec, passthru, exec, popen, proc_open MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /proc/self/cwd/wp-content/plugins/wp-ultimate-csv-importer/extensionModules/ |
Upload File : |
<?php
/******************************************************************************************
* Copyright (C) Smackcoders. - All Rights Reserved under Smackcoders Proprietary License
* Unauthorized copying of this file, via any medium is strictly prohibited
* Proprietary and confidential
* You can contact Smackcoders at email address info@smackcoders.com.
*******************************************************************************************/
namespace Smackcoders\FCSV;
if ( ! defined( 'ABSPATH' ) )
exit; // Exit if accessed directly
class BPExtension extends ExtensionHandler{
private static $instance = null;
public static function getInstance() {
if (BPExtension::$instance == null) {
BPExtension::$instance = new BPExtension;
}
return BPExtension::$instance;
}
public function processExtension($data, $process_type = null ){
global $wpdb;
$response = [];
$all_buddy_fields = [];
$get_BPfields = $wpdb->get_results("SELECT id, name FROM {$wpdb->prefix}bp_xprofile_fields where type !='option'", ARRAY_A);
foreach($get_BPfields as $get_buddy_fields){
if($process_type == 'Export'){
$all_buddy_fields[$get_buddy_fields['name']] = $get_buddy_fields['name'];
}
else{
$all_buddy_fields[$get_buddy_fields['name']] = $get_buddy_fields['id'];
}
}
$bp_fields_key = $this->convert_static_fields_to_array($all_buddy_fields);
$response['bp_fields'] = $bp_fields_key;
return $response;
}
public function extensionSupportedImportType($import_type ){
if(is_plugin_active('buddypress/bp-loader.php')){
if($import_type == 'Users'){
return true;
}
}
}
}