Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
* AMP Reject Validation Errors by Default plugin initialization file.
* @package AMP
* @author Weston Ruter, Google
* @link
* @license GPL-2.0-or-later
* @copyright 2019 Google Inc.
* @wordpress-plugin
* Plugin Name: AMP Reject Validation Errors by Default
* Plugin URI:
* Description: Reject sanitization of new AMP validation errors by default. When the AMP plugin is in Transitional mode, this means newly-encountered validation errors will cause a request to an AMP page to redirect to the non-AMP page; on Standard mode sites, the AMP attribute will be removed from the HTML element.
* Version: 0.1.0
* Author: Weston Ruter, Google
* Author URI:
* License: GNU General Public License v2 (or later)
* License URI:
add_filter( 'amp_validation_error_default_sanitized', '__return_false' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.