1 book.install book_update_1002()

Add option for reorder link.

Related topics

File

core/modules/book/book.install, line 128
Install, update and uninstall functions for the book module.

Code

function book_update_1002() {
  $config = config('book.settings');
  $book_links = $config->get('book_links');
  if (isset($book_links['book_add_child'])) {
    $book_links['book_reorder'] = 'book_reorder';
  }
  else {
    $book_links[] = 'book_reorder';
  }
  $config->set('book_links', $book_links);
  $config->save();
}