PluginProbe
Forumax – AI Powered Advanced Community Forum Plugin / 1.2.1
Forumax – AI Powered Advanced Community Forum Plugin v1.2.1
2.4.4 2.4.3 2.4.2 2.4.1 2.4.0 trunk 1.0.8 1.1.0 1.2.1 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 1.3.0 1.3.1 1.3.2 1.3.3 1.4.0 1.4.1 2.0.0 2.1.0 All 29 releases
bbp-core / includes / admin / menu / Approve_Topic.php

Approve_Topic.php in Forumax – AI Powered Advanced Community Forum Plugin 1.2.1, at includes/admin/menu/Approve_Topic.php

34 lines 784 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 namespace admin\menu;
3
4 defined( 'ABSPATH' ) || exit();
5
6 class Approve_Topic {
7 public function __construct() {
8 add_action( 'admin_init', [ $this, 'approve_spam_topic' ] );
9 add_action( 'admin_init', [ $this, 'approve_pending_reply' ] );
10 }
11
12 public function approve_spam_topic() {
13 $approval_request = $_GET['bbpc_approve_topic_id'] ?? false;
14
15 if ( $approval_request ) {
16 bbp_approve_topic( (int) $approval_request );
17 wp_safe_redirect( admin_url( 'admin.php?page=bbp-core' ) );
18 }
19 }
20
21 public function approve_pending_reply() {
22 $approval_request = $_GET['bbpc_approve_reply_id'] ?? false;
23
24 if ( $approval_request ) {
25 bbp_approve_reply( (int) $approval_request );
26 wp_safe_redirect( admin_url( 'admin.php?page=bbp-core' ) );
27 }
28 }
29 }
30
31 new Approve_Topic();
32
33
34