Tribe__Admin__Notices::hook()
This will happen on the current_screen and will hook to the correct actions and display the notices
Return
(void)
Source
File: src/Tribe/Admin/Notices.php
public function hook() {
$transients = $this->get_transients();
foreach ( $transients as $slug => $transient ) {
list( $html, $args, $expire ) = $transient;
if ( $expire < time() ) {
continue;
}
$this->register( $slug, $html, $args );
}
foreach ( $this->notices as $notice ) {
if ( $notice->dismiss && $this->has_user_dimissed( $notice->slug ) ) {
continue;
}
if (
! empty( $notice->active_callback )
&& is_callable( $notice->active_callback )
&& false == call_user_func( $notice->active_callback )
) {
continue;
}
add_action( $notice->action, $notice->callback, $notice->priority );
}
}
Changelog
| Version | Description |
|---|---|
| 4.3 | Introduced. |