Tagfilters

Quick Tip: Beware of the_content Filter

Here’s a quick tip! Don’t apply the_content¬†filters because some plugins (especially social share plugins) will use that filter to add something extra before or after your content, assuming it’s your main post or page content, which is fair. I’m also pretty sure that attachment posts can add things like images there too. So if you’re using the_content¬†filter...

How To: List Filters That You Are About to Apply

I was working on a project where I had to find out all the registered filters that I was about to apply, so here’s a WordPress quickie for you! I found this out by inspecting the apply_filters function inside the plugin.php core file, and apparently there’s a $wp_filter global that contains them all in an associative array where keys are tags. So by doing a print_r at a certain time...

Adding mod_rewrite Rules to .htaccess in WordPress

This is all about the Twitter Friendly Links plugin I’ve been working on lately. You might have noticed some 404 issues in the comments section on the plugin page, this in most cases is due to caching fail. I wrote about this a while ago when I was working on W3 Total Cache compatibility where all I had to do is set the wp_query object’s is_404 variable to false. Then again, the other...