$theme) { if ((!empty($theme['widgets']) && is_array($theme['widgets'])) || isset($theme['_additional'])) { $skin = new stdClass(); $skin->theme = $theme_name; $skin->module = $module; $skin->sid = skinr_handler('form_index_handler', 'submit', $form_settings['index_handler'], $form, $form_state); $skin->skins = array(); if (!empty($theme['widgets']) && is_array($theme['widgets'])) { foreach ($theme['widgets'] as $skin_name => $skin_value) { $skin->skins['_options'][$skin_name] = $skin_value; } } if (isset($theme['_additional'])) { $theme['_additional'] = trim($theme['_additional']); if (!empty($theme['_additional'])) { $skin->skins['_additional'] = $theme['_additional']; } } if (empty($skin->sid)) { // We didn't receive a valid sid, so raise an error drupal_set_message(t("Skinr settings weren't saved due to an error."), 'error'); } skinr_skin_save($skin); } } } } /** * Implements hook_skinr_api_VERSION(). */ function skinr_skinr_api_2() { } /** * Helper function for built-in integration code. */ function skinr_skinr_api_modules() { return array( 'path' => drupal_get_path('module', 'skinr') . '/modules', ); } function block_skinr_api_2() { return skinr_skinr_api_modules(); } function comment_skinr_api_2() { return skinr_skinr_api_modules(); } function node_skinr_api_2() { return skinr_skinr_api_modules(); } function panels_skinr_api_2() { return skinr_skinr_api_modules(); } function views_skinr_api_2() { return skinr_skinr_api_modules(); }