PluginProbe
Forumax – AI Powered Advanced Community Forum Plugin / 2.2.0
Forumax – AI Powered Advanced Community Forum Plugin v2.2.0
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 / widgets / widgets.php

widgets.php in Forumax – AI Powered Advanced Community Forum Plugin 2.2.0, at widgets/widgets.php

29 lines 913 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 // Require widget files
3 require plugin_dir_path(__FILE__) . '/forum-info/Forum_Information.php';
4 require plugin_dir_path(__FILE__) . '/Forumax_Topic_Info.php';
5 require plugin_dir_path(__FILE__) . '/Forumax_Forums_List.php';
6
7 // Register Widgets
8 add_action( 'widgets_init', function() {
9
10 // Register only Forumax-specific widgets
11 register_widget( 'Forumax\WpWidgets\Forumax_Forum_Information');
12 register_widget( 'Forumax\WpWidgets\Forumax_Topic_Info');
13
14
15 if ( class_exists('bbPress') ) {
16 unregister_widget( 'BBP_Forums_Widget' );
17
18 register_widget( 'Forumax\WpWidgets\Forumax_Forums_List');
19 }
20
21 // Enqueue widget styles
22 add_action('admin_enqueue_scripts', function($hook){
23 if ( $hook === 'widgets.php' ) {
24 wp_enqueue_style( 'forumax-wp-widget', FORUMAX_ASSETS . 'admin/css/wp-widget.css' );
25 }
26 });
27 }, 11 ); // Priority 20
28
29