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

Live-refresh for [pfm_list]

[pfm_list] mounts subscribe to WordPress's built-in Heartbeat API so visitors see new rows without reloading. On each tick (15-60 s, WP-configurable) the front-end sends

{ pfm_list_subscribe: ['<entity_slug>'] }

The HeartbeatProvider responds with

{ pfm_list_latest: { '<entity_slug>': '<ISO timestamp>' } }

— the maximum sys_created_at for each entity. When the value is newer than the list mount's last-known timestamp, the mount refetches its page silently.

Falls back cleanly on installs where wp-heartbeat is disabled (no jQuery loaded, or wp_deregister_script('heartbeat') somewhere) — the list keeps working, it just doesn't auto-refresh.

Permission gating: the timestamp endpoint only reports entity heads. Whether a visitor can READ the new rows is decided when the mount re-runs its listRecords() call, via the regular resolver pipeline.