function _designkit_system_theme_settings_validate_post in DesignKit 7
Store details of the uploaded logo in the default theme logo property
1 string reference to '_designkit_system_theme_settings_validate_post'
- designkit_form_system_theme_settings_alter in ./
designkit.module - Theme integration. Implementation of hook_form_alter() for system_theme_settings.
File
- ./
designkit.admin.inc, line 115
Code
function _designkit_system_theme_settings_validate_post(&$form, &$form_state) {
if (!empty($form_state['values']['designkit_image']['logo'])) {
$fid = $form_state['values']['designkit_image']['logo'];
$file = file_load($fid);
form_set_value($form['logo']['settings']['logo_path'], $file->uri, $form_state);
form_set_value($form['logo']['default_logo'], FALSE, $form_state);
}
else {
form_set_value($form['logo']['settings']['logo_path'], '', $form_state);
form_set_value($form['logo']['default_logo'], TRUE, $form_state);
}
}