You are here

function plus1_menu in Plus 1 7

Same name and namespace in other branches
  1. 6.2 plus1.module \plus1_menu()
  2. 6 plus1.module \plus1_menu()

Implements hook_menu().

File

./plus1.module, line 36

Code

function plus1_menu() {
  $items['plus1/vote/%/%'] = array(
    'title' => 'Vote',
    'page callback' => 'plus1_vote',
    'page arguments' => array(
      2,
      3,
      4,
    ),
    'access callback' => 'plus1_user_access',
    'access arguments' => array(
      'plus1 vote on node',
      'plus1 vote on comment',
      'plus1 vote on taxonomy_term',
    ),
    'type' => MENU_CALLBACK,
  );
  $items['plus1/undo-vote/%/%'] = array(
    'title' => 'Undo vote',
    'page callback' => 'plus1_undo_vote',
    'page arguments' => array(
      2,
      3,
      4,
    ),
    'access callback' => 'plus1_user_access',
    'access arguments' => array(
      'plus1 vote on node',
      'plus1 vote on comment',
      'plus1 vote on taxonomy_term',
    ),
    'type' => MENU_CALLBACK,
  );
  $items['admin/config/user-interface/plus1'] = array(
    'title' => 'Plus 1',
    'description' => 'Allows readers to vote on content.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'plus1_settings',
    ),
    'access callback' => 'plus1_user_access',
    'access arguments' => array(
      'administer the plus1 voting widget',
    ),
    'file' => 'plus1.admin.inc',
  );
  return $items;
}