Skip to content

enhance: organize turnstile settings#276

Open
sapayth wants to merge 3 commits intoweDevsOfficial:developfrom
sapayth:enhance/organize_turnstile_settings
Open

enhance: organize turnstile settings#276
sapayth wants to merge 3 commits intoweDevsOfficial:developfrom
sapayth:enhance/organize_turnstile_settings

Conversation

@sapayth
Copy link
Member

@sapayth sapayth commented Dec 29, 2025

related PRO PR: #260

  • Added new WordPress filter hooks in wedocs core plugin:
    • wedocs_general_settings_fields - for injecting fields into General Settings
    • wedocs_ai_settings_fields - for injecting fields into AI Settings

Summary by CodeRabbit

  • New Features

    • Added extensibility to AI and General Settings panels so external plugins can inject additional settings fields.
    • Added a "Legacy template toggle" control in General Settings.
  • Documentation

    • Added a documentation header to the GeneralSettings component.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 29, 2025

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1c95512 and 416daea.

📒 Files selected for processing (1)
  • src/components/Settings/GeneralSettings.js
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/components/Settings/GeneralSettings.js

Walkthrough

Adds WordPress filter-based extension points to two settings panels, calling wp.hooks.applyFilters to allow runtime injection of extra UI fields in AiSettings.js and GeneralSettings.js, passing current settings and setter functions as arguments.

Changes

Cohort / File(s) Summary
AI Settings
src/components/Settings/AiSettings.js
Inserts a wp.hooks.applyFilters('wedocs_ai_settings_fields', null, settingsData, aiSettingsData, setSettings) call at two points in the AI Settings UI to render externally provided fields. No other field logic or validation was changed.
General Settings
src/components/Settings/GeneralSettings.js
Adds a documentation header and a UI block labeled “Legacy template toggle”; injects wp.hooks.applyFilters('wedocs_general_settings_fields', null, settingsData, generalSettingsData, setSettings) to allow external field injection.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Suggested reviewers

  • iftakharul-islam

Poem

🐰 I nudged two forms with a gentle hook,
So fields can bloom without a single rook.
Settings stretch their ears to new designs,
Hopping in lines of injected signs. 🥕✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Title check ⚠️ Warning The title "enhance: organize turnstile settings" does not match the actual changes, which add WordPress filter hooks for injecting fields into General and AI Settings screens, not turnstile settings organization. Update the title to accurately reflect the main change, such as "enhance: add filter hooks for settings field injection" or "feat: introduce wedocs_general_settings_fields and wedocs_ai_settings_fields hooks".
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants