pulse icon indicating copy to clipboard operation
pulse copied to clipboard

Pulse

Pulse - Heartbeat API Example Plugin

What is Pulse?

Pulse by Jeffikus is an example plugin for the Heartbeat API! It is a starting point for building your Heartbeat functionality into your WordPress powered application or plugin.

The plugin basically does the following:

  • Outputs console data for a logged in user - the object will state that the user is logged in - Console Screenshot
  • Outputs console data for a non logged in user - the object will state that the user is not logged in - Console Screenshot

Why on Github and not WordPress.org

WordPress.org is where your finished plugins should go (assuming they are free) - while this plugin doesn't actually perform any function or add value on its own - you need to make the magic happen :-)

The main reason for hosting it on Github is so you can easily fork it for your own projects, and send pull requests for updates/suggestions!

What can I do with Heartbeat?

There are loads of possibilities;

  • Chat applications,
  • Notifications on the frontend,
  • Manipulation of the DOM based on events happening in the CMS backend,
  • And generally all types of (near) real-time functionality.

How did you learn about this?

Credit must go to the following sites and people for making resources available:

  • Remi Corson - a colleague of mine at WooThemes gave me my initial run through of Heartbeat at this years WordCamp Europe in between talks - www.remicorson.com
  • Pippin wrote a great starter tutorial here - http://pippinsplugins.com/using-the-wordpress-heartbeat-api/
  • WP Tuts Plus also wrote a great 3 part series - http://wp.tutsplus.com/tutorials/creative-coding/the-heartbeat-api-getting-started/
  • The WordPress Codex of course - http://codex.wordpress.org/Function_Reference/wp_heartbeat_settings
  • wp-heartbeat-notify is a great example plugin - https://github.com/micc83/wp-heartbeat-notify
  • Jason Coleman also wrote a great tutorial - http://www.strangerstudios.com/blog/2013/08/heartbeat-api-for-wordpress/