PluginProbe
Front End PM / trunk
Front End PM vtrunk
trunk 1.1 1.2 1.3 10.1.1 10.1.2 10.1.3 10.1.4 10.1.5 10.1.6 10.1.7 10.2.1 11.1.1 11.2.1 11.2.2 11.2.3 11.3.1 11.3.3 11.3.4 11.3.5 11.3.6 11.3.7 11.3.8 11.3.9 11.4.1 All 58 releases
front-end-pm / templates / box-content.php

box-content.php in Front End PM trunk, at templates/box-content.php

57 lines 2.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 if ( ! defined( 'ABSPATH' ) ) {
3 exit; // Exit if accessed directly.
4 }
5 if ( $box_content->found_messages ) {
6 ?>
7 <div class="fep-cb-check-uncheck-all-div">
8 <label>
9 <input type="checkbox" class="fep-cb-check-uncheck-all" />
10 <?php esc_html_e( 'Check/Uncheck all', 'front-end-pm' ); ?>
11 </label>
12 </div>
13 <div id="fep-table" class="fep-table fep-odd-even">
14 <?php
15 while ( $box_content->have_messages() ) {
16 $box_content->the_message();
17 $row_class = array();
18 $row_class[] = 'fep-table-row';
19 $row_class[] = 'fep-table-row-' . fep_get_message_field( 'mgs_type' );
20 if( fep_is_read( true ) ){
21 $row_class[] = 'fep-table-row-read';
22 } else {
23 $row_class[] = 'fep-table-row-unread';
24 }
25
26 if ( 'announcement' === fep_get_message_field( 'mgs_type' ) ) :
27 ?>
28 <div id="fep-announcement-<?php echo fep_get_the_id(); ?>" class="<?php echo fep_sanitize_html_class( $row_class ); ?>">
29 <?php foreach ( FEP_Announcements::init()->get_table_columns() as $column => $display ) : ?>
30 <div class="fep-column fep-column-<?php echo esc_attr( $column ); ?>"><?php FEP_Announcements::init()->get_column_content( $column ); ?></div>
31 <?php endforeach; ?>
32 </div>
33 <?php elseif ( 'message' === fep_get_message_field( 'mgs_type' ) ) : ?>
34 <div id="fep-message-<?php echo fep_get_the_id(); ?>" class="<?php echo fep_sanitize_html_class( $row_class ); ?>">
35 <?php foreach ( Fep_Messages::init()->get_table_columns() as $column => $display ) : ?>
36 <div class="fep-column fep-column-<?php echo esc_attr( $column ); ?>"><?php Fep_Messages::init()->get_column_content( $column ); ?></div>
37 <?php endforeach; ?>
38 </div>
39 <?php endif; ?>
40 <?php
41 } //endwhile
42 ?>
43 </div>
44 <?php
45 echo fep_pagination_prev_next( $box_content->has_more_row );
46 } else {
47 if ( empty( $_GET['fep-filter'] ) || 'show-all' == $_GET['fep-filter'] ) {
48 ?>
49 <div class="fep-error"><?php echo sprintf( __( 'No %s found.', 'front-end-pm' ), ( isset( $_GET['fepaction'] ) && 'announcements' == $_GET['fepaction'] ) ? __('announcements', 'front-end-pm') : __('messages', 'front-end-pm') ); ?></div>
50 <?php
51 } else {
52 ?>
53 <div class="fep-error"><?php echo sprintf( __( 'No %s found. Try different filter.', 'front-end-pm' ), ( isset( $_GET['fepaction'] ) && 'announcements' == $_GET['fepaction'] ) ? __('announcements', 'front-end-pm') : __('messages', 'front-end-pm') ); ?></div>
54 <?php
55 }
56 }
57