Home >php教程 >PHP源码 >问题: Drupal 6 中如何实现 Drupal 7 中hook_ js_alter

问题: Drupal 6 中如何实现 Drupal 7 中hook_ js_alter

PHP中文网
PHP中文网Original
2016-05-23 16:41:021566browse

Drupal 7 中有hook_js_alter(&$javascript) , 如何在drupal6中实现类似的方法呢。
最近在项目(Drupal 6平台) 中遇到的一个问题, 子主题中要替换一个在基主题中加载的js, Drupal 7中很好实现,直接用hook_js_alter就行了, 但到了Drupal 6 怎么做呢???(最后没办法 直接用字符串str_replace函数把那段js引用给去掉了).

Drupal 7:
  function hook_js_alter(&$javascript){
  }
Drupal 6:
  ????
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn