Skip to content
Snippets Groups Projects
Commit e9e02144 authored by catch's avatar catch
Browse files

Issue #1222248 by sun, andypost, jenlampton: Remove theme_book_title_link() use l() instead.

parent a0302110
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -51,9 +51,6 @@ function book_theme() {
'book_admin_table' => array(
'render element' => 'form',
),
'book_title_link' => array(
'variables' => array('link' => NULL),
),
'book_all_books_block' => array(
'render element' => 'book_menus',
'template' => 'book-all-books-block',
......@@ -320,7 +317,7 @@ function book_block_view($delta = '') {
$tree = menu_tree_all_data($node->book['menu_name'], $node->book);
// There should only be one element at the top level.
$data = array_shift($tree);
$block['subject'] = theme('book_title_link', array('link' => $data['link']));
$block['subject'] = l($data['link']['title'], $data['link']['href'], $data['link']['options']);
$block['content'] = ($data['below']) ? menu_tree_output($data['below']) : '';
}
}
......@@ -356,23 +353,6 @@ function book_block_save($delta = '', $edit = array()) {
config('book.settings')->set('block.navigation.mode', $edit['book_block_mode'])->save();
}
/**
* Returns HTML for a link to a book title when used as a block title.
*
* @param $variables
* An associative array containing:
* - link: An array containing title, href and options for the link.
*
* @ingroup themeable
*/
function theme_book_title_link($variables) {
$link = $variables['link'];
$link['options']['attributes']['class'] = array('book-title');
return l($link['title'], $link['href'], $link['options']);
}
/**
* Returns an array of all books.
*
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment