You are here

function weight_menu in Weight 7

Same name and namespace in other branches
  1. 5 weight.module \weight_menu()
  2. 6 weight.module \weight_menu()

Implements hook_menu().

File

./weight.module, line 47
This module uses the sticky column of the node table to add weighting to nodes.

Code

function weight_menu() {
  $items = array();

  // Ajax callback for weight changer page.
  $items['admin/node/weight/_weight_change'] = array(
    'page callback' => '_weight_change',
    'access arguments' => array(
      'administer nodes',
    ),
    'type' => MENU_CALLBACK,
  );

  // Top level settings.
  $items['admin/config/content/weight'] = array(
    'title' => 'Weight',
    'access arguments' => array(
      'administer site configuration',
    ),
    'description' => 'Add weight-based sorting to nodes.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'weight_settings_form',
    ),
    'file' => 'weight.admin.inc',
  );
  return $items;
}