In WordPress 3.2, the favorite actions menu was removed during the latest UI refresh. If you’re like me, you had used its hooks to add your own links to frequently-used sections of the admin. I had even made a plugin that allowed me to easily add and remove links. Two things that went in there were a link to the listing of scheduled posts, as well as an item to quickly empty WP Super Cache’s stored cache files.
So now that the core contributors got rid of my convenient quick-access to my scheduled posts and cache settings, I decided to hack together a makeshift replacement. I noticed that the Profile and Log Out links had been rolled into a new User Info menu (a.k.a. the “Howdy Menu”) and set about looking through the WordPress API for a suitable hook. After finding the right one, I set about writing a little bit of code…
add_filter('admin_user_info_links', 'wsc_add_custom_user_links'); function wsc_add_custom_user_links($links) { $links[] = '<a href="options-general.php?page=wpsupercache&tab=easy">Cache</a>'; $links[] = '<a href="edit.php?post_status=future&post_type=post">Scheduled</a>'; $links[] = '<a href="http://example.org">Another link</a>'; return $links; }
Here’s the part where I laughed maniacally about thwarting Matt Mullenweg’s scheme to lower blogging productivity.
You can plunk this code snippet down in your theme’s functions.php file, adding or removing links as you wish. It’s not as elegant as the favorite actions menu, and its a bit narrower. So you will need to watch the character length of your link text, unless you want some ugly word-wrapping to happen. I imagine you could improve it by hooking in a new CSS file with some modifications, but that’s a bit more than a 10-minute fix.
There you have it. You can add your own links to the User Info menu in WordPress 3.2 in place of the favorite actions menu.
How to Defeat Cyrillic Spam in WordPress
Jun 17, 2011 by Matt | Posted in WordPress No CommentsLately, I have been getting a lot of Cyrillic comment spam. It tends to slip past Akismet, as well as the built-in WordPress spam filters. They’re always spam, never legit comments. (As this is an English-language blog, there wouldn’t be much point for somebody to post non-English comments, anyway…)
It has been a minor annoyance for me, since I get a few every week and have to manually remove them.
Fortunately, Jeff Starr (of Digging into WordPress fame) has come up with a solution. Apparently you can put Unicode characters into the WordPress comment blacklist…which of course would include Cyrillic characters. I don’t know why I didn’t think of that to begin with, it’s so simple.
Anyway, his post includes several characters you can copy and paste into your blacklist.
10 Characters for Your WordPress Blacklist [Perishable Press]