-
Notifications
You must be signed in to change notification settings - Fork 381
Include sources for validation error formatted data #5835
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Plugin builds for 1fa8938 are ready 🛎️!
|
Codecov Report
@@ Coverage Diff @@
## develop #5835 +/- ##
=============================================
+ Coverage 75.13% 75.14% +0.01%
- Complexity 5647 5655 +8
=============================================
Files 210 210
Lines 16961 16981 +20
=============================================
+ Hits 12743 12760 +17
- Misses 4218 4221 +3
Flags with carried forward coverage won't be shown. Click here to find out more.
|
if ( isset( $_GET['post'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended | ||
$validation_errors = AMP_Validated_URL_Post_Type::get_invalid_url_validation_errors( (int) $_GET['post'] ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended, WordPress.Security.ValidatedSanitizedInput.InputNotValidated | ||
foreach ( $validation_errors as $error ) { | ||
if ( isset( $error['data']['sources'], $error['term']->term_id ) && $error['term']->term_id === $term->term_id ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I realize here that it's possible that the sources may not be specifically for this term. Specifically, it's possible for an error to occur multiple times on a URL, and each time the source may different. That does complicate things here, however, since the {{$taxonomy}}_row_actions
filter doesn't pass any index. Perhaps that could be captured by by setting an index to 0
before rendering the table?
Then with each invocation of filter_tag_row_actions
the index could be incremented. The index can then be provided from filter_tag_row_actions
to get_error_details_json
in addition to the $term
(which would actually be redundant here), since the error could then be obtained in get_error_details_json
here via $validation_errors[ $index ]
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@westonruter I think I have it resolved in 6af38a9.
Co-authored-by: Weston Ruter <[email protected]>
…validation data in term
Rebasing to include #5837 along with a couple additional commits. |
6af38a9
to
1fa8938
Compare
Summary
Fixes #5825
Checklist