PluginProbe
wpForo Forum / 3.1.6
wpForo Forum v3.1.6
3.1.6 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 All 138 releases
← All changes | admin/pages/ai-features.php +17 -0 3.0.73.1.6 View file →
@@ -17,8 +17,9 @@
17 17 require_once __DIR__ . '/tabs/ai-features-helpers.php';
18 18 require_once __DIR__ . '/tabs/ai-features-tab-overview.php';
19 19 require_once __DIR__ . '/tabs/ai-features-tab-rag-indexing.php';
20 20 require_once __DIR__ . '/tabs/ai-features-tab-wp-indexing.php';
21 +require_once __DIR__ . '/tabs/ai-features-tab-ai-tools.php';
21 22 require_once __DIR__ . '/tabs/ai-features-tab-ai-tasks.php';
22 23 require_once __DIR__ . '/tabs/ai-features-tab-analytics.php';
23 24 require_once __DIR__ . '/tabs/ai-features-tab-ai-logs.php';
24 25
@@ -41,8 +42,15 @@
41 42 wp_enqueue_style( 'wpforo-ai-wp-indexing', WPFORO_URL . '/admin/assets/css/ai-features-wp-indexing.css', [ 'wpforo-ai-features' ], WPFORO_VERSION );
42 43 wp_enqueue_script( 'wpforo-ai-wp-indexing', WPFORO_URL . '/admin/assets/js/ai-features-wp-indexing.js', [ 'jquery' ], WPFORO_VERSION, true );
43 44 }
44 45
46 +// File Indexing tab - load isolated scripts/styles and media library
47 +if ( $current_tab === 'ai_tools' ) {
48 + wp_enqueue_media();
49 + wp_enqueue_style( 'wpforo-ai-tools', WPFORO_URL . '/admin/assets/css/ai-features-tools.css', [ 'wpforo-ai-features' ], WPFORO_VERSION );
50 + wp_enqueue_script( 'wpforo-ai-tools', WPFORO_URL . '/admin/assets/js/ai-features-tools.js', [ 'jquery', 'wpforo-ai-features' ], WPFORO_VERSION, true );
51 +}
52 +
45 53 // Localize script with AJAX URL and nonce
46 54 wp_localize_script( 'wpforo-ai-features', 'wpforoAIAdmin', [
47 55 'ajaxUrl' => admin_url( 'admin-ajax.php' ),
48 56 'nonce' => wp_create_nonce( 'wpforo_ai_features_nonce' ),
@@ -162,8 +170,13 @@
162 170 if ( isset( WPF()->ai_client ) && WPF()->ai_client->is_feature_available( 'wordpress_content_indexing' ) ) {
163 171 $tabs['wp_indexing'] = __( 'WordPress Indexing', 'wpforo' );
164 172 }
165 173
174 + // File Indexing tab - only show if custom_knowledge feature is available (Business+ plan + cloud storage)
175 + if ( isset( WPF()->ai_client ) && WPF()->ai_client->is_feature_available( 'custom_knowledge' ) ) {
176 + $tabs['ai_tools'] = __( 'File Indexing', 'wpforo' );
177 + }
178 +
166 179 $tabs['ai_tasks'] = __( 'AI Tasks', 'wpforo' );
167 180 $tabs['analytics'] = __( 'AI Analytics', 'wpforo' );
168 181 $tabs['ai_logs'] = __( 'AI Logs', 'wpforo' );
169 182 }
@@ -237,8 +250,12 @@
237 250 break;
238 251
239 252 case 'wp_indexing':
240 253 wpforo_ai_render_wp_indexing_tab( $is_connected, $status );
254 + break;
255 +
256 + case 'ai_tools':
257 + wpforo_ai_render_ai_tools_tab( $is_connected, $status );
241 258 break;
242 259
243 260 case 'ai_tasks':
244 261 wpforo_ai_render_ai_tasks_tab( $is_connected, $status );