addons-settings-page.php
6 years ago
advanced-settings-page.php
6 years ago
error-manager-page.php
6 years ago
language-switcher-shortcode.php
6 years ago
license-settings-page.php
6 years ago
machine-translation-settings-page.php
6 years ago
main-settings-language-selector.php
6 years ago
main-settings-page.php
6 years ago
settings-navigation-tabs.php
6 years ago
test-api-settings-page.php
6 years ago
translation-manager.php
6 years ago
trp-remove-duplicate-rows.php
6 years ago
trp-update-database.php
6 years ago
trp-remove-duplicate-rows.php
35 lines
| 1 | <div id="trp-addons-page" class="wrap"> |
| 2 | |
| 3 | <h1> <?php esc_html_e( 'TranslatePress Settings', 'translatepress-multilingual' );?></h1> |
| 4 | |
| 5 | <div class="grid feat-header"> |
| 6 | <div class="grid-cell"> |
| 7 | <h2><?php esc_html_e('Remove duplicate rows from TranslatePress tables', 'translatepress-multilingual' );?> </h2> |
| 8 | <?php if ( empty( $_GET['trp_rm_duplicates'] ) ){ ?> |
| 9 | <div> |
| 10 | <?php esc_html_e( '<strong>IMPORTANT NOTE: Before performing this action it is strongly recommended to first backup the database.</strong><br><br>This feature can be used to cleanup duplicate entries in TranslatePress trp_dictionary tables. Such duplicates can appear in exceptional situations of unexpected behavior.', 'translatepress-multilingual' )?> |
| 11 | </div> |
| 12 | <form onsubmit="return confirm('<?php echo esc_js( __( 'IMPORTANT: It is strongly recommended to first backup the database!!\nAre you sure you want to continue?', 'translatepress-multilingual' ) ); ?>');"> |
| 13 | <table class="form-table"> |
| 14 | <tr> |
| 15 | <th scope="row"><?php esc_html_e( 'Batch size', 'translatepress-multilingual' ); ?></th> |
| 16 | <td> |
| 17 | <input name="trp_rm_batch_size" type="number" value="10000" step="100" min="100"> |
| 18 | <p> |
| 19 | <i><?php esc_html_e( 'The number of rows to check at once.<br>Choosing a smaller number helps solve the 504 error "Page took too long to respond" on large databases.<br>May take several minutes depending on the database size.', 'translatepress-multilingual' ); ?></i> |
| 20 | </p> |
| 21 | </td> |
| 22 | </tr> |
| 23 | </table> |
| 24 | <input type="hidden" name="trp_rm_nonce" value="<?php echo wp_create_nonce('tpremoveduplicaterows')?>"> |
| 25 | <input type="hidden" name="page" value="trp_remove_duplicate_rows"> |
| 26 | <input type="hidden" name="trp_rm_batch" value="1"> |
| 27 | <input type="hidden" name="trp_rm_duplicates" value="<?php echo esc_attr( $this->settings['translation-languages'][0] ); ?>"> |
| 28 | <input type="submit" class="button-primary" value="<?php esc_attr_e( 'Remove duplicate rows', 'translatepress-multilingual' ); ?>"> |
| 29 | </form> |
| 30 | <?php } ?> |
| 31 | |
| 32 | </div> |
| 33 | </div> |
| 34 | |
| 35 | </div> |