-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Editor: Hide 'sticky' option for password-protected posts #70887
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: trunk
Are you sure you want to change the base?
Conversation
Size Change: +14 B (0%) Total Size: 1.89 MB
ℹ️ View Unchanged
|
Thanks! Hiding/showing works as described. One question: should toggling between sticky and password fields also clear the selection? For instance, if you're setting a password to a post that's already sticky, or unchecking password and setting sticky the notice appears: Kapture.2025-07-24.at.16.27.57.mp4I think in the case of unchecking password and setting sticky in particular, the user should be able to save. Is that reproducible for other folks? In any case, I'll defer to @jameskoster |
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 If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Good catch, @ramonjd! The React component does clear out unsupported fields. That error happens only when a post is already sticky or password-protected and a new request sends conflicting values. The validation happens before actual values are updated in the DB. I'll create a core ticket based on the decision here. |
@jameskoster, when you've time, can I get a second opinion on this? 🙇 |
What?
Closes #30373.
PR updates
PostStatus
component to hide the sticky post option when a password is set, preventing a saving error.Note
The issue suggests making this option only available for public posts, but as far as post saving is concerned, all options are valid except password-protected.
Why?
Currently, if you try to make a password-protected post sticky, saving will fail with an error.
Testing Instructions
Testing Instructions for Keyboard
Same.
Screenshots or screencast
CleanShot.2025-07-24.at.09.51.53.mp4