tracker_menu

Хочешь помочь с переводом? Это очень просто и быстро. Лишь зарегистрируйся, и можешь тут же начать переводить.

modules/tracker/tracker.module, строка 24

Версии
5
tracker_menu($may_cache)
6
tracker_menu()

Реализация hook_menu().

Код

<?php
function tracker_menu($may_cache) {
  global $user;
  $items = array();

  if ($may_cache) {
    $items[] = array('path' => 'tracker', 'title' => t('Recent posts'),
      'callback' => 'tracker_page', 'access' => user_access('access content'),
      'weight' => 1);

    if ($user->uid) {
      $items[] = array('path' => 'tracker/all', 'title' => t('All recent posts'),
        'type' => MENU_DEFAULT_LOCAL_TASK);
      $items[] = array('path' => 'tracker/'. $user->uid, 'title' => t('My recent posts'),
        'type' => MENU_LOCAL_TASK);
    }
  }
  else {
    if (arg(0) == 'user' && is_numeric(arg(1))) {
      $items[] = array('path' => 'user/'. arg(1) .'/track', 'title' => t('Track'),
          'callback' => 'tracker_track_user', 'access' => user_access('access content'),
          'type' => MENU_IS_LOCAL_TASK);
      $items[] = array('path' => 'user/'. arg(1) .'/track/posts', 'title' => t('Track posts'),
          'type' => MENU_DEFAULT_LOCAL_TASK);
    }
  }

  return $items;
}
?>
Войдите или зарегистрируйтесь, чтобы получить возможность отправлять комментарии

Вход в систему