← All changes
|
inc/admin/views/tools/database/html-upgrade-database.php
+111
-111
4.3.9
→
4.4.8
View file →
| @@ -1,111 +1,111 @@ | ||
| 1 | -<?php | |
| 2 | -/** | |
| 3 | - * Template tool upgrade database. | |
| 4 | - * | |
| 5 | - * @template html-upgrade-database | |
| 6 | - * @author ThimPress | |
| 7 | - * @package LearnPress/Admin/Views | |
| 8 | - * @version 4.0.1 | |
| 9 | - */ | |
| 10 | - | |
| 11 | -defined( 'ABSPATH' ) or die(); | |
| 12 | - | |
| 13 | -$user_agree_terms = (int) LP_Settings::instance()->get( 'agree_terms', 0 ); | |
| 14 | -$check_lp_need_upgrade_db = LP_Updater::instance()->check_lp_db_need_upgrade(); | |
| 15 | - | |
| 16 | -if ( ! $check_lp_need_upgrade_db ) { | |
| 17 | - return; | |
| 18 | -} | |
| 19 | -?> | |
| 20 | - | |
| 21 | -<div class="card" id="lp-tool-upgrade-db"> | |
| 22 | - <h2><?php echo sprintf( '%s', __( 'Upgrade Database', 'learnpress' ) ); ?></h2> | |
| 23 | - <p class="tools-button"> | |
| 24 | - <a class="button lp-btn-upgrade-db" href="javascript:;"> | |
| 25 | - <?php esc_html_e( 'Upgrade now', 'learnpress' ); ?> | |
| 26 | - </a> | |
| 27 | - <span class="spinner"></span> | |
| 28 | - <?php wp_nonce_field( 'lp-nonce', 'lp-nonce' ); ?> | |
| 29 | - </p> | |
| 30 | - <div style="max-height: 500px; overflow: auto" class="wrapper-lp-status-upgrade"></div> | |
| 31 | - | |
| 32 | - <?php | |
| 33 | - if ( $user_agree_terms !== $check_lp_need_upgrade_db ) { | |
| 34 | - ?> | |
| 35 | - <div class="wrapper-terms-upgrade"> | |
| 36 | - <div class="terms-upgrade"> | |
| 37 | - <h2>Terms of Service update</h2> | |
| 38 | - <div class="pd-2em"> | |
| 39 | - <span>To system LearnPress runs normally, we need to upgrade database on your site.</span> | |
| 40 | - <p> | |
| 41 | - IMPORTANT: Before upgrading the LearnPress database on your website, please read these Terms of | |
| 42 | - Services carefully. | |
| 43 | - </p> | |
| 44 | - <p> | |
| 45 | - Our Terms of Services, provided by ThimPress, outline the precautions for upgrading the | |
| 46 | - LearnPress database on your website. By using this feature, you agree to be bound by these | |
| 47 | - Terms. If you disagree with any part, you should not upgrade the database and consider | |
| 48 | - downgrading LearnPress versions if necessary. | |
| 49 | - </p> | |
| 50 | - <h4>ACCEPTANCE OF TERMS</h4> | |
| 51 | - <span> | |
| 52 | - 1. We do not take responsibility for the loss data that is not from our LearnPress plugins. This | |
| 53 | - means we cannot guarantee the safety of data unrelated to LearnPress during the database upgrade | |
| 54 | - process . <strong style="color: #f55252"><i>It's essential to back up your entire website before | |
| 55 | - upgradingspan</i></strong>. | |
| 56 | - </span> | |
| 57 | - <p> | |
| 58 | - 2. We are not responsible for the issues caused by interrupting the upgrade process. | |
| 59 | - Interrupting | |
| 60 | - the process before finishing can lead to problems on your website. Please ensure that the | |
| 61 | - LearnPress database is upgraded successfully. | |
| 62 | - </p> | |
| 63 | - <p> | |
| 64 | - 3. A stable internet connection is essential for a successful upgrade since any Internet | |
| 65 | - disconnection can lead to unexpected problems. We do not take responsibility for any issues | |
| 66 | - caused by any disconnection. | |
| 67 | - </p> | |
| 68 | - <h4>ACCEPTANCE OF TERMS</h4> | |
| 69 | - <span> | |
| 70 | - 1.Back up your website before upgrading. This will make sure you can restore your website in | |
| 71 | - case any unexpected errors happen. | |
| 72 | - </span> | |
| 73 | - <p> | |
| 74 | - 2. Maintain a stable Internet connection throughout the process. This will minimize the risk of | |
| 75 | - breaking down your website. | |
| 76 | - </p> | |
| 77 | - <p> | |
| 78 | - 3. Do not interrupt the process once it starts. You should let the process run for a successful | |
| 79 | - database update. | |
| 80 | - </p> | |
| 81 | - <p> | |
| 82 | - <input type="checkbox" name="lp-agree-term"> | |
| 83 | - <span> | |
| 84 | - <?php esc_html_e( 'I agree the new Terms of Service.', 'learnpress' ); ?> | |
| 85 | - </span> | |
| 86 | - </p> | |
| 87 | - <p class="error"><?php esc_html_e( 'Please agree to the terms before upgrade!', 'learnpress' ); ?></p> | |
| 88 | - </div> | |
| 89 | - </div> | |
| 90 | - </div> | |
| 91 | - <?php | |
| 92 | - } | |
| 93 | - ?> | |
| 94 | - <div class="wrapper-lp-upgrade-message"> | |
| 95 | - <div class="lp-upgrade-message"> | |
| 96 | - <h2>Upgrade finished</h2> | |
| 97 | - <div class="pd-2em"> | |
| 98 | - <div class="learn-press-message"> | |
| 99 | - <p>You have upgraded the database from plugin LearnPress successfully.</p> | |
| 100 | - <p>You can use the LearnPress functions and LearnPress add-ons now.</p> | |
| 101 | - <p>Read more document <a href="<?php echo LearnPress::$doc_link; ?>">LearnPress</a></p> | |
| 102 | - </div> | |
| 103 | - </div> | |
| 104 | - </div> | |
| 105 | - </div> | |
| 106 | - <div class="wrapper-lp-loading"> | |
| 107 | - <?php lp_skeleton_animation_html( 7 ); ?> | |
| 108 | - </div> | |
| 109 | - <input type="hidden" name="message-when-upgrading" | |
| 110 | - value="<?php esc_html_e( 'Please don\'t close this tab until the completed upgrade', 'learnpress' ); ?>"/> | |
| 111 | -</div> | |
| 1 | +<?php | |
| 2 | +/** | |
| 3 | + * Template tool upgrade database. | |
| 4 | + * | |
| 5 | + * @template html-upgrade-database | |
| 6 | + * @author ThimPress | |
| 7 | + * @package LearnPress/Admin/Views | |
| 8 | + * @version 4.0.1 | |
| 9 | + */ | |
| 10 | + | |
| 11 | +defined( 'ABSPATH' ) or die(); | |
| 12 | + | |
| 13 | +$user_agree_terms = (int) LP_Settings::instance()->get( 'agree_terms', 0 ); | |
| 14 | +$check_lp_need_upgrade_db = LP_Updater::instance()->check_lp_db_need_upgrade(); | |
| 15 | + | |
| 16 | +if ( ! $check_lp_need_upgrade_db ) { | |
| 17 | + return; | |
| 18 | +} | |
| 19 | +?> | |
| 20 | + | |
| 21 | +<div class="card" id="lp-tool-upgrade-db"> | |
| 22 | + <h2><?php echo sprintf( '%s', __( 'Upgrade Database', 'learnpress' ) ); ?></h2> | |
| 23 | + <p class="tools-button"> | |
| 24 | + <a class="button lp-btn-upgrade-db" href="javascript:;"> | |
| 25 | + <?php esc_html_e( 'Upgrade now', 'learnpress' ); ?> | |
| 26 | + </a> | |
| 27 | + <span class="spinner"></span> | |
| 28 | + <?php wp_nonce_field( 'lp-nonce', 'lp-nonce' ); ?> | |
| 29 | + </p> | |
| 30 | + <div style="max-height: 500px; overflow: auto" class="wrapper-lp-status-upgrade"></div> | |
| 31 | + | |
| 32 | + <?php | |
| 33 | + if ( $user_agree_terms !== $check_lp_need_upgrade_db ) { | |
| 34 | + ?> | |
| 35 | + <div class="wrapper-terms-upgrade"> | |
| 36 | + <div class="terms-upgrade"> | |
| 37 | + <h2>Terms of Service update</h2> | |
| 38 | + <div class="pd-2em"> | |
| 39 | + <span>To system LearnPress runs normally, we need to upgrade database on your site.</span> | |
| 40 | + <p> | |
| 41 | + IMPORTANT: Before upgrading the LearnPress database on your website, please read these Terms of | |
| 42 | + Services carefully. | |
| 43 | + </p> | |
| 44 | + <p> | |
| 45 | + Our Terms of Services, provided by ThimPress, outline the precautions for upgrading the | |
| 46 | + LearnPress database on your website. By using this feature, you agree to be bound by these | |
| 47 | + Terms. If you disagree with any part, you should not upgrade the database and consider | |
| 48 | + downgrading LearnPress versions if necessary. | |
| 49 | + </p> | |
| 50 | + <h4>ACCEPTANCE OF TERMS</h4> | |
| 51 | + <span> | |
| 52 | + 1. We do not take responsibility for the loss data that is not from our LearnPress plugins. This | |
| 53 | + means we cannot guarantee the safety of data unrelated to LearnPress during the database upgrade | |
| 54 | + process . <strong style="color: #f55252"><i>It's essential to back up your entire website before | |
| 55 | + upgradingspan</i></strong>. | |
| 56 | + </span> | |
| 57 | + <p> | |
| 58 | + 2. We are not responsible for the issues caused by interrupting the upgrade process. | |
| 59 | + Interrupting | |
| 60 | + the process before finishing can lead to problems on your website. Please ensure that the | |
| 61 | + LearnPress database is upgraded successfully. | |
| 62 | + </p> | |
| 63 | + <p> | |
| 64 | + 3. A stable internet connection is essential for a successful upgrade since any Internet | |
| 65 | + disconnection can lead to unexpected problems. We do not take responsibility for any issues | |
| 66 | + caused by any disconnection. | |
| 67 | + </p> | |
| 68 | + <h4>ACCEPTANCE OF TERMS</h4> | |
| 69 | + <span> | |
| 70 | + 1.Back up your website before upgrading. This will make sure you can restore your website in | |
| 71 | + case any unexpected errors happen. | |
| 72 | + </span> | |
| 73 | + <p> | |
| 74 | + 2. Maintain a stable Internet connection throughout the process. This will minimize the risk of | |
| 75 | + breaking down your website. | |
| 76 | + </p> | |
| 77 | + <p> | |
| 78 | + 3. Do not interrupt the process once it starts. You should let the process run for a successful | |
| 79 | + database update. | |
| 80 | + </p> | |
| 81 | + <p> | |
| 82 | + <input type="checkbox" name="lp-agree-term"> | |
| 83 | + <span> | |
| 84 | + <?php esc_html_e( 'I agree the new Terms of Service.', 'learnpress' ); ?> | |
| 85 | + </span> | |
| 86 | + </p> | |
| 87 | + <p class="error"><?php esc_html_e( 'Please agree to the terms before upgrade!', 'learnpress' ); ?></p> | |
| 88 | + </div> | |
| 89 | + </div> | |
| 90 | + </div> | |
| 91 | + <?php | |
| 92 | + } | |
| 93 | + ?> | |
| 94 | + <div class="wrapper-lp-upgrade-message"> | |
| 95 | + <div class="lp-upgrade-message"> | |
| 96 | + <h2>Upgrade finished</h2> | |
| 97 | + <div class="pd-2em"> | |
| 98 | + <div class="learn-press-message"> | |
| 99 | + <p>You have upgraded the database from plugin LearnPress successfully.</p> | |
| 100 | + <p>You can use the LearnPress functions and LearnPress add-ons now.</p> | |
| 101 | + <p>Read more document <a href="<?php echo LearnPress::$doc_link; ?>">LearnPress</a></p> | |
| 102 | + </div> | |
| 103 | + </div> | |
| 104 | + </div> | |
| 105 | + </div> | |
| 106 | + <div class="wrapper-lp-loading"> | |
| 107 | + <?php lp_skeleton_animation_html( 7 ); ?> | |
| 108 | + </div> | |
| 109 | + <input type="hidden" name="message-when-upgrading" | |
| 110 | + value="<?php esc_html_e( 'Please don\'t close this tab until the completed upgrade', 'learnpress' ); ?>"/> | |
| 111 | +</div> | |