Fixing Now-Reading’s Admin Menu

I like using Now-Reading to track what books I’m currently reading, have read and want to read on my website. Unfortunately the plugin’s author has been too busy of late to update the plugin and one of the recent updates to WordPress caused Now-Reading’s admin menu to break (when using the single menu option). PHP is not a programming language that I’m really familiar with but I did some poking around in Now-Reading’s code and found if I changed this snip of code:

	if ( $options['menuLayout'] == NR_MENU_SINGLE ) {

		add_menu_page('Now Reading', 'Now Reading', 9, 'admin.php?page=add_book', 'now_reading_add');


		add_submenu_page('admin.php?page=add_book', 'Add a Book', 'Add a Book',$nr_level , 'add_book', 'now_reading_add');

		add_submenu_page('admin.php?page=add_book', 'Manage Books', 'Manage Books', $nr_level, 'manage_books', 'nr_manage');

		add_submenu_page('admin.php?page=add_book', 'Options', 'Options', 9, 'nr_options', 'nr_options');

To read like this:

	if ( $options['menuLayout'] == NR_MENU_SINGLE ) {

		add_menu_page('Now Reading', 'Now Reading', 9, 'add_book', 'now_reading_add');
		add_submenu_page('add_book', 'Add a Book', 'Add a Book',$nr_level , 'add_book', 'now_reading_add');
		add_submenu_page('add_book', 'Manage Books', 'Manage Books', $nr_level, 'manage_books', 'nr_manage');
		add_submenu_page('add_book', 'Options', 'Options', 9, 'nr_options', 'nr_options');

Then Now-Reading’s single admin menu worked properly again.

Similar Posts:

  • Now-Reading Tweaks v2
    Some time back, I tried to make Rob Miller’s Now-Reading plugin display who’s reading each book on t …
  • WordPress 3.1 is Out
    The latest, greatest version of WordPress was released yesterday. It comes with a whole lot fixes an …
  • WordPress/Akismet Hack 0.0.2
    Do you run WP? Do you also have Akismet installed? Would you like a quick reference on the Dashboard …
  • Twilightners
    The more observant of you might have noticed that Twilightners has been showing up on my side bar as …
  • Now-Reading: Default Filters on Book-Meta
    Ever since upgrading to the latest version of Rob Miller’s Now-Reading plugin, I noticed my single b …

1 Comment

Comments are closed.

While this fix works to restore the functionality of the admin menu to Rob Miller’s Now Reading plugin; the plugin broke a week later due to changes at Amazon. Not wanting to give up my now-reading/library; I’ve switched to using Now Reading Reloaded.

It’s basically the same plugin but under active development by another person who has more time to work on it.

Copyright © 2004 – 2017 Powered by WordPress.