借由event_hook,我们可以不必大费周章地通过编写原生代码给Ruby解释器挂上钩子,现在只需编写纯ruby代码就可以实现事件钩子了。
By using event_hook, it's now possible to write pure Ruby event hooks instead of having to write native code to hook into the Ruby interpreter.
典型的报警方法是电子邮件和某种类型的自定义钩子接口,可以允许运营小组将事件传播给事件处理系统。
Typical alerting methods are E-mail and some sort of custom hook interface to allow operation teams to propagate events into an event-processing system.
hook_name参数是WordPress提供的Action hook(动作钩子)名称,这决定了你的函数应当和哪个事件结合。
Hook_name is the name of an action hook provided by WordPress, that tells what event your function should be associated with.
应用推荐