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()
返回值
  • (int|false) The Unix timestamp of the next time the event will occur. False if the event doesn't exist.
定义位置
相关方法
wp_get_schedulewp_get_scheduleswp_get_scheduled_eventwp_clear_scheduled_hookwp_unschedule_hook
引入
2.1.0
弃用
-

wp_next_scheduled: 这个函数用来检索一个特定钩子的下一个预定事件的时间戳。它可以用来确定预定事件何时发生,或根据预定事件执行行动。

检索一个事件的下一个时间戳。

function wp_next_scheduled( $hook, $args = array() ) {
	$next_event = wp_get_scheduled_event( $hook, $args );
	if ( ! $next_event ) {
		return false;
	}

	return $next_event->timestamp;
}

常见问题

FAQs
查看更多 >
闪电侠

(工作日 10:00 - 18:30 为您服务)

2025-12-05 18:32:58

您好,无论是售前、售后、意见建议……均可通过联系工单与我们取得联系。

您也可选择聊天工具与我们即时沟通或点击查看:

您的工单我们已经收到,我们将会尽快跟您联系!
取消
选择聊天工具: