wpseek.com
WordPress开发者和主题制作者的搜索引擎



wp_next_scheduled › WordPress Function

Since2.1.0
已弃用n/a
wp_next_scheduled ( $hook, $args = array() )
参数: (2)
  • (string) $hook Action hook of the event.
    Required: Yes
  • (array) $args Optional. Array containing each separate argument to pass to the hook's callback function. Although not passed to a callback, these arguments are used to uniquely identify the event, so they should be the same as those used when originally scheduling the event. Default empty array.
    Required: No
    默认: array()
返回:
  • (int|false) The Unix timestamp of the next time the event will occur. False if the event doesn't exist.
定义在:
文档:

Retrieves the next timestamp for an event.



源码

function wp_next_scheduled( $hook, $args = array() ) {
	$next_event = wp_get_scheduled_event( $hook, $args );

	if ( ! $next_event ) {
		return false;
	}

	return $next_event->timestamp;
}