Function
Determine if an action exists.
tml_action_exists( string $action )
Parameters
-
$actionstring - The action name.
Return
bool
True if the action exists or false otherwise.
Source
function tml_action_exists( $action ) {
$exists = array_key_exists( $action, tml_get_actions() );
/**
* Filter whether an action exists or not.
*
* @since 7.0
*
* @param bool $exists Whether the action exists or not.
* @param string $action The action name.
*/
return apply_filters( 'tml_action_exists', $exists, $action );
}
Uses
Used by
Changelog
| Version | Description |
|---|---|
| 7.0 | Introduced. |