* @link http://www.albin.net */ /** * Implementation of hook_init(). */ function themesettingsapi_init() { // Conditionally load on admin/build/themes/settings/* and admin/settings/admin if (arg(0) == 'admin' && (arg(4) != '' && arg(2) == 'themes' && arg(3) == 'settings' && arg(1) == 'build' || arg(2) == 'admin' && arg(1) == 'settings')) { include_once('./'. drupal_get_path('module', 'themesettingsapi') .'/themesettingsapi.admin.inc'); } // Conditionally load the admin theme on node/add/* and node/*/edit if (variable_get('node_admin_theme', '0') && arg(0) == 'node' && (arg(1) == 'add' || arg(2) == 'edit')) { global $custom_theme; $custom_theme = variable_get('admin_theme', '0'); drupal_add_css(drupal_get_path('module', 'system') .'/admin.css', 'module'); } }