hook_menu_alter with Organic Groups I want to change the menu button on my main nav bar depending if the user is or isn't a member of a group. 

I need one button to 'register' if the user isn't part of a group and that same button changes to 'add post' if he/she is.

I do not know what to put in the array. Do I put an IF statement similar to "Correct way to use hook_menu_alter"?

   function change_menu_menu_alter(&amp;$items) {
     $items['/node/[nid]'] = array(
       'access callback' =&gt; 'change_menu_custom_menu_access_callback',
       'access arguments' =&gt; array(1),
       // **I don't know what goes here!!!**
     );
       return $items;
   }
   function change_menu_custom_menu_access_callback($gid) {
     return og_is_member('node', $gid);
   }


EDIT: I do not have gid in my url as I am using pathauto to use [node:content-type]/[node:title] on my URL which is why I don't think the current answer works on my website.
This is how I solved a similar problem with the hook_menu() and the use of 'title callback' and 'page callback'

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

    $items['link'] = array(
        'title' =&gt; 'test',
        'description' =&gt; t('Just a test'),
        'title callback' =&gt; 'change_title_link',
        'title arguments' =&gt; array(1),
        'page callback' =&gt; 'go_to_place',
        'page arguments' =&gt; array(1),
        'access callback' =&gt; 'user_is_logged_in',
        'expanded' =&gt; TRUE,
        'weight' =&gt; 100,
        'menu_name' =&gt; 'main-menu',
        'options' =&gt; array('attributes' =&gt; array('class' =&gt; array('perfil-usuario'))),
        ); 

    return $items;
}


In this function you can change the link title 

function change_title_link($gid) {
  if(og_is_member('node', $gid)) {
    return 'Post';
  }
  else {
    return 'Register';  
  }
}


Here you can redirect to the desire url

function go_to_place($gid) {
  if(og_is_member('node', $gid)) {
    drupal_goto('/someplace/post');
  }
  else {
    drupal_goto('/someplace/register');
  }
}