convertkit
/
includes
/
mcp
/
resources
/
class-convertkit-mcp-resource-restrict-content-reference.php
class-convertkit-mcp-resource-restrict-content-reference.php in Kit (formerly ConvertKit) – Email Newsletter, Email Marketing, Membership, Subscribers and Landing Pages 3.4.3, at includes/mcp/resources/class-convertkit-mcp-resource-restrict-content-reference.php
| 1 | <?php |
| 2 | /** |
| 3 | * Kit MCP Resource: Restrict Content reference. |
| 4 | * |
| 5 | * @package ConvertKit |
| 6 | * @author ConvertKit |
| 7 | */ |
| 8 | |
| 9 | /** |
| 10 | * A Markdown reference on how Restrict Content gates posts and pages |
| 11 | * (`kit://reference/restrict-content`). |
| 12 | * |
| 13 | * @package ConvertKit |
| 14 | * @author ConvertKit |
| 15 | */ |
| 16 | class ConvertKit_MCP_Resource_Restrict_Content_Reference extends ConvertKit_MCP_Resource_Reference { |
| 17 | |
| 18 | /** |
| 19 | * Returns the resource name. |
| 20 | * |
| 21 | * @since 3.5.0 |
| 22 | * |
| 23 | * @return string |
| 24 | */ |
| 25 | public function get_name() { |
| 26 | |
| 27 | return 'kit/reference-restrict-content'; |
| 28 | |
| 29 | } |
| 30 | |
| 31 | /** |
| 32 | * Returns the resource URI. |
| 33 | * |
| 34 | * @since 3.5.0 |
| 35 | * |
| 36 | * @return string |
| 37 | */ |
| 38 | public function get_uri() { |
| 39 | |
| 40 | return 'kit://reference/restrict-content'; |
| 41 | |
| 42 | } |
| 43 | |
| 44 | /** |
| 45 | * Returns the resource label. |
| 46 | * |
| 47 | * @since 3.5.0 |
| 48 | * |
| 49 | * @return string |
| 50 | */ |
| 51 | public function get_label() { |
| 52 | |
| 53 | return __( 'Kit Restrict Content Reference', 'convertkit' ); |
| 54 | |
| 55 | } |
| 56 | |
| 57 | /** |
| 58 | * Returns the resource description. |
| 59 | * |
| 60 | * @since 3.5.0 |
| 61 | * |
| 62 | * @return string |
| 63 | */ |
| 64 | public function get_description() { |
| 65 | |
| 66 | return __( 'How Restrict Content gates a post or page behind a Kit Product, Tag or Form, and what the visitor sees.', 'convertkit' ); |
| 67 | |
| 68 | } |
| 69 | |
| 70 | /** |
| 71 | * Returns the Markdown content lines. |
| 72 | * |
| 73 | * @since 3.5.0 |
| 74 | * |
| 75 | * @return array |
| 76 | */ |
| 77 | protected function get_content_lines() { |
| 78 | |
| 79 | return array( |
| 80 | '# ' . __( 'Restrict Content', 'convertkit' ), |
| 81 | '', |
| 82 | __( 'Restrict Content gates a single post or page so only qualifying visitors see the full content. Everyone else sees a teaser plus a prompt to subscribe or unlock.', 'convertkit' ), |
| 83 | '', |
| 84 | '## ' . __( 'What content can be gated by', 'convertkit' ), |
| 85 | '', |
| 86 | '- ' . __( '**Product** — the visitor must have purchased the Kit Product to view the content (a paywall). Look up the Product ID via `kit://products`.', 'convertkit' ), |
| 87 | '- ' . __( '**Tag** — the visitor must be a subscriber with the given Tag. Look up the Tag ID via `kit://tags`.', 'convertkit' ), |
| 88 | '- ' . __( '**Form** — the visitor must subscribe via the given Form to unlock. Look up the Form ID via `kit://forms`.', 'convertkit' ), |
| 89 | '', |
| 90 | '## ' . __( 'How to set it', 'convertkit' ), |
| 91 | '', |
| 92 | __( 'Set Restrict Content on a post or page with `kit/post-settings-update`, supplying the Product, Tag or Form to gate by. Site-wide behaviour (teaser length, wording, login) is configured in the Restrict Content settings group — read the current values from `kit://settings`.', 'convertkit' ), |
| 93 | '', |
| 94 | '## ' . __( 'Visitor experience', 'convertkit' ), |
| 95 | '', |
| 96 | __( 'A returning subscriber can authenticate by email to access Tag- or Form-gated content. Product-gated content requires a completed purchase. Restrict Content applies only to the post types that support it.', 'convertkit' ), |
| 97 | ); |
| 98 | |
| 99 | } |
| 100 | |
| 101 | } |
| 102 |