How to organize WordPress theme code to facilitate child theming without taking any special consideration in the base theme.
When code is always written the way that it's written, it sometimes takes an outsider voice to question the rote.
Cutting straight to the point, here’s a quick way with PHP for removing empty values from an array and shifting the indices appropriately. Nothing too fancy but I found it useful at work and figure that I might as well share the tip.… Read the rest
Through the necessity to externalize GUI messages in an application that I have been working on, I have come up with a remarkably simple and clean approach for loading key:value pairs from an external XML file or stream. The Class also transparently allows for String interpolation, should it be required.… Read the rest
Taken from my reply to a post regarding the topic on Facebook, a few words introducing key guidelines I follow when commenting my code. Regarding classes, I like to provide a class summary stating the intent and purpose. Accessors, Mutators, Constructors – I don’t feel the need to comment them as their roles are (and should be) rather self-explanatory.… Read the rest
Clean Code: A Handbook of Agile Software Craftmanship Frustrated with your code? Wondering how on earth your own solution works? It doesn’t need to be so; reading code should and can be like reading a good story, its tale unfolding in vivid detail with each line.… Read the rest