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

Move content filtering off of pattern hooks #136

Open
ryelle opened this issue May 7, 2024 · 3 comments
Open

Move content filtering off of pattern hooks #136

ryelle opened this issue May 7, 2024 · 3 comments
Labels
Accessibility Issues related to keyboard navigation, screen readers, etc [Component] Backend i18n Translations, RTL issues [Status] On Hold [Type] Bug Something isn't working

Comments

@ryelle
Copy link
Contributor

ryelle commented May 7, 2024

The render_block_core/pattern hook is used for a few things in the parent theme, but this hook is no longer run as of WordPress/gutenberg#60349. In fact, patterns are not "rendered" at all, instead the blocks are swapped out at the template level, before do_blocks runs.

So, how should the following be handled?

Rendering embeds — Can be removed, this was fixed in core.

Render shortcodes — Can maybe be removed? Shortcodes appear to work in block content, but not as attributes (see WordPress/wporg-developer#513).

Wrap the arrows ↗ in aria-hidden spans — We need an alternate solution for this. (see #94)

Flip inline styles for RTL support — We need an alternate solution for this (see WordPress/wporg-main-2022#126)

@ryelle ryelle added [Type] Bug Something isn't working Accessibility Issues related to keyboard navigation, screen readers, etc [Component] Backend i18n Translations, RTL issues labels May 7, 2024
@adamwoodnz
Copy link
Contributor

I've opened a PR to move shortcodes into block content for Developer here: WordPress/wporg-developer#517

@ryelle
Copy link
Contributor Author

ryelle commented Jun 5, 2024

As of GB 18.5, the pattern render hooks (for patterns included in templates) will run again, so we can unpin and update 👍🏻

A better fix would be WordPress/wordpress-develop#6533, which would create a single filter over all the page content, and we could add the arrow & RTL fixes on that. But until then, the GB fix will work.

@ryelle
Copy link
Contributor Author

ryelle commented Jun 6, 2024

I've unpinned Gutenberg, and everything is still running as expected.

I think I'm going to leave this open, on hold, and update the title so that we can track the the_block_template_html and switch to that if/when it's merged.

@ryelle ryelle changed the title Pattern render hook not supported in GB 18.1+ Move content filtering off of pattern hooks Jun 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Accessibility Issues related to keyboard navigation, screen readers, etc [Component] Backend i18n Translations, RTL issues [Status] On Hold [Type] Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants