cache.php
974 Bytes
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
41
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
global $wpdb;
$count = $wpdb->get_var(
"SELECT COUNT( option_id )
FROM {$wpdb->options}
WHERE option_name LIKE 'um_cache_userdata_%'"
);
$url_user_cache = add_query_arg(
array(
'um_adm_action' => 'user_cache',
'_wpnonce' => wp_create_nonce( 'user_cache' ),
)
);
$url_user_status_cache = add_query_arg(
array(
'um_adm_action' => 'user_status_cache',
'_wpnonce' => wp_create_nonce( 'user_status_cache' ),
)
);
?>
<p><?php esc_html_e( 'Run this task from time to time to keep your DB clean.', 'ultimate-member' ); ?></p>
<p>
<a href="<?php echo esc_url( $url_user_cache ); ?>" class="button">
<?php
// translators: %s: users number.
echo esc_html( sprintf( __( 'Clear cache of %s users', 'ultimate-member' ), $count ) );
?>
</a>
<a href="<?php echo esc_url( $url_user_status_cache ); ?>" class="button">
<?php esc_html_e( 'Clear user statuses cache', 'ultimate-member' ); ?>
</a>
</p>