diff --git a/includes/sanitizers/class-amp-core-theme-sanitizer.php b/includes/sanitizers/class-amp-core-theme-sanitizer.php index f24804dace6..85b9a3b0c79 100644 --- a/includes/sanitizers/class-amp-core-theme-sanitizer.php +++ b/includes/sanitizers/class-amp-core-theme-sanitizer.php @@ -198,8 +198,7 @@ public static function get_supported_themes() { public static function get_acceptable_errors( $template ) { if ( isset( self::$theme_features[ $template ] ) ) { return [ - 'removed_unused_css_rules' => true, - 'illegal_css_at_rule' => [ + 'illegal_css_at_rule' => [ [ 'at_rule' => 'viewport', ], diff --git a/includes/validation/class-amp-validated-url-post-type.php b/includes/validation/class-amp-validated-url-post-type.php index 8bf9bc83614..3ed2d4beb2e 100644 --- a/includes/validation/class-amp-validated-url-post-type.php +++ b/includes/validation/class-amp-validated-url-post-type.php @@ -1622,11 +1622,7 @@ public static function handle_validation_error_status_update() { 'amp_taxonomy_terms_updated' => $updated_count, ]; - /* - * Re-check the post after the validation status change. This is particularly important for validation errors like - * 'removed_unused_css_rules' since whether it is accepted will determine whether other validation errors are triggered - * such as in this case 'excessive_css'. - */ + // Re-check the post after the validation status change. if ( $updated_count > 0 ) { $validation_results = self::recheck_post( $post->ID ); // @todo For WP_Error case, see . diff --git a/includes/validation/class-amp-validation-error-taxonomy.php b/includes/validation/class-amp-validation-error-taxonomy.php index a18d8cf6f03..39e77a32891 100644 --- a/includes/validation/class-amp-validation-error-taxonomy.php +++ b/includes/validation/class-amp-validation-error-taxonomy.php @@ -2325,8 +2325,6 @@ public static function get_error_title_from_code( $error_code ) { return __( 'Illegal CSS at-rule', 'amp' ); case 'disallowed_file_extension': return __( 'Disallowed file extension', 'amp' ); - case 'removed_unused_css_rules': - return __( 'Remove unused CSS rules', 'amp' ); // @todo This is obsolete. default: return __( 'Unknown Error', 'amp' ); }