
如何列出MySQL数据库(分步代码教程)
wp_get_schedule ( $hook, $args = array() )
wp_get_schedule: 这个函数用来检索特定钩子的cron时间表。它将钩子的名称作为参数,并返回时间表。
检索一个事件的重复发生时间表。
function wp_get_schedule( $hook, $args = array() ) { $schedule = false; $event = wp_get_scheduled_event( $hook, $args ); if ( $event ) { $schedule = $event->schedule; } /** * Filters the schedule for a hook. * * @since 5.1.0 * * @param string|false $schedule Schedule for the hook. False if not found. * @param string $hook Action hook to execute when cron is run. * @param array $args Arguments to pass to the hook's callback function. */ return apply_filters( 'get_schedule', $schedule, $hook, $args ); }