WordPress Code Generation

Over the past few months, I’ve been heavily involved in some heavily customized WordPress development projects. Well, years, actually. There’s a bit of boilerplate involved for sure, and that’s where code generators step in. At least I would argue that defining the callbacks and hooking into the necessary actions is boilerplate.

WordPress’s setup is very flexible (in most regards) so that boilerplate is by design. It allows most anything later down the chain to be overridden or removed entirely. That said, it’s certainly not something I can do from memory myself, so I either have to go back and review pages and pages of documentation from the codex or, as I have been lately, turning to code scaffolding tools.

For example, the ones at Generate WP have been tremendously helpful. (As an aside: I seem to have to change the cron generator’s output to run during `init` rather than during the `wp` action.) They are rarely 100% what I want, but good enough to give me a good running start for those common, often tedious, parts of a project.

I’m now always on the lookout for more tools like that as a computer can usually do a repetitive task better than a human is able to. If you’re one of the three or four people who happen to stumble on this post, feel free to drop a comment so I can check them out.

Leave a Reply

  • (will not be published)

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>