Drupal Hooks学习经验

1,hook_form_alter()

2,hook_action_info()

增加一个动作.

function xxx_action_info() {
  return array(
      '_xxx_action' => array(
      'type' => 'node',
      'description' => t('xxx action description'),
      'configurable' => FALSE,
      'hooks' => array(),
    )
  );
}

function _xxx_action(){

//do something.

}

博客分类: 
Total votes: 837

添加新评论