Changes between Initial Version and Version 1 of Ticket #23216, comment 85
- Timestamp:
- 05/30/2013 11:53:06 PM (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #23216, comment 85
initial v1 5 5 6 6 Have a look at the attached [http://core.trac.wordpress.org/attachment/ticket/23216/heartbeat-test-plugin.php test plugin] for an example. You can do pretty much anything in a function similar to heartbeat_test_comments_count() and have some JS on the page to receive the result and do something. 7 8 Also note that heartbeat won't connect to the server unless there is a script on the page that is expecting a response. This is to limit server load. So for screens where there is no core script using it, you will want to add something with `$(document).on( 'heartbeat-send.my-script', function( e, data ) {...});`.