amp_validation_error_sanitized

apply_filters( 'amp_validation_error_sanitized',  null|bool $sanitized,  array $error )

Description #

Filters whether the validation error should be sanitized.

Returning true this indicates that the validation error is acceptable and should not be considered a blocker to render AMP. Returning null means that the default status should be used.
Note that the $node is not passed here to ensure that the filter can be applied on validation errors that have been stored. Likewise, the $sources are also omitted because these are only available during an explicit validation request and so they are not suitable for plugins to vary sanitization by.

See also

  • {@see AMP_Validation_Manager::is_sanitization_auto_accepted()}: Which controls whether an error is initially accepted or rejected for sanitization.

Parameters #

$sanitized

(null|bool) Whether sanitized; this is initially null, and changing it to bool causes the validation error to be forced.

$error

(array) Validation error being sanitized.



Changelog #

Changelog
Version Description
1.0 Introduced.