This snippet is a code from my module that just makes a simple menu item into my admin menu in Drupal 7. I am using menu_hook function to achieve this.
Source code viewer
// Also I have made a tool for this http://browse-tutorials.com/tools/drupal/create-page.
// Just insert your module name, page name, url and check some checkboxes.
/**
* Implementation of hook_menu()
*/
// Change hook to your module machine name.
function hook_menu() {
'title' => 'Title', // menu item title
'description' => 'Description', // menu item description
'page callback' => 'function_name_of_page_function', // function that returns or echos pages content
'access callback' => TRUE, // no restrictions on access rights
'type' => MENU_NORMAL_ITEM, // this type creates normal menu item
);
return $items;
}
function function_name_of_page_function() {
// Use echo to make content appear on empty page.
// Use return to make content appear in content region of your active theme.
}Programming Language: PHP