← All changes
|
includes/abilities/settings/class-update-llms-txt-settings.php
+14
-3
2.0.1
→
2.10.0
View file →
| @@ -56,9 +56,9 @@ | ||
| 56 | 56 | */ |
| 57 | 57 | public function __construct() { |
| 58 | 58 | $this->id = 'thinkrank/update-llms-txt-settings'; |
| 59 | 59 | $this->label = __( 'Update ThinkRank llms.txt Settings', 'thinkrank' ); |
| 60 | - $this->description = __( 'Update ThinkRank llms.txt settings, which describe the site to AI language models via the llms.txt file.', 'thinkrank' ); | |
| 60 | + $this->description = __( 'Update ThinkRank llms.txt settings, which describe the site to AI language models via the llms.txt file. Read the current values with get-llms-txt-settings first, then publish-llms-txt to write the file.', 'thinkrank' ); | |
| 61 | 61 | } |
| 62 | 62 | |
| 63 | 63 | /** |
| 64 | 64 | * {@inheritDoc} |
| @@ -67,9 +67,16 @@ | ||
| 67 | 67 | */ |
| 68 | 68 | public function get_annotations() { |
| 69 | 69 | return [ |
| 70 | 70 | 'readonly' => false, |
| 71 | - 'destructive' => true, | |
| 71 | + // Settings writes are recoverable: the matching get-* ability reads | |
| 72 | + // the previous value, so nothing is lost that cannot be put back. | |
| 73 | + // `destructive` is reserved for calls that lose data or reach | |
| 74 | + // outside the site, and marking routine configuration with it made | |
| 75 | + // MCP clients demand a human approval for every save — which users | |
| 76 | + // reported as a permission bug, because the client's refusal reads | |
| 77 | + // as "No approval received" (#675). | |
| 78 | + 'destructive' => false, | |
| 72 | 79 | 'idempotent' => true, |
| 73 | 80 | 'priority' => 2.0, |
| 74 | 81 | 'openWorldHint' => false, |
| 75 | 82 | ]; |
| @@ -90,9 +97,13 @@ | ||
| 90 | 97 | $props[ $key ] = [ 'type' => 'string' ]; |
| 91 | 98 | } |
| 92 | 99 | |
| 93 | 100 | $props['delivery_mode']['enum'] = [ 'auto', 'static', 'dynamic' ]; |
| 94 | - $props['delivery_mode']['description'] = __( 'How /llms.txt is served: "static" writes a physical file the web server answers, "dynamic" keeps the document in WordPress and serves it from PHP as UTF-8, "auto" picks static on Apache/LiteSpeed and dynamic elsewhere.', 'thinkrank' ); | |
| 101 | + $props['delivery_mode']['description'] = __( 'How /llms.txt is served: "static" writes a physical file the web server answers, "dynamic" keeps the document in WordPress and serves it from PHP as UTF-8, "auto" prefers static on Apache/LiteSpeed but falls back to dynamic when the published file turns out to be served without a character set.', 'thinkrank' ); | |
| 102 | + | |
| 103 | + // The delimiter is not guessable from the field name, and getting it | |
| 104 | + // wrong publishes mangled bullets to the file AI crawlers read (#765). | |
| 105 | + $props['key_features']['description'] = __( 'Key features of the site, one per line. A newline separates features; a comma is treated as part of a feature, so "Collect reviews from Trustpilot, Google, and Etsy" stays one feature rather than becoming three.', 'thinkrank' ); | |
| 95 | 106 | |
| 96 | 107 | return $props; |
| 97 | 108 | } |
| 98 | 109 | |