This commit is contained in:
Mykyta Synelnikov
2023-11-29 19:18:38 +02:00
parent edf0ed3085
commit 6d0f9494f3
3 changed files with 10 additions and 10 deletions
+5 -5
View File
@@ -68,12 +68,12 @@ if ( ! class_exists( 'um\admin\Secure' ) ) {
if ( $date_from ) {
$date_query_attr = array(
'after' => wp_date( 'F j, Y', strtotime( '-1 day', $date_from ) ),
'before' => wp_date( 'F j, Y', strtotime( '+1 day', $date_from ) ),
'after' => gmdate( get_option( 'date_format', 'F j, Y' ), strtotime( '-1 day', $date_from ) ),
'before' => gmdate( get_option( 'date_format', 'F j, Y' ), strtotime( '+1 day', $date_from ) ),
);
if ( $date_to ) {
$date_query_attr['before'] = wp_date( 'F j, Y', strtotime( '+1 day', $date_to ) );
$date_query_attr['before'] = gmdate( get_option( 'date_format', 'F j, Y' ), strtotime( '+1 day', $date_to ) );
}
$query->set( 'date_query', $date_query_attr );
@@ -205,7 +205,7 @@ if ( ! class_exists( 'um\admin\Secure' ) ) {
$scan_status = get_option( 'um_secure_scan_status' );
$last_scanned_time = get_option( 'um_secure_last_time_scanned' );
if ( ! empty( $last_scanned_time ) ) {
$scanner_content .= human_time_diff( $last_scanned_time, current_datetime()->format( 'U' ) ) . ' ' . esc_html__( 'ago', 'ultimate-member' );
$scanner_content .= human_time_diff( strtotime( $last_scanned_time ) ) . ' ' . esc_html__( 'ago', 'ultimate-member' );
if ( 'started' === $scan_status ) {
$scanner_content .= ' - ' . esc_html__( 'Not Completed.', 'ultimate-member' );
}
@@ -328,7 +328,7 @@ if ( ! class_exists( 'um\admin\Secure' ) ) {
$restore_account_url = admin_url( 'users.php?user_id=' . $user_id . '&um_secure_restore_account=1&_wpnonce=' . $nonce );
$action = ' &#183; <a href=" ' . esc_attr( $restore_account_url ) . ' " onclick=\'return confirm("' . esc_js( __( 'Are you sure that you want to restore this account after getting flagged for suspicious activity?', 'ultimate-member' ) ) . '");\'><small>' . esc_html__( 'Restore Account', 'ultimate-member' ) . '</small></a>';
if ( ! empty( $datetime ) ) {
$val .= '<div><small>' . human_time_diff( $datetime, current_datetime()->format( 'U' ) ) . ' ' . __( 'ago', 'ultimate-member' ) . '</small>' . $action . '</div>';
$val .= '<div><small>' . human_time_diff( strtotime( $datetime ) ) . ' ' . __( 'ago', 'ultimate-member' ) . '</small>' . $action . '</div>';
}
}
um_reset_user();