-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Site logo: Add link toggle option #31162
Conversation
Size Change: +632 B (0%) Total Size: 1.31 MB
ℹ️ View Unchanged
|
Still learning about how to do the deprecation, and tests needs to be updated. |
Because there will be multiple changes to the site logo block, I think it makes more sense to do one update for tests and add the deprecated version after all changes have been made? |
I don't think there needs to be any kind of deprecation... This is an experimental block, and as such, breaking changes are to be expected. Once it gets included in core then I believe it will be marked as stable, but until then it's experimental, is it not? 🤔 |
For some reason I thought it was already in core 👍 |
I would like to get this merged, but I am not sure that this is the best text for the option: "Make image a link to home". |
Co-authored-by: Ari Stathopoulos <aristath@gmail.com>
Co-authored-by: Ari Stathopoulos <aristath@gmail.com>
Description
Partial for #30406
Adds a link toggle and target option to the site logo block.
The current solution using
preg_replace
andstr_replace
would not be my first choice.I tried using https://developer.wordpress.org/reference/functions/wp_get_attachment_image/
and https://developer.wordpress.org/reference/hooks/wp_get_attachment_image_attributes/
to remove the link but I was not able to, because I could not make it work correctly with the size filter.
Because the link can not be changed, the rel is always the same, so I did not include that option.
How has this been tested?
Tested manually by adding 3 site logo blocks:
View the markup of the block in the editor and front.
Confirmed that links, link targets, and aria label are output correctly.
Types of changes
Enhancement
Checklist:
*.native.js
files for terms that need renaming or removal).