Tribe__Tickets__Attendee_Registration__Template::theme_body_class( array $classes )
Add the theme to the body class, in order to add compatibility for official themes.
Contents
Parameters
- $classes
-
(array) (Required) List of classes to filter
Return
(array) $classes
Source
File: src/Tribe/Attendee_Registration/Template.php
public function theme_body_class( $classes ) {
$child_theme = get_option( 'stylesheet' );
$parent_theme = get_option( 'template' );
// if the 2 options are the same, then there is no child theme
if ( $child_theme == $parent_theme ) {
$child_theme = false;
}
if ( $child_theme ) {
$theme_classes = "tribe-theme-parent-$parent_theme tribe-theme-child-$child_theme";
} else {
$theme_classes = "tribe-theme-$parent_theme";
}
$classes[] = $theme_classes;
return $classes;
}
Changelog
| Version | Description |
|---|---|
| 4.9 | Introduced. |