| @@ -20,15 +20,15 @@ | ||
| 20 | 20 | final class SupportModule extends Module { |
| 21 | 21 | |
| 22 | 22 | public const SLUG = 'support'; |
| 23 | 23 | public const TIER = self::TIER_FREE; |
| 24 | - public const VERSION = '1.0.0'; | |
| 24 | + public const VERSION = '1.1.0'; | |
| 25 | 25 | |
| 26 | 26 | public function ui_metadata(): array { |
| 27 | 27 | return array( |
| 28 | - 'label' => 'Help & Support', | |
| 28 | + 'label' => __( 'Help & Support', 'xspeed' ), | |
| 29 | 29 | 'icon' => 'LifeBuoy', |
| 30 | - 'description' => 'Open a support ticket with a one-click system snapshot already attached.', | |
| 30 | + 'description' => __( 'Open a support ticket with a one-click system snapshot already attached.', 'xspeed' ), | |
| 31 | 31 | 'custom_panel' => 'SupportPanel', |
| 32 | 32 | ); |
| 33 | 33 | } |
| 34 | 34 | |
| @@ -35,15 +35,33 @@ | ||
| 35 | 35 | public function settings_schema(): array { |
| 36 | 36 | return array( |
| 37 | 37 | 'support_url' => array( |
| 38 | 38 | 'type' => 'string', |
| 39 | - 'default' => 'https://wpdeveloper.com/support', | |
| 40 | - 'label' => 'Support URL', | |
| 41 | - 'description' => 'Where the "Open ticket" button takes the user.', | |
| 39 | + 'default' => 'https://xspeedcache.com/support/', | |
| 40 | + 'label' => __( 'Support URL', 'xspeed' ), | |
| 41 | + 'description' => __( 'Where the "Open ticket" button takes the user.', 'xspeed' ), | |
| 42 | 42 | ), |
| 43 | 43 | ); |
| 44 | 44 | } |
| 45 | 45 | |
| 46 | + /** | |
| 47 | + * The ticket link moved to the dedicated xSpeed support page (#414). A | |
| 48 | + * site that persisted the old default keeps it in its options row, so the | |
| 49 | + * new default alone would not reach it — rewrite exactly the old default | |
| 50 | + * and leave any genuinely custom URL alone. | |
| 51 | + */ | |
| 52 | + public function migrations(): array { | |
| 53 | + return array( | |
| 54 | + '1.1.0' => static function ( array $opts ): array { | |
| 55 | + $stored = isset( $opts['support_url'] ) ? untrailingslashit( trim( (string) $opts['support_url'] ) ) : ''; | |
| 56 | + if ( 'https://wpdeveloper.com/support' === $stored ) { | |
| 57 | + $opts['support_url'] = 'https://xspeedcache.com/support/'; | |
| 58 | + } | |
| 59 | + return $opts; | |
| 60 | + }, | |
| 61 | + ); | |
| 62 | + } | |
| 63 | + | |
| 46 | 64 | public function rest_routes(): array { |
| 47 | 65 | $default = parent::rest_routes(); |
| 48 | 66 | return array_merge( |
| 49 | 67 | $default, |
| @@ -72,8 +90,9 @@ | ||
| 72 | 90 | array( |
| 73 | 91 | 'name' => 'xspeed support', |
| 74 | 92 | 'callback' => array( $this, 'cli_handler' ), |
| 75 | 93 | 'shortdesc' => 'Print the support snapshot.', |
| 94 | + 'ai_hint' => 'Generate a diagnostic snapshot (environment, settings, active plugins, recent errors) to attach to a support request. Use when a problem needs escalating and the user is asked for their configuration.', | |
| 76 | 95 | 'synopsis' => array(), |
| 77 | 96 | ), |
| 78 | 97 | ); |
| 79 | 98 | } |