Disable contact forms on past WordCamp sites#1656
Open
dd32 wants to merge 4 commits into
Open
Conversation
Replace Jetpack contact form HTML with a message when: 1. A newer event site exists for the same city, OR 2. The event ended more than 18 months ago. This reduces spam sent to organizers of past events. The replacement message directs visitors to the latest edition (if available) and includes a link to report Code of Conduct concerns to the WordPress Incident Response Team. Uses the jetpack_contact_form_html filter as suggested in the issue discussion. Fixes #1468 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Optimization per review feedback: avoid the expensive database query to find a newer site during the first 3 months after an event ends, since a new edition is unlikely to exist that soon. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Tests the contact form disabling logic for past WordCamp sites: - Past event with newer site disables form with redirect message - Current/future event keeps form active - Recent past event without newer site keeps form active - Old past event (>18 months) disables form - Disabled form includes Code of Conduct reporting link - Event with no end date keeps form active Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
get_latest_home_url()logic), ORjetpack_contact_form_htmlfilter as suggested by @jeherve in the issue discussionlatest-site-hints.phpas suggested by @dd32Implementation details
get_latest_home_url()function andget_wordcamp_post()end date logicTest plan
Fixes #1468
🤖 Generated with Claude Code