If you’re a WordPress developer, then there’s a few developer tools you should have under your belt. One of those is the Log Deprecated Noticed plugin by Andrew Nacin. If you don’t know about it, it’s a plugin you run on your development environment (you have one of those, right?) as opposed to the production environment. From the plugin’s description:

This plugin logs the usage of deprecated files, functions, and function arguments. It identifies where the deprecated functionality is being used and offers the alternative if available.

One of the great features of the plugin is that it shows you how many (if any) new notices/log entries you have, allowing you to quickly see if you’ve used a deprecated function. It does so by adding a little badge (a la updates) right next to it’s menu (which is under Tools). However, since WordPress 3.3 and the fly-out menus, the badge is no longer persistent since the Tools menu isn’t going to be open very frequently, as shown here:

To solve this, I set out to write a plugin that extends the Log Deprecates Notices plugin and adds a link and counter to the new improved toolbar in WordPress 3.3+, like so:

The plugin is available on github and the WordPress.org repository.

Eventually, I’d also like to add the following features to the plugin:

  • Update the counter with some kind of callback, so that if a call to deprecated function is made after the toolbar loads, it still counts the new notice.
  • Add deprecated log info to the Debug Bar plugin

Any questions, comments, recommendations, let me know!

2 Comments on “Log Deprecated Notices Extender

Leave a comment