PluginProbe
wpForo Forum / 2.3.0
wpForo Forum v2.3.0
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 1.4.2 All 137 releases
wpforo / admin / pages / moderation.php

moderation.php in wpForo Forum 2.3.0, at admin/pages/moderation.php

62 lines 2.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 // Exit if accessed directly
3 if( ! defined( 'ABSPATH' ) ) exit;
4 if( ! WPF()->usergroup->can( 'aum' ) ) exit;
5 ?>
6
7 <div id="wpf-admin-wrap" class="wrap" style="margin-top: 0">
8 <?php wpforo_screen_option() ?>
9 <div id="icon-users" class="icon32"><br></div>
10 <h2 style="padding: 30px 0 0 0; line-height: 20px; margin-bottom: 15px;"><?php _e( 'Topic and Post Moderation', 'wpforo' ); ?></h2>
11 <?php WPF()->notice->show() ?>
12
13 <form method="get">
14 <input type="hidden" name="page" value="<?php echo wpforo_prefix_slug( 'moderations' ) ?>">
15 <?php WPF()->moderation->list_table->users_dropdown() ?>
16 <?php WPF()->moderation->list_table->status_dropdown() ?>
17 <?php WPF()->moderation->list_table->type_dropdown() ?>
18 <input type="submit" value="<?php _e( 'Filter', 'wpforo' ) ?>" class="button button-large">
19
20 <?php WPF()->moderation->list_table->search_box( 'Search Posts', 'wpf-post-search' ) ?>
21 </form>
22 <br>
23 <hr>
24 <?php
25 $unapproveds = WPF()->post->get_count( [ 'status' => 1 ] );
26 $approveds = WPF()->post->get_count( [ 'status' => 0 ] );
27 $uhref = admin_url( 'admin.php?page=' . wpforo_prefix_slug( 'moderations' ) . '&filter_by_status=1' );
28 $ahref = admin_url( 'admin.php?page=' . wpforo_prefix_slug( 'moderations' ) . '&filter_by_status=0' );
29 if( WPF()->moderation->list_table->get_filter_by_status_var() ) {
30 $uattr = ' class="current"';
31 $aattr = '';
32 } else {
33 $uattr = '';
34 $aattr = ' class="current"';
35 }
36
37 ?>
38 <ul class="subsubsub">
39 <li>
40 <a href="<?php echo $uhref ?>" <?php echo $uattr ?>>
41 <?php _e( 'Unapproved', 'wpforo' ); ?>
42 <span class="count">(<?php echo $unapproveds; ?>)</span>
43 </a> |
44 </li>
45 <li>
46 <a href="<?php echo $ahref ?>" <?php echo $aattr ?>>
47 <?php _e( 'Published', 'wpforo' ); ?>
48 <span class="count">(<?php echo $approveds; ?>)</span>
49 </a>
50 </li>
51 </ul>
52 <!-- Forms are NOT created automatically, so you need to wrap the table in one to use features like bulk actions -->
53 <form id="wpf-dashboard-moderation-page" method="GET">
54 <!-- For plugins, we also need to ensure that the form posts back to our current page -->
55 <input type="hidden" name="page" value="<?php echo wpforo_prefix_slug( 'moderations' ) ?>">
56 <input type="hidden" name="wpfaction" value="bulk_moderation">
57
58 <!-- Now we can render the completed list table -->
59 <?php WPF()->moderation->list_table->display() ?>
60 </form>
61 </div>
62