function fp_add_body_class
Search API
6.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
unknown_type $class:
3 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_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.
File
- includes/
misc.inc, line 1003 - 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;
}