* @link http://www.albin.net */ /** * Implementation of hook_menu(). * * We check the path inside HOOK_menu to maintain compatibility with the i18n * module. Note that arg() is not available in HOOK_init() for cached pages. */ function themesettingsapi_menu($may_cache) { if (!$may_cache) { // 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'); } } }