Tag Archives: plugins

Rewrite Rules Inspector

Clients often ask for fuzzy, non-standard, maybe weird and not always logical permalink structure for their sites. If you’re now working with such a client, consider yourself lucky, because the brand new Rewrite Rules Inspector plugin is here! Props to the WordPress.com VIP team :)



Jetpack 1.3 Released, now with Grunion Contact Forms

Jetpack Contact Forms

Jetpack 1.3 has been released, and it now ships with the Grunion Contact Forms plugin, the very same forms plugin that’s running (behind the scenes) on WordPress.com. The update fixes a couple of small bugs as well. You should be able to download it from your Dashboard very soon.



True, and here’s a related post I wrote earlier about Plugins vs. Without a Plugin. Still, we keep seeing such tutorials piling up everyday, even obvious ones like Google Analytics.

Why would one want to go through the trouble of copying and pasting code into their theme’s header.php file, and then breaking everything when they change their theme or when the theme gets an update? Why not just use a plugin that will retrieve the analytics profile via OAuth?

Is it considered “cool” to copy/paste all my plugins into my theme’s functions.php file? If so, I might just try it out right here on my site! And since I’m running multisite with quite a few different sites, I’ll have to do that ten times for each plugin that I need to use. Then maybe use constants to indicate which snippets I want active and which ones I don’t. *

And as soon as I end up with a 5000-line functions.php file, I can go complain that WordPress is too difficult to learn, and that it’s a pain switching themes or domains, and maybe blame Otto for absolute URLs too. *

* Sarcasm





The MIT license is compatible with the GPL and can be used when submitting plugins to the WordPress.org directory. Thanks to Mark Jaquith for clearing that up.



How to: Disable Jetpack Subscriptions Notifications

It’s more difficult to keep this in mind, than it is to actually execute it. Sometimes we (content creators) want to publish content to see how it feeds to our Twitter or Facebook accounts, or to see how it turns up in the RSS feed, so what we usually do is publish a “test” post and delete it afterwards (together with the tweet and Facebook post.)

However, sent e-mails cannot be deleted, once they’re out there, there’s no turning back. It’s not the best user experience to receive a “testing my twitter plugin” e-mail, right? Jetpack is one of the best ways to deliver e-mail notifications, about your new posts, to your subscribers. I wrote about it before and actually use it myself.

The best way to prevent all of this is of course to use dummy accounts or staging servers. The second best way to test your posts publishing out, is to wait for actual content (and if things didn’t work, try again next time), but sometimes we want to just try it out in our live environment, and if you do that, don’t forget to disable Jetpack subscriptions, which can be done in two easy steps. In the Jetpack configuration page under Subscriptions, hit Learn More and you’ll see a Deactivate button.

Disable Jetpack Subscriptions

Don’t worry, you will not loose all your subscribers, they’ll start receiving notification e-mails, when you Activate the subscriptions module again on that very same page, and yeah, don’t forget to activate it back when you’re done “testing things out.”

That’s about it! How do you handle test posts you don’t want your subscribers to see? Can you easily deactivate the e-mails with other plugins and services such as Feedburner? Share your thoughts and comments and thank you for subscribing!





An Actual Retweet Button for Jetpack & Sharedaddy

I was thinking about this for quite some time now — an actual retweet button for WordPress, and I wonder why Twitter hasn’t provided one yet, it’s so obvious!

Sharedaddy Retweet Button

Yes, the tweet button is doing a great job these days, but let’s admit, that we content publishers enjoy retweets more than regular tweets to our articles, because:

  • They show your name and your Twitter avatar along with the original message, so when others see your tweet retweeted, there’s a better chance they’ll follow you.
  • They instantly show up in your Interactions and increase the retweet count, so you can always see who’s tweeting your posts, without having to use Twitter’s search.
  • They give you a better chance to get a Top Tweet, thus providing even more exposure.

Continue reading



Using Jetpack for E-mail Subscriptions in WordPress

You can find a bunch of “subscribe to posts” plugins in the WordPress.org directory but from my personal experience, it’s very difficult to find something as good and reliable as Jetpack.

Jetpack E-mail Subscriptions for WordPress

The major difference is behind the scenes — when most post subscription plugins will use the wp_mail function to distribute your new post (using sendmail from your server or an SMTP account,) Jetpack will simply send your new post to the WordPress.com server, which will take care of the distribution for you.

Continue reading



Hey WordPress, How About a WP_Plugin Class?

Okay January is my month of ideas :) Let’s talk about plugins for a moment, shall we? Actions and filters are no secret to WordPress developers, right? Say, how many times do you type something like this in your plugins or theme files:

class Some_Plugin {
    function __construct() {
        add_action( 'admin_init', array( $this, 'admin_init' ) );
    }

    function admin_init() {
        // Whatever
    }
}

If you don’t, then you can stop reading now :) I’m addressing the naming technique here, the fact that admin_init is both an action tag, and a method that you assign to that action tag. So if I’m naming all my methods after actions and filters tags in WordPress, isn’t there a way to cut down the burden of having to add_action and add_filter all the time?

I’ve been thinking of an approach that could solve this problem in both, an easy to understand way, and a compatible way. Perhaps we’re lacking a WP_Plugin class in WordPress that would take care of this (along with a bunch of other things) for us, so that we can focus on writing our plugin, and not spend time matching tags to methods.

Here’s a concept that first popped into my mind, experimental and buggy, but something to get our heads thinking about it. If your class extends the WP_Plugin class, and your method’s name starts with a double-underscore prefix (or any other convention we may choose), and matches an existing action or filter, why not run the action or filter automatically without having to add_action or add_filter?

class Some_Plugin extends WP_Plugin {
    function __admin_init() {
        // Will run during admin_init
    }

    function __the_content( $content ) {
        // Will filter the_content
        return $content;
    }
}

Again, it’s just a thought and a lot of decisions should be made before implementing something like this. I went ahead and drafted a plugin file which works well to some extent. You can change the method name convention on line 18.

So my questions to you, dear reader are: is will this make things easier for the WordPress developers? Will this mess things up? What do you think of the prefix convention? How would you propose to handle the priority dilemma? What else could go into a WP_Plugin class?

Update! It seems like Reflection is a better approach at what I’m trying to do, and separating actions from filters logic too. Thanks so much for the heads up Ryan McCue, Kaiser and Daniel Dvorkin. Here’s Ryan’s improvement over my first Gist.

Thanks for stopping by and subscribing!