filtrod 6.8.0
wp_next_scheduled
Opis — z kodu źródłowego
Filters the timestamp of the next scheduled event for the given hook.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$timestamp | int | Unix timestamp (UTC) for when to next run the event. |
$next_event | object | { An object containing an event's data. @type string $hook Action hook of the event. @type int $timestamp Unix timestamp (UTC) for when to next run the event. @type string $schedule How often the event should subsequently recur. @type array $args Array containing each separate argument to pass to the hook callback function. @type int $interval Optional. The interval time in seconds for the schedule. Only present for recurring events. } |
$args | array | Array containing each separate argument to pass to the hook callback function. |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'wp_next_scheduled', 'twoja_funkcja', 10, 4 );
function twoja_funkcja($param_1, $param_2, $param_3, $param_4) {
// Twój kod
}
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'wp_next_scheduled', 'twoja_funkcja', 10, 4 );
function twoja_funkcja($param_1, $param_2, $param_3, $param_4) {
// Twój kod
}Popularne w tej kategorii