Unidimensional arrays and objects can be converted by casting (e.g. $array = (array) $object; / $object = (object) $array;) but if multidimensional only the first tier is converted. Here’s the solution!
Shortcodes are a great way to extend WordPress and as developers there are some pretty groovy undocumented tricks we can employ.
Closures (also known as Anonymous Functions) can be called by WordPress Actions or Filters instead of specifying a named function and can lead to cleaner code and escape from callback hell.
Sometimes you reeeeeally want your filter to run last and you can use this code to make sure it does!
PHP currently has more than 5,000 functions; like “Learn a Word a Day”, PHP FOTD selects a new PHP function every day so 5,000 isn’t so intimidating!
Ever wished you could do something like [shortcode epic] and pass the flag as a parameter? Turns out it’s pretty easy!
Recently I had to find a way to turn strings into colors — it was an interesting problem and this is how I solved it.
Getting Dropbox, LAMP and Ubuntu Linux to play nicely isn’t as difficult as apache error.log’s cryptic messages lead you to believe. In fact, it’s quite simple!