function social_media_links_update_7101 in Social Media Links Block and Field 7
Migrate the platform data to the new structure.
File
- ./
social_media_links.install, line 21 - Social Media Link module's install and uninstall code.
Code
function social_media_links_update_7101() {
$platforms = variable_get('social_media_links_platforms', array());
foreach ($platforms as $key => $value) {
if (!is_array($value)) {
$platform_new = array(
'platform_value' => $value,
'weight' => 0,
);
$platforms[$key] = $platform_new;
}
}
variable_set('social_media_links_platforms', $platforms);
}