refactor: replace hardcoded admin/online room string with helper - #176
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❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #176 +/- ##
============================================
- Coverage 29.13% 29.11% -0.02%
Complexity 164 164
============================================
Files 15 15
Lines 1840 1841 +1
============================================
Hits 536 536
- Misses 1304 1305 +1
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:
Adds
wp_presence_admin_room(), mirroringwp_presence_post_room(), and uses it in place of the 'admin/online' literal acrossheartbeat.php,user-list.php,admin-bar.php,lifecycle.php, and the Who's Online widget (which also drops its own ROOM constant, since a class constant can't hold a function call's return value).Related:
Use of AI Tools
AI assistance: Yes
Tool(s): Claude Code
Model(s): Claude Sonnet 5
Used for: Implementation across all six files; reviewed and verified by me.