| @@ -75,10 +75,11 @@ | ||
| 75 | 75 | public function ui_metadata(): array { |
| 76 | 76 | return array( |
| 77 | 77 | 'label' => __( 'Cloudflare', 'xspeed' ), |
| 78 | 78 | 'icon' => 'Cloud', |
| 79 | - 'description' => __( 'Connect a Cloudflare zone for automatic edge purging when xSpeed clears its cache, plus a dev-mode toggle.', 'xspeed' ), | |
| 79 | + 'description' => __( 'Clear the Cloudflare cache whenever xSpeed clears its own cache.', 'xspeed' ), | |
| 80 | 80 | 'custom_panel' => 'CloudflarePanel', |
| 81 | + 'group' => 'network', | |
| 81 | 82 | ); |
| 82 | 83 | } |
| 83 | 84 | |
| 84 | 85 | /** |
| @@ -98,10 +99,10 @@ | ||
| 98 | 99 | return array( |
| 99 | 100 | 'enabled' => array( |
| 100 | 101 | 'type' => 'bool', |
| 101 | 102 | 'default' => false, |
| 102 | - 'label' => __( 'Enable Cloudflare integration', 'xspeed' ), | |
| 103 | - 'description' => __( 'Use the credentials below to verify your zone and run purges.', 'xspeed' ), | |
| 103 | + 'label' => __( 'Connect Cloudflare', 'xspeed' ), | |
| 104 | + 'description' => __( 'Lets xSpeed clear the Cloudflare cache for your domain, using the details below.', 'xspeed' ), | |
| 104 | 105 | ), |
| 105 | 106 | 'auth_method' => array( |
| 106 | 107 | 'type' => 'enum', |
| 107 | 108 | 'default' => 'token', |
| @@ -110,9 +111,9 @@ | ||
| 110 | 111 | 'token' => 'API Token', |
| 111 | 112 | 'key' => 'Global API Key', |
| 112 | 113 | ), |
| 113 | 114 | 'label' => __( 'Authentication', 'xspeed' ), |
| 114 | - 'description' => __( 'API Tokens (scoped, recommended) or the legacy Global API Key with your account email.', 'xspeed' ), | |
| 115 | + 'description' => __( 'An API token is safer and recommended. The older Global API Key also needs your account email.', 'xspeed' ), | |
| 115 | 116 | 'dependsOn' => array( 'field' => 'enabled' ), |
| 116 | 117 | ), |
| 117 | 118 | 'api_token' => array( |
| 118 | 119 | 'type' => 'secret', |
| @@ -117,9 +118,9 @@ | ||
| 117 | 118 | 'api_token' => array( |
| 118 | 119 | 'type' => 'secret', |
| 119 | 120 | 'default' => '', |
| 120 | 121 | 'label' => __( 'API Token', 'xspeed' ), |
| 121 | - 'description' => __( 'Create a token at dash.cloudflare.com → My Profile → API Tokens. Needs "Zone → Cache Purge" + "Zone Settings" permissions.', 'xspeed' ), | |
| 122 | + 'description' => __( 'Create one at dash.cloudflare.com → My Profile → API Tokens. Give it the "Zone → Cache Purge" and "Zone Settings" permissions.', 'xspeed' ), | |
| 122 | 123 | // Only the token auth branch (and only while CF is enabled, via |
| 123 | 124 | // the transitive gate on auth_method → enabled). |
| 124 | 125 | 'dependsOn' => array( 'field' => 'auth_method', 'value' => 'token' ), |
| 125 | 126 | ), |
| @@ -125,10 +126,10 @@ | ||
| 125 | 126 | ), |
| 126 | 127 | 'email' => array( |
| 127 | 128 | 'type' => 'string', |
| 128 | 129 | 'default' => '', |
| 129 | - 'label' => __( 'Account Email', 'xspeed' ), | |
| 130 | - 'description' => __( 'Only used when Authentication is set to Global API Key.', 'xspeed' ), | |
| 130 | + 'label' => __( 'Account email', 'xspeed' ), | |
| 131 | + 'description' => __( 'The email address of your Cloudflare account.', 'xspeed' ), | |
| 131 | 132 | 'dependsOn' => array( 'field' => 'auth_method', 'value' => 'key' ), |
| 132 | 133 | ), |
| 133 | 134 | 'api_key' => array( |
| 134 | 135 | 'type' => 'secret', |
| @@ -133,9 +134,9 @@ | ||
| 133 | 134 | 'api_key' => array( |
| 134 | 135 | 'type' => 'secret', |
| 135 | 136 | 'default' => '', |
| 136 | 137 | 'label' => __( 'Global API Key', 'xspeed' ), |
| 137 | - 'description' => __( 'Found at dash.cloudflare.com → My Profile → API Tokens → Global API Key.', 'xspeed' ), | |
| 138 | + 'description' => __( 'Find it at dash.cloudflare.com → My Profile → API Tokens → Global API Key.', 'xspeed' ), | |
| 138 | 139 | 'dependsOn' => array( 'field' => 'auth_method', 'value' => 'key' ), |
| 139 | 140 | ), |
| 140 | 141 | 'zone_id' => array( |
| 141 | 142 | 'type' => 'string', |
| @@ -140,16 +141,16 @@ | ||
| 140 | 141 | 'zone_id' => array( |
| 141 | 142 | 'type' => 'string', |
| 142 | 143 | 'default' => '', |
| 143 | 144 | 'label' => __( 'Zone ID', 'xspeed' ), |
| 144 | - 'description' => __( 'The 32-character hex Zone ID from your domain overview page.', 'xspeed' ), | |
| 145 | + 'description' => __( 'The 32-character Zone ID shown on your domain overview page in Cloudflare.', 'xspeed' ), | |
| 145 | 146 | 'dependsOn' => array( 'field' => 'enabled' ), |
| 146 | 147 | ), |
| 147 | 148 | 'auto_purge_on_update' => array( |
| 148 | 149 | 'type' => 'bool', |
| 149 | 150 | 'default' => true, |
| 150 | - 'label' => __( 'Auto-purge Cloudflare on xSpeed purge', 'xspeed' ), | |
| 151 | - 'description' => __( 'When xSpeed clears its own cache (post save, settings change, manual purge), trigger a Cloudflare purge too.', 'xspeed' ), | |
| 151 | + 'label' => __( 'Clear Cloudflare with xSpeed', 'xspeed' ), | |
| 152 | + 'description' => __( 'Clear the Cloudflare cache each time xSpeed clears its own, for example after you save a post.', 'xspeed' ), | |
| 152 | 153 | 'dependsOn' => array( 'field' => 'enabled' ), |
| 153 | 154 | ), |
| 154 | 155 | ); |
| 155 | 156 | } |