Tag Archives: WordPress

Missing the Favorites Menu in WordPress? Add a Makeshift Replacement.

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

Lately, 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]

WPTavern is Back: New Owner, Same Great Flavor

Back in May, the popular WordPress blog WPTavern (home of the WordPress Weekly podcast) was put up for sale by its owner. It was taking up too much of his time and “real life” was getting in the way.

If you’re a reader of WPTavern, you’ll be happy to learn that an undisclosed buyer has acquired the site under the stipulation that Jeff continue to be at the helm.

I’m happy to report that not only have I sold the content I generated to an awesome buyer, they have requested that I continue about my business with WPTavern, the forum and the podcast as if nothing has happened. The only distinct change that has happened and will be the only thing to happen for the foreseeable future is that the site will be owned by someone else. I am in charge of maintaining and operating the site as I normally would. At the request of the new owner, the terms of the deal as well as who the new owner is is under wraps.

Another part of the deal, there will no longer be display advertising on WPTavern…though perhaps we’ll be seeing some from the new owner in the future?

Tumblr-style Links with WordPress Post Formats

There are a few blogs, such as Daring Fireball and Digging into WordPress, that have microblog-style “link” items interspersed with ordinary posts. The post title links off-site instead of to a permalink page, and a more compact styling is usually used. Basically, like Tumblr does it.

Digging into WordPress has a neat guide to doing this yourself in WordPress, if you don’t mind editing your theme files and working with a bit of PHP.

…the key difference between the two types of posts: regular post titles link to the single-view of the post, but Link post titles link to the URL of an external resource (i.e., whatever awesome thing you’re sharing with your visitors). This makes it super-easy to share links via true “Tumblr-style” Link posts.

I really like the idea of Daring Fireball-style link posts, though they aren’t necessary an ideal feature for every blog. They would be great for niche news blogs, for referring people to stories broken by another website, without writing a fluff piece that doesn’t really add to the story.

Tumblr Links with Post Formats [Digging into WordPress]

Using Shortcodes in WordPress Widgets

If you, like most WordPress users, have a widget-enabled theme, you probably have wished you could use shortcodes in them at one time or another. Many plugins allow you to add functionality to your posts via shortcodes, but for some reason they are not enabled in text widgets.

Fortunately, there is an easy way to turn on the shortcode parsing in widgets. Chris Coyier, over at Digging into WordPress, dug up a filter hook you can add to your theme’s functions.php file.

You have to wonder, though…why isn’t this behavior the default?

Shortcodes in Widgets [Digging into WordPress]

WordPress BlackBox Debug Bar Plugin

BlackBox is a handy WordPress plugin that I’m going to have to try out for development. It adds a debug bar along the top of each page, with items that would be invaluable for plugin and theme developers but probably of little interest to bloggers who don’t like getting under the hood.

With the theme you can have a look at all of the globals, see any errors generated, and keep tabs on the MySQL queries (including their execution times) behind the page generation. It even includes a profiler.

StatDash: Statistics on Your WordPress Dashboard

Wouldn’t it be neat to have an at-a-glance display of common statistical information on your WordPress Dashboard? The StatDash plugin does exactly that, adding a customizable widget that shows stats from Google Analytics, Feedburner, Twitter and even your earnings from the Envato Marketplaces.

You can choose which of the services are displayed, as well as hide the chart if you wish to have the widget be a bit more compact.

StatDash is my first item to be released on Code Canyon. It’s priced at $8, and is GPL compliant of course.

WordPress 3.1 Taking Up More Memory?

I’ve noticed on more than once website that, since upgrading to WordPress 3.1, frequent “memory exhausted” errors on Admin pages. It seems like a 32MB allotment just isn’t enough for a WordPress site with a few plugins anymore. Increasing the script memory limit in php.ini (while tweaking the FastCGI process count, in my case, to balance the increase) fixes the fatal errors. 48MB seems to be sufficient, though your mileage may vary.

I wonder what changed that is causing increased memory usage, seeing as the 3.0.x line didn’t have the problem. (Though I recall some of the dashboard widgets occasionally spitting out a similar error on occasion, thanks to SimplePie’s tendency to use a lot of RAM.)

WordPress Admin Bar Plugin Roundup

WordPress 3.1 added an “admin bar” that floats along the top of your blog when you are logged in with an account of sufficient privileges, giving you easy access to frequently-accessed pages in the WordPress admin.

It didn’t take long for plugin developers to start finding ways to extend it.

Weblog Tools Collection has a small roundup of admin bar plugins, which add additional functionality to the admin bar. One lets you manage what appears on the bar, and several add entirely new items such as debugging tools.

Admin Bar Plugin Roundup [Weblog Tools Collection]

Add Submenus to the WordPress Admin Bar

Want to customize the Admin Bar, added in WordPress 3.1, to make it a bit more useful? Rather than removing it, like some people have sought to do, wouldn’t it make more sense to extend it with some additional submenus? If you head over  to Pro Blog Design, you can learn how to add links to the WordPress admin bar.

In this tutorial, we’ll be building a simple plugin that will let us add some handy links (e.g. a Twitter search for the current post, analytics, and ad sales), as well as remove the links we don’t want.

You can follow the tutorial, or just download the finished plugin and make some customizations to it.

Add Useful Links to WordPress Admin Bar [Pro Blog Design]