| 1 |
<?php |
| 2 |
/** |
| 3 |
* This template displays the Friends Log. |
| 4 |
* |
| 5 |
* @package Friends |
| 6 |
*/ |
| 7 |
|
| 8 |
?> |
| 9 |
<style> |
| 10 |
del { |
| 11 |
background-color: #ffabaf; |
| 12 |
text-decoration: none; |
| 13 |
} |
| 14 |
|
| 15 |
ins { |
| 16 |
background-color: #68de7c; |
| 17 |
text-decoration: none; |
| 18 |
} |
| 19 |
</style> |
| 20 |
<table class="widefat"> |
| 21 |
<thead> |
| 22 |
<tr> |
| 23 |
<th><?php esc_html_e( 'Date', 'friends' ); ?></th> |
| 24 |
<th><?php esc_html_e( 'Message', 'friends' ); ?></th> |
| 25 |
<th><?php esc_html_e( 'User', 'friends' ); ?></th> |
| 26 |
</tr> |
| 27 |
</thead> |
| 28 |
<tbody> |
| 29 |
<?php |
| 30 |
foreach ( $args['logs'] as $log ) : |
| 31 |
?> |
| 32 |
<tr> |
| 33 |
<td><?php echo esc_html( $log->post_date ); ?></td> |
| 34 |
<td> |
| 35 |
<details> |
| 36 |
<summary><?php echo wp_kses_post( $log->post_title ); ?></summary> |
| 37 |
<pre> |
| 38 |
<?php |
| 39 |
echo wp_kses( |
| 40 |
str_replace( array( '<del>', '</del>', '<ins>', '</ins>' ), array( '<del>', '</del>', '<ins>', '</ins>' ), esc_html( $log->post_content ) ), |
| 41 |
array( |
| 42 |
'ins' => array(), |
| 43 |
'del' => array(), |
| 44 |
) |
| 45 |
); |
| 46 |
?> |
| 47 |
</pre> |
| 48 |
</details> |
| 49 |
</td> |
| 50 |
<td><?php echo esc_html( get_the_author_meta( 'display_name', $log->post_author ) ); ?></td> |
| 51 |
</tr> |
| 52 |
<?php endforeach; ?> |
| 53 |
</tbody> |
| 54 |
</table> |
| 55 |
|