tribe_notice( string $slug, callable|string $callback, array $arguments = array(), callable|null $active_callback = null )
Shortcut for Tribe__Admin__Notices::register(), create a Admin Notice easily
Contents
Parameters
- $slug
-
(string) (Required) Slug to save the notice
- $callback
-
(callable|string) (Required) A callable Method/Function to actually display the notice
- $arguments
-
(array) (Optional) Arguments to Setup a notice
Default value: array()
- $active_callback
-
(callable|null) (Optional) An optional callback that should return bool values to indicate whether the notice should display or not.
Default value: null
Return
(stdClass) Which notice was registered
Source
File: src/functions/template-tags/general.php
function tribe_notice( $slug, $callback, $arguments = array(), $active_callback = null ) {
return Tribe__Admin__Notices::instance()->register( $slug, $callback, $arguments, $active_callback );
}