Sanitize Multidimensional Input Field

Since input can accept multidimensional reference such as name=”foo[bar]” or name=”foo[bar][inside], you should sanitize/escape values multidimensional array recursively from the POST action. With WordPress’s sanitize_text_field, here’s a gist: function sanitize_array( &$array ) { foreach ($array as &$value) { if( !is_array($value) ) // sanitize if value is not an array $value = sanitize_text_field( $value ); else // go inside this function again $this->sanitize_array($value); } return $array; } Here’s a sample usage: // Var $arrayName = array(‘foo’ => ‘Hello to the’, ‘bar’ => array(‘var1’ => ‘<strong>Bold</strong>’, […]

Activating Photon of Jetpack

Maximizing the full capacity of Jetpack, I decided to enable Photon to boost serving of images in my blog from end. It’s worth noting that rank very well in terms of DNS performance. Along the way of discovering how to effectively use this module to match with the design specification of my blog, I have discovered few things to be mindful of. Caching Images are cached like forever. If you decided to update the image, renaming would be the solution. Shrinking If […]

Not Just Another Redesign

I recently got a downtime in several of my projects and so I took the chance to work on that one thing that I’ve been meaning to get done – personal website redesign. This is the second redesign of and I decided to come up with a look and feel that could represent my work and my personality somehow. I got fascinated with the idea of ‘Less is More’ direction as I am starting to realize about the massive noise we get everyday and how much our surrounding gets […]

SoundCloud Playlists

I happened to work on a site that needs retrieving of SoundCloud playlists for a simple podcast site. I’ve taken a look in the wild if there are already plugins that could do the job since the client has given me limited amount of time. There are indeed a bunch of them but almost all of them are lacking or […]

First Backpacking Adventure

Ive been trying to start exploring places away from my comfort zone but it’s just recently that I was finally able to commence my plan to travel.  Our first attempt happened in El Nido & Puerto Princesa of Palawan. El Nido We arrived at our hostel midnight of July 10. But before that, we were in a van that me and a friend are the only Pinoys. It’s crazy. We’re still in the Philippines but felt like we’re not. Initially […]