function fp_add_body_class

6.x misc.inc fp_add_body_class($class)
7.x misc.inc fp_add_body_class($class)
4.x misc.inc fp_add_body_class($class)
5.x misc.inc fp_add_body_class($class)

Add a CSS class to the body tag of the page. Useful for themeing later on.

Parameters

String $class:

5 calls to fp_add_body_class()
advise_display_view in modules/advise/advise.module
This is the page which actually displays the "view" for the user to see their advising session, or for an advisor to advise them.
content_edit_content_form in modules/content/content.module
This form lets the user edit some piece of content
content_view_content in modules/content/content.module
Display the content specified in the GET's cid.
fp_display_page in includes/theme.inc
Output the contents of the $page variable to the screen. $page is an array containing details about the page, as well as its original menu item (router_item) definition.
user_edit_attribute_form in modules/user/user.module
The form which lets us actually edit this user's attribute (ex: Visa Status) Meant to be very similar to:

File

includes/misc.inc, line 1612
This file contains misc functions for FlightPath

Code

function fp_add_body_class($class) {

  // Let's sanitize the "class" to make sure it doesn't contain any trouble characters.
  $class = str_replace("'", '', $class);
  $class = str_replace('"', '', $class);
  $class = str_replace('(', '', $class);
  $class = str_replace(')', '', $class);
  $class = str_replace(';', '', $class);
  $class = str_replace('.', '', $class);
  $class = str_replace('<', '', $class);
  $class = str_replace('>', '', $class);
  $class = str_replace('/', '', $class);
  $class = str_replace('\\', '', $class);
  $class = str_replace('#', '', $class);
  $class = str_replace('&', '', $class);

  @$GLOBALS ["fp_add_body_classes"] .= " " . $class;
}