Various php helper functions for usage with wordpress or standalone.