Always the Way to Blog

I could remember I started blogging way back in 2008 when I got no other things to do aside from taking classes in college and playing online games (RAN is on top of my head). My aunt was and is always going to be my inspiration of why I got my self into this kind of stuff. I started using blogspot. Then moved to self hosted WordPress with the help of such wonderful aunt, who used to be a web designer and developer that time! […]

The Lego of WordPress Frameworks – Genesis

In the recent real estate project, I got to finally play with Genesis Framework and I can’t deny the newly embraced fact that it’s dang “sweet”. I always wanted to try out this framework ever since but clients are requesting to build their websites with other frameworks. So I always hit it in that direction. This time, I happened to suggest this tool to a client and had the chance to give direction on how to build the website that meets their business goals, timeframe and budget. The first time I […]

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>’, […]