diff --git a/includes/validation/class-amp-validation-error-taxonomy.php b/includes/validation/class-amp-validation-error-taxonomy.php
index 8eea7b798da..f02c25ea56e 100644
--- a/includes/validation/class-amp-validation-error-taxonomy.php
+++ b/includes/validation/class-amp-validation-error-taxonomy.php
@@ -888,103 +888,94 @@ public static function render_error_status_filter() {
$error_status_filter_value = isset( $_GET[ self::VALIDATION_ERROR_STATUS_QUERY_VAR ] ) ? intval( $_GET[ self::VALIDATION_ERROR_STATUS_QUERY_VAR ] ) : ''; // WPCS: CSRF OK.
- if ( 0 === $new_term_count && 0 === $accepted_term_count && 0 === $rejected_term_count ) {
- return;
- }
?>
(%s)',
- 'With New Errors (%s) ',
- $new_term_count,
- 'terms',
- 'amp'
- ),
- number_format_i18n( $new_term_count )
- );
- } else {
- $new_term_text = sprintf(
- /* translators: %s: the new term count. */
- _nx(
- 'New Error (%s) ',
- 'New Errors (%s) ',
- $new_term_count,
- 'terms',
- 'amp'
- ),
- number_format_i18n( $new_term_count )
- );
- }
- ?>
- >
-
+ if ( 'edit' === $screen_base ) {
+ $new_term_text = sprintf(
+ /* translators: %s: the new term count. */
+ _nx(
+ 'With New Error (%s) ',
+ 'With New Errors (%s) ',
+ $new_term_count,
+ 'terms',
+ 'amp'
+ ),
+ number_format_i18n( $new_term_count )
+ );
+ } else {
+ $new_term_text = sprintf(
+ /* translators: %s: the new term count. */
+ _nx(
+ 'New Error (%s) ',
+ 'New Errors (%s) ',
+ $new_term_count,
+ 'terms',
+ 'amp'
+ ),
+ number_format_i18n( $new_term_count )
+ );
+ }
+ ?>
+ >
(%s)',
- 'With Accepted Errors (%s) ',
- $accepted_term_count,
- 'terms',
- 'amp'
- ),
- number_format_i18n( $accepted_term_count )
- );
- } else {
- $accepted_term_text = sprintf(
- /* translators: %s: the accepted term count. */
- _nx(
- 'Accepted Error (%s) ',
- 'Accepted Errors (%s) ',
- $accepted_term_count,
- 'terms',
- 'amp'
- ),
- number_format_i18n( $accepted_term_count )
- );
- }
- ?>
- >
- (%s)',
- 'With Rejected Errors (%s) ',
- $rejected_term_count,
- 'terms',
- 'amp'
- ),
- number_format_i18n( $rejected_term_count )
- );
- } else {
- $rejected_term_text = sprintf(
- /* translators: %s: the rejected term count. */
- _nx(
- 'Rejected Error (%s) ',
- 'Rejected Errors (%s) ',
- $rejected_term_count,
- 'terms',
- 'amp'
- ),
- number_format_i18n( $rejected_term_count )
- );
- }
- ?>
- >
-
+ if ( 'edit' === $screen_base ) {
+ $accepted_term_text = sprintf(
+ /* translators: %s: the accepted term count. */
+ _nx(
+ 'With Accepted Error (%s) ',
+ 'With Accepted Errors (%s) ',
+ $accepted_term_count,
+ 'terms',
+ 'amp'
+ ),
+ number_format_i18n( $accepted_term_count )
+ );
+ } else {
+ $accepted_term_text = sprintf(
+ /* translators: %s: the accepted term count. */
+ _nx(
+ 'Accepted Error (%s) ',
+ 'Accepted Errors (%s) ',
+ $accepted_term_count,
+ 'terms',
+ 'amp'
+ ),
+ number_format_i18n( $accepted_term_count )
+ );
+ }
+ ?>
+ >
+ (%s)',
+ 'With Rejected Errors (%s) ',
+ $rejected_term_count,
+ 'terms',
+ 'amp'
+ ),
+ number_format_i18n( $rejected_term_count )
+ );
+ } else {
+ $rejected_term_text = sprintf(
+ /* translators: %s: the rejected term count. */
+ _nx(
+ 'Rejected Error (%s) ',
+ 'Rejected Errors (%s) ',
+ $rejected_term_count,
+ 'terms',
+ 'amp'
+ ),
+ number_format_i18n( $rejected_term_count )
+ );
+ }
+ ?>
+ >
assertEmpty( ob_get_clean() );
- /*
- * This is now on the correct screen, so it shouldn't be empty anymore.
- * When no validation error exists, there should not be an for any specific error status, like 'New Error'.
- */
set_current_screen( 'edit.php' );
- ob_start();
- AMP_Validation_Error_Taxonomy::render_error_status_filter();
- $this->assertNotContains( 'New Error', ob_get_clean() );
-
$number_of_errors = 10;
for ( $i = 0; $i < $number_of_errors; $i++ ) {
$invalid_url_post = $this->factory()->post->create( array( 'post_type' => AMP_Invalid_URL_Post_Type::POST_TYPE_SLUG ) );