Fix save trp hash.ag#710
Conversation
…e is inactive or manual moderation is force enabled in WP settings.
64eabd7 to
22eccf7
Compare
22eccf7 to
0cd650f
Compare
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Fixes how the “The Real Person” (TRP) hash is stored/checked for comments, especially around the “skip moderation for first comment” (auto-moderation) setting, and synchronizes related settings between plugin and WordPress options.
Changes:
- Centralizes TRP hash meta keys and adds helpers to check/set the hash.
- Updates comment preprocessing flow to set TRP hash via a class method and standardizes detection of the “first comment auto-mod” setting.
- Syncs discussion/plugin setting values and hardens UI checked-state handling.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| lib/Cleantalk/ApbctWP/CleantalkRealPerson.php | Adds TRP hash helpers and updates badge CSS-class logic to rely on saved hash meta. |
| lib/Cleantalk/Antispam/Integrations/CleantalkPreprocessComment.php | Adds hook registration to set TRP hash on comment_post and refactors moderation option detection. |
| inc/cleantalk-settings.php | Syncs moderation option between settings sources; adjusts checkbox checked() value handling. |
| inc/cleantalk-public.php | Removes legacy function that stored the auto-moderation TRP hash meta. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report❌ Patch coverage is ❌ Your patch check has failed because the patch coverage (6.66%) is below the target coverage (70.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## dev #710 +/- ##
============================================
- Coverage 25.77% 25.77% -0.01%
- Complexity 5591 5593 +2
============================================
Files 264 264
Lines 24076 24086 +10
============================================
+ Hits 6206 6208 +2
- Misses 17870 17878 +8 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
https://app.doboard.com/1/task/40044