updated for Wordpress 4.1