/
admin.backups-table.php
40 lines (29 loc) · 1.11 KB
/
admin.backups-table.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<?php
// If max backups has changed
if ( ! hmbkp_in_progress() )
hmbkp_delete_old_backups();
if ( ( $backup_archives = hmbkp_get_backups() ) && count( $backup_archives ) ) : ?>
<table class="widefat" id="hmbkp_manage_backups_table">
<thead>
<tr>
<th scope="col"><?php printf( _n( '1 backup completed', '%d backups completed', count( $backup_archives ), 'hmbkp' ), count( $backup_archives ) ); ?></th>
<th scope="col"><?php _e( 'Size', 'hmbkp' ); ?></th>
<th scope="col"><?php _e( 'Actions', 'hmbkp' ); ?></th>
</tr>
</thead>
<tfoot>
<tr>
<th><?php printf( _n( 'Only the most recent backup will be saved', 'The %d most recent backups will be saved', hmbkp_max_backups(), 'hmbkp' ), hmbkp_max_backups() ); ?></th>
<th><?php printf( __( 'Total %s', 'hmbkp' ), hmbkp_total_filesize() ); ?></th>
<th></th>
</tr>
</tfoot>
<tbody id="the-list">
<?php foreach ( (array) $backup_archives as $file ) :
if ( ! file_exists( $file ) )
continue;
hmbkp_get_backup_row( $file );
endforeach; ?>
</tbody>
</table>
<?php endif; ?>