Issue #2012526 by mcjim: Remove drupal_add_css() from book.module — use #attached.

8.0.x
catch 2013-06-09 22:29:22 +01:00
parent c1b39526c7
commit 970879581a
1 changed files with 5 additions and 1 deletions

View File

@ -776,6 +776,11 @@ function book_node_view(EntityInterface $node, EntityDisplay $display, $view_mod
$node->content['book_navigation'] = array(
'#markup' => theme('book_navigation', array('book_link' => $node->book)),
'#weight' => 100,
'#attached' => array(
'css' => array(
drupal_get_path('module', 'book') . '/css/book.theme.css',
),
),
);
}
}
@ -986,7 +991,6 @@ function template_preprocess_book_all_books_block(&$variables) {
* Properties used: bid, link_title, depth, plid, mlid.
*/
function template_preprocess_book_navigation(&$variables) {
drupal_add_css(drupal_get_path('module', 'book') . '/css/book.theme.css');
$book_link = $variables['book_link'];
// Provide extra variables for themers. Not needed by default.