Presence API 0.20.2 has 8 actions and 16 filters, read directly from its source code on Nov 19, 2026. The list updates automatically when a new version is released.
How to use these hooks
Actions let you run your own code at a specific moment. Filters let you change a value before the plugin uses it. Put your code in a child theme's functions.php or a code-snippets plugin, never in the plugin's own files, because updates overwrite them.
// Run your own code when Presence API fires an action
add_action( 'removed_presence', function( $room, $client_id ) {
// Your code runs here.
}, 10, 2 );
// Change a value Presence API is about to use
add_filter( 'wp_check_post_lock_window', function( $value ) {
// Change $value here.
return $value;
}, 10, 1 );Parts of a name in {braces} are filled in at runtime (for example a post type or field ID). Choose Example on any hook for a ready-to-edit snippet.
All hooks
-
/** * This filter is documented in wp-admin/includes/ajax-actions.php */ apply_filters( 'wp_check_post_lock_window', 150 ); -
/** * This filter is documented in includes/presence.php */ apply_filters( 'wp_presence_cleanup_batch_size', 1000 ); -
/** * This filter is documented in includes/presence.php */ apply_filters( 'wp_presence_cleanup_max_passes', 10 ); -
/** * Fires after a client's presence row is removed from a room. */ do_action( 'removed_presence', $room, $client_id ); -
/** * Fires after all of a user's presence rows are removed, across every room. */ do_action( 'removed_user_presence', $user_id ); -
/** * Fires after a client's presence row is written to a room. */ do_action( 'set_presence', $room, $client_id, $state, $user_id ); -
/** * Fires after a write that may have changed who's online on this site. */ do_action( 'wp_presence_admin_room_changed' ); -
/** * Fires when collaboration ends (2+ to 1 editor). */ do_action( 'wp_presence_collaboration_ended', $room, $entries ); -
/** * Fires when collaboration starts (1 to 2+ editors). */ do_action( 'wp_presence_collaboration_started', $room, $entries ); -
/** * Filters the screen key used to track stale-screen state. */ apply_filters( 'wp_presence_current_screen_key', $key, $screen ); -
/** * Filters the presence TTL (time-to-live) used when a caller names no window. */ apply_filters( 'wp_presence_default_ttl', WP_PRESENCE_DEFAULT_TTL ); -
/** * Filters the editor presence state before it's saved. */ apply_filters( 'wp_presence_editor_state', $state, $post_id, $user_id ); -
/** * Filters whether a piece of the plugin is switched on for this site. */ apply_filters( 'wp_presence_feature_enabled', $enabled, $feature ); -
/** * Filters the interval. */ apply_filters( 'wp_presence_heartbeat_idle_interval', 45 ); -
/** * Filters the tick count. */ apply_filters( 'wp_presence_heartbeat_idle_ticks', 5 ); -
/** * Filters whether a user is an AI agent, for labelling its presence rows. */ apply_filters( 'wp_presence_is_agent_user', false, (int) $user_id ); -
/** * Filters the longest window a writer may ask for through `$expires_in`. */ apply_filters( 'wp_presence_max_expires_in', HOUR_IN_SECONDS ); -
/** * Filters whether network-wide presence aggregation runs. */ apply_filters( 'wp_presence_network_aggregation_enabled', ! wp_is_large_network() ); -
/** * Filters the capability required to see network-wide presence data. */ apply_filters( 'wp_presence_network_capability', 'manage_network' ); -
/** * Filters whether presence is recorded anywhere on this network. */ apply_filters( 'wp_presence_network_recording_enabled', (bool) get_site_option( 'wp_presence_network_recording', true ) ); -
/** * Filters how stale a site's network summary row may get before a push * rewrites it. */ apply_filters( 'wp_presence_network_summary_refresh_interval', $maximum ); -
/** * Filters whether presence is recorded on this site. */ apply_filters( 'wp_presence_recording_enabled', (bool) get_option( 'wp_presence_recording', true ) ); -
/** * Fires when a room reads differently without a row being written or removed, * such as when a post someone is editing changes its title or status. */ do_action( 'wp_presence_room_changed', $room ); -
/** * Fires after a screen revision is bumped. */ do_action( 'wp_presence_screen_revision_bumped', $screen_key, $revision, $actor_id );
Generated from Presence API's GPL-licensed source code. Hooks inside bundled third-party libraries are not listed.
Done for you
Rather have it built for you?
Tell us what should change and we’ll write and test the code using these hooks.
Custom hook snippet
from $49
A small, update-safe change built on the plugin’s own hooks.
- Code written against the plugin’s actions and filters
- Tested on a staging copy of your site
- Install instructions included
Typical turnaround: 2–3 business days
Choose thisPlugin customisation
from $149
New features or changed behaviour, without editing the plugin’s files.
- Built as a companion plugin, so updates never wipe it
- Exact quote before we start
- Tested on staging, then deployed
Typical turnaround: 3–7 business days
Choose thisNot sure which fits? Describe what you need and we’ll suggest the simplest option.
Can't find the right hook?
We can build the customisation for you. Describe what you need: