diff --git includes/common.inc includes/common.inc
index 405c98a..996372c 100644
--- includes/common.inc
+++ includes/common.inc
@@ -2699,7 +2699,7 @@ function drupal_add_css($data = NULL, $options = NULL) {
'type' => 'file',
'weight' => CSS_DEFAULT,
'media' => 'all',
- 'preprocess' => TRUE,
+ 'preprocess' => FALSE,
'data' => $data,
'browsers' => array(),
);
@@ -3671,7 +3671,7 @@ function drupal_js_defaults($data = NULL) {
'scope' => 'header',
'cache' => TRUE,
'defer' => FALSE,
- 'preprocess' => TRUE,
+ 'preprocess' => FALSE,
'version' => NULL,
'data' => $data,
);
diff --git includes/locale.inc includes/locale.inc
index 08c5492..b1b28f0 100644
--- includes/locale.inc
+++ includes/locale.inc
@@ -1759,7 +1759,7 @@ function _locale_rebuild_js($langcode = NULL) {
*/
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']);
diff --git modules/aggregator/aggregator.module modules/aggregator/aggregator.module
index 672d078..103f2a5 100644
--- modules/aggregator/aggregator.module
+++ modules/aggregator/aggregator.module
@@ -286,7 +286,7 @@ function _aggregator_category_title($category) {
* 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));
}
/**
diff --git modules/block/block.admin.inc modules/block/block.admin.inc
index a36a71a..6b24a10 100644
--- modules/block/block.admin.inc
+++ modules/block/block.admin.inc
@@ -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 = NULL) {
*/
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') . '>');
diff --git modules/book/book.module modules/book/book.module
index e49f4fb..ef2b9c8 100644
--- modules/book/book.module
+++ modules/book/book.module
@@ -229,7 +229,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));
}
/**
@@ -501,9 +502,6 @@ function _book_add_form_elements(&$form, &$form_state, $node) {
'#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')),
);
diff --git modules/color/color.module modules/color/color.module
index 5966dcf..cb0d60d 100644
--- modules/color/color.module
+++ modules/color/color.module
@@ -189,7 +189,7 @@ function color_scheme_form($complete_form, &$form_state, $theme) {
),
// Add custom CSS.
'css' => array(
- $base . '/color.css' => array('preprocess' => FALSE),
+ $base . '/color.css' => array(),
),
// Add custom JavaScript.
'js' => array(
diff --git modules/comment/comment.module modules/comment/comment.module
index 1d818f5..d38d7f5 100644
--- modules/comment/comment.module
+++ modules/comment/comment.module
@@ -290,6 +290,14 @@ function comment_menu() {
}
/**
+ * Implements hook_init().
+ */
+function comment_init() {
+ drupal_add_css(drupal_get_path('module', 'comment') . '/comment.css', array('preprocess' => TRUE));
+ drupal_add_js(drupal_get_path('module', 'comment') . '/comment-node-form.js', array('preprocess' => TRUE));
+}
+
+/**
* Implements hook_menu_alter().
*/
function comment_menu_alter(&$items) {
@@ -716,7 +724,6 @@ function comment_node_page_additions($node) {
$comments = comment_load_multiple($cids);
comment_prepare_thread($comments);
$build = comment_view_multiple($comments, $node);
- $build['#attached']['css'][] = drupal_get_path('module', 'comment') . '/comment.css';
$build['pager']['#theme'] = 'pager';
$additions['comments'] = $build;
}
@@ -1077,9 +1084,6 @@ function comment_form_node_type_form_alter(&$form, $form_state) {
'#collapsible' => TRUE,
'#collapsed' => TRUE,
'#group' => 'additional_settings',
- '#attached' => array(
- 'js' => array(drupal_get_path('module', 'comment') . '/comment-node-form.js'),
- ),
);
$form['comment']['comment_default_mode'] = array(
'#type' => 'checkbox',
@@ -1150,9 +1154,6 @@ function comment_form_alter(&$form, $form_state, $form_id) {
'#collapsible' => TRUE,
'#collapsed' => TRUE,
'#group' => 'additional_settings',
- '#attached' => array(
- 'js' => array(drupal_get_path('module', 'comment') . '/comment-node-form.js'),
- ),
'#weight' => 30,
);
$comment_count = isset($node->nid) ? db_query('SELECT comment_count FROM {node_comment_statistics} WHERE nid = :nid', array(':nid' => $node->nid))->fetchField() : 0;
diff --git modules/dblog/dblog.module modules/dblog/dblog.module
index e6b33d3..0493141 100644
--- modules/dblog/dblog.module
+++ modules/dblog/dblog.module
@@ -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');
}
}
diff --git modules/field/field.attach.inc modules/field/field.attach.inc
index 7434dda..4004c9a 100644
--- modules/field/field.attach.inc
+++ modules/field/field.attach.inc
@@ -542,7 +542,6 @@ function field_attach_form($entity_type, $entity, &$form, &$form_state, $langcod
// 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, $entity, $view_mode, $langcode = NULL)
$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,
diff --git modules/field/field.module modules/field/field.module
index 06be61d..1122013 100644
--- modules/field/field.module
+++ modules/field/field.module
@@ -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, $entity, $field_name, $display = array()
if (isset($result[$field_name])) {
$output = $result[$field_name];
- $output['#attached']['css'][] = drupal_get_path('module', 'field') . '/theme/field.css';
}
}
diff --git modules/field/modules/text/text.module modules/field/modules/text/text.module
index eb06b09..17c6db1 100644
--- modules/field/modules/text/text.module
+++ modules/field/modules/text/text.module
@@ -20,6 +20,13 @@ function text_help($path, $arg) {
}
/**
+ * Implements hook_init().
+ */
+function text_init() {
+ drupal_add_js(drupal_get_path('module', 'text') . '/text.js', array('preprocess' => TRUE));
+}
+
+/**
* Implements hook_field_info().
*
* Field settings:
@@ -537,9 +544,6 @@ function text_field_widget_form(&$form, &$form_state, $field, $instance, $langco
'#title' => t('Summary'),
'#rows' => $instance['widget']['settings']['summary_rows'],
'#description' => t('Leave blank to use trimmed value of full text as the summary.'),
- '#attached' => array(
- 'js' => array(drupal_get_path('module', 'text') . '/text.js'),
- ),
'#attributes' => array('class' => array('text-summary')),
'#prefix' => '
',
'#suffix' => '
',
diff --git modules/file/file.module modules/file/file.module
index 4075d65..e1a0cce 100644
--- modules/file/file.module
+++ modules/file/file.module
@@ -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'),
),
);
diff --git modules/filter/filter.module modules/filter/filter.module
index 92613c7..9602490 100644
--- modules/filter/filter.module
+++ modules/filter/filter.module
@@ -343,6 +343,15 @@ function filter_cron() {
}
/**
+ * Implements hook_init().
+ */
+function filter_init() {
+ $path = drupal_get_path('module', 'filter');
+ drupal_add_css($path . '/filter.css', array('preprocess' => TRUE));
+ drupal_add_js($path . '/filter.js', array('preprocess' => TRUE));
+}
+
+/**
* Implements hook_modules_enabled().
*/
function filter_modules_enabled($modules) {
@@ -788,11 +797,6 @@ function filter_process_format($element) {
$element['value']['#type'] = $element['#base_type'];
$element['value'] += element_info($element['#base_type']);
- // Turn original element into a text format wrapper.
- $path = drupal_get_path('module', 'filter');
- $element['#attached']['js'][] = $path . '/filter.js';
- $element['#attached']['css'][] = $path . '/filter.css';
-
// Setup child container for the text format widget.
$element['format'] = array(
'#type' => 'fieldset',
diff --git modules/forum/forum.module modules/forum/forum.module
index eaae274..83363da 100644
--- modules/forum/forum.module
+++ modules/forum/forum.module
@@ -221,7 +221,7 @@ function forum_menu_local_tasks_alter(&$data, $router_item, $root_path) {
* 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));
}
/**
diff --git modules/help/help.admin.inc modules/help/help.admin.inc
index ce7f5d2..3666fd5 100644
--- modules/help/help.admin.inc
+++ modules/help/help.admin.inc
@@ -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 topics') . '
' . t('Help is available on the following items:') . '
' . help_links_as_list();
return $output;
}
diff --git modules/image/image.admin.inc modules/image/image.admin.inc
index d41c86a..b244f8d 100644
--- modules/image/image.admin.inc
+++ modules/image/image.admin.inc
@@ -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_state, $style) {
$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_state, $style, $effect) {
}
$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']);
}
diff --git modules/image/image.field.inc modules/image/image.field.inc
index 43f5a2d..ca46e0d 100644
--- modules/image/image.field.inc
+++ modules/image/image.field.inc
@@ -356,7 +356,6 @@ function image_field_widget_process($element, &$form_state, $form) {
$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']) {
diff --git modules/image/image.module modules/image/image.module
index 50be71c..a8f7792 100644
--- modules/image/image.module
+++ modules/image/image.module
@@ -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() {
diff --git modules/locale/locale.admin.inc modules/locale/locale.admin.inc
index 3b79afe..706e43a 100644
--- modules/locale/locale.admin.inc
+++ modules/locale/locale.admin.inc
@@ -784,7 +784,7 @@ function locale_translate_overview_screen() {
*/
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);
diff --git modules/node/node.module modules/node/node.module
index f900961..7d9dc5e 100644
--- modules/node/node.module
+++ modules/node/node.module
@@ -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) {
diff --git modules/openid/openid.module modules/openid/openid.module
index 66521bd..8f4e8e0 100644
--- modules/openid/openid.module
+++ modules/openid/openid.module
@@ -62,6 +62,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) {
@@ -115,8 +123,6 @@ function openid_form_user_login_alter(&$form, &$form_state) {
}
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;
diff --git modules/openid/openid.pages.inc modules/openid/openid.pages.inc
index 06738a1..ed7c7fb 100644
--- modules/openid/openid.pages.inc
+++ modules/openid/openid.pages.inc
@@ -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();
diff --git modules/poll/poll.module modules/poll/poll.module
index c9bbd2c..db75586 100644
--- modules/poll/poll.module
+++ modules/poll/poll.module
@@ -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));
}
/**
diff --git modules/search/search.module modules/search/search.module
index 7f1bfa3..bb3d655 100644
--- modules/search/search.module
+++ modules/search/search.module
@@ -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;
}
diff --git modules/shortcut/shortcut.module modules/shortcut/shortcut.module
index 464312d..4425806 100644
--- modules/shortcut/shortcut.module
+++ modules/shortcut/shortcut.module
@@ -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(&$variables) {
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' => '',
'#type' => 'link',
'#title' => '' . $link_text . '',
diff --git modules/simpletest/tests/common.test modules/simpletest/tests/common.test
index 3b14e9f..b68e2e9 100644
--- modules/simpletest/tests/common.test
+++ modules/simpletest/tests/common.test
@@ -607,7 +607,7 @@ class CascadingStylesheetsTestCase extends DrupalWebTestCase {
function testRenderInlinePreprocess() {
$css = 'body { padding: 0px; }';
$css_preprocessed = '';
- drupal_add_css($css, 'inline');
+ drupal_add_css($css, array('type' => 'inline', 'preprocess' => TRUE));
$styles = drupal_get_css();
$this->assertEqual(trim($styles), $css_preprocessed, t('Rendering preprocessed inline CSS adds it to the page.'));
}
@@ -617,7 +617,7 @@ class CascadingStylesheetsTestCase extends DrupalWebTestCase {
*/
function testRenderInlineNoPreprocess() {
$css = 'body { padding: 0px; }';
- drupal_add_css($css, array('type' => 'inline', 'preprocess' => FALSE));
+ drupal_add_css($css, array('type' => 'inline'));
$styles = drupal_get_css();
$this->assertTrue(strpos($styles, $css) > 0, t('Rendering non-preprocessed inline CSS adds it to the page.'));
}
diff --git modules/system/system.module modules/system/system.module
index bdb69ec..e8e4141 100644
--- modules/system/system.module
+++ modules/system/system.module
@@ -1066,6 +1066,7 @@ function system_library() {
'js' => array(
'misc/jquery.js' => array('weight' => JS_LIBRARY - 20),
),
+ 'preprocess' => TRUE,
);
// jQuery Once.
@@ -1076,6 +1077,7 @@ function system_library() {
'js' => array(
'misc/jquery.once.js' => array('weight' => JS_LIBRARY - 19),
),
+ 'preprocess' => TRUE,
);
// jQuery Form Plugin.
@@ -1120,7 +1122,7 @@ function system_library() {
'misc/farbtastic/farbtastic.js' => array(),
),
'css' => array(
- 'misc/farbtastic/farbtastic.css' => array('preprocess' => FALSE),
+ 'misc/farbtastic/farbtastic.css' => array(),
),
);
@@ -1820,10 +1822,10 @@ function system_init() {
if (arg(0) == 'admin' || (variable_get('node_admin_theme', '0') && arg(0) == 'node' && (arg(1) == 'add' || arg(2) == 'edit' || arg(2) == 'delete'))) {
drupal_add_css(drupal_get_path('module', 'system') . '/admin.css', array('weight' => CSS_SYSTEM));
}
- drupal_add_css(drupal_get_path('module', 'system') . '/system.css', array('weight' => CSS_SYSTEM));
- drupal_add_css(drupal_get_path('module', 'system') . '/system-behavior.css', array('weight' => CSS_SYSTEM));
- drupal_add_css(drupal_get_path('module', 'system') . '/system-menus.css', array('weight' => CSS_SYSTEM));
- drupal_add_css(drupal_get_path('module', 'system') . '/system-messages.css', array('weight' => CSS_SYSTEM));
+ drupal_add_css(drupal_get_path('module', 'system') . '/system.css', array('weight' => CSS_SYSTEM, 'preprocess' => TRUE));
+ drupal_add_css(drupal_get_path('module', 'system') . '/system-behavior.css', array('weight' => CSS_SYSTEM, 'preprocess' => TRUE));
+ drupal_add_css(drupal_get_path('module', 'system') . '/system-menus.css', array('weight' => CSS_SYSTEM, 'preprocess' => TRUE));
+ drupal_add_css(drupal_get_path('module', 'system') . '/system-messages.css', array('weight' => CSS_SYSTEM, 'preprocess' => TRUE));
// Ignore slave database servers for this request.
diff --git modules/taxonomy/taxonomy.module modules/taxonomy/taxonomy.module
index 7a21234..79d8e86 100644
--- modules/taxonomy/taxonomy.module
+++ modules/taxonomy/taxonomy.module
@@ -348,6 +348,13 @@ function taxonomy_menu() {
}
/**
+ * Implements hook_init().
+ */
+function taxonomy_init() {
+ drupal_add_css(drupal_get_path('module', 'taxonomy') . '/taxonomy.css', array('preprocess' => TRUE));
+}
+
+/**
* Return edit access for a given term.
*/
function taxonomy_term_edit_access($term) {
@@ -609,8 +616,6 @@ function taxonomy_term_view($term, $view_mode = 'full') {
'#suffix' => '
',
);
- $build['#attached']['css'][] = drupal_get_path('module', 'taxonomy') . '/taxonomy.css';
-
return $build;
}
diff --git modules/tracker/tracker.module modules/tracker/tracker.module
index a34d0ad..b8a3966 100644
--- modules/tracker/tracker.module
+++ modules/tracker/tracker.module
@@ -70,6 +70,13 @@ function tracker_menu() {
}
/**
+ * Implements hook_init().
+ */
+function tracker_init() {
+ drupal_add_css(drupal_get_path('module', 'tracker') . '/tracker.css', array('preprocess' => TRUE));
+}
+
+/**
* Implements hook_cron().
*/
function tracker_cron() {
diff --git modules/tracker/tracker.pages.inc modules/tracker/tracker.pages.inc
index 661b8a6..b9dfa8d 100644
--- modules/tracker/tracker.pages.inc
+++ modules/tracker/tracker.pages.inc
@@ -113,7 +113,7 @@ function tracker_page($account = NULL, $set_title = FALSE) {
'#theme' => 'table',
'#empty' => t('No content available.'),
'#attached' => array(
- 'css' => array(drupal_get_path('module', 'tracker') . '/tracker.css' => array('preprocess' => FALSE)),
+ 'css' => array(drupal_get_path('module', 'tracker') . '/tracker.css' => array()),
),
);
$page['pager'] = array(
diff --git modules/user/user.module modules/user/user.module
index 9561345..9732988 100644
--- modules/user/user.module
+++ modules/user/user.module
@@ -1744,7 +1744,7 @@ function user_menu() {
* Implements hook_init().
*/
function user_init() {
- drupal_add_css(drupal_get_path('module', 'user') . '/user.css');
+ drupal_add_css(drupal_get_path('module', 'user') . '/user.css', array('preprocess' => TRUE));
}
/**
diff --git preprocess_false_4.patch preprocess_false_4.patch
new file mode 100644
index 0000000..b9ba773
--- /dev/null
+++ preprocess_false_4.patch
@@ -0,0 +1,786 @@
+Index: includes/common.inc
+===================================================================
+RCS file: /cvs/drupal/drupal/includes/common.inc,v
+retrieving revision 1.1150
+diff -u -p -r1.1150 common.inc
+--- includes/common.inc 22 Apr 2010 22:36:01 -0000 1.1150
++++ includes/common.inc 24 Apr 2010 05:11:22 -0000
+@@ -2672,7 +2672,7 @@ function drupal_add_css($data = NULL, $o
+ 'type' => 'file',
+ 'weight' => CSS_DEFAULT,
+ 'media' => 'all',
+- 'preprocess' => TRUE,
++ 'preprocess' => FALSE,
+ 'data' => $data,
+ 'browsers' => array(),
+ );
+@@ -3604,7 +3604,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.251
+diff -u -p -r1.251 locale.inc
+--- includes/locale.inc 9 Apr 2010 12:14:25 -0000 1.251
++++ includes/locale.inc 24 Apr 2010 05:11:22 -0000
+@@ -1777,7 +1777,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.438
+diff -u -p -r1.438 aggregator.module
+--- modules/aggregator/aggregator.module 13 Apr 2010 15:23:02 -0000 1.438
++++ modules/aggregator/aggregator.module 24 Apr 2010 05:11:22 -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.77
+diff -u -p -r1.77 block.admin.inc
+--- modules/block/block.admin.inc 23 Apr 2010 05:39:43 -0000 1.77
++++ modules/block/block.admin.inc 24 Apr 2010 05:11:22 -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.539
+diff -u -p -r1.539 book.module
+--- modules/book/book.module 13 Apr 2010 15:23:02 -0000 1.539
++++ modules/book/book.module 24 Apr 2010 05:11:22 -0000
+@@ -229,7 +229,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));
+ }
+
+ /**
+@@ -489,9 +490,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.85
+diff -u -p -r1.85 color.module
+--- modules/color/color.module 22 Apr 2010 23:25:32 -0000 1.85
++++ modules/color/color.module 24 Apr 2010 05:11:22 -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/comment/comment.module
+===================================================================
+RCS file: /cvs/drupal/drupal/modules/comment/comment.module,v
+retrieving revision 1.869
+diff -u -p -r1.869 comment.module
+--- modules/comment/comment.module 22 Apr 2010 10:12:25 -0000 1.869
++++ modules/comment/comment.module 24 Apr 2010 05:11:22 -0000
+@@ -287,6 +287,14 @@ function comment_menu() {
+ }
+
+ /**
++ * Implements hook_init().
++ */
++function comment_init() {
++ drupal_add_css(drupal_get_path('module', 'comment') . '/comment.css', array('preprocess' => TRUE));
++ drupal_add_js(drupal_get_path('module', 'comment') . '/comment-node-form.js', array('preprocess' => TRUE));
++}
++
++/**
+ * Implements hook_menu_alter().
+ */
+ function comment_menu_alter(&$items) {
+@@ -709,7 +717,6 @@ function comment_node_page_additions($no
+ $comments = comment_load_multiple($cids);
+ comment_prepare_thread($comments);
+ $build = comment_view_multiple($comments, $node);
+- $build['#attached']['css'][] = drupal_get_path('module', 'comment') . '/comment.css';
+ $build['pager']['#theme'] = 'pager';
+ $additions['comments'] = $build;
+ }
+@@ -1070,9 +1077,6 @@ function comment_form_node_type_form_alt
+ '#collapsible' => TRUE,
+ '#collapsed' => TRUE,
+ '#group' => 'additional_settings',
+- '#attached' => array(
+- 'js' => array(drupal_get_path('module', 'comment') . '/comment-node-form.js'),
+- ),
+ );
+ $form['comment']['comment_default_mode'] = array(
+ '#type' => 'checkbox',
+@@ -1143,9 +1147,6 @@ function comment_form_alter(&$form, $for
+ '#collapsible' => TRUE,
+ '#collapsed' => TRUE,
+ '#group' => 'additional_settings',
+- '#attached' => array(
+- 'js' => array(drupal_get_path('module', 'comment') . '/comment-node-form.js'),
+- ),
+ '#weight' => 30,
+ );
+ $comment_count = isset($node->nid) ? db_query('SELECT comment_count FROM {node_comment_statistics} WHERE nid = :nid', array(':nid' => $node->nid))->fetchField() : 0;
+Index: modules/dblog/dblog.module
+===================================================================
+RCS file: /cvs/drupal/drupal/modules/dblog/dblog.module,v
+retrieving revision 1.52
+diff -u -p -r1.52 dblog.module
+--- modules/dblog/dblog.module 27 Mar 2010 14:24:14 -0000 1.52
++++ modules/dblog/dblog.module 24 Apr 2010 05:11:22 -0000
+@@ -79,7 +79,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.86
+diff -u -p -r1.86 field.attach.inc
+--- modules/field/field.attach.inc 4 Apr 2010 12:48:18 -0000 1.86
++++ modules/field/field.attach.inc 24 Apr 2010 05:11:22 -0000
+@@ -551,7 +551,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_weights_pre_render';
+ $form['#extra_fields'] = field_extra_fields($entity_type, $bundle);
+
+@@ -1262,9 +1261,6 @@ function field_attach_view($entity_type,
+ $output['#pre_render'][] = '_field_extra_weights_pre_render';
+ $output['#extra_fields'] = field_extra_fields($entity_type, $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.72
+diff -u -p -r1.72 field.module
+--- modules/field/field.module 13 Apr 2010 15:23:02 -0000 1.72
++++ modules/field/field.module 24 Apr 2010 05:11:22 -0000
+@@ -188,6 +188,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.
+@@ -616,7 +623,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/field/modules/text/text.module
+===================================================================
+RCS file: /cvs/drupal/drupal/modules/field/modules/text/text.module,v
+retrieving revision 1.53
+diff -u -p -r1.53 text.module
+--- modules/field/modules/text/text.module 13 Apr 2010 15:16:27 -0000 1.53
++++ modules/field/modules/text/text.module 24 Apr 2010 05:11:22 -0000
+@@ -20,6 +20,13 @@ function text_help($path, $arg) {
+ }
+
+ /**
++ * Implements hook_init().
++ */
++function text_init() {
++ drupal_add_js(drupal_get_path('module', 'text') . '/text.js', array('preprocess' => TRUE));
++}
++
++/**
+ * Implements hook_field_info().
+ *
+ * Field settings:
+@@ -534,9 +541,6 @@ function text_field_widget_form(&$form,
+ '#title' => t('Summary'),
+ '#rows' => $instance['widget']['settings']['summary_rows'],
+ '#description' => t('Leave blank to use trimmed value of full text as the summary.'),
+- '#attached' => array(
+- 'js' => array(drupal_get_path('module', 'text') . '/text.js'),
+- ),
+ '#attributes' => array('class' => array('text-summary')),
+ '#prefix' => '',
+ '#suffix' => '
',
+Index: modules/file/file.module
+===================================================================
+RCS file: /cvs/drupal/drupal/modules/file/file.module,v
+retrieving revision 1.25
+diff -u -p -r1.25 file.module
+--- modules/file/file.module 13 Apr 2010 15:23:03 -0000 1.25
++++ modules/file/file.module 24 Apr 2010 05:11:22 -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.
+@@ -73,7 +80,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/filter/filter.module
+===================================================================
+RCS file: /cvs/drupal/drupal/modules/filter/filter.module,v
+retrieving revision 1.327
+diff -u -p -r1.327 filter.module
+--- modules/filter/filter.module 13 Apr 2010 15:23:03 -0000 1.327
++++ modules/filter/filter.module 24 Apr 2010 05:11:23 -0000
+@@ -336,6 +336,15 @@ function filter_cron() {
+ }
+
+ /**
++ * Implements hook_init().
++ */
++function filter_init() {
++ $path = drupal_get_path('module', 'filter');
++ drupal_add_css($path . '/filter.css', array('preprocess' => TRUE));
++ drupal_add_js($path . '/filter.js', array('preprocess' => TRUE));
++}
++
++/**
+ * Implements hook_modules_enabled().
+ */
+ function filter_modules_enabled($modules) {
+@@ -797,11 +806,6 @@ function filter_process_format($element)
+ $element['value']['#type'] = $element['#base_type'];
+ $element['value'] += element_info($element['#base_type']);
+
+- // Turn original element into a text format wrapper.
+- $path = drupal_get_path('module', 'filter');
+- $element['#attached']['js'][] = $path . '/filter.js';
+- $element['#attached']['css'][] = $path . '/filter.css';
+-
+ // Apply default #after_build behavior.
+ $element['#after_build'][] = 'filter_form_after_build';
+
+Index: modules/forum/forum.module
+===================================================================
+RCS file: /cvs/drupal/drupal/modules/forum/forum.module,v
+retrieving revision 1.563
+diff -u -p -r1.563 forum.module
+--- modules/forum/forum.module 14 Apr 2010 15:51:21 -0000 1.563
++++ modules/forum/forum.module 24 Apr 2010 05:11:23 -0000
+@@ -215,7 +215,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 24 Apr 2010 05:11:23 -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 topics') . '
' . 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.19
+diff -u -p -r1.19 image.admin.inc
+--- modules/image/image.admin.inc 22 Apr 2010 21:43:59 -0000 1.19
++++ modules/image/image.admin.inc 24 Apr 2010 05:11:23 -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(
+@@ -382,7 +382,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.20
+diff -u -p -r1.20 image.field.inc
+--- modules/image/image.field.inc 13 Apr 2010 15:23:03 -0000 1.20
++++ modules/image/image.field.inc 24 Apr 2010 05:11:23 -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.40
+diff -u -p -r1.40 image.module
+--- modules/image/image.module 23 Apr 2010 07:54:44 -0000 1.40
++++ modules/image/image.module 24 Apr 2010 05:11:23 -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.11
+diff -u -p -r1.11 locale.admin.inc
+--- modules/locale/locale.admin.inc 13 Apr 2010 15:23:03 -0000 1.11
++++ modules/locale/locale.admin.inc 24 Apr 2010 05:11:23 -0000
+@@ -782,7 +782,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.1264
+diff -u -p -r1.1264 node.module
+--- modules/node/node.module 22 Apr 2010 09:12:35 -0000 1.1264
++++ modules/node/node.module 24 Apr 2010 05:11:23 -0000
+@@ -2006,7 +2006,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.84
+diff -u -p -r1.84 openid.module
+--- modules/openid/openid.module 7 Apr 2010 16:35:03 -0000 1.84
++++ modules/openid/openid.module 24 Apr 2010 05:11:23 -0000
+@@ -62,6 +62,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) {
+@@ -115,8 +123,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.27
+diff -u -p -r1.27 openid.pages.inc
+--- modules/openid/openid.pages.inc 2 Mar 2010 08:59:54 -0000 1.27
++++ modules/openid/openid.pages.inc 24 Apr 2010 05:11:23 -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.344
+diff -u -p -r1.344 poll.module
+--- modules/poll/poll.module 22 Apr 2010 23:59:04 -0000 1.344
++++ modules/poll/poll.module 24 Apr 2010 05:11:23 -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.344
+diff -u -p -r1.344 search.module
+--- modules/search/search.module 11 Apr 2010 18:54:11 -0000 1.344
++++ modules/search/search.module 24 Apr 2010 05:11:23 -0000
+@@ -145,6 +145,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() {
+@@ -889,9 +896,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.24
+diff -u -p -r1.24 shortcut.module
+--- modules/shortcut/shortcut.module 6 Mar 2010 06:33:14 -0000 1.24
++++ modules/shortcut/shortcut.module 24 Apr 2010 05:11:24 -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() {
+@@ -661,7 +668,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' => '',
+ '#type' => 'link',
+ '#title' => '' . $link_text . '',
+Index: modules/simpletest/tests/common.test
+===================================================================
+RCS file: /cvs/drupal/drupal/modules/simpletest/tests/common.test,v
+retrieving revision 1.110
+diff -u -p -r1.110 common.test
+--- modules/simpletest/tests/common.test 22 Apr 2010 21:41:09 -0000 1.110
++++ modules/simpletest/tests/common.test 24 Apr 2010 05:11:24 -0000
+@@ -576,7 +576,7 @@ class CascadingStylesheetsTestCase exten
+ function testRenderInlinePreprocess() {
+ $css = 'body { padding: 0px; }';
+ $css_preprocessed = '';
+- drupal_add_css($css, 'inline');
++ drupal_add_css($css, array('type' => 'inline', 'preprocess' => TRUE));
+ $styles = drupal_get_css();
+ $this->assertEqual(trim($styles), $css_preprocessed, t('Rendering preprocessed inline CSS adds it to the page.'));
+ }
+@@ -586,7 +586,7 @@ class CascadingStylesheetsTestCase exten
+ */
+ function testRenderInlineNoPreprocess() {
+ $css = 'body { padding: 0px; }';
+- drupal_add_css($css, array('type' => 'inline', 'preprocess' => FALSE));
++ drupal_add_css($css, array('type' => 'inline'));
+ $styles = drupal_get_css();
+ $this->assertTrue(strpos($styles, $css) > 0, t('Rendering non-preprocessed inline CSS adds it to the page.'));
+ }
+Index: modules/system/system.module
+===================================================================
+RCS file: /cvs/drupal/drupal/modules/system/system.module,v
+retrieving revision 1.922
+diff -u -p -r1.922 system.module
+--- modules/system/system.module 22 Apr 2010 07:36:50 -0000 1.922
++++ modules/system/system.module 24 Apr 2010 05:11:24 -0000
+@@ -1061,6 +1061,7 @@ function system_library() {
+ 'js' => array(
+ 'misc/jquery.js' => array('weight' => JS_LIBRARY - 20),
+ ),
++ 'preprocess' => TRUE,
+ );
+
+ // jQuery Once.
+@@ -1071,6 +1072,7 @@ function system_library() {
+ 'js' => array(
+ 'misc/jquery.once.js' => array('weight' => JS_LIBRARY - 19),
+ ),
++ 'preprocess' => TRUE,
+ );
+
+ // jQuery Form Plugin.
+@@ -1115,7 +1117,7 @@ function system_library() {
+ 'misc/farbtastic/farbtastic.js' => array(),
+ ),
+ 'css' => array(
+- 'misc/farbtastic/farbtastic.css' => array('preprocess' => FALSE),
++ 'misc/farbtastic/farbtastic.css' => array(),
+ ),
+ );
+
+@@ -1804,10 +1806,10 @@ function system_init() {
+ if (arg(0) == 'admin' || (variable_get('node_admin_theme', '0') && arg(0) == 'node' && (arg(1) == 'add' || arg(2) == 'edit' || arg(2) == 'delete'))) {
+ drupal_add_css(drupal_get_path('module', 'system') . '/admin.css', array('weight' => CSS_SYSTEM));
+ }
+- drupal_add_css(drupal_get_path('module', 'system') . '/system.css', array('weight' => CSS_SYSTEM));
+- drupal_add_css(drupal_get_path('module', 'system') . '/system-behavior.css', array('weight' => CSS_SYSTEM));
+- drupal_add_css(drupal_get_path('module', 'system') . '/system-menus.css', array('weight' => CSS_SYSTEM));
+- drupal_add_css(drupal_get_path('module', 'system') . '/system-messages.css', array('weight' => CSS_SYSTEM));
++ drupal_add_css(drupal_get_path('module', 'system') . '/system.css', array('weight' => CSS_SYSTEM, 'preprocess' => TRUE));
++ drupal_add_css(drupal_get_path('module', 'system') . '/system-behavior.css', array('weight' => CSS_SYSTEM, 'preprocess' => TRUE));
++ drupal_add_css(drupal_get_path('module', 'system') . '/system-menus.css', array('weight' => CSS_SYSTEM, 'preprocess' => TRUE));
++ drupal_add_css(drupal_get_path('module', 'system') . '/system-messages.css', array('weight' => CSS_SYSTEM, 'preprocess' => TRUE));
+
+
+ // Ignore slave database servers for this request.
+Index: modules/taxonomy/taxonomy.module
+===================================================================
+RCS file: /cvs/drupal/drupal/modules/taxonomy/taxonomy.module,v
+retrieving revision 1.587
+diff -u -p -r1.587 taxonomy.module
+--- modules/taxonomy/taxonomy.module 23 Apr 2010 07:54:44 -0000 1.587
++++ modules/taxonomy/taxonomy.module 24 Apr 2010 05:11:24 -0000
+@@ -338,6 +338,13 @@ function taxonomy_menu() {
+ }
+
+ /**
++ * Implements hook_init().
++ */
++function taxonomy_init() {
++ drupal_add_css(drupal_get_path('module', 'taxonomy') . '/taxonomy.css', array('preprocess' => TRUE));
++}
++
++/**
+ * Return edit access for a given term.
+ */
+ function taxonomy_term_edit_access($term) {
+@@ -596,8 +603,6 @@ function taxonomy_term_view($term, $view
+ '#suffix' => '
',
+ );
+
+- $build['#attached']['css'][] = drupal_get_path('module', 'taxonomy') . '/taxonomy.css';
+-
+ return $build;
+ }
+
+Index: modules/tracker/tracker.module
+===================================================================
+RCS file: /cvs/drupal/drupal/modules/tracker/tracker.module,v
+retrieving revision 1.171
+diff -u -p -r1.171 tracker.module
+--- modules/tracker/tracker.module 4 Dec 2009 16:49:47 -0000 1.171
++++ modules/tracker/tracker.module 24 Apr 2010 05:11:24 -0000
+@@ -70,6 +70,13 @@ function tracker_menu() {
+ }
+
+ /**
++ * Implements hook_init().
++ */
++function tracker_init() {
++ drupal_add_css(drupal_get_path('module', 'tracker') . '/tracker.css', array('preprocess' => TRUE));
++}
++
++/**
+ * Implements hook_cron().
+ */
+ function tracker_cron() {
+Index: modules/tracker/tracker.pages.inc
+===================================================================
+RCS file: /cvs/drupal/drupal/modules/tracker/tracker.pages.inc,v
+retrieving revision 1.31
+diff -u -p -r1.31 tracker.pages.inc
+--- modules/tracker/tracker.pages.inc 14 Jan 2010 06:23:40 -0000 1.31
++++ modules/tracker/tracker.pages.inc 24 Apr 2010 05:11:24 -0000
+@@ -113,7 +113,7 @@ function tracker_page($account = NULL, $
+ '#theme' => 'table',
+ '#empty' => t('No content available.'),
+ '#attached' => array(
+- 'css' => array(drupal_get_path('module', 'tracker') . '/tracker.css' => array('preprocess' => FALSE)),
++ 'css' => array(drupal_get_path('module', 'tracker') . '/tracker.css' => array()),
+ ),
+ );
+ $page['pager'] = array(
+Index: modules/user/user.module
+===================================================================
+RCS file: /cvs/drupal/drupal/modules/user/user.module,v
+retrieving revision 1.1161
+diff -u -p -r1.1161 user.module
+--- modules/user/user.module 23 Apr 2010 05:39:43 -0000 1.1161
++++ modules/user/user.module 24 Apr 2010 05:11:24 -0000
+@@ -1660,7 +1660,7 @@ function user_menu() {
+ * Implements hook_init().
+ */
+ function user_init() {
+- drupal_add_css(drupal_get_path('module', 'user') . '/user.css');
++ drupal_add_css(drupal_get_path('module', 'user') . '/user.css', array('preprocess' => TRUE));
+ }
+
+ /**
+Index: themes/garland/template.php
+===================================================================
+RCS file: /cvs/drupal/drupal/themes/garland/template.php,v
+retrieving revision 1.39
+diff -u -p -r1.39 template.php
+--- themes/garland/template.php 4 Mar 2010 09:03:08 -0000 1.39
++++ themes/garland/template.php 24 Apr 2010 05:11:24 -0000
+@@ -42,7 +42,7 @@ function garland_preprocess_html(&$vars)
+ $vars['classes_array'][] = 'fluid-width';
+ }
+ // Add conditional CSS for IE6.
+- drupal_add_css(path_to_theme() . '/fix-ie.css', array('weight' => CSS_THEME, 'browsers' => array('IE' => 'lt IE 7', '!IE' => FALSE), 'preprocess' => FALSE));
++ drupal_add_css(path_to_theme() . '/fix-ie.css', array('weight' => CSS_THEME, 'browsers' => array('IE' => 'lt IE 7', '!IE' => FALSE)));
+ }
+
+ /**
+Index: themes/seven/template.php
+===================================================================
+RCS file: /cvs/drupal/drupal/themes/seven/template.php,v
+retrieving revision 1.16
+diff -u -p -r1.16 template.php
+--- themes/seven/template.php 21 Apr 2010 06:55:23 -0000 1.16
++++ themes/seven/template.php 24 Apr 2010 05:11:24 -0000
+@@ -6,9 +6,9 @@
+ */
+ function seven_preprocess_html(&$vars) {
+ // Add conditional CSS for IE8 and below.
+- drupal_add_css(path_to_theme() . '/ie.css', array('weight' => CSS_THEME, 'browsers' => array('IE' => 'lte IE 8', '!IE' => FALSE), 'preprocess' => FALSE));
++ drupal_add_css(path_to_theme() . '/ie.css', array('weight' => CSS_THEME, 'browsers' => array('IE' => 'lte IE 8', '!IE' => FALSE)));
+ // Add conditional CSS for IE6.
+- drupal_add_css(path_to_theme() . '/ie6.css', array('weight' => CSS_THEME, 'browsers' => array('IE' => 'lt IE 7', '!IE' => FALSE), 'preprocess' => FALSE));
++ drupal_add_css(path_to_theme() . '/ie6.css', array('weight' => CSS_THEME, 'browsers' => array('IE' => 'lt IE 7', '!IE' => FALSE)));
+ }
+
+ /**
diff --git themes/garland/template.php themes/garland/template.php
index 64f1929..2c103ab 100644
--- themes/garland/template.php
+++ themes/garland/template.php
@@ -42,7 +42,7 @@ function garland_preprocess_html(&$vars) {
$vars['classes_array'][] = 'fluid-width';
}
// Add conditional CSS for IE6.
- drupal_add_css(path_to_theme() . '/fix-ie.css', array('weight' => CSS_THEME, 'browsers' => array('IE' => 'lt IE 7', '!IE' => FALSE), 'preprocess' => FALSE));
+ drupal_add_css(path_to_theme() . '/fix-ie.css', array('weight' => CSS_THEME, 'browsers' => array('IE' => 'lt IE 7', '!IE' => FALSE)));
}
/**
diff --git themes/seven/template.php themes/seven/template.php
index 09773e2..74510a6 100644
--- themes/seven/template.php
+++ themes/seven/template.php
@@ -18,9 +18,9 @@ function seven_preprocess_maintenance_page(&$vars) {
*/
function seven_preprocess_html(&$vars) {
// Add conditional CSS for IE8 and below.
- drupal_add_css(path_to_theme() . '/ie.css', array('weight' => CSS_THEME, 'browsers' => array('IE' => 'lte IE 8', '!IE' => FALSE), 'preprocess' => FALSE));
+ drupal_add_css(path_to_theme() . '/ie.css', array('weight' => CSS_THEME, 'browsers' => array('IE' => 'lte IE 8', '!IE' => FALSE)));
// Add conditional CSS for IE6.
- drupal_add_css(path_to_theme() . '/ie6.css', array('weight' => CSS_THEME, 'browsers' => array('IE' => 'lt IE 7', '!IE' => FALSE), 'preprocess' => FALSE));
+ drupal_add_css(path_to_theme() . '/ie6.css', array('weight' => CSS_THEME, 'browsers' => array('IE' => 'lt IE 7', '!IE' => FALSE)));
}
/**