| @@ 223-239 (lines=17) @@ | ||
| 220 | * |
|
| 221 | * @return void |
|
| 222 | */ |
|
| 223 | public static function clear_all_idc_options() { |
|
| 224 | // If the site is currently in IDC, let's also clear the VaultPress connection options. |
|
| 225 | // We have to check if the site is in IDC, otherwise we'd be clearing the VaultPress |
|
| 226 | // connection any time the Jetpack connection is cycled. |
|
| 227 | if ( Jetpack::validate_sync_error_idc_option() ) { |
|
| 228 | delete_option( 'vaultpress' ); |
|
| 229 | delete_option( 'vaultpress_auto_register' ); |
|
| 230 | } |
|
| 231 | ||
| 232 | Jetpack_Options::delete_option( |
|
| 233 | array( |
|
| 234 | 'sync_error_idc', |
|
| 235 | 'safe_mode_confirmed', |
|
| 236 | 'migrate_for_idc', |
|
| 237 | ) |
|
| 238 | ); |
|
| 239 | } |
|
| 240 | ||
| 241 | /** |
|
| 242 | * Does the current admin page have help tabs? |
|
| @@ 173-189 (lines=17) @@ | ||
| 170 | /** |
|
| 171 | * Clears all IDC specific options. This method is used on disconnect and reconnect. |
|
| 172 | */ |
|
| 173 | static function clear_all_idc_options() { |
|
| 174 | // If the site is currently in IDC, let's also clear the VaultPress connection options. |
|
| 175 | // We have to check if the site is in IDC, otherwise we'd be clearing the VaultPress |
|
| 176 | // connection any time the Jetpack connection is cycled. |
|
| 177 | if ( Jetpack::validate_sync_error_idc_option() ) { |
|
| 178 | delete_option( 'vaultpress' ); |
|
| 179 | delete_option( 'vaultpress_auto_register' ); |
|
| 180 | } |
|
| 181 | ||
| 182 | Jetpack_Options::delete_option( |
|
| 183 | array( |
|
| 184 | 'sync_error_idc', |
|
| 185 | 'safe_mode_confirmed', |
|
| 186 | 'migrate_for_idc', |
|
| 187 | ) |
|
| 188 | ); |
|
| 189 | } |
|
| 190 | ||
| 191 | /** |
|
| 192 | * Does the current admin page have help tabs? |
|