-
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
Add text to image button is shown even when the cover block cannot be inserted #32520
Comments
Thanks for reporting this, @tomjn. Can you share the code for filtering cover block settings? |
Help us move this issue forward. This issue is being marked stale since it has no activity after 15 days of requesting more information. Please add info requested so we can help move the issue forward. Note: The triage policy is to close stale issues that need more info and no response after 2 weeks. |
Apologies for not getting back on the code example, I don't have a clean code example, I'd have to extract it, but it can be reproduced by making the cover block not support insertions. We use a filter to turn the |
TLDR: the button transforms an image block into a cover block, even when that transformation is removed, and when cover blocks supports section is modified by filters so that it cannot be inserted. The only way to remove the button at the moment is to completely unregister the cover block The change in #32666 may help mitigate this though |
Thanks for the feedback, @tomjn. We probably need |
Description
There is a transform on the image block that has been turned into a button so that there is an easy shortcut. This button is shown when the cover block is registered.
However, if the cover block settings are filtered so that support for insertion and transforms are removed, the button persists, resulting in broken things ( this site does not support the cover block in these contexts ).
I can find no other solution for removing this ability other that to complete unregister the cover block which is not an option. Users should not be able to insert cover blocks in this context yet this button makes this possible because the
supports
section is ignored.WordPress information
Device information
The text was updated successfully, but these errors were encountered: