Skip to content

Commit

Permalink
h1 checks output only warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
matiasbenedetto committed Sep 27, 2024
1 parent 282e051 commit c05ac27
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions checks/class-fse-templates-h1-check.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ public function check( $php_files, $css_files, $other_files ) {
$h1_count = $this->count_h1_tags_recursively( $blocks );

if ( $h1_count > 1 ) {
$ret = false;
$templates_with_multiple_h1_tags[] = $template->slug;
}

Expand All @@ -49,7 +48,7 @@ public function check( $php_files, $css_files, $other_files ) {
}

if ( ! empty( $templates_with_multiple_h1_tags ) ) {
$this->error[] = sprintf( '<span class="tc-lead tc-required">' . __( 'REQUIRED', 'theme-check' ) . '</span>: ' . __( 'The following templates have multiple h1 tags: %s', 'theme-check' ), '<strong>' . implode( ', ', $templates_with_multiple_h1_tags ) . '</strong>' );
$this->error[] = sprintf( '<span class="tc-lead tc-warning">' . __( 'WARNING', 'theme-check' ) . '</span>: ' . __( 'The following templates have multiple h1 tags: %s', 'theme-check' ), '<strong>' . implode( ', ', $templates_with_multiple_h1_tags ) . '</strong>' );
}

if ( ! empty( $templates_with_no_h1_tags ) ) {
Expand Down

0 comments on commit c05ac27

Please sign in to comment.