Hide_End_Time_Modifier::check_visibility( string $area, null|int|string|WP_Post $post = null )

Check the visibility of the view for end time fields.


Parameters

$area

(string) (Required) The view to check visibility for.

$post

(null|int|string|WP_Post) (Optional) The post object to check visibility for.

Default value: null


Top ↑

Return

(bool) Whether the end time should be hidden or visible.


Top ↑

Source

File: src/Events/Views/Modifiers/Hide_End_Time_Modifier.php

	final public function check_visibility( string $area, $post = null ): bool {
		$views = $this->get_options();

		// If the area is the default view, we need to replace 'default' with the actual view slug.
		if ( $area === 'default' ) {
			$area = tribe( Views_Manager::class )->get_default_view_slug();
		}

		if ( isset( $views[ $area ] ) ) {
			// Is this view flagged to hide the end time?
			return $views[ $area ];
		}

		return true;
	}

Top ↑

Changelog

Changelog
Version Description
6.4.1 Introduced.