-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Inserter: Fix title condition for media tab previews #58993
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 Unlinked AccountsThe following contributors have not linked their GitHub and WordPress.org accounts: @nbcsteveb. Contributors, please read how to link your accounts to ensure your work is properly credited in WordPress releases. 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. |
Size Change: +12 B (0%) Total Size: 1.71 MB
ℹ️ View Unchanged
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for fixing this!
Unlinked contributors: nbcsteveb. Co-authored-by: Mamaduka <[email protected]> Co-authored-by: ntsekouras <[email protected]>
I just cherry-picked this PR to the more/backports-for-beta3 branch to get it included in the next release: a01f6a7 |
Unlinked contributors: nbcsteveb. Co-authored-by: Mamaduka <[email protected]> Co-authored-by: ntsekouras <[email protected]>
What?
Fixes #58982.
PR avoids crashing the editor when media has no title and adds a fallback string to display in the tooltip.
Note: We can't use
ID
orslug
for the fallback string since media sources like "Openverse" don't provide these values.Why?
The previous fallback condition resulted in the
title
being an object.Testing Instructions
/wp-admin/upload.php
.Testing Instructions for Keyboard
Same.
Screenshots or screencast
CleanShot.2024-02-14.at.08.47.18.mp4