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.
Contents
Parameters
- $slug
-
(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_noticefunction or theTribe__Admin__Notices::register_transient()method.
Return
(bool) Whether the transient notice is showing or not.
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 );
}
Changelog
| Version | Description |
|---|---|
| 4.11.1 | Introduced. |