Index: includes/common.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/common.inc,v retrieving revision 1.1192 diff -u -p -r1.1192 common.inc --- includes/common.inc 16 Jul 2010 02:37:05 -0000 1.1192 +++ includes/common.inc 16 Jul 2010 07:07:25 -0000 @@ -2740,7 +2740,7 @@ function drupal_add_css($data = NULL, $o 'type' => 'file', 'weight' => CSS_DEFAULT, 'media' => 'all', - 'preprocess' => TRUE, + 'preprocess' => FALSE, 'data' => $data, 'browsers' => array(), ); @@ -3712,7 +3712,7 @@ function drupal_js_defaults($data = NULL 'scope' => 'header', 'cache' => TRUE, 'defer' => FALSE, - 'preprocess' => TRUE, + 'preprocess' => FALSE, 'version' => NULL, 'data' => $data, ); Index: includes/locale.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/locale.inc,v retrieving revision 1.257 diff -u -p -r1.257 locale.inc --- includes/locale.inc 16 Jul 2010 02:38:16 -0000 1.257 +++ includes/locale.inc 16 Jul 2010 07:07:25 -0000 @@ -1775,7 +1775,7 @@ function _locale_rebuild_js($langcode = */ function _locale_translate_language_list($translation, $limit_language) { // Add CSS. - drupal_add_css(drupal_get_path('module', 'locale') . '/locale.css', array('preprocess' => FALSE)); + drupal_add_css(drupal_get_path('module', 'locale') . '/locale.css'); $languages = language_list(); unset($languages['en']); Index: modules/aggregator/aggregator.module =================================================================== RCS file: /cvs/drupal/drupal/modules/aggregator/aggregator.module,v retrieving revision 1.439 diff -u -p -r1.439 aggregator.module --- modules/aggregator/aggregator.module 1 May 2010 08:12:22 -0000 1.439 +++ modules/aggregator/aggregator.module 16 Jul 2010 07:07:25 -0000 @@ -286,7 +286,7 @@ function _aggregator_category_title($cat * Implements hook_init(). */ function aggregator_init() { - drupal_add_css(drupal_get_path('module', 'aggregator') . '/aggregator.css'); + drupal_add_css(drupal_get_path('module', 'aggregator') . '/aggregator.css', array('preprocess' => TRUE)); } /** Index: modules/block/block.admin.inc =================================================================== RCS file: /cvs/drupal/drupal/modules/block/block.admin.inc,v retrieving revision 1.83 diff -u -p -r1.83 block.admin.inc --- modules/block/block.admin.inc 8 Jul 2010 03:41:27 -0000 1.83 +++ modules/block/block.admin.inc 16 Jul 2010 07:07:25 -0000 @@ -10,7 +10,7 @@ * Menu callback for admin/structure/block/demo. */ function block_admin_demo($theme = NULL) { - drupal_add_css(drupal_get_path('module', 'block') . '/block.css', array('preprocess' => FALSE)); + drupal_add_css(drupal_get_path('module', 'block') . '/block.css'); return ''; } @@ -45,7 +45,7 @@ function block_admin_display($theme = NU */ function block_admin_display_form($form, &$form_state, $blocks, $theme) { - drupal_add_css(drupal_get_path('module', 'block') . '/block.css', array('preprocess' => FALSE)); + drupal_add_css(drupal_get_path('module', 'block') . '/block.css'); $block_regions = system_region_list($theme, REGIONS_VISIBLE) + array(BLOCK_REGION_NONE => '<' . t('none') . '>'); Index: modules/book/book.module =================================================================== RCS file: /cvs/drupal/drupal/modules/book/book.module,v retrieving revision 1.547 diff -u -p -r1.547 book.module --- modules/book/book.module 7 Jul 2010 01:07:33 -0000 1.547 +++ modules/book/book.module 16 Jul 2010 07:07:25 -0000 @@ -222,7 +222,8 @@ function book_admin_paths() { * Implements hook_init(). */ function book_init() { - drupal_add_css(drupal_get_path('module', 'book') . '/book.css'); + drupal_add_css(drupal_get_path('module', 'book') . '/book.css', array('preprocess' => TRUE)); + drupal_add_js(drupal_get_path('module', 'book') . '/book.js', array('preprocess' => TRUE)); } /** @@ -499,9 +500,6 @@ function _book_add_form_elements(&$form, '#collapsible' => TRUE, '#collapsed' => TRUE, '#group' => 'additional_settings', - '#attached' => array( - 'js' => array(drupal_get_path('module', 'book') . '/book.js'), - ), '#tree' => TRUE, '#attributes' => array('class' => array('book-outline-form')), ); Index: modules/color/color.module =================================================================== RCS file: /cvs/drupal/drupal/modules/color/color.module,v retrieving revision 1.88 diff -u -p -r1.88 color.module --- modules/color/color.module 16 Jul 2010 02:37:05 -0000 1.88 +++ modules/color/color.module 16 Jul 2010 07:07:25 -0000 @@ -189,7 +189,7 @@ function color_scheme_form($complete_for ), // Add custom CSS. 'css' => array( - $base . '/color.css' => array('preprocess' => FALSE), + $base . '/color.css' => array(), ), // Add custom JavaScript. 'js' => array( Index: modules/dblog/dblog.module =================================================================== RCS file: /cvs/drupal/drupal/modules/dblog/dblog.module,v retrieving revision 1.53 diff -u -p -r1.53 dblog.module --- modules/dblog/dblog.module 29 Jun 2010 00:39:15 -0000 1.53 +++ modules/dblog/dblog.module 16 Jul 2010 07:07:25 -0000 @@ -91,7 +91,7 @@ function dblog_menu() { function dblog_init() { if (arg(0) == 'admin' && arg(1) == 'reports') { // Add the CSS for this module - drupal_add_css(drupal_get_path('module', 'dblog') . '/dblog.css', array('preprocess' => FALSE)); + drupal_add_css(drupal_get_path('module', 'dblog') . '/dblog.css'); } } Index: modules/field/field.attach.inc =================================================================== RCS file: /cvs/drupal/drupal/modules/field/field.attach.inc,v retrieving revision 1.91 diff -u -p -r1.91 field.attach.inc --- modules/field/field.attach.inc 17 Jun 2010 13:44:45 -0000 1.91 +++ modules/field/field.attach.inc 16 Jul 2010 07:07:25 -0000 @@ -542,7 +542,6 @@ function field_attach_form($entity_type, // Add custom weight handling. list($id, $vid, $bundle) = entity_extract_ids($entity_type, $entity); - $form['#attached']['css'][] = drupal_get_path('module', 'field') . '/theme/field.css'; $form['#pre_render'][] = '_field_extra_fields_pre_render'; $form['#entity_type'] = $entity_type; $form['#bundle'] = $bundle; @@ -1129,9 +1128,6 @@ function field_attach_view($entity_type, $output['#entity_type'] = $entity_type; $output['#bundle'] = $bundle; - // Include CSS styles. - $output['#attached']['css'][] = drupal_get_path('module', 'field') . '/theme/field.css'; - // Let other modules alter the renderable array. $context = array( 'entity_type' => $entity_type, Index: modules/field/field.module =================================================================== RCS file: /cvs/drupal/drupal/modules/field/field.module,v retrieving revision 1.76 diff -u -p -r1.76 field.module --- modules/field/field.module 24 Jun 2010 21:37:49 -0000 1.76 +++ modules/field/field.module 16 Jul 2010 07:07:25 -0000 @@ -166,6 +166,13 @@ function field_theme() { } /** + * Implements hook_init(). + */ +function field_init() { + drupal_add_css(drupal_get_path('module', 'field') . '/theme/field.css', array('preprocess' => TRUE)); +} + +/** * Implements hook_cron(). * * Purges some deleted Field API data, if any exists. @@ -811,7 +818,6 @@ function field_view_field($entity_type, if (isset($result[$field_name])) { $output = $result[$field_name]; - $output['#attached']['css'][] = drupal_get_path('module', 'field') . '/theme/field.css'; } } Index: modules/file/file.module =================================================================== RCS file: /cvs/drupal/drupal/modules/file/file.module,v retrieving revision 1.31 diff -u -p -r1.31 file.module --- modules/file/file.module 2 Jul 2010 12:37:57 -0000 1.31 +++ modules/file/file.module 16 Jul 2010 07:07:25 -0000 @@ -54,6 +54,13 @@ function file_menu() { } /** + * Implements hook_init(). + */ +function file_init() { + drupal_add_css(drupal_get_path('module', 'file') . '/file.css', array('preprocess' => TRUE)); +} + +/** * Implements hook_element_info(). * * The managed file element may be used independently anywhere in Drupal. @@ -74,7 +81,6 @@ function file_element_info() { '#upload_location' => NULL, '#extended' => FALSE, '#attached' => array( - 'css' => array($file_path . '/file.css'), 'js' => array($file_path . '/file.js'), ), ); Index: modules/forum/forum.module =================================================================== RCS file: /cvs/drupal/drupal/modules/forum/forum.module,v retrieving revision 1.567 diff -u -p -r1.567 forum.module --- modules/forum/forum.module 20 Jun 2010 23:55:08 -0000 1.567 +++ modules/forum/forum.module 16 Jul 2010 07:07:25 -0000 @@ -221,7 +221,7 @@ function forum_menu_local_tasks_alter(&$ * Implements hook_init(). */ function forum_init() { - drupal_add_css(drupal_get_path('module', 'forum') . '/forum.css'); + drupal_add_css(drupal_get_path('module', 'forum') . '/forum.css', array('preprocess' => TRUE)); } /** Index: modules/help/help.admin.inc =================================================================== RCS file: /cvs/drupal/drupal/modules/help/help.admin.inc,v retrieving revision 1.11 diff -u -p -r1.11 help.admin.inc --- modules/help/help.admin.inc 13 Oct 2009 05:26:57 -0000 1.11 +++ modules/help/help.admin.inc 16 Jul 2010 07:07:25 -0000 @@ -11,7 +11,7 @@ */ function help_main() { // Add CSS - drupal_add_css(drupal_get_path('module', 'help') . '/help.css', array('preprocess' => FALSE)); + drupal_add_css(drupal_get_path('module', 'help') . '/help.css'); $output = '
' . t('Help is available on the following items:') . '
' . help_links_as_list(); return $output; } Index: modules/image/image.admin.inc =================================================================== RCS file: /cvs/drupal/drupal/modules/image/image.admin.inc,v retrieving revision 1.20 diff -u -p -r1.20 image.admin.inc --- modules/image/image.admin.inc 24 Apr 2010 14:49:14 -0000 1.20 +++ modules/image/image.admin.inc 16 Jul 2010 07:07:25 -0000 @@ -16,7 +16,7 @@ function image_style_list() { $page['image_style_list'] = array( '#markup' => theme('image_style_list', array('styles' => $styles)), '#attached' => array( - 'css' => array(drupal_get_path('module', 'image') . '/image.admin.css' => array('preprocess' => FALSE)), + 'css' => array(drupal_get_path('module', 'image') . '/image.admin.css' => array()), ), ); @@ -48,7 +48,7 @@ function image_style_form($form, &$form_ $form_state['image_style'] = $style; $form['#tree'] = TRUE; - $form['#attached']['css'][drupal_get_path('module', 'image') . '/image.admin.css'] = array('preprocess' => FALSE); + $form['#attached']['css'][drupal_get_path('module', 'image') . '/image.admin.css'] = array(); // Show the thumbnail preview. $form['preview'] = array( @@ -383,7 +383,7 @@ function image_effect_form($form, &$form } $form['#tree'] = TRUE; - $form['#attached']['css'][drupal_get_path('module', 'image') . '/image.admin.css'] = array('preprocess' => FALSE); + $form['#attached']['css'][drupal_get_path('module', 'image') . '/image.admin.css'] = array(); if (function_exists($effect['form callback'])) { $form['data'] = call_user_func($effect['form callback'], $effect['data']); } Index: modules/image/image.field.inc =================================================================== RCS file: /cvs/drupal/drupal/modules/image/image.field.inc,v retrieving revision 1.22 diff -u -p -r1.22 image.field.inc --- modules/image/image.field.inc 10 Jul 2010 01:43:06 -0000 1.22 +++ modules/image/image.field.inc 16 Jul 2010 07:07:26 -0000 @@ -356,7 +356,6 @@ function image_field_widget_process($ele $widget_settings = $instance['widget']['settings']; $element['#theme'] = 'image_widget'; - $element['#attached']['css'][] = drupal_get_path('module', 'image') . '/image.css'; // Add the image preview. if ($element['#file'] && $widget_settings['preview_image_style']) { Index: modules/image/image.module =================================================================== RCS file: /cvs/drupal/drupal/modules/image/image.module,v retrieving revision 1.43 diff -u -p -r1.43 image.module --- modules/image/image.module 31 May 2010 11:42:11 -0000 1.43 +++ modules/image/image.module 16 Jul 2010 07:07:26 -0000 @@ -66,6 +66,13 @@ function image_help($path, $arg) { } /** + * Implements hook_init(). + */ +function image_init() { + drupal_add_css(drupal_get_path('module', 'image') . '/image.css', array('preprocess' => TRUE)); +} + +/** * Implements hook_menu(). */ function image_menu() { Index: modules/locale/locale.admin.inc =================================================================== RCS file: /cvs/drupal/drupal/modules/locale/locale.admin.inc,v retrieving revision 1.16 diff -u -p -r1.16 locale.admin.inc --- modules/locale/locale.admin.inc 26 Jun 2010 21:32:20 -0000 1.16 +++ modules/locale/locale.admin.inc 16 Jul 2010 07:07:26 -0000 @@ -784,7 +784,7 @@ function locale_translate_overview_scree */ function locale_translate_seek_screen() { // Add CSS. - drupal_add_css(drupal_get_path('module', 'locale') . '/locale.css', array('preprocess' => FALSE)); + drupal_add_css(drupal_get_path('module', 'locale') . '/locale.css'); $elements = drupal_get_form('locale_translation_filter_form'); $output = drupal_render($elements); Index: modules/node/node.module =================================================================== RCS file: /cvs/drupal/drupal/modules/node/node.module,v retrieving revision 1.1280 diff -u -p -r1.1280 node.module --- modules/node/node.module 16 Jul 2010 02:37:06 -0000 1.1280 +++ modules/node/node.module 16 Jul 2010 07:07:26 -0000 @@ -1998,7 +1998,7 @@ function _node_custom_theme() { * Implements hook_init(). */ function node_init() { - drupal_add_css(drupal_get_path('module', 'node') . '/node.css'); + drupal_add_css(drupal_get_path('module', 'node') . '/node.css', array('preprocess' => TRUE)); } function node_last_changed($nid) { Index: modules/openid/openid.module =================================================================== RCS file: /cvs/drupal/drupal/modules/openid/openid.module,v retrieving revision 1.93 diff -u -p -r1.93 openid.module --- modules/openid/openid.module 7 Jul 2010 08:05:01 -0000 1.93 +++ modules/openid/openid.module 16 Jul 2010 07:07:26 -0000 @@ -72,6 +72,14 @@ function openid_help($path, $arg) { } /** + * Implements hook_init(). + */ +function openid_init() { + drupal_add_css(drupal_get_path('module', 'openid') . '/openid.css', array('preprocess' => TRUE)); + drupal_add_js(drupal_get_path('module', 'openid') . '/openid.js', array('preprocess' => TRUE)); +} + +/** * Implements hook_user_insert(). */ function openid_user_insert(&$edit, $account, $category) { @@ -125,8 +133,6 @@ function openid_form_user_login_alter(&$ } function _openid_user_login_form_alter(&$form, &$form_state) { - $form['#attached']['css'][] = drupal_get_path('module', 'openid') . '/openid.css'; - $form['#attached']['js'][] = drupal_get_path('module', 'openid') . '/openid.js'; $form['#attached']['library'][] = array('system', 'cookie'); if (!empty($form_state['input']['openid_identifier'])) { $form['name']['#required'] = FALSE; Index: modules/openid/openid.pages.inc =================================================================== RCS file: /cvs/drupal/drupal/modules/openid/openid.pages.inc,v retrieving revision 1.28 diff -u -p -r1.28 openid.pages.inc --- modules/openid/openid.pages.inc 24 Apr 2010 14:49:14 -0000 1.28 +++ modules/openid/openid.pages.inc 16 Jul 2010 07:07:26 -0000 @@ -29,7 +29,6 @@ function openid_authentication_page() { */ function openid_user_identities($account) { drupal_set_title(format_username($account)); - drupal_add_css(drupal_get_path('module', 'openid') . '/openid.css'); // Check to see if we got a response $result = openid_complete(); Index: modules/poll/poll.module =================================================================== RCS file: /cvs/drupal/drupal/modules/poll/poll.module,v retrieving revision 1.352 diff -u -p -r1.352 poll.module --- modules/poll/poll.module 24 Jun 2010 18:53:31 -0000 1.352 +++ modules/poll/poll.module 16 Jul 2010 07:07:26 -0000 @@ -31,7 +31,7 @@ function poll_help($path, $arg) { * Implements hook_init(). */ function poll_init() { - drupal_add_css(drupal_get_path('module', 'poll') . '/poll.css'); + drupal_add_css(drupal_get_path('module', 'poll') . '/poll.css', array('preprocess' => TRUE)); } /** Index: modules/search/search.module =================================================================== RCS file: /cvs/drupal/drupal/modules/search/search.module,v retrieving revision 1.351 diff -u -p -r1.351 search.module --- modules/search/search.module 30 Jun 2010 15:47:50 -0000 1.351 +++ modules/search/search.module 16 Jul 2010 07:07:26 -0000 @@ -98,6 +98,13 @@ function search_help($path, $arg) { } /** + * Implements hook_init(). + */ +function search_init() { + drupal_add_css(drupal_get_path('module', 'search') . '/search.css', array('preprocess' => TRUE)); +} + +/** * Implements hook_theme(). */ function search_theme() { @@ -872,9 +879,6 @@ function search_get_keys() { * An HTML string containing the search form. */ function search_form($form, &$form_state, $action = '', $keys = '', $type = NULL, $prompt = NULL) { - // Add CSS - drupal_add_css(drupal_get_path('module', 'search') . '/search.css', array('preprocess' => FALSE)); - if (!$action) { $action = 'search/' . $type; } Index: modules/shortcut/shortcut.module =================================================================== RCS file: /cvs/drupal/drupal/modules/shortcut/shortcut.module,v retrieving revision 1.25 diff -u -p -r1.25 shortcut.module --- modules/shortcut/shortcut.module 30 Jun 2010 15:12:59 -0000 1.25 +++ modules/shortcut/shortcut.module 16 Jul 2010 07:07:26 -0000 @@ -167,6 +167,13 @@ function shortcut_menu() { } /** + * Implements hook_init(). + */ +function shortcut_init() { + drupal_add_css(drupal_get_path('module', 'shortcut') . '/shortcut.css', array('preprocess' => TRUE)); +} + +/** * Implements hook_theme(). */ function shortcut_theme() { @@ -674,7 +681,6 @@ function shortcut_preprocess_page(&$vari if (theme_get_setting('shortcut_module_link')) { $variables['title_suffix']['add_or_remove_shortcut'] = array( - '#attached' => array('css' => array(drupal_get_path('module', 'shortcut') . '/shortcut.css')), '#prefix' => '