| @@ 325-337 (lines=13) @@ | ||
| 322 | */ |
|
| 323 | public function __pause_db_update( $force = false ) { |
|
| 324 | // Bailout. |
|
| 325 | if ( |
|
| 326 | ! $force && |
|
| 327 | ( |
|
| 328 | wp_doing_ajax() || |
|
| 329 | ! isset( $_GET['page'] ) || |
|
| 330 | 'give-updates' !== $_GET['page'] || |
|
| 331 | ! isset( $_GET['give-pause-db-upgrades'] ) || |
|
| 332 | self::$background_updater->is_paused_process() |
|
| 333 | ) |
|
| 334 | ||
| 335 | ) { |
|
| 336 | return false; |
|
| 337 | } |
|
| 338 | ||
| 339 | $batch = self::$background_updater->get_all_batch(); |
|
| 340 | ||
| @@ 375-383 (lines=9) @@ | ||
| 372 | */ |
|
| 373 | public function __restart_db_update() { |
|
| 374 | // Bailout. |
|
| 375 | if ( |
|
| 376 | wp_doing_ajax() || |
|
| 377 | ! isset( $_GET['page'] ) || |
|
| 378 | 'give-updates' !== $_GET['page'] || |
|
| 379 | ! isset( $_GET['give-restart-db-upgrades'] ) || |
|
| 380 | ! self::$background_updater->is_paused_process() |
|
| 381 | ) { |
|
| 382 | return false; |
|
| 383 | } |
|
| 384 | ||
| 385 | wp_cache_delete( 'give_paused_batches', 'options' ); |
|
| 386 | $batch = get_option( 'give_paused_batches' ); |
|