Backward Compatible WP Heartbeat API Usage

I wanted to utilize the WP 3.6 heartbeat API in an app I’m working on. I also wanted to include this feature before WordPress 3.6 officially shipped, so that meant it had to be compatible with WordPress 3.5.x as well.

Turns out, it’s really easy. The heartbeat API looks excellent.