Template_Bootstrap::filter_add_body_classes( $classes )

Set the correct body classes for our plugin.


Return

(array) The array containing the body classes


Top ↑

Source

File: src/Tribe/Views/V2/Template_Bootstrap.php

	public function filter_add_body_classes( $classes ) {
		$setting  = $this->get_template_setting();
		$template = $this->get_template_object()->get_path();

		if ( 'page' === $setting ) {
			$classes[] = 'page-template-' . sanitize_title( $template );

			if ( ! is_tax() ) {
				$key = array_search( 'archive', $classes );

				if ( false !== $key ) {
					unset( $classes[ $key ] );
				}
			}
		} else {
			$classes[] = 'tribe-events-page-template';
		}

		return $classes;
	}

Top ↑

Changelog

Changelog
Version Description
4.9.11 Introduced.