Skip to content

Single Fire Actions

Compare
Choose a tag to compare
@lipemat lipemat released this 31 May 07:43
· 1094 commits to master since this release

New methods added to the Util/Actions class for firing an action or filter one time. Useful in situations where do_action() or apply_filters() fires more than once during a call, page-load, or user action.

use Lipe\Lib\Util\Actions;
Actions::in()->add_single_filter( $filter, $callable, $priority = 10, $accepted_args = 1 );
Actions::in()->add_single_action( $action, $callable, $priority = 10, $accepted_args = 1 );