HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux WebLive 5.15.0-79-generic #86-Ubuntu SMP Mon Jul 10 16:07:21 UTC 2023 x86_64
User: ubuntu (1000)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/html/wpprotonperinggit/wp-content/themes/voiture/wp-private-message/message-item.php
<?php
if ( ! defined( 'ABSPATH' ) ) {
	exit;
}
$args = array(
	'post_per_page' => 1,
	'paged' => 1,
	'parent' => $post->ID,
);
$reply_messages = WP_Private_Message_Message::get_list_reply_messages($args);
$read = get_post_meta($post->ID, '_read_'.get_current_user_id(), true);
$yourself_id = get_current_user_id();
$sender = get_post_meta($post->ID, '_sender', true);
$recipient = get_post_meta($post->ID, '_recipient', true);
if ( $yourself_id == $sender ) {
	$recipient_id = $recipient;
} else {
	$recipient_id = $sender;
}
if ( $read ) {
	$classes .= ' read';
} else {
	$classes .= ' unread';
}

?>
<li id="message-id-<?php echo esc_attr($post->ID); ?>" class="<?php echo esc_attr($classes); ?>">
	<a class="message-item" href="javascript:void(0);" data-id="<?php echo esc_attr($post->ID); ?>" data-nonce="<?php echo esc_attr(wp_create_nonce( 'wp-private-message-choose-message-nonce' )); ?>">
		<div class="avatar">
			<?php voiture_private_message_user_avatar( $recipient_id ); ?>
		</div>
		<div class="content">
			<h4 class="user-name flex-middle"><?php echo esc_html( get_the_author_meta('display_name', $recipient_id)); ?>
				<span class="message-time ali-right">
					<?php if ( $reply_messages->have_posts() ) { ?>
						<?php foreach ($reply_messages->posts as $rpost) {?>
								<?php echo human_time_diff(get_the_time('U', $rpost), current_time('timestamp')); ?>
						<?php } ?>
					<?php } else { ?>
							<?php echo human_time_diff(get_the_time('U', $post), current_time('timestamp')); ?>
					<?php } ?>
				</span>
			</h4>
			<div class="message-title"><?php echo esc_html($post->post_title); ?></div>
		</div>
	</a>
</li>