Switch language

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




wp_get_schedule [ WordPress Function ]

wp_get_schedule ( $hook, $args = array() )
Parameters:
  • (string) $hook Action hook to execute when cron is run.
  • (array) $args Optional. Arguments to pass to the hook's callback function.
Returns:
  • (string|bool) False, if no schedule. Schedule on success.
Defined at:



Retrieve Cron schedule for hook with arguments.

Source


<?php
function wp_get_schedule($hook$args = array()) {
    
$crons _get_cron_array();
    
$key md5(serialize($args));
    if ( empty(
$crons) )
        return 
false;
    foreach ( 
$crons as $timestamp => $cron ) {
        if ( isset( 
$cron[$hook][$key] ) )
            return 
$cron[$hook][$key]['schedule'];
    }
    return 
false;
}
?>

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