You are here

function views_add_css in Views (for Drupal 7) 6.2

Same name and namespace in other branches
  1. 8.3 views.module \views_add_css()
  2. 6.3 views.module \views_add_css()
  3. 7.3 views.module \views_add_css()

Include views .css files.

5 calls to views_add_css()
template_preprocess_views_ui_edit_view in includes/admin.inc
Preprocess the view edit page.
template_preprocess_views_ui_list_views in includes/admin.inc
Preprocess the list views theme
views_tabset::render in includes/tabs.inc
Output the HTML for the tabs.
views_ui_preview in includes/admin.inc
Page callback for the live preview.
views_ui_standard_form_buttons in includes/admin.inc
Provide standard buttons for the forms to make it easy. Also provide a hidden op operator because the forms plugin doesn't seem to properly provide which button was clicked.

File

./views.module, line 605
Primarily Drupal hooks and global API functions to manipulate views.

Code

function views_add_css($file) {

  // We set preprocess to FALSE because we are adding the files conditionally,
  // and we don't want to generate duplicate cache files.
  // TODO: at some point investigate adding some files unconditionally and
  // allowing preprocess.
  drupal_add_css(drupal_get_path('module', 'views') . "/css/{$file}.css", 'module', 'all', FALSE);
}