You are here

function i18n_book_navigation_prev in Book translation 7.2

Same name and namespace in other branches
  1. 6.2 i18n_book_navigation.module \i18n_book_navigation_prev()

Load the previous link in the book.

Port from book_prev(). Will translate the link after loading it.

Parameters

array $book_link: The link data.

Return value

array|false The loaded link or false if no link was found.

See also

book_prev()

1 call to i18n_book_navigation_prev()
i18n_book_navigation_preprocess_i18n_book_navigation in ./i18n_book_navigation.module
Implements hook_preprocess_i18n_book_navigation().

File

./i18n_book_navigation.module, line 571
Defines the Book translation module.

Code

function i18n_book_navigation_prev($book_link) {
  $tree = array(
    array(
      'link' => book_prev($book_link),
      'below' => FALSE,
    ),
  );
  $tree = i18n_book_navigation_translate_tree($tree);
  return isset($tree[0]['link']) ? $tree[0]['link'] : FALSE;
}