You are here

function blogapi_menu in Drupal 5

Same name and namespace in other branches
  1. 4 modules/blogapi.module \blogapi_menu()
  2. 6 modules/blogapi/blogapi.module \blogapi_menu()

File

modules/blogapi/blogapi.module, line 771
Enable users to post using applications that support XML-RPC blog APIs.

Code

function blogapi_menu($may_cache) {
  $items = array();
  if (drupal_is_front_page()) {
    drupal_add_link(array(
      'rel' => 'EditURI',
      'type' => 'application/rsd+xml',
      'title' => t('RSD'),
      'href' => url('blogapi/rsd', NULL, NULL, TRUE),
    ));
  }
  if ($may_cache) {
    $items[] = array(
      'path' => 'blogapi',
      'title' => t('RSD'),
      'callback' => 'blogapi_blogapi',
      'access' => user_access('access content'),
      'type' => MENU_CALLBACK,
    );
    $items[] = array(
      'path' => 'admin/settings/blogapi',
      'title' => t('Blog APIs'),
      'description' => t('Configure which content types and engines external blog clients can use.'),
      'callback' => 'drupal_get_form',
      'callback arguments' => array(
        'blogapi_admin_settings',
      ),
      'access' => user_access('administer site configuration'),
      'type' => MENU_NORMAL_ITEM,
    );
  }
  return $items;
}