Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 21 additions & 6 deletions src/components/Settings/AiSettings.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,25 @@
/**
* AI Settings Component
*
*
* Centralized AI Control Settings panel for weDocs that allows admins to configure
* and manage API integrations with multiple AI providers.
*
*
* Available WordPress Filters:
*
*
* @filter wedocs_ai_provider_configs
* Allows customization of AI provider configurations including available models.
* Used in the settings UI to display provider options and model selections.
*
* @filter wedocs_ai_service_providers
*
* @filter wedocs_ai_service_providers
* Allows customization of AI service provider configurations for the AI service utility.
* Used for API calls and provider management in the backend.
*
*
* @filter wedocs_ai_settings_fields
* Allows injection of additional settings fields into the AI Settings panel.
* Receives: (fields, settingsData, aiSettingsData, setSettings)
* Return: JSX elements to render additional fields.
* @since 2.0.1
*
* @since 2.0.0
*/

Expand Down Expand Up @@ -558,6 +564,15 @@ const AiSettings = ({
</p>
</div>
</div>

{/* Additional fields injected via hook */}
{wp.hooks.applyFilters(
'wedocs_ai_settings_fields',
null,
settingsData,
aiSettingsData,
setSettings
)}
</div>
</div>
</div>
Expand Down
25 changes: 25 additions & 0 deletions src/components/Settings/GeneralSettings.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/**
* General Settings Component
*
* Provides the main settings panel for weDocs including documentation home,
* email feedback, searchbar, helpful feedback, comments, and printing options.
*
* Available WordPress Filters:
*
* @filter wedocs_general_settings_fields
* Allows injection of additional settings fields into the General Settings panel.
* Receives: (fields, settingsData, generalSettingsData, setSettings)
* Return: JSX elements to render additional fields.
*
* @since 2.0.1
*/

import { __ } from '@wordpress/i18n';
import Switcher from '../Switcher';
import { useEffect, useState } from '@wordpress/element';
Expand Down Expand Up @@ -362,6 +378,15 @@ const GeneralSettings = ( {
</div>
</div>
</div>

{/* Additional fields injected via hook */}
{wp.hooks.applyFilters(
'wedocs_general_settings_fields',
null,
settingsData,
generalSettingsData,
setSettings
)}
</div>
</div>
</div>
Expand Down