value to not filter at all, like for 'All Statuses'. * * This is also used in WP_List_Table, like for the 'Bulk Actions' option. * When this is present, this ensures that this isn't filtered. * * @var int */ const NO_FILTER_VALUE = ''; /** * Validation code for an invalid element. * * @var string */ const INVALID_ELEMENT_CODE = 'invalid_element'; /** * Validation code for an invalid attribute. * * @var string */ const INVALID_ATTRIBUTE_CODE = 'invalid_attribute'; /** * The 'type' of error for invalid HTML elements, like . * * These usually have the 'code' of 'invalid_element'. * Except for 'invalid_element' errors for a cap->edit_posts ) ) { return; } $id = 'link-errors-url'; printf( '', esc_url( add_query_arg( 'post_type', AMP_Validated_URL_Post_Type::POST_TYPE_SLUG, admin_url( 'edit.php' ) ) ), esc_attr( $id ), esc_html__( 'View Validated URLs', 'amp' ) ); ?> element. * * There is a difference how the errors are counted, depending on which screen this is on. * For example: Accepted Errors (10). * This status filter (%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 ) ); } $value = self::VALIDATION_ERROR_NEW_REJECTED_STATUS . ',' . self::VALIDATION_ERROR_NEW_ACCEPTED_STATUS; ?> (%s)', 'With Accepted Errors (%s)', $ack_accepted_term_count, 'terms', 'amp' ), number_format_i18n( $ack_accepted_term_count ) ); } else { $accepted_term_text = sprintf( /* translators: %s: the accepted term count. */ _nx( 'Accepted Error (%s)', 'Accepted Errors (%s)', $ack_accepted_term_count, 'terms', 'amp' ), number_format_i18n( $ack_accepted_term_count ) ); } $value = self::VALIDATION_ERROR_ACK_ACCEPTED_STATUS; ?> (%s)', 'With Rejected Errors (%s)', $ack_rejected_term_count, 'terms', 'amp' ), number_format_i18n( $ack_rejected_term_count ) ); } else { $rejected_term_text = sprintf( /* translators: %s: the rejected term count. */ _nx( 'Rejected Error (%s)', 'Rejected Errors (%s)', $ack_rejected_term_count, 'terms', 'amp' ), number_format_i18n( $ack_rejected_term_count ) ); } $value = self::VALIDATION_ERROR_ACK_REJECTED_STATUS; ?> element is rendered on the validation error post page (Errors by URL), * and the validation error taxonomy page (Error Index). */ public static function render_error_type_filter() { $error_type_filter_value = isset( $_GET[ self::VALIDATION_ERROR_TYPE_QUERY_VAR ] ) ? sanitize_key( wp_unslash( $_GET[ self::VALIDATION_ERROR_TYPE_QUERY_VAR ] ) ) : ''; // phpcs:ignore WordPress.Security.NonceVerification.Recommended /* * On the 'Errors by URL' page, the