Setyenv · Docs
  • English
  • Español
  • 中文
  • 日本語
  • العربية
  • Deutsch
  • Français
  • हिन्दी
  • Bahasa Indonesia
  • Italiano
  • Nederlands
  • Português
  • Русский
  • Türkçe

Auto-refresh (Heartbeat)

Front-end record lists auto-refresh using the WordPress Heartbeat API. When a record changes, the list updates silently without a full page reload.

How it works

  1. The [pfm_list] embed subscribes to heartbeat ticks for its entity
  2. Every 15-60 seconds (WordPress heartbeat interval), the server checks for changes since the client's last-known timestamp
  3. If changes exist, the client auto-fetches the updated list
  4. The user sees the list update in-place with no page flash

Configuration

Auto-refresh is on by default for all front-end lists. To disable:

add_filter('pfm_heartbeat_list_refresh', '__return_false');

Graceful fallback

If the WordPress Heartbeat API is disabled (some hosts do this), the list embed falls back to a manual refresh button. No errors, no broken UI — just less automatic.

Performance

  • The heartbeat tick only checks timestamps, not record data
  • Only entities the user can READ are checked
  • Per-row permission filtering is deferred to the actual fetch
  • The server response is a few bytes per subscribed entity