Contributions API

Calling all Drupal developers!

Help us get this on the first page of Digg. DIGG NOW!

Modules in 6

i18ncontent_menu_alter

Definition

i18ncontent_menu_alter(&$menu)
contributions/i18n/i18ncontent/i18ncontent.module, line 127

Description

Implementation of hook_menu_alter().

Take over the node add pages

Code

<?php
function i18ncontent_menu_alter(&$menu) {
  foreach ($menu as $path => $item) {
    if (!empty($item['page callback']) && $item['page callback'] == 'node_add') {
      $arg = arg(NULL, $path);
      $menu[$path]['title callback'] = 'i18nstrings_title_callback';
      $menu[$path]['title arguments'] = array('nodetype:'.$arg[2].':name', $item['title']);
    }
  }
}
?>