Skip to content
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

Media & text: filter render_block missing link attributes (href, rel and classes) #30718

Open
Moooartin opened this issue Apr 12, 2021 · 1 comment
Labels
[Block] Media & Text Affects the Media & Text Block Needs Technical Feedback Needs testing from a developer perspective. [Type] Enhancement A suggestion for improvement.

Comments

@Moooartin
Copy link

Description

The attributes passed to filter render_block for core/media-text block are missing the link attributes if it is inserted.

Step-by-step reproduction instructions

Add a media-text block, then insert a link through the toolbar, modify or not the options.
Use the render_block filter to see the block arguments.

Actual behaviour

Using render_block the only new attribute available, if you inserted a link, is ["linkDestination"] => (string) "custom"

Expected behaviour

To have access to all link "arguments", the real href link, the rel attribute and the classes if they are defined.
maybe something like this:

["linkDestination"] => (string) "htps://....."
["linkRel"] => (string) "......"
["linkClasses"] => (string) "......"

WordPress information

  • WordPress version: 5.7
@annezazu annezazu added [Block] Media & Text Affects the Media & Text Block [Feature] Link Editing Link components (LinkControl, URLInput) and integrations (RichText link formatting) Needs Technical Feedback Needs testing from a developer perspective. labels May 6, 2021
@getdave getdave removed the [Feature] Link Editing Link components (LinkControl, URLInput) and integrations (RichText link formatting) label Nov 16, 2021
@getdave
Copy link
Contributor

getdave commented Nov 16, 2021

Removing LinkEditing because this is a Media Text block issue.

@jordesign jordesign added the [Type] Enhancement A suggestion for improvement. label Aug 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Media & Text Affects the Media & Text Block Needs Technical Feedback Needs testing from a developer perspective. [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

4 participants