Advertisement
Guest User

Untitled

a guest
Feb 21st, 2019
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.55 KB | None | 0 0
  1. <?php
  2.  
  3. /**
  4.  * Implements hook_menu().
  5.  */
  6. function foo_menu() {
  7.   $items = array();
  8.  
  9.   $items['node/%node/check'] = array(
  10.     'title' => t('Checking'),
  11.     'access callback' => 'foo_callback',
  12.     'page callback' => 'foo_body',
  13.     'page arguments' => array(1),
  14.     'type' => MENU_LOCAL_TASK,
  15.     'context' => MENU_CONTEXT_PAGE | MENU_CONTEXT_INLINE,
  16.   );
  17.  
  18.   return $items;
  19. }
  20.  
  21. /**
  22.  * Custom callback.
  23.  */
  24. function foo_callback() {
  25.   return TRUE;
  26. }
  27.  
  28. /**
  29.  * Custom menu callback;
  30.  */
  31. function foo_body($node) {
  32.   return 'a';
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement