function structured_data_settings_form_submit in Structured Data (JSON+LD Rich Snippets) 7
Submit handler for structured_data_settings_form().
1 string reference to 'structured_data_settings_form_submit'
- structured_data_settings_form in ./
structured_data.admin.inc - Form callback for admin settings page.
File
- ./
structured_data.admin.inc, line 317 - Administrative pages for the structured_data module.
Code
function structured_data_settings_form_submit($form, &$form_state) {
variable_set('structured_data_social_links', $form_state['values']['social_links']['links']);
unset($form_state['values']['social_links']);
// Create a file usage record for the logo file uploaded.
if ($file = file_load($form_state['values']['structured_data_site_logo_custom'])) {
global $user;
$file->status = FILE_STATUS_PERMANENT;
file_save($file);
file_usage_add($file, 'structured_data', 'site_logo', $user->uid);
}
}