Que*_*ner 15 drupal-7 drupal-theming
有什么区别
function mythemes_preprocess_html(&$variables) { ... }
Run Code Online (Sandbox Code Playgroud)
和
function mythemes_process_html(&$variables) { ... }
Run Code Online (Sandbox Code Playgroud)
在drupal 7 template.php中.
何时必须使用预处理功能,何时必须使用过程功能.
谢谢.
小智 12
它们实际上是相同的,虽然在不同的阶段被称为.首先调用预处理函数并进行更改.然后在稍后阶段调用过程函数,并允许进行更改以更改在预处理阶段引入的任何修改.
有关更多信息,请参见http://drupal.org/node/223430.