Tribe__PUE__Notices::has_notice( string $plugin_name, string|null $notice_type = null )
Returns whether or not a given plugin name has a specific notice
Contents
Parameters
- $plugin_name
-
(string) (Required)
- $notice_type
-
(string|null) (Optional)
Default value: null
Return
(boolean)
Source
File: src/Tribe/PUE/Notices.php
public function has_notice( $plugin_name, $notice_type = null ) {
if ( $notice_type ) {
return ! empty( $this->notices[ $notice_type ][ $plugin_name ] );
}
foreach ( $this->notices as $notice_type => $plugins ) {
if ( ! empty( $plugins[ $plugin_name ] ) ) {
return true;
}
}
return false;
}