Custom Favorite Actions For WP 2.7 (Beta)

The upcoming WordPress 2.7 will include a “favorite actions” feature – a dropdown menu that is supposed to contain quick links for easy access to select dashboard pages. The dropdown starts out with a few preset links, and new links can be added by plugins.

Power To The Users

I think it would make more sense to let the users themselves choose what goes into this quick-access menu (incidentally, Ozh has proposed something similar). It wouldn’t be realistic to devise a “one size fits all” list of defaults, and giving the user more control over his/her site is usually a good thing. There’s also the potential problem of every plugin wanting to push it’s own link into the dropdown…

So I wrote a plugin. Yep, 2.7 isn’t even in public beta yet, and I’ve already got a plugin for it ๐Ÿ™‚ This plugin, Custom Favorites, will allow you to easily add and remove dashboard pages from the “favorite actions” list. Here’s how it works : you start out with a blank (almost) list of favorites – default links and those added by other plugins are automatically removed. You can add a link to the menu by navigating to any admin page and selecting “Add this page” from the dropdown. To remove a page, open the page again and choose “Remove this page” from the dropdown.

Obligatory Disclaimers

Needless to say this is not the most stable and bug-free plugin, at least not yet. But if you’re already playing around with WP 2.7 then that warning probably won’t deter you ๐Ÿ˜‰ And if you want to try it out with WP 2.6.x, you can – the plugin will switch to the “compatibility mode” and use a normal dashboard menu for the favorite links (this is probably only useful together with a dropdown menu plugin like this one).

Notice : I don’t recommend using this plugin if your blog allows user registration. The current version may present a security risk in that situation. You have been warned.

Download

custom-favorites.zip (8 KB)

Requirements :

  • WordPress 2.7
  • PHP 5 or later
  • MySQL 4.1 or later

Damn, and I promised to never write a plugin that could be quickly obsoleted by changes in WP core. Grr.

Related posts :

4 Responses to “Custom Favorite Actions For WP 2.7 (Beta)”

  1. Worked like a charm. Great work on this while we wait for WP to implement the same feature.

  2. Hey shadow, I was revisiting my plugins and found this one is loading its admin javascript on regular pages. I know it was a one-off plugin but are you still maintaining it at all?

    Have you seen the discussion of how to load plugins properly at http://beerpla.net/2010/01/13/wordpress-plugin-development-how-to-include-css-and-javascript-conditionally-and-only-when-needed-by-the-posts ?

  3. White Shadow says:

    Fixed. This plugin may not be actively maintained, but I usually fix reported bugs even in one-off plugins.

    And yes, I’ve read your post (and the follow-up). However, my strong lurker tendencies tend to deter me from participating in such discussions ๐Ÿ˜‰

  4. […] already discussed favorite actions in another post. To summarize, the user needs to be in control of what goes into that menu. As is, the dropdown […]

Leave a Reply