Repository navigation
Conversation
Feature: admin-interface/settings-page/subscriber-gate-defaults Implements: - US-001: default gate headline and text with fallback on read - US-002: unlock cookie lifetime, whole days 1 to 365, else 30 - US-003: Publication and Subscriber gating saves keep each other's values The Subscriber gating section prints for every administrator, including when the Publication section is hidden. Options::get_gate_settings() returns final values for the gated content block.
Feature: custom-blocks/gated-content-block/gated-content-block Implements: - US-001: gated block with Subscribe form ID, Headline and Text - US-002: optional gate divider, valid only directly inside the gated block - US-003: server-rendered gate card over blurred, height-limited locked content - US-004: unlock in place when the block's own form is submitted - US-005: site-wide unlock cookie, logged-in bypass, first gate per page - US-006: locked content is inert and hidden from assistive technology The gate view script loads only on pages that render a gated block.
…ew blocks has_divider() re-iterated the shared inner block list from inside the loop over that same list, so the cursor reset and the loop never ended whenever two or more blocks came before the divider (or no divider was present).
…add theme fade variable
…ver faded content
…ted content block
…gated block, restore publication reset on save
…s link in the gated block sidebar
…ber gating settings
…ard" The form's alignment is set inside the beehiiv form itself, so the card CSS had no effect.
…rop heading level
…, reserve form space
…e form space until it loads
… runner to Ubuntu 24.04
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
Adds subscriber gating to the plugin (Teamwork task 19815117). Editors wrap content in a Gated Content block. Readers see a preview, then blurred locked content behind a subscribe card. Submitting the block's own beehiiv form unlocks the content in place and sets a site-wide cookie.
beehiiv/gated-content) holds inner blocks and renders on the server. The first inner block is the preview, or everything before an optional Gate Divider block. Per-block form ID, headline and text, plus card background and text colours.beehiiv/gated-content-divider) is allowed only directly inside a gated block.BEEHIIV_SUBSCRIBER_FORM_SUBMITTEDfromsubscribe-forms.beehiiv.com(and the legacy embed host) and unlocks only whenexternalEmbedIdmatches the block's form ID.Behavior worth knowing
Testing
tests/js/gated-content-view.test.js(6 tests) passes.GatedContentRenderTest,SubscriberGateDefaultsTest) and the Playwright e2e suite for this feature.Known gaps