WordPress sends e-mails in plain/text by default, and you can change that using the wp_mail_content_type filter. However, if you change the content type to text/html for all your e-mails, you might break some messages that contain links, because WordPress puts <angle brackets> around links. From the RFC2396: Using <> angle brackets around each URI is especially recommended as a...
Speaking at WordCamp Sofia 2012
I’ll be travelling to Bulgaria and speaking about the Settings API at WordCamp Sofia this weekend. There are still tickets available if you’re willing to come.
Asking for help with your code
Asking for help with your code without at least indenting it properly, is like going to the dentist without brushing your teeth. — Konstantin Kovshenin (@kovshenin) October 13, 2012 Here is what I had to look at this weekend, only about ten times longer. add_action('save_post','my_save_post',10,2); function my_save_post($post_id,$post){ if(wp_is_post_revision($post_id)){return; } $post=...
The Moscow WordPress Meetup is this Saturday
The Moscow WordPress Meetup is this Saturday. If you’re in Moscow, come join us for a few hours of geek talk about WordPress. We have several presentations scheduled, as well as good coffee, stickers and buttons. Despite the Moscow weather recently, I feel that Saturday will be a great day.
What WordPress Theme Developers Can Learn from Twenty Twelve
We’ve all been waiting for the new default theme for WordPress, and it has finally arrived. Without a doubt, Twenty Twelve is one of the best themes I’ve ever played with. It’s so simple, clean, good-looking and filled with so much awesomeness inside. I’m sure that by now you have downloaded the theme, or at least checked out the demo. In this short review I’d like...
WordPress Workflow Tips: Using Subversion Externals for Plugins, Themes and Core
I’m pretty sure most of you are familiar with version control, and that it’s best practice to start each new project in version control, and not “add it sometime later.” Version control will help you manage changes to your code, and have revisions which you can easily roll back to. Although my favorite version control software is Git, today we’ll talk about...
WordPress Actions vs. Filters
If you’re still wondering about the difference between WordPress actions and WordPress filters, Michael Fields posted a very cool explanation in this forum thread called Actions vs. Filters. I think it’s the best explanation of actions and filters I have seen so far, well done Michael, and keep up the good work! Let’s pretend that WordPress is a Mexican restaurant and we have...
Don’t Be Shy to Use sprintf with WordPress
Don’t be shy to use the printf and sprintf functions with WordPress. It makes code much easier to read. Take a look at the following examples. echo '<a href="' . get_permalink() . '" class="link">' . get_the_title() . '</a>'; It looks quite dirty and it’s very easy to miss a quote or double-quote. Here’s one that looks a lot cleaner and easier to read: printf( '<a...
High Performance WordPress
A co-worker and friend of mine Iliya Polihronov gave this talk earlier this year at WordCamp San Francisco 2012. He walked through an optimal server configuration for a high-performance WordPress environment, including nginx, php-fpm, APC and memcached. His notes are on SlideShare. I’ve been running an nginx and php-fpm configuration for over a year now, with a VPS from MediaTemple. I tried...
GitHub Projects as Subversion Externals
It’s probably a no-brainer, but this totally blew my brains out. Apparently you can use Subversion with GitHub repositories! So if you’re a fan of Subversion externals, and like to include themes and plugins using svn:externals like this: akismet jetpack You’re gonna love the fact, that if the theme or plugin is not hosted in a Subversion repository, but on GitHub only (such as...