Archive for the "Code" Tag

Filed in: , , ,
Posted On: 2011 / 08 / 02

Often when viewing a Twitter profile, the same comment pops into my mind: “Does this person follow me?”. That’s a basic information Twitter profiles still fail to clearly show. There’s a neat site you may know already, doesfollow.com, which lets you know if user1 follows user2 in a very simple way: check http://doesfollow.com/user1/user2 (example). Simple, [...] → Read more

Filed in: , , , ,
Posted On: 2010 / 09 / 06

Lately, every time I manually flagged a comment as spam, I started to have the impression that they all were posted on the same post, namely an old announcement for my plugin "Absolute Comments". An SQL query later, my impression was confirmed: this blog post *is* a spam magnet: I suspect that some particular keywords [...] → Read more

Filed in: , , , ,
Posted On: 2010 / 05 / 18

There's a cool (and underused by plugins) API in WordPress: the Transients API. Transients are temporary options, ie options set with an expiration time. Anytime you're storing options and they have a short life span, you should use transients instead.[...] → Read more

Filed in: , ,
Posted On: 2009 / 11 / 16

I've recently moved to WordPress an active community site which is run and moderated by several editors and administrators. Each post gets dozens of comments, and I wanted to highlight those made by staff members. What not to do If you've googled a bit for a solution on how to identify authors' or admins' comments, [...] → Read more

Filed in: , , , , ,
Posted On: 2009 / 09 / 11

Short intro for readers who don't follow me or this blog's feed: I've been a judge in the annual WordPress Plugin Competition, and as such I have reviewed a number of plugins. Read more about this. As promised, I'm going to share a list of the most common mistakes, errors, misunderstandings, bad habits or wrong [...] → Read more

Filed in: , , ,
Posted On: 2009 / 05 / 05

In the upcoming WordPress 2.8 there's an interesting function set meant to help authors manage their plugin custom options. In a nutshell: whitelist your options, define how you want them to be validated, and just lean back and rely on the API to handle everything for you. Your new best friend is function register_setting(), and [...] → Read more

Filed in: , ,
Posted On: 2009 / 04 / 29

Using PHP's HTTP Authentication is a simple way to protect scripts behind a login/password prompt. There's one little problem: it's supposed to work only on PHP as an Apache module, not the CGI version. It took me a while, hair pulling and some googling to get a basic HTTP Auth system working on Dreamhost's PHP [...] → Read more

Filed in: , , , ,
Posted On: 2008 / 11 / 16

Working with SVN on Windows is pretty much synonym to using TortoiseSVN I guess. If you are running a trunk version of WordPress, maintaining plugins or doing anything else collaboratively, chances are you're using this nice piece of software. When you log to you computer to get some coding work done, what is your first [...] → Read more

Filed in: , ,
Posted On: 2008 / 09 / 07

I ran into an interesting problem, facing what is certainly an HTML limitation that had somehow never really occurred to me. The thing is: when you submit a form with empty fields, empty values are POSTed, except for checkboxes and radio buttons which are not posted at all, just as if they were no such [...] → Read more

Filed in: , , ,
Posted On: 2008 / 08 / 15

The plugin quick reviews I recently did (Plugin Competition roundup, part 1, part 2) got two consequences so far. First, they generated some feedback from readers asking for insights or advices, and second, they quite left me in perplex astonishment regarding how many coders ship plugin with messy code. About the second point, I threw [...] → Read more