-
Notifications
You must be signed in to change notification settings - Fork 33
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
Feat/introducing abstract for list table of custom tables #2372
Feat/introducing abstract for list table of custom tables #2372
Conversation
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.
Remaining comments which cannot be posted as a review comment to avoid GitHub Rate Limit
phpcs
[phpcs] reported by reviewdog 🐶StellarWP.XSS.EscapeOutput.OutputNotEscaped
Expected next thing to be an escaping function (see Codex for 'Data Validation'), not '$input_id'
<input type="search" id="<?php echo $input_id ?>" name="s" value="<?php _admin_search_query(); ?>" /> |
[phpcs] reported by reviewdog 🐶WordPress.Security.EscapeOutput.OutputNotEscaped
All output should be run through an escaping function (see the Security sections in the WordPress Developer Handbooks), found '$input_id'.
<input type="search" id="<?php echo $input_id ?>" name="s" value="<?php _admin_search_query(); ?>" /> |
[phpcs] reported by reviewdog 🐶Generic.Arrays.DisallowLongArraySyntax.Found
Short array syntax must be used to define arrays
<?php submit_button( $text, 'button', false, false, array('id' => 'search-submit') ); ?> |
[phpcs] reported by reviewdog 🐶NormalizedArrays.Arrays.ArrayBraceSpacing.SpaceAfterArrayOpenerSingleLine
Expected 1 space after the array opener in a single line array. Found: no spaces
<?php submit_button( $text, 'button', false, false, array('id' => 'search-submit') ); ?> |
[phpcs] reported by reviewdog 🐶NormalizedArrays.Arrays.ArrayBraceSpacing.SpaceBeforeArrayCloserSingleLine
Expected 1 space before the array closer in a single line array. Found: no spaces
<?php submit_button( $text, 'button', false, false, array('id' => 'search-submit') ); ?> |
[phpcs] reported by reviewdog 🐶Generic.CodeAnalysis.UnusedFunctionParameter.Found
The method parameter $args is never used
public static function get_total_items( array $args = [] ): int { |
Co-authored-by: Rafsun Chowdhury <rafsun.aiub@gmail.com>
Co-authored-by: Rafsun Chowdhury <rafsun.aiub@gmail.com>
🎫 Ticket
ETP-956
🗒️ Description
Introduces an abstract that can be used for creating WP_LIst_Tables from data that resides in custom tables.
Also introduces a couple of custom table query methods to make pagination and searching easier.
The code changes are covered by tests and are being implemented in the waitlist feature.
The 2 tests that are failing are because they need this
merged to pass.
🎥 Artifacts
✔️ Checklist
npm run changelog
to add changelog file(s). More info herewpunit
orintegration
tests.wpunit
orintegration
tests.