function content_profile_import in Content Profile 6
Import settings from nodeprofile / bio.
1 call to content_profile_import()
- content_profile_install in ./
content_profile.install - Implementation of hook_install().
File
- ./
content_profile.install, line 47 - Content profile installation file.
Code
function content_profile_import() {
//nodeprofile
if ($settings = variable_get('nodeprofile_settings', array())) {
$cp_setting = array();
foreach ($settings as $setting => $data) {
foreach ($data as $type => $value) {
$cp_settings[$type][$setting] = $value;
}
}
foreach ($cp_settings as $type => $data) {
variable_set('content_profile_use_' . $type, 1);
$data['edit_tab'] = $data['user_edit'] ? 'sub' : 0;
unset($data['user_edit']);
variable_set('content_profile_' . $type, $data);
}
variable_del('nodeprofile_settings');
}
//bio
if ($type = variable_get('bio_nodetype', FALSE)) {
variable_set('content_profile_use_' . $type, 1);
variable_del('bio_nodetype');
}
}