Theme_Compatibility::should_add_body_class_to_queue( boolean $add, array $class, string $queue )

Contains the logic for if this object’s classes should be added to the queue.


Parameters

$add

(boolean) (Required) Whether to add the class to the queue or not.

$class

(array) (Required) The array of body class names to add.

$queue

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


Top ↑

Return

(boolean) Whether body classes should be added or not.


Top ↑

Source

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

	public function should_add_body_class_to_queue( $add, $class, $queue ) {
		if (
			'admin' === $queue
			|| ! tribe( Template_Bootstrap::class )->should_load()
			|| ! $this->is_compatibility_required()
		) {
			return $add;
		}

		if ( in_array( $class, $this->get_body_classes() ) ) {
			return true;
		}

		return $add;
	}

Top ↑

Changelog

Changelog
Version Description
5.8.0 now uses static::get_compatibility_classes().
5.1.5 Introduced.