Skip to content

Instantly share code, notes, and snippets.

@hellofromtonya
Last active December 15, 2016 19:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hellofromtonya/d5f6da3a5d957399276e29d83ddfe5e2 to your computer and use it in GitHub Desktop.
Save hellofromtonya/d5f6da3a5d957399276e29d83ddfe5e2 to your computer and use it in GitHub Desktop.
WordPress `get_body_class` function
function get_body_class( $class = '' ) {
$classes = array();
// build all of the classes
// .. omitted for brevity
$classes = apply_filters( 'body_class', $classes, $class );
return array_unique( $classes );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment