You are here

function menu_badges_menu_badges_options in Menu Badges 7

Implements hook_menu_badges_options().

File

./menu_badges.module, line 207
Menu Badges module file.

Code

function menu_badges_menu_badges_options() {
  $options = array(
    'menu_badges_test_badge' => array(
      'callback' => 'menu_badges_test_badge',
      'label' => t('Test Badge'),
      'module' => 'menu_badges',
    ),
  );
  if (module_exists('privatemsg')) {
    $options += array(
      'menu_badges_privatemsg_unread_count' => array(
        'callback' => 'menu_badges_privatemsg_unread_count',
        'label' => t('PrivateMsg: Unread count (current user)'),
        'module' => 'privatemsg',
      ),
      'menu_badges_privatemsg_unread_count_uid' => array(
        'callback' => '',
        'arguments' => array(
          'menu_arg' => 1,
        ),
        'label' => t('PrivateMsg: Unread count (for user/% tab.)'),
        'module' => 'privatemsg',
      ),
    );
  }
  if (module_exists('commerce_cart')) {
    $options += array(
      'menu_badges_commerce_cart_item_count' => array(
        'callback' => 'menu_badges_commerce_cart_item_count',
        'label' => t('Commerce: Cart items count'),
        'module' => 'commerce',
      ),
    );
  }
  if (module_exists('user_relationships')) {
    $options += array(
      'menu_badges_ur_pending_incoming_current' => array(
        'callback' => 'menu_badges_ur_pending',
        'arguments' => array(
          'role' => 'requestee',
        ),
        'label' => t('User Relationships: Pending Incoming Requests (current user)'),
        'module' => 'user_relationships',
      ),
      'menu_badges_ur_pending_incoming_uid' => array(
        'callback' => 'menu_badges_ur_pending',
        'arguments' => array(
          'role' => 'requestee',
          'menu_arg' => 1,
        ),
        'label' => t('User Relationships: Pending Incoming Requests (for user/% tab)'),
        'module' => 'user_relationships',
      ),
      'menu_badges_ur_pending_outgoing_current' => array(
        'callback' => 'menu_badges_ur_pending',
        'arguments' => array(
          'role' => 'requester',
        ),
        'label' => t('User Relationships: Pending Outgoing Requests (current user)'),
        'module' => 'user_relationships',
      ),
      'menu_badges_ur_pending_outgoing_uid' => array(
        'callback' => 'menu_badges_ur_pending',
        'arguments' => array(
          'role' => 'requester',
          'menu_arg' => 1,
        ),
        'label' => t('User Relationships: Pending Outgoing Requests (for user/% tab)'),
        'module' => 'user_relationships',
      ),
    );
  }
  if (module_exists('views')) {
    $options += menu_badges_get_views_badges();
  }
  return $options;
}