Switch language

wpseek.com
A WordPress-centric search engine for devs and theme authors




wp_unschedule_event [ WordPress Function ]

wp_unschedule_event ( $timestamp, $hook, $args = array() )
Parameters:
  • (int) $timestamp Timestamp for when to run the event.
  • (string) $hook Action hook, the execution of which will be unscheduled.
  • (array) $args Arguments to pass to the hook's callback function. Although not passed to a callback function, these arguments are used to uniquely identify the scheduled event, so they should be the same as those used when originally scheduling the event.
Defined at:



Unschedule a previously scheduled cron job.

The $timestamp and $hook parameters are required, so that the event can be identified.

Source


<?php
function wp_unschedule_event$timestamp$hook$args = array() ) {
    
$crons _get_cron_array();
    
$key md5(serialize($args));
    unset( 
$crons[$timestamp][$hook][$key] );
    if ( empty(
$crons[$timestamp][$hook]) )
        unset( 
$crons[$timestamp][$hook] );
    if ( empty(
$crons[$timestamp]) )
        unset( 
$crons[$timestamp] );
    
_set_cron_array$crons );
}
?>

Examples [ wp-snippets.com ]

Top Google zoekresultaten

Meer ...

Gebruikersdiscussies [ wordpress.org ]

0 User Note(s)

Nog geen één. Wees de eerste!

Nieuw toevoegen ...



HTML5 Powered with CSS3 / Styling, Performance & Integration, and Semantics