-
Notifications
You must be signed in to change notification settings - Fork 385
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
Provide Block Suppression capability on AMP pages #5167
Comments
From what I understand after discussing this earlier, the acceptance criterion for this would be, "On AMP pages, all block markup associated with suppressed plugins is filtered out of the post content." The challenges are:
So I think static block suppression could involve two levels:
Number 1 is going to cover many cases because the best practice for registering custom blocks that depend on CSS/JS is to use |
This is a current challenge for AMP validation as well. We can only report the block that an error is coming from in such cases, not the plugin that added the static block in the first place. So I believe this addresses the first level you called out. For plugin suppression, there's also an open todo regarding static blocks: amp-wp/src/PluginSuppression.php Lines 404 to 411 in f1096a9
For static blocks that have corresponding For example, I made a gist plugin which allows you to hide/show certain blocks based on whether the additional class names have |
A Support topic, requesting to add functionality to hide/suppress part of the content on AMP endpoint. |
In 2.0 the Plugin Suppression capability allows users to suppress invalid markup from being injected to AMP pages, while keeping the plugin active for non-AMP pages. In some cases, when a feature of the offending plugin is used and then the corresponding plugin is suppressed, there may be content associated with the feature but it may not be what the user intended.
The plugin should offer the capability of removing certain blocks from an active plugin from being rendered on AMP pages.
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
Implementation brief
QA testing instructions
Demo
Changelog entry
The text was updated successfully, but these errors were encountered: