WordPress:Function Reference/wp clear scheduled hook

来自站长百科
Fludlen讨论 | 贡献2008年7月22日 (二) 14:52的版本
跳转至: 导航、​ 搜索

Description

描述

Un-schedules all previously-scheduled cron jobs using a particular hook name and arguments.

使用一个特别的hook名和参数,取消先前安排的所有cron jobs。

Usage

用法

%%% <?php wp_clear_scheduled_hook('my_schedule_hook', original_arg1, arg2, ... ); ?> %%%

%%% <?php wp_clear_scheduled_hook('my_schedule_hook', original_arg1, arg2, ... ); ?> %%%

Note that you need to know the exact function arguments this cron hook was supposed to have, in order to unschedule it. All ocurrences of this hook in the schedule, with these arguments, will be removed from the schedule. Also note that the arguments are passed-in singly, not in an array as in the other cron-related functions.

注意你需要知道这个cron hook可能需要的确切的函数参数,以取消这个cron job的安排。时间安排表中这个hook的所有操作,以及这些参数,都会被删除。同时注意,参数是一个一个地传递的,而不是像其它的cron相关的函数那样,以数组传递。

See: 看看: