PHP functions and codes for Wordpress