- added separate button for the user statuses count cache clearing;

This commit is contained in:
Nikita Sinelnikov
2022-08-12 20:14:39 +03:00
parent f4f84bbd7e
commit 221e54f6ce
3 changed files with 49 additions and 9 deletions
+11 -5
View File
@@ -1,5 +1,6 @@
<?php if ( ! defined( 'ABSPATH' ) ) exit;
<?php if ( ! defined( 'ABSPATH' ) ) {
exit;
}
global $wpdb;
@@ -7,11 +8,16 @@ $count = $wpdb->get_var(
"SELECT COUNT( option_id )
FROM {$wpdb->options}
WHERE option_name LIKE 'um_cache_userdata_%'"
); ?>
);
?>
<p><?php _e( 'Run this task from time to time to keep your DB clean.', 'ultimate-member' ) ?></p>
<p>
<a href="<?php echo esc_url( add_query_arg( 'um_adm_action', 'user_cache' ) ); ?>" class="button">
<?php printf( __( 'Clear cache of %s users', 'ultimate-member' ), $count ) ?>
<?php echo esc_html( sprintf( __( 'Clear cache of %s users', 'ultimate-member' ), $count ) ); ?>
</a>
</p>
<a href="<?php echo esc_url( add_query_arg( 'um_adm_action', 'user_status_cache' ) ); ?>" class="button">
<?php esc_html_e( 'Clear user statuses cache', 'ultimate-member' ); ?>
</a>
</p>