| @@ 243-259 (lines=17) @@ | ||
| 240 | * |
|
| 241 | * @return void |
|
| 242 | */ |
|
| 243 | public static function clear_all_idc_options() { |
|
| 244 | // If the site is currently in IDC, let's also clear the VaultPress connection options. |
|
| 245 | // We have to check if the site is in IDC, otherwise we'd be clearing the VaultPress |
|
| 246 | // connection any time the Jetpack connection is cycled. |
|
| 247 | if ( self::validate_sync_error_idc_option() ) { |
|
| 248 | delete_option( 'vaultpress' ); |
|
| 249 | delete_option( 'vaultpress_auto_register' ); |
|
| 250 | } |
|
| 251 | ||
| 252 | Jetpack_Options::delete_option( |
|
| 253 | array( |
|
| 254 | 'sync_error_idc', |
|
| 255 | 'safe_mode_confirmed', |
|
| 256 | 'migrate_for_idc', |
|
| 257 | ) |
|
| 258 | ); |
|
| 259 | } |
|
| 260 | ||
| 261 | /** |
|
| 262 | * Checks whether the sync_error_idc option is valid or not, and if not, will do cleanup. |
|
| @@ 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? |
|