PluginProbe
wpForo Forum / 3.1.6
wpForo Forum v3.1.6
3.1.6 3.1.5 3.1.4 3.1.2 3.1.1 3.1.0 3.0.9 3.0.8 3.0.7 trunk 1.0.0 1.0.1 1.0.2 1.1.0 1.1.1 1.1.2 1.2.0 1.3.0 1.3.1 1.4.0 1.4.1 1.4.10 1.4.11 1.4.12 1.4.13 All 138 releases
wpforo / themes / 2022 / recent-posts.php

recent-posts.php in wpForo Forum 3.1.6, at themes/2022/recent-posts.php

48 lines 2.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <div class="wpforo-recent-content wpfr-posts">
2 <?php if( ! empty( WPF()->current_object['posts'] ) ): ?>
3 <table style="width: 100%; border: 0; border-spacing: 0; border-collapse: collapse;">
4 <tr class="wpf-htr">
5 <td class="wpf-shead-title" colspan="3"><?php wpforo_phrase( 'Posts with their shortened content' ) ?></td>
6 </tr>
7 <?php foreach( WPF()->current_object['posts'] as $key => $post ) :
8 $member = wpforo_member( $post );
9 $forum = wpforo_forum( $post['forumid'] );
10 ?>
11 <tr class="wpf-ttr <?php wpforo_unread( $post['topicid'], 'post', true, $post['postid'] ); ?>">
12 <td class="wpf-spost-avatar">
13 <?php if( WPF()->usergroup->can( 'va' ) && wpforo_setting( 'profiles', 'avatars' ) ): ?>
14 <?php echo wpforo_user_avatar( $member, 40 ) ?>
15 <?php endif; ?>
16 </td>
17 <td class="wpf-spost-title">
18 <a href="<?php echo esc_url( WPF()->post->get_url( $post['postid'] ) ) ?>" class="wpf-spost-title-link"
19 title="<?php wpforo_phrase( 'View entire post' ) ?>"><?php echo esc_html( $post['title'] ) ?> &nbsp;<i class="fas fa-chevron-right" style="font-size:11px;"></i></a>
20 <p style="font-size:12px"><?php wpforo_member_link( $member, 'by' ); ?>, <?php wpforo_date( $post['created'] ); ?></p>
21 <div class="wpf-spost-forum">
22 <span class="wpf-spost-forum-label"><?php wpforo_phrase( 'Forum' ) ?></span>
23 <?php $forum_icon = ( isset( $forum['icon'] ) && $forum['icon'] ) ? $forum['icon'] : 'fas fa-comments'; ?>
24 <i class="<?php echo esc_attr( $forum_icon ) ?>" style="color: <?php echo esc_attr( $forum['color'] ) ?>"></i>
25 <a href="<?php echo $forum['url'] ?>"><?php echo esc_html( $forum['title'] ); ?></a>
26 </div>
27 </td>
28 </tr>
29 <?php if( apply_filters( 'wpforo_recent_posts_intro', true, $post ) ): ?>
30 <tr class="wpf-ptr">
31 <td class="wpf-spost-icon">&nbsp;</td>
32 <td colspan="2" class="wpf-stext">
33 <?php
34 $body = wpforo_content_filter( $post['body'], $post );
35 $body = preg_replace( '#\[attach][^\[\]]*\[/attach]#i', '', strip_tags( $body ) );
36 wpforo_text( $body, 200 );
37 ?>
38 </td>
39 </tr>
40 <?php endif; ?>
41 <?php do_action( 'wpforo_recent_loop_hook_posts', $key, $post ) ?>
42 <?php endforeach ?>
43 </table>
44 <?php else: ?>
45 <p class="wpf-p-error"><?php wpforo_phrase( 'No posts were found here' ) ?> </p>
46 <?php endif; ?>
47 </div>
48