Tagged: bp_xprofile_data table
i am aware that bp_xprofile_data table name define by code written below
class BP_XProfile_Component extends BP_Component { public function setup_globals( $args = array() ) $global_tables = array( 'table_name_data' => $bp->table_prefix . 'bp_xprofile_data', 'table_name_groups' => $bp->table_prefix . 'bp_xprofile_groups', 'table_name_fields' => $bp->table_prefix . 'bp_xprofile_fields', 'table_name_meta' => $bp->table_prefix . 'bp_xprofile_meta', );
i want to make multi langunage bp_xprofile_data table line bp_xprofile_data_hi or bp_xprofile_data_ur
and at a time any one of table will responsible to privde xprofile field value base on user setted coddition like language or location …Hi Abhist,
Welcome to BuddyDev support forums.This is not a good way to achieve it as it might cause complications where the tables might have been used directly(instead of using the table name on BP object).
Still, if you know how to find the language code, you can adapt the following code to modify tables
add_filter( 'bp_xprofile_global_tables', function( $tables ) { //$tables['table_name_data'] = 'my table name'; //$tables['table_name_groups'] = 'my table name'; //$tables['table_name_fields'] = 'my table name'; //$tables['table_name_meta'] = 'my table name'; // feel free to modify it here. return $tables; });
Please put this code in your wp-content/plugins/bp-custom.php and add the login to change your table name based on language conditions.
Regards
Brajesh
The topic ‘ [Resolved] multi bp_xprofile_data table and use any of them based on condition’ is closed to new replies.