Hooks::body_classes_should_add( boolean $add, string $queue )

Logic for if body classes should be added.


Parameters #

$add

(boolean) (Required) Whether to add classes or not.

$queue

(string) (Required) The queue we want to get 'admin', 'display', 'all'.


Top ↑

Return #

(boolean) Whether to add classes or not.


Top ↑

Source #

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

	public function body_classes_should_add( $add, $queue ) {
		$context = tribe_context();

		if (
			$context->get( 'event_post_type', false )
			|| $context->get( 'shortcode', false )
		) {
			return true;
		}

		return $add;
	}

Top ↑

Changelog #

Changelog
Version Description
TBD Introduced.