Enqueue an action to run as soon as possible in the background.

Description Description

This is a wrapper for do_action().

You can pass extra arguments to the hooks, much like you can with do_action().

Example usage:

// The action callback function.
function log_name( $name ) {
    // Log the name.
    log_noptin_message( $name, 'notice' );
add_action( 'log_name_in_the_background', 'log_name', 10, 1 );

 // Ask Noptin to fire the hook in the background.
 do_noptin_background_action( 'log_name_in_the_background', 'Brian');

See also See also

Top ↑

Parameters Parameters


(string) (Required) (required). Name of the action hook. Default: none.


(mixed) (Optional) Additional arguments to pass to callbacks when the hook triggers. @return int|bool The action id on success. False otherwise.

Top ↑

Source Source

File: includes/functions.php

function do_noptin_background_action() {
	return create_noptin_task( func_get_args() )->do_async();

Top ↑

Changelog Changelog


Top ↑

User Contributed Notes User Contributed Notes

30 day money back guarantee
Safe & Secure online payment
Custom CSS Slide Example
Custom Animation Example
Default Animation