You are here

function fblikebutton_menu in Facebook Like Button 7

Same name and namespace in other branches
  1. 6.2 fblikebutton.module \fblikebutton_menu()
  2. 6 fblikebutton.module \fblikebutton_menu()
  3. 7.2 fblikebutton.module \fblikebutton_menu()

Implements of hook_menu().

File

./fblikebutton.module, line 13
Adds Facebook's "Like" button to each selected node type. Adds a block with a global static value where users can "Like" the URL set by admins.

Code

function fblikebutton_menu() {
  $items['admin/config/fblikebutton'] = array(
    'title' => 'FB Like Button',
    'description' => 'Configure the Facebook Like button',
    'page callback' => 'system_admin_menu_block_page',
    'access arguments' => array(
      'administer fblikebutton',
    ),
    'position' => 'right',
    'weight' => -20,
    'type' => MENU_NORMAL_ITEM,
    'file' => 'system.admin.inc',
    'file path' => drupal_get_path('module', 'system'),
  );
  $items['admin/config/fblikebutton/general'] = array(
    'title' => 'General settings',
    'description' => 'Configure the settings for the Like button as it appears on individual nodes.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'fblikebutton_admin_settings',
    ),
    'access arguments' => array(
      'administer fblikebutton',
    ),
    'type' => MENU_NORMAL_ITEM,
    'file' => 'fblikebutton.admin.inc',
    'weight' => 0,
  );
  $items['admin/config/fblikebutton/block'] = array(
    'title' => 'Block settings',
    'description' => 'Configure the settings for the Like button as it appears in the block.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'fblikebutton_block_settings',
    ),
    'access arguments' => array(
      'administer fblikebutton block',
    ),
    'type' => MENU_NORMAL_ITEM,
    'file' => 'fblikebutton.admin.inc',
    'weight' => 1,
  );
  return $items;
}