Menu item with update text (title) in real time I have a menu where one of the items (menu links) is a link to a view where I can see all comments that I have to moderate. Which I need is (if it is possible) to have the title of this link that change in realtime (or every time I load a page/node). 

Think to my situation where I don't know how many comments I need to moderate so in this moment every X minutes I reload the page with all comments that I have to moderate. But this is frustating. So my necessity is to have a menu item like "Comments to moderate: FOO" where FOO is a number (from 0 to infinite) that I can calculate in realtime at every page load or every BAR minutes.

M.
This is how I solved a similar problem:

You need implement the hook_menu() and use the 'title callback'

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

    $items['perfil-usuario'] = array(
        'title' =&gt; 'perfil',
        'description' =&gt; t('User Profile'),
        'title callback' =&gt; 'change_title_profile_link',
        'page callback' =&gt; 'go_to_profile',
        '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_profile_link() {
    return rand();
}


Here you can redirect to the desire url, if the url change you can implement this function

function go_to_profile() {
}