Tribe__Events__Community__Main::getEventStatusIcon( string $status )

Display status icon.


Parameters

$status

(string) (Required) The post status.


Top ↑

Return

(string) The status image element markup.


Top ↑

Source

File: src/Tribe/Main.php

		public function getEventStatusIcon( $status ) {

			$post_status_types = [ 'pending', 'draft', 'future', 'publish' ];

			// Confirm the post status is valid, if not, default to pending.
			if ( ! in_array( $status, $post_status_types ) ) {
				$status = 'pending';
			}

			$src = $this->locatePublishStatusIcon( $status );

			return '<img src="' . esc_url( $src ) . '" alt="' . esc_attr( $status ) . ' icon" class="icon ' . esc_attr( $status ) . '">';
		}

Top ↑

Changelog

Changelog
Version Description
4.8.14 Introduced.