added comments on Wordpress functions used