added WP version checking