In trying to figure out what to talk about at WordCamp Atlanta, I remembered a question put to me in WordCamp Birmingham. The question was how can a theme developer easily make a plugin-dependency in their theme?

I wrote some code to do this sort of thing, just as an example/test/demonstration, but then after looking over the schedule, I found that Thomas Griffin had beat me to it. After looking over his slides and having him walk me through his code, I realized that his solution was much more fully featured than mine, so I’m glad I didn’t present anything on this topic. (I ended up just doing an answer session where I tried to answer any question put to me, and frankly that was much more fun than having slides, so I’m probably just going to do that from now on.)

You can find his cool library here, BTW:

However, his solution is highly complex. The class he came up with is well done and fully-featured. He has capabilities for making notifications in the header space on the admin section, lightbox popups, bulk installs, forced activation, custom skinning, etc. It’s a big thing. While that’s great for a lot of people in terms of having code you can just drop-in and use, I thought that it doesn’t do much to teach how one can DIY it.

See, the code I wrote was tiny. It basically just provides some minor functionality to show a theme author how to detect installed plugins, how to detect when they’re active, how to build install and activate links, etc. It doesn’t do any pretty stuff. No custom skinning. No lightbox popups. All these things are possible, but if somebody hands you a hunk of library code to do them, then you know how to use that library, not how it works. I dislike using libraries for this reason.

So here’s the small class I wrote to do the same sort of thing, but in a very bare-bones style.


Simple class to let themes add dependencies on plugins in ways they might find useful

Example usage:

	$test = new Theme_Plugin_Dependency( 'simple-facebook-connect', '' );
	if ( $test->check_active() ) 
		echo 'SFC is installed and activated!';
	else if ( $test->check() ) 
		echo 'SFC is installed, but not activated. <a href="'.$test->activate_link().'">Click here to activate the plugin.</a>';
	else if ( $install_link = $test->install_link() )
		echo 'SFC is not installed. <a href="'.$install_link.'">Click here to install the plugin.</a>';
		echo 'SFC is not installed and could not be found in the Plugin Directory. Please install this plugin manually.';

