diff --git a/fusion_core/theme-settings.php b/fusion_core/theme-settings.php index ec69ade945b16b1aa105671b6e33bc1a73625229..db32b4140d524a734d8af53d25363a8c2593f87e 100644 --- a/fusion_core/theme-settings.php +++ b/fusion_core/theme-settings.php @@ -19,8 +19,8 @@ function fusion_core_form_system_theme_settings_alter(&$form, $form_state) { global $base_url; - // Get theme name from url (admin/.../theme_name) - $theme_name = arg(count(arg()) - 1); + // Get theme name from $form_state. + $theme_name = $form_state['build_info']['args'][0]; // Get default theme settings from .info file $theme_data = list_themes(); // get data for all themes