| 1 |
<?php |
| 2 |
/** |
| 3 |
* Kit MCP Prompt: Audit. |
| 4 |
* |
| 5 |
* @package ConvertKit |
| 6 |
* @author ConvertKit |
| 7 |
*/ |
| 8 |
|
| 9 |
/** |
| 10 |
* Guided, read-only workflow to review the Kit configuration and report gaps. |
| 11 |
* Produces a prompt named `kit/audit`. |
| 12 |
* |
| 13 |
* @package ConvertKit |
| 14 |
* @author ConvertKit |
| 15 |
*/ |
| 16 |
class ConvertKit_MCP_Prompt_Audit extends ConvertKit_MCP_Prompt { |
| 17 |
|
| 18 |
/** |
| 19 |
* Returns the prompt's short name. |
| 20 |
* |
| 21 |
* @since 3.5.0 |
| 22 |
* |
| 23 |
* @return string |
| 24 |
*/ |
| 25 |
protected function get_prompt_name() { |
| 26 |
|
| 27 |
return 'audit'; |
| 28 |
|
| 29 |
} |
| 30 |
|
| 31 |
/** |
| 32 |
* Returns the prompt's label. |
| 33 |
* |
| 34 |
* @since 3.5.0 |
| 35 |
* |
| 36 |
* @return string |
| 37 |
*/ |
| 38 |
public function get_label() { |
| 39 |
|
| 40 |
return __( 'Audit Kit configuration', 'convertkit' ); |
| 41 |
|
| 42 |
} |
| 43 |
|
| 44 |
/** |
| 45 |
* Returns the prompt's description. |
| 46 |
* |
| 47 |
* @since 3.5.0 |
| 48 |
* |
| 49 |
* @return string |
| 50 |
*/ |
| 51 |
public function get_description() { |
| 52 |
|
| 53 |
return __( 'Review the Kit connection, default Forms and per-post settings, and report gaps and misconfigurations. Read only — makes no changes.', 'convertkit' ); |
| 54 |
|
| 55 |
} |
| 56 |
|
| 57 |
/** |
| 58 |
* Returns the prompt text. |
| 59 |
* |
| 60 |
* @since 3.5.0 |
| 61 |
* |
| 62 |
* @param array $input Prompt arguments (unused). |
| 63 |
* @return array|WP_Error |
| 64 |
*/ |
| 65 |
public function execute_callback( $input ) { // phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.Found |
| 66 |
|
| 67 |
return $this->render( |
| 68 |
array( |
| 69 |
'# ' . __( 'Audit Kit configuration', 'convertkit' ), |
| 70 |
__( 'Goal: review the current Kit setup and report gaps. This is read only — do not change any settings; if the user wants a fix, point them to the relevant prompt (setup, add-form, restrict-content).', 'convertkit' ), |
| 71 |
'## ' . __( 'Gather', 'convertkit' ), |
| 72 |
__( '- `kit://account` — is the site connected?', 'convertkit' ), |
| 73 |
__( '- `kit://settings` — default Forms, broadcasts and restrict-content configuration.', 'convertkit' ), |
| 74 |
__( '- `kit://forms`, `kit://tags`, `kit://products` — what exists on the account.', 'convertkit' ), |
| 75 |
__( '- For a sample of published Pages and Posts, `kit/post-settings-get` to see their Form / Landing Page / Tag / Restrict Content settings.', 'convertkit' ), |
| 76 |
'## ' . __( 'Report', 'convertkit' ), |
| 77 |
__( '- Whether the account is connected and which account it is.', 'convertkit' ), |
| 78 |
__( '- Whether a default Form is set per post type, and which.', 'convertkit' ), |
| 79 |
__( '- Content that references a Form, Tag or Product ID that no longer exists on the account.', 'convertkit' ), |
| 80 |
__( '- Where Restrict Content is in use, and any content that looks like it should be gated but is not.', 'convertkit' ), |
| 81 |
__( 'Summarise findings as a short list, most important first, with the suggested fix for each.', 'convertkit' ), |
| 82 |
) |
| 83 |
); |
| 84 |
|
| 85 |
} |
| 86 |
|
| 87 |
} |
| 88 |
|