docs: document the existing Presence API extension points - #175
Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the Core Committers: Use this line as a base for the props when committing in SVN: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
▶ Preview in WordPress PlaygroundBoots a fresh WordPress with this PR's presence-api build, seeds 5 demo users, and drops you on the dashboard. Stress-test variant: 40 demo users · Built from |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #175 +/- ##
=========================================
Coverage 29.13% 29.13%
Complexity 164 164
=========================================
Files 15 15
Lines 1840 1840
=========================================
Hits 536 536
Misses 1304 1304
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Description
Currently, several extension points exist within the plugin but remain undocumented in the
README.mdfile. Furthermore, the boundary between public stable APIs and internal private helpers needs to be explicitly defined to avoid developers relying on unstable functions.Fixes
Proposed Changes
README.md
presencepost type support (viaregister_post_type()oradd_post_type_support()), thewp_presence_default_ttlfilter andWP_PRESENCE_DEFAULT_TTLconstant, thewp_presence_current_screen_keyfilter, and thewp_presence_screen_revision_bumpedaction.wp_presence_current_screen_keyfrom the "Stale-screen detection" section, so the PHP opt-in and its JS counterpartwp.presence.markScreenStale()point at each other.includes/functions.phpis@access privateand may change or be removed.includes/functions.php
wp_presence_parse_room()as@access private— it was neither public nor tagged, which made the README's boundary claim inaccurate. All its callers are internal.How to Test / Verification
Documentation change; verify the README matches the code
Usage of AI
Use: Yes
Model: Claude Code Opus 5
For: help with wordings and draft PR description