Displaying number of drafts in Posts section of admin sidebar [closed]

I found Quick Review Post Access (Figure 1) which does the trick. It’s not perfect; I was hoping for the little circle, but this works just as well, and even better, it links directly to the page with non-drafts filtered out, making it even easier to keep track of and work with incomplete posts. It even works for pending and future posts as well.

It’s simple enough to make it use the circle (Figure 2) by simply editing the file Quick_Review_Post_Access.php as so:

- add_submenu_page( $path, __( 'Drafts' ), sprintf( __( 'Drafts (%d)' ), $num_posts->draft ), $post_type->cap->edit_posts, "edit.php?post_type=$name&post_status=draft" );
+ add_submenu_page( $path, __( 'Drafts' ), sprintf( __( 'Drafts <span class="update-plugins" title="Drafts"><span class="update-count">%d</span></span>' ), $num_posts->draft ), $post_type->cap->edit_posts, "edit.php?post_type=$name&post_status=draft" );

- add_submenu_page( $path, __( 'Pending' ), sprintf( __( 'Pending (%d)' ), $num_posts->pending ), $post_type->cap->edit_posts, "edit.php?post_type=$name&post_status=pending" );
+ add_submenu_page( $path, __( 'Pending' ), sprintf( __( 'Pending <span class="update-plugins" title="Pending"><span class="update-count">%d</span></span>' ), $num_posts->pending ), $post_type->cap->edit_posts, "edit.php?post_type=$name&post_status=pending" );

- add_submenu_page( $path, __( 'future' ), sprintf( __( 'future (%d)' ), $num_posts->future ), $post_type->cap->edit_posts, "edit.php?post_type=$name&post_status=future" );
+ add_submenu_page( $path, __( 'Future' ), sprintf( __( 'Future <span class="update-plugins" title="Future"><span class="update-count">%d</span></span>' ), $num_posts->future ), $post_type->cap->edit_posts, "edit.php?post_type=$name&post_status=future" );

The only note is that the plugin’s requirements are messed up, so you’ll get a warning about compatibility:

Requires: 2.0.2 or higher

Compatible up to: 1.0.1

However, the description specifically says that it is compatible with WP3.0+.


Figure 1: Quick Review Post Access

Quick Review Post Access screenshot

Figure 2: Quick Review Post Access modification

QRPA modification