You are here

function epub_read_title_callback in Epub 6

Determine correct menu title

Parameters

$nid: An integer containing node id.

Return value

A string containing the title for menu tab of a book node.

1 string reference to 'epub_read_title_callback'
epub_menu in ./epub.module
Implementation of hook_menu().

File

./epub.module, line 361
Provide ePub content type and enable the creation of ePub files from book contents.

Code

function epub_read_title_callback($nid) {
  $node = node_load($nid);
  if ($node->type === 'book') {
    return _epub_links_book($nid) ? t('Download ePub') : t('Add ePub');
  }
  elseif ($node->type === 'epub') {
    return _epub_links_book($node->bid) ? t('Download ePub') : t('Add ePub');
  }
}