After you have updated your .info
file, you can start to revise the code of your module. In this section, we will review some of the major changes to the general Drupal API before diving into specific key functional areas.
In Drupal 7, several hooks from Drupal 6 have been split into multiple hooks based on the Drupal 6 op code. For example, the Drupal 6 hook_node_type
: becomes hook_node_type_delete, hook_node_type_insert
, and hook_node_type_update
in Drupal 7. This makes the code implementing the hooks more efficient as well as making it easier for developers to easily find out which hooks can be implemented. The hooks that have been split in this manner include:
hook_aggregator
hook_block
hook_comment
hook_menu_link
hook_node_type
hook_search
hook_user
hook_nodeapi
—this was split intohook_node_ hooks
More information about each of these hooks can be found at: http://api.drupal.org/api/7. To convert these hooks to Drupal 7, you will need...