The AMP plugin provides a “Plugin Suppression” capability. When plugins cause validation errors a new section appears on the AMP settings screen listing all plugins currently known to be causing validation errors. Each row of the list includes the plugin name, author, a description with a summary of the validation errors, and a dropdown which allows you to mark the plugin either as “Active” or “Suppressed”.
As soon as it is determined an AMP page is being served, plugins are suppressed by:
- Unhooking filters and actions whose callbacks are defined in the plugin (including hooking into
- Overriding shortcodes with plugin-defined callbacks to just
- Overriding widgets with plugin-defined callbacks to just
__return_null. In addition to this, the display is also blocked with the
widget_display_callbackfilter to ensure widgets rendered with
the_widget()are accounted for.
- Overriding dynamic blocks with plugin-defined callbacks to just
__return_empty_stringand to also nullify the frontend
When a plugin is suppressed, the Plugin Suppression table indicates its status. The plugin suppression entry for a suppressed also indicated if the plugin has been updated since the time it was suppressed, giving you a chance to see if the plugin changes may have fixed the AMP incompatibility.
This capability makes it easier for you to deal with plugin issues as they arise, controlling their behavior on AMP pages while maintaining their functionality on non-AMP pages.