WordPress: Function Reference/wp clear scheduled hook:修订间差异

来自站长百科
跳转至: 导航、​ 搜索
无编辑摘要
无编辑摘要
 
第1行: 第1行:
== Description ==
== 描述==
== 描述==
Un-schedules all previously-scheduled cron jobs using a particular hook name and arguments.


使用一个特别的hook名和参数,取消先前安排的所有cron jobs。
使用一个特别的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, ... ); ?> %%%
%%% <?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相关的函数那样,以数组传递。
注意你需要知道这个cron hook可能需要的确切的函数参数,以取消这个cron job的安排。时间安排表中这个hook的所有操作,以及这些参数,都会被删除。同时注意,参数是一个一个地传递的,而不是像其它的cron相关的函数那样,以数组传递。
See:
看看:
看看:
* [[WordPress:Function_Reference/wp_schedule_event|wp_schedule_event]]
* [[WordPress:Function_Reference/wp_schedule_single_event|wp_schedule_single_event]]
* [[WordPress:Function_Reference/wp_unschedule_event|wp_unschedule_event]]
* [[WordPress:Function_Reference/wp_schedule_event|wp_schedule_event]]
* [[WordPress:Function_Reference/wp_schedule_event|wp_schedule_event]]
* [[WordPress:Function_Reference/wp_schedule_single_event|wp_schedule_single_event]]
* [[WordPress:Function_Reference/wp_schedule_single_event|wp_schedule_single_event]]
* [[WordPress:Function_Reference/wp_unschedule_event|wp_unschedule_event]]
* [[WordPress:Function_Reference/wp_unschedule_event|wp_unschedule_event]]

2008年7月29日 (二) 15:21的最新版本

描述[ ]

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

用法[ ]

%%% <?php wp_clear_scheduled_hook('my_schedule_hook', original_arg1, arg2, ... ); ?> %%% 注意你需要知道这个cron hook可能需要的确切的函数参数,以取消这个cron job的安排。时间安排表中这个hook的所有操作,以及这些参数,都会被删除。同时注意,参数是一个一个地传递的,而不是像其它的cron相关的函数那样,以数组传递。 看看: