[ SYSTEM ]: Linux wordpress 6.1.0-41-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.158-1 (2025-11-09) x86_64
[ SERVER ]: Apache/2.4.66 (Debian) | PHP: 8.2.30
[ USER ]: www-data | IP: 172.19.30.54
GEFORCE FILE MANAGER
/
var
/
www
/
html
/
wordpress
/
wp-content
/
plugins
/
suretriggers
/
src
/
Integrations
/
wpforo
/
actions
/
UPLOAD:
NAME
SIZE
QUICK PERMS
ACTIONS
📄 add-user-to-group.php
2,565 B
SET
[ EDIT ]
|
[ DEL ]
📄 set-user-reputation.php
2,702 B
SET
[ EDIT ]
|
[ DEL ]
📄 wf-delete-topic.php
2,013 B
SET
[ EDIT ]
|
[ DEL ]
DELETE SELECTED
[ CLOSE ]
EDIT: wf-delete-topic.php
<?php /** * WfDeleteTopic. * php version 5.6 * * @category WfDeleteTopic * @package SureTriggers * @author BSF <username@example.com> * @license https://www.gnu.org/licenses/gpl-3.0.html GPLv3 * @link https://www.brainstormforce.com/ * @since 1.0.0 */ namespace SureTriggers\Integrations\wpForo\Actions; use SureTriggers\Integrations\AutomateAction; use SureTriggers\Traits\SingletonLoader; use Exception; /** * WfDeleteTopic * * @category WfDeleteTopic * @package SureTriggers * @author BSF <username@example.com> * @license https://www.gnu.org/licenses/gpl-3.0.html GPLv3 * @link https://www.brainstormforce.com/ * @since 1.0.0 */ class WfDeleteTopic extends AutomateAction { /** * Integration type. * * @var string */ public $integration = 'wpForo'; /** * Action name. * * @var string */ public $action = 'wp_foro_delete_topic'; use SingletonLoader; /** * Register an action. * * @param array $actions actions. * @return array */ public function register( $actions ) { $actions[ $this->integration ][ $this->action ] = [ 'label' => __( 'Delete Topic', 'suretriggers' ), 'action' => $this->action, 'function' => [ $this, 'action_listener' ], ]; return $actions; } /** * Action listener. * * @param int $user_id user id. * @param int $automation_id automation_id. * @param array $fields template fields. * @param array $selected_options saved template data. * @throws Exception Exception. * * @return bool|array */ public function _action_listener( $user_id, $automation_id, $fields, $selected_options ) { $topic = $selected_options['topic_id']; if ( ! function_exists( 'WPF' ) ) { return false; } $topicid = WPF()->topic->delete( $topic, true, false ); if ( $topicid ) { return [ 'message' => 'Topic deleted successfully.' ]; } else { return [ 'status' => 'error', 'message' => 'Topic not deleted.', ]; } } } WfDeleteTopic::get_instance();