Not working on WordPress 4.0

Fix for issue posted on https://wordpress.org/support/topic/not-working-on-wordpress-40