One of the things that I’ve been criticized for (for lack of a better term, I suppose) is that I push object-oriented techniques over procedural programming  in WordPress.

To some degree this is true: I do prefer object-oriented programming, but I don’t think it’s the end-all-be-all of programming paradigms. After all, when building, say, a theme, there’s actually little room for writing object-oriented code.

On top of that, because of the minimum requirements of WordPress, there are a lot of advanced features in PHP that I avoid because I can’t be guaranteed that the end user will have them available on his or her system when they install the plugin.

So, sure, I prefer object-oriented programming, but I certainly don’t aim to make it the utopian programming practice.

That said, there is one aspect of procedural programming that requires some type of convention: private functions.

Continue reading