hook

Drupal 7 - Hook执行顺序

没有什么文档来说明这个事情,在阅读 "module_implements" 代码的过程中,我获得了变更 Hook 执行顺序的灵感。 下面是 module_implements 中的代码片段 // Allow modules to change the weight of specific implementations but avoid // an infinite loop. if ($hook != 'module_implements_alter')

最佳实践:hook_cron

原文:Best practices for using Drupal’s cron system: hook_cron() 如果你成功的设置了 Drupal Cron,hook_cron() 提供了一种不依赖页面请求的方式来进行后台任务,