|
@@ 502-529 (lines=28) @@
|
| 499 |
|
} |
| 500 |
|
|
| 501 |
|
// Show notice if upgrade paused. |
| 502 |
|
if ( self::$background_updater->is_paused_process() ) { |
| 503 |
|
ob_start(); |
| 504 |
|
?> |
| 505 |
|
<p> |
| 506 |
|
<strong><?php _e( 'Database Update', 'give' ); ?></strong> |
| 507 |
|
– <?php _e( 'GiveWP needs to update your database to the latest version. The following process will make updates to your site\'s database. Please create a backup before proceeding.', 'give' ); ?> |
| 508 |
|
</p> |
| 509 |
|
<p class="submit"> |
| 510 |
|
<a href="<?php echo esc_url( add_query_arg( array( 'give-restart-db-upgrades' => 1 ), admin_url( 'edit.php?post_type=give_forms&page=give-updates' ) ) ); ?>" class="button button-primary give-restart-updater-btn"> |
| 511 |
|
<?php _e( 'Restart the updater', 'give' ); ?> |
| 512 |
|
</a> |
| 513 |
|
</p> |
| 514 |
|
<script type="text/javascript"> |
| 515 |
|
jQuery('.give-restart-updater-btn').click('click', function () { |
| 516 |
|
return window.confirm('<?php echo esc_js( __( 'It is recommended that you backup your database before proceeding. Do you want to run the update now?', 'give' ) ); ?>'); // jshint ignore:line |
| 517 |
|
}); |
| 518 |
|
</script> |
| 519 |
|
<?php |
| 520 |
|
$desc_html = ob_get_clean(); |
| 521 |
|
|
| 522 |
|
|
| 523 |
|
Give()->notices->register_notice( array( |
| 524 |
|
'id' => 'give_upgrade_db', |
| 525 |
|
'type' => 'error', |
| 526 |
|
'dismissible' => false, |
| 527 |
|
'description' => $desc_html, |
| 528 |
|
) ); |
| 529 |
|
} |
| 530 |
|
|
| 531 |
|
// Bailout if doing upgrades. |
| 532 |
|
if( $this->is_doing_updates() ) { |
|
@@ 564-591 (lines=28) @@
|
| 561 |
|
$this->run_db_update(); |
| 562 |
|
|
| 563 |
|
// Show run the update notice. |
| 564 |
|
} elseif ( $this->get_total_new_db_update_count() ) { |
| 565 |
|
ob_start(); |
| 566 |
|
?> |
| 567 |
|
<p> |
| 568 |
|
<strong><?php _e( 'Database Update', 'give' ); ?></strong> |
| 569 |
|
– <?php _e( 'GiveWP needs to update your database to the latest version. The following process will make updates to your site\'s database. Please create a complete backup before proceeding.', 'give' ); ?> |
| 570 |
|
</p> |
| 571 |
|
<p class="submit"> |
| 572 |
|
<a href="<?php echo esc_url( add_query_arg( array( 'give-run-db-update' => 1 ), admin_url( 'edit.php?post_type=give_forms&page=give-updates' ) ) ); ?>" class="button button-primary give-run-update-now"> |
| 573 |
|
<?php _e( 'Run the updater', 'give' ); ?> |
| 574 |
|
</a> |
| 575 |
|
</p> |
| 576 |
|
<script type="text/javascript"> |
| 577 |
|
jQuery('.give-run-update-now').click('click', function () { |
| 578 |
|
return window.confirm('<?php echo esc_js( __( 'It is recommended that you backup your database before proceeding. Do you want to run the update now?', 'give' ) ); ?>'); // jshint ignore:line |
| 579 |
|
}); |
| 580 |
|
</script> |
| 581 |
|
<?php |
| 582 |
|
$desc_html = ob_get_clean(); |
| 583 |
|
|
| 584 |
|
|
| 585 |
|
Give()->notices->register_notice( array( |
| 586 |
|
'id' => 'give_upgrade_db', |
| 587 |
|
'type' => 'updated', |
| 588 |
|
'dismissible' => false, |
| 589 |
|
'description' => $desc_html, |
| 590 |
|
) ); |
| 591 |
|
} |
| 592 |
|
} |
| 593 |
|
|
| 594 |
|
/** |