Made compatible with WordPress 4.1