if (!class_exists('Theme_Plugin_Dependency')) {
	class Theme_Plugin_Dependency {
		// input information from the theme
		var $slug;
		var $uri;

		// installed plugins and uris of them
		private $plugins; // holds the list of plugins and their info
		private $uris; // holds just the URIs for quick and easy searching

		// both slug and PluginURI are required for checking things
		function __construct( $slug, $uri ) {
			$this->slug = $slug;
			$this->uri = $uri;
			if ( empty( $this->plugins ) ) 
				$this->plugins = get_plugins();
			if ( empty( $this->uris ) ) 
				$this->uris = wp_list_pluck($this->plugins, 'PluginURI');

		// return true if installed, false if not
		function check() {
			return in_array($this->uri, $this->uris);

		// return true if installed and activated, false if not
		function check_active() {
			$plugin_file = $this->get_plugin_file();
			if ($plugin_file) return is_plugin_active($plugin_file);
			return false;

		// gives a link to activate the plugin
		function activate_link() {
			$plugin_file = $this->get_plugin_file();
			if ($plugin_file) return wp_nonce_url(self_admin_url('plugins.php?action=activate&plugin='.$plugin_file), 'activate-plugin_'.$plugin_file);
			return false;

		// return a nonced installation link for the plugin. checks to make sure it's there first.
		function install_link() {
			include_once ABSPATH . 'wp-admin/includes/plugin-install.php';

			$info = plugins_api('plugin_information', array('slug' => $this->slug ));

			if ( is_wp_error( $info ) ) 
				return false; // plugin not available from

			return wp_nonce_url(self_admin_url('update.php?action=install-plugin&plugin=' . $this->slug), 'install-plugin_' . $this->slug);

		// return array key of plugin if installed, false if not, private because this isn't needed for themes, generally
		private function get_plugin_file() {
			return array_search($this->uri, $this->uris);

Obviously, for theme authors wanting to do something, they’re going to want to make much prettier means of displaying things and installing things. Thus, this code is meant as an example, to show the basics of how to detect such things.

So, use it directly if you like (it works), but more importantly, if you want to put plugin dependancies in your theme, then I suggest reading it and figuring out how it works instead. Then you can see how plugins can be detected and how to build simple install and activation links.

(BTW, note that I used the slug and the PluginURI for a reason. Plugins should be using a unique URL for the plugin in their code, and that URL is very likely to be the most unique thing about the plugin, and therefore the best way to check for a plugin already being there or not. Slugs can be duplicated by accident or design, but URLs are generally going to be unique and specific to a particular plugin.)

This site is for an innovative, forward-looking Dutch architecture company.

It is powered by WordPress, based on the AutofocusPro theme, with extensive customisation, including to the layout of the site’s categories, the site’s header, and with additional sidebars implemented.

The site’s home page behaviour has also been modified to give roll-over effects which indicate the post’s categories, and the behaviour of a slideshow function for individual pages has been customised by Urban Legend web.

A customised plugin, qTranslate, has been used to offer Dutch and English versions of the site. 

To put it in a sentence, information overload is a true plague nowadays.

And I really mean it. I truly think that the amount of information available on the internet these days is a bad thing. There’s a page on any topic imaginable. In fact, I would even risk saying that if you can’t find something on the internet then it most likely doesn’t exist.

OK, but why is it a bad thing? Because it’s simply paralyzing. Whenever you’re searching for something on the internet the problem isn’t that you can’t find it, the problem is that there’s too much information available, so you can’t stop searching … you know that there’s always something else waiting on the next page.

Having the confidence and knowing when to stop searching for something and using the information you already have can be a skill difficult to develop.

Luckily, there are some simple steps you can take to start your information diet. Check out my guest post at to find out what I’m on about:

How to Fight Information Overload

Feel free to share your own ways of fighting information overload and not letting it take over your life.

Related Posts:

How to Defeat Information Overload |

We hereby declare 2012 as the Year of the WordPress Meetup. You’ll want to get in on this action.

meet·up mēt-əp noun
A meeting, especially a regular meeting of people who share a particular interest and have connected with each other through a social-networking Web site: a meetup for new moms in the neighborhood; a meetup to plan the trip; a meetup for WordPress users.1

So what is a WordPress Meetup? Basically, it’s people in a community getting together — meeting up — who share an interest in WordPress, whether they be bloggers, business users, developers, consultants, or any other category of person able to say, “I use WordPress in some way and I like it, and I want to meet other people who can say the same.” Meetups come in different shapes and sizes, but they all carry the benefit of connecting you with potential collaborators and friends, and helping you learn more about what you can do with WordPress. Here are some of the common types of WordPress meetups:

  • Hang out and work on your WordPress sites together
  • Social/happy hour type gatherings
  • Mini-lectures/presentations
  • Developer hacking meetups
  • Show & tell of how group members are using WordPress
  • Formal instruction on how to use WordPress
  • Lecture series (possibly with visiting speakers)
  • Genius bar/help desk

There’s no prescribed format, as each local group can decide for itself what they want to do. Some groups mix it up from month to month, while others have multiple events each month to satisfy the needs of their community.

The tough part? Running a popular group takes time and money. Just as we worked last year to remove the financial burden for WordCamp organizers and provide logistical support so they could focus more on their event content and experience, we want to start extending that kind of support to meetup groups as well. We don’t want it to cost anything for someone to run a WordPress meetup, or to attend one — building local communities should be as free as WordPress itself!

Since there are so many more meetups than there are WordCamps, we’re going to start with the cost that is the same for every group: organizer dues. We’re setting up an official WordPress account on right now, and over the next couple of weeks will be working with existing meetup group organizers, people who want to start a new meetup group, and the helpful folks at to put this program in place. WordPress meetup groups that choose to have their group become part of the WordPress account will no longer pay organizer dues for that group, as the WordPress Foundation will be footing the bill.

This is exciting for several reasons. First, it means local organizers who are giving something back to the project by way of their time won’t also have shell out $12-19/month for the privilege. That alone is a big step. Second, it will open the door to more events and leaders within a community, since leadership and event planning won’t need to be tied to “owning” the meetup group. Third, more active meetup groups means more WordCamps, yay!

In addition to the financial aspects, we’ll be working on ways to improve social recognition of meetup activity by incorporating feeds from the official meetup groups into the site, and including meetup group participation in the activity stream on your profile.2 I’m also hoping we can do something around providing video equipment to meetup groups (like we already do for WordCamps) to record presentations and tutorials that can be posted to, helping meetup groups offer WordPress classes in their community, and getting involved with mentoring WordPress clubs at local schools and universities. Oh, and we’ll send out some WordPress buttons and stickers to the groups that join in, because everyone loves buttons and stickers.

We’re also putting together some cool resources for people who want to start a new meetup group. There will be a field guide to getting started and some supplies to help you get your group going, and a forum for organizers to talk to and learn from each other.

Over time, we’ll be talking to organizers and looking at what other expenses we can absorb and what other support we can provide to local groups. For now, we’re starting with the organizer dues. If you currently run a WordPress meetup group (whether you are using or not) or would like to start a WordPress meetup group in your area, please fill out our WordPress Meetup Groups survey. Filling in the survey doesn’t obligate you to join the official group, it just gives us a starting point to a) find out what groups are around/interested, and b) get some information on existing groups and their expenses and needs. will contact the group organizers who’ve said they’d like to join the new program, and will walk them through the logistics of the change and answer questions before helping them to opt-in officially.

So, if you currently run a WordPress meetup group, or you would like to start one, please  fill out our WordPress Meetup Groups survey. I can’t wait to see more meetups!

1 – Adapted from “meetup” definition at
2 – Didn’t know about profiles? Check out (put in the username you use in the forums) to see yours!

news(Note. This post contains a list of popular social news sites. In some scenarios, social news sites are great to get backlinks to your blog or website.)

In the previous part we were discussing some popular social bookmarking sites. If I were to choose just a single biggest benefit of social bookmarking I would have to say that it’s the sole result of getting a link and all the SEO benefits that follow.

Social news sites, however, even though similar in nature, provide a completely different main benefit.

From a technical standpoint, you use social news sites very similarly to social bookmarking sites. You just choose a site, register, submit a link along with a short description, and you’re done.

But the main benefit isn’t the link itself. It’s the traffic that follows. That is, if your content has a viral enough nature.

Two leaders

Before I tell you anything else let me just show you the two leaders of this market, so you can understand what exactly a social news site is.

These are: Digg and Reddit.



There you go.

Social news sites are basically all about having users submit interesting (at least in theory) information, and then have other users vote which entries deserve more coverage.

So the most viral content ends up being seen by thousands of people, and the least viral content falls into oblivion.

How to make social news sites work for you

No one knows this exactly… Sorry.

Social news sites are a funny thing. Oftentimes, some stupid piece of garbage-information ends up the most seen thing ever, while interesting, exciting, and well-written articles get almost no attention at all.

It all depends on the site you’re submitting your entry to. Some things work better on some sites than others. Depending on what you want to share it’s up to you to select the best sites.

One advice I have for you is: don’t care about failure or criticism. Don’t give up if your content sees no reaction whatsoever. Or even if someone says that your content is crap (it happens). Or even if you get banned for whatever reason (just create another account).

The simple truth is that social news sites are run by their own rights, and there’s no telling what might happen.

Why is it worth it, then?

The main benefit of using social news sites

First of all, you have to do it right. You have to create awesome content, viral, and also be a little lucky while submitting it to the right social news sites.

If you get all of these elements right you might see a massive stream of traffic to your site. This is the kind of traffic your webhost might not be ready for and cause your site to crash. This happens quite often for some really popular stories.

So if the traffic is the biggest benefit, why am I listing social news sites as part of my “Get Backlinks” series? Two reasons:

  1. You still get a link from the social news site.
  2. The sole act of your story being popular may result in more links from other people who have seen it.

I know that this is not a given, but when it happens you get the most valuable links possible – natural links created by other people. Google loves those.

Giving yourself a head-start

Registering on, any social news site and only visiting it to submit your own stuff is the fastest way to get banned. That’s because, essentially, this is spamming.

To have a better chance of succeeding you should pick just a small range of social news sites and be a somewhat active user there. Which means visiting them and voting on various stuff from time to time, and occasionally submitting your own story.

If you get banned anyway, simply create another account or choose a different site.

Also, remember that using social news sites can’t be your only technique of getting links and recognition. Link building is most effective when you’re using a number of different techniques. This makes your backlinking profile look more natural.

That being said, I wouldn’t focus the majority of my link building efforts on social news sites. Try to use it only when you know that you’ve created an outstanding piece of content. For example, something that has a significant number of shares and retweets already (as an indication of its viral nature).

When using social news sites in such a situation you have a big chance of multiplying your traffic and getting even more publicity. When using social news in a situation when you have just a mediocre piece of content you won’t see any results.

What follows is a list of popular social news sites that fall into different categories. Some niches and markets have more social news sites (e.g. web design), and some have none (I haven’t been able to locate any music-related social news site, for example).

21 social news sites worth checking out

Main-stream leaders: Digg and Reddit. We’ve already talked about those.

Other social news sites (PR ordered):

Lastly, don’t hesitate to shoot me a comment if you know more quality social news sites that would be a good fit for this list.

Related Posts:

Where to Get Backlinks to Your Site – Part 6 – Social News Sites |

Some people have been forwarding me this email message that they received from Facebook:

We currently detect that your app is using the old JavaScript SDK (FeatureLoader.js). This library will no longer work for authentication on February 1st, 2012 since it does not support OAuth 2.0. In May, we announced that all apps on Facebook need to support OAuth 2.0 by October 1st, 2011. Please upgrade to the new JavaScript SDK by February 1st, 2012 to avoid any disruption of service to your app.

The Simple Facebook Connect plugin has not used the FeatureLoader.js script since before version 1.0, which was released 5 months ago. Version 1.2 of SFC fully integrated OAuth 2.0 authentication, and it was released 5 weeks ago.

So if you’re getting this email from Facebook, upgrade SFC to the latest version. Problem solved.

Google came out with an experimental specification for websites to provide “hints” on forms, to allow things like autocomplete to work better and be more standardized. Seems useful.

Here’s a quick plugin snippet you can use to make your comments form use this specification. Only Chrome 15 and up is using this at the moment, but in the long run I think most browsers will be implementing something similar to this, since filling out forms is just one of those endless pieces of drudgery that we could all stand to do away with.

Note that your theme will need to be using the comment_form() function call for this to work, otherwise you’ll just have to edit your comment form in the theme manually.

Plugin Name: Add X-Autocomplete Fields to Comment Form
function add_x_autocompletetype($fields) {
	$fields['author'] = str_replace('<input', '<input x-autocompletetype="name-full"', $fields['author']);
	$fields['email'] = str_replace('<input', '<input x-autocompletetype="email"', $fields['email']);
	return $fields;

Simple little bit of code, really. Should work with any theme using the normal comment_form() function call.

Creating a website people will actually use the way you want them to is quite possibly the most important goal of every online business designer. Or at least it should be.

Essentially, the problem is that just because you’ve got yourself an online store, for example, doesn’t mean that it will automatically do a good job at selling. Or that your new blog will do a good job at showcasing your articles.

The world of web design is quite an extensive one, and I’m not here to teach you all ins and outs of it (not that I even know them). What I want to do, though, is show you the most basic minimum you need to be aware of when building your own online business and the website that is meant to run it.

If you want to learn how to recognize a site that guides your visitors towards the desired actions check out my guest post at WebDesignDev:

Why People Are Not Using My Website the Way I Want Them To?!

Is your website on the right path? Do you have any ideas on how you can make it more user-friendly?

Related Posts:

Creating a Website People Will Actually Use the Way You Want Them To |