Guest User

Untitled

a guest
Nov 21st, 2018
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. <?php
  2. /* $Id$ */
  3.  
  4. function hello_world_help($section) {
  5. switch ($section) {
  6. case 'admin/help#hello_world':
  7. $output = '<p>Hello world help...</p>';
  8. return $output;
  9. case 'admin/modules#description':
  10. return 'Hello world module description...';
  11. }
  12. }
  13.  
  14. function hello_world_menu($may_cache) {
  15. $items = array();
  16.  
  17. if ($may_cache) {
  18. }
  19. else {
  20. $items[] = array(
  21. 'path' => 'hello', // drupal path example.com/?q=hello
  22. 'title' => 'Hello world page...', // page title
  23. 'callback' => 'hello_world_page', // callback function name
  24. 'access' => TRUE, // every user can look at generated page
  25. 'type' => MENU_CALLBACK // define type of menu item as callback
  26. );
  27. }
  28.  
  29. return $items;
  30. }
  31.  
  32. function hello_world_page() {
  33. return '<p>Hello world!</p>';
  34. }
Add Comment
Please, Sign In to add comment