Tribe__Admin__Notices::showing_transient_notice( string|array $slug )

Checks whether a specific transient admin notices is being shown or not, depending on its expiration and dismissible status.

Parameters #


(string|array) (Required) The slug, or slugs, of the transient notices to check. This is the same slug used to register the transient notice in the tribe_transient_notice function or the Tribe__Admin__Notices::register_transient() method.

Top ↑

Return #

(bool) Whether the transient notice is showing or not.

Top ↑

Source #

File: src/Tribe/Admin/Notices.php

	public function showing_transient_notice( $slug ) {
		$transient_notices = (array) $this->get_transients();

		return isset( $transient_notices[ $slug ] )
		       && ! $this->has_user_dimissed( $slug )
		       && ! $this->transient_notice_expired( $slug );

Top ↑

Changelog #

Version Description
4.11.1 Introduced.