How to get the custom class added to a view Views let people to add custom css class to a display. I'm looking to get this information and add to the body tag.

I try with this two functions and the dpm() function from devel:

views_get_view('name');
views_get_page_view();


But I'm not able to find the custom class that I add to the view.

Do you have any idea how to get this information?
If you only need to get this information, you can use template_preprocess_views_view

/**
 * Preprocess the primary theme implementation for a view.
 */
function YOURTHEME_preprocess_views_view(&amp;$vars) {
  $view = $vars['view'];
  switch ($view-&gt;name) {
    case 'your_view_name' :
      // print out the array with all options to see what you're dealing with
      drupal_set_message('&lt;pre&gt;' . print_r($view-&gt;display['display_name']-&gt;display_options, true) . '&lt;/pre&gt;');
      break;
  }
}


But if you will need to override this custom class, you'll need to use hook_views_pre_render()

function YOURTHEME_views_pre_render(&amp;$view) {

  switch ($view-&gt;name) {
    case 'name_of_your_view' :

      // override the view settings
      // for example: $view-&gt;field['fieldname']-&gt;options['label'] = 'Some label';

      break;
  }
}