Image: Hide 'Set as featured image' for in-editor revisions#76123
Image: Hide 'Set as featured image' for in-editor revisions#76123
Conversation
|
Size Change: +18 B (0%) Total Size: 6.87 MB
ℹ️ View Unchanged
|
|
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. |
| <Slot | ||
| fillProps={ { | ||
| ...fillProps, | ||
| canEdit, |
There was a problem hiding this comment.
The canEdit value is now available via fillProps, making it easier for other consumers to use the same check.
@ramonjd, I think you're working on similar fixes, which might be useful for your cases as well.
| </BlockSettingsMenuControls> | ||
| ); | ||
| const featuredImageControl = | ||
| ! isDescendentOfQueryLoop && postId && id ? ( |
There was a problem hiding this comment.
I moved this check out of fill rendered, we can avoid rendering the whole component in the Query Loop context.
|
Flaky tests detected in b6475b8. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/22657211560
|
|
Just curious, does the react native script need modification as well? |
I don't think so. Native app development is on hold for now. |
Co-authored-by: Mamaduka <mamaduka@git.wordpress.org> Co-authored-by: ramonjd <ramonopoly@git.wordpress.org> Co-authored-by: sidhant-tomar-003 <sidhanttomar@git.wordpress.org> Co-authored-by: t-hamano <wildworks@git.wordpress.org> Co-authored-by: shimotmk <shimotomoki@git.wordpress.org>
|
I just cherry-picked this PR to the wp/7.0 branch to get it included in the next release: ab59c5f |


What?
Closes #76061.
PR hides the 'Set as featured image' control for the image block when the block can't be edited, for example, when displayed by in-editor revisions.
I understand we're editing the post, not the image itself, but I think the
canEditcheck is still suitable here.Testing Instructions
Testing Instructions for Keyboard
Same.
Screenshots or screencast