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

Activating Photon of Jetpack

Maximizing the full capacity of Jetpack, I decided to enable Photon to boost serving of images in my blog from WordPress.com end. It’s worth noting that WordPress.com 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 […]