feat(gateway): sub-phase 5b-iii — intake policy configuration + session cookie#572
Merged
FredericoAndrade merged 3 commits intomainfrom Mar 26, 2026
Merged
feat(gateway): sub-phase 5b-iii — intake policy configuration + session cookie#572FredericoAndrade merged 3 commits intomainfrom
FredericoAndrade merged 3 commits intomainfrom
Conversation
- Session cookie: gateway_gated changed from 30-day to session-scoped (setCookie days=0 on both gate submit and passthrough paths) - Named intake field sets: gateway_intake_fields filter now keyed by set name (not post type); JS payload renamed intakeSteps → intakeSets - IntakeResolver: 3-tier resolution (per-record postmeta → per-CPT wp_option → global wp_option) for both 'set' and 'always' flags - SettingsRepository: 4 new intake accessors + option key constants - Download_Shortcode: emits data-intake-set + data-intake-always attrs - Resource_Metabox: adds Intake form dropdown + repeat-download select - Settings_Page: Intake forms section with global + per-CPT controls; data retention moved to its own section - meta--videos-single.php: intake attrs on video, Wikimedia, caption links - JS: openModal/doSilentPassthrough accept intakeSet + intakeAlways; passthrough with intakeAlways=true shows intake step instead of proceeding directly to download - Tests: IntakeResolverTest (11 cases); total 187 tests, 270 assertions Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…documents Registers three named intake field sets via the gateway_intake_fields filter, each defined as a standalone file under includes/intake/: - videos: use_case (select) + community (radio) - captions: use_case (select) + community (radio) - documents: use_case (select, includes grant_writing) + organization (text, optional) + community (radio) Adds 'intake' to the theme's auto-loaded include directories. Sets must be wired to CPTs via Gateway > Settings > Intake forms after deploy. Also adds video state UI planning entry to plan.md. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
44cf130 to
9774e05
Compare
…ntainer class Adds gateway-container + gate/intake modifier classes to both step containers. Shared styles (labels, text/email/select/textarea inputs, focus states, fieldset/legend, error messages, action buttons) now live under .gateway-container. Gate-specific consent label layout sits under .gateway-container.gate. Intake field types (select, fieldset, legend, radio options) inherit all shared styles automatically. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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
gateway_gatedchanged from 30-day to session-scoped; gate fires on every new browser sessiongateway_intake_fieldsfilter now keyed by set name (e.g.'standard') instead of post type slug; JS payload renamedintakeSteps→intakeSetsalwaysflagdata-intake-setanddata-intake-alwaysattributesopenModalanddoSilentPassthroughaccept intake params; passthrough withintakeAlways=trueshows the intake step instead of proceeding directly to downloadTest plan
composer test— 187 tests, 270 assertions, all greencomposer lint— cleangateway_intake_fieldsfilter, assign it to a CPT in Settings → Download Gateway → intake step appears after gate submit for that CPT_gateway_intake_set = 'none'on one post in a CPT that has a default set → intake skipped for that post onlydata-intake-setanddata-intake-alwaysattributes visible in rendered HTML for shortcode links and video template links🤖 Generated with Claude Code