Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request is a safety-focused patch release (
v0.6.4) for the ContentPoll AI plugin. It introduces a conservative dry-run orphan detector for analytics, strengthens vote recording to prevent ambiguous data, and improves front-end vote submission reliability. No schema changes are made, and existing legacy data is preserved, but new problematic records are prevented.Backend reliability and safety:
VoteController.php) now requires a valid, non-zeropostIdfor all vote submissions, rejecting requests without proper post context to prevent creation of ambiguouspost_id = 0records.VoteStorageService.php) is updated to handle duplicate vote prevention and error handling more robustly by usingwpdb::insertand treating any insert failure as a duplicate vote.Analytics improvements:
VoteAnalyticsServiceto help inspectblock_idsthat no longer appear in post/page content, without performing any deletion. [1] [2]Front-end enhancements:
vote-submit.js) now attempts to resolvepostIdfrom both thedata-post-idattribute and the block editor store (core/editor), increasing reliability in various contexts.Documentation and versioning:
0.6.4and documented the changes inCHANGELOG.mdandreadme.txt. [1] [2] [3] [4] [5] [6]Testing:
postId, ensuring compatibility with the new backend requirements. [1] [2]