wp_next_scheduled
函数
wp_next_scheduled ( $hook, $args = array() )
- 参数
-
-
(string)
$hook
Action hook of the event.- Required: 是
-
(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: 否
- Default: array()
-
(string)
- 返回值
-
- (int|false) The Unix timestamp of the next time the event will occur. False if the event doesn’t exist.
- 定义位置
-
-
wp-includes/cron.php
, line 806
-
wp-includes/cron.php
- 引入
- 2.1.0
- 弃用
- –
Retrieve 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; }
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。