| 1 |
<?php |
| 2 |
/** |
| 3 |
* Kit MCP Resource: Forms reference. |
| 4 |
* |
| 5 |
* @package ConvertKit |
| 6 |
* @author ConvertKit |
| 7 |
*/ |
| 8 |
|
| 9 |
/** |
| 10 |
* A Markdown reference on how Kit Forms embed and display in WordPress |
| 11 |
* (`kit://reference/forms`). |
| 12 |
* |
| 13 |
* @package ConvertKit |
| 14 |
* @author ConvertKit |
| 15 |
*/ |
| 16 |
class ConvertKit_MCP_Resource_Forms_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-forms'; |
| 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/forms'; |
| 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 Forms 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 Kit Forms embed and display in WordPress: formats, where they appear, and how a default Form is overridden per post or category.', '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 |
'# ' . __( 'Kit Forms in WordPress', 'convertkit' ), |
| 81 |
'', |
| 82 |
'## ' . __( 'Formats', 'convertkit' ), |
| 83 |
'', |
| 84 |
'- ' . __( '**Inline** forms render in the post content, where the Form is placed or auto-appended.', 'convertkit' ), |
| 85 |
'- ' . __( '**Modal**, **slide in** and **sticky bar** forms are non-inline: Kit triggers them on the page, so their placement in content does not matter.', 'convertkit' ), |
| 86 |
'', |
| 87 |
__( 'The `kit://forms` resource and `kit/forms-list` tool return each Form\'s `format`, so you can tell inline from non-inline Forms.', 'convertkit' ), |
| 88 |
'', |
| 89 |
'## ' . __( 'How a Form is chosen for a post', 'convertkit' ), |
| 90 |
'', |
| 91 |
__( 'The Form shown on a given post is resolved in this order:', 'convertkit' ), |
| 92 |
'', |
| 93 |
'1. ' . __( 'The post\'s own Form setting (`kit/post-settings-update`), if set.', 'convertkit' ), |
| 94 |
'2. ' . __( 'The Form set on one of the post\'s categories (`kit/category-settings-update`), if set.', 'convertkit' ), |
| 95 |
'3. ' . __( 'The default Form for the post type, from General settings.', 'convertkit' ), |
| 96 |
'', |
| 97 |
__( 'A post can also be set to "None" to show no Form, overriding the defaults.', 'convertkit' ), |
| 98 |
'', |
| 99 |
'## ' . __( 'Placing a Form manually', 'convertkit' ), |
| 100 |
'', |
| 101 |
__( 'A specific Form can be inserted into content with the Kit Form block or the `[convertkit]` shortcode, rather than relying on the default. Use `kit/forms` to look up the Form ID first.', 'convertkit' ), |
| 102 |
); |
| 103 |
|
| 104 |
} |
| 105 |
|
| 106 |
} |
| 107 |
|