PluginProbe
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses / 4.4.8
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses v4.4.8
4.4.8 4.4.7 4.4.6 4.4.5 4.4.4 4.4.3 4.4.2 4.4.1 4.4.0 4.3.9.1 4.3.9 4.3.8 4.3.7 4.1.6.9 4.1.6.9.1 4.1.6.9.2 4.1.6.9.3 4.1.6.9.4 4.1.7 4.1.7.1 4.1.7.2 4.1.7.3 4.1.7.3.1 4.1.7.3.2 4.2.0 All 139 releases
← All changes | inc/admin/views/tools/database/html-clean-database.php +31 -32 4.1.6.94.4.8 View file →
@@ -11,39 +11,41 @@
11 11
12 12 defined( 'ABSPATH' ) or die();
13 13 $lp_db_sessions = LP_Sessions_DB::getInstance();
14 14 global $wpdb;
15 -$clean_tables = array(
16 - 'learnpress_sessions',
17 -)
15 +$clean_tables = array( 'learnpress_sessions' );
18 16 ?>
19 17
20 18 <div class="card" id="lp-tool-clean-database">
21 - <h2><?php echo sprintf( '%s', __( 'Clean data system', 'learnpress' ) ); ?></h2>
19 + <h2><?php echo sprintf( '%s', __( 'Clean Data System', 'learnpress' ) ); ?></h2>
22 20 <p><?php _e( 'Remove old data, not use or expire', 'learnpress' ); ?></p>
23 21 <div class="tools-prepare__message"></div>
24 22 <div id="tools-select__id" class="tools-select__data">
25 - <ul class="clean-table">
26 - <?php
27 - foreach ( $clean_tables as $clean_table ) :
28 - $color_code = '#ffffff';
29 - $rows = $lp_db_sessions->count_row_db_sessions();
30 - if ( $rows > 500 ) {
31 - $color_code = '#ff0000';
32 - }
33 - ?>
34 - <li style="background-color: <?php echo esc_attr( $color_code ); ?>">
35 - <input type="checkbox" id="clean-table__<?php echo esc_attr( $clean_table ); ?>" name="clean-table__<?php echo esc_attr( $clean_table ); ?>" value="<?php echo esc_attr( $clean_table ); ?>" >
36 - <label for="clean-table__<?php echo esc_attr( $clean_table ); ?>">
37 - <?php echo sprintf( '%s (%d) %s', $clean_table, $lp_db_sessions->count_row_db_sessions(), __( 'rows expire', 'learnpress' ) ); ?>
38 - </label>
39 - <br>
40 - </li>
41 - <?php endforeach; ?>
42 - </ul>
23 + <ul class="clean-table">
24 + <?php
25 + foreach ( $clean_tables as $clean_table ) :
26 + $color_code = '#ffffff';
27 + $rows = $lp_db_sessions->count_row_db_sessions();
28 + if ( $rows > 500 ) {
29 + $color_code = '#ff0000';
30 + }
31 + ?>
32 + <li style="background-color: <?php echo esc_attr( $color_code ); ?>">
33 + <input type="checkbox" id="clean-table__<?php echo esc_attr( $clean_table ); ?>"
34 + name="clean-table__<?php echo esc_attr( $clean_table ); ?>"
35 + value="<?php echo esc_attr( $clean_table ); ?>">
36 + <label for="clean-table__<?php echo esc_attr( $clean_table ); ?>">
37 + <?php echo sprintf( '%s (%d) %s', $clean_table, $lp_db_sessions->count_row_db_sessions(), __( 'rows expire', 'learnpress' ) ); ?>
38 + </label>
39 + <br>
40 + </li>
41 + <?php endforeach; ?>
42 + </ul>
43 43 </div>
44 44 <p class="tools-button">
45 - <button type="button" class="button lp-btn lp-btn-clean-db"><?php esc_html_e( 'Delete', 'learnpress' ); ?></button>
45 + <button type="button" class="button lp-btn lp-btn-clean-db">
46 + <?php esc_html_e( 'Delete', 'learnpress' ); ?>
47 + </button>
46 48 </p>
47 49
48 50 <div class="wrapper-lp-loading" style="display: none">
49 51 <?php
@@ -48,22 +50,20 @@
48 50 <div class="wrapper-lp-loading" style="display: none">
49 51 <?php
50 52 $i = 0;
51 53 foreach ( $clean_tables as $clean_table ) :
52 - $i++;
54 + ++$i;
53 55 $rows = $lp_db_sessions->count_row_db_sessions();
54 56 ?>
55 57 <div class="progressbar__item step-<?php echo esc_attr( $i ); ?>" data-total="<?php echo esc_attr( $rows ); ?>">
56 58 <div class="progressbar__container">
57 59 <div class="progressbar__content">
58 - <h4><?php echo esc_html( 'Table name: ' . $clean_table . '' ); ?></h4>
60 + <h4><?php echo sprintf( '%s: %s', esc_html__( 'Table name', 'learnpress' ), $clean_table ); ?></h4>
59 61 <div class="progressbar__indexs">
60 - <span class="progressbar__rows">
61 - <?php echo esc_html( '0 / ' . $rows . ' expire' ); ?>
62 - </span>
63 - <span class="progressbar__percent">
64 - ( 0% )
65 - </span>
62 + <span class="progressbar__rows">
63 + <?php echo sprintf( '0 / %d %s', $rows, __( 'expire', 'learnpress' ) ); ?>
64 + </span>
65 + <span class="progressbar__percent">( 0% )</span>
66 66 </div>
67 67 </div>
68 68 <div class="progressbar__value"></div>
69 69 </div>
@@ -70,7 +70,6 @@
70 70 </div>
71 71 <div class="lp-tool__message"></div>
72 72 <?php endforeach; ?>
73 73 </div>
74 -
75 74 </div>
76 75