RTC: Remove post list lock icon and replace user-specific lock text with generic message#76255
Draft
RTC: Remove post list lock icon and replace user-specific lock text with generic message#76255
Conversation
…ing edited' Co-authored-by: maxschmeling <112691+maxschmeling@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Remove post list lock icon and update lock text
RTC: Remove post list lock icon and replace user-specific lock text with generic message
Mar 6, 2026
Contributor
|
@copilot this changed the text, but the lock icon was still there when I tested locally |
WordPress core shows the lock icon via `.wp-locked .locked-indicator { display: block }`.
The previous selector `.locked-indicator { display: none }` had lower specificity
(1 class vs 2 classes) and couldn't override it. Use `.wp-locked .locked-indicator`
to match the specificity and ensure the lock icon is hidden.
Co-authored-by: maxschmeling <112691+maxschmeling@users.noreply.github.com>
Contributor
Author
Fixed in ee95d2e. The issue was CSS specificity — WordPress core shows the lock icon via Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When RTC is enabled, the posts list (
edit.php) shows a lock icon, user avatar, and "[Name] is currently editing" — implying exclusive lock semantics that no longer apply when collaborative editing is possible.Changes
lib/compat/wordpress-7.0/collaboration.php— three new functions gated behindwp_enable_real_time_collaboration+edit.phppage check:admin_head): hides.wp-locked .locked-indicator(lock icon in checkbox column) and.wp-locked .locked-info .locked-avatar(user avatar). The.wp-lockedparent selector is required to match the specificity of WordPress core'slist-tables.css, which shows the lock icon via.wp-locked .locked-indicator { display: block }.admin_footer): replaces.locked-textcontent with"Currently being edited"on DOMContentLoaded and re-applies on eachheartbeat-tickto override any core heartbeat updates that would restore the user-specific nameThe translated string passed to JS is encoded with
JSON_HEX_TAG | JSON_HEX_AMP | JSON_HEX_APOS | JSON_HEX_QUOTto guard against script injection via malicious translations.Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.