Move hook to admin hooks#2172
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2172 +/- ##
============================================
+ Coverage 26.91% 26.97% +0.05%
+ Complexity 8213 8201 -12
============================================
Files 127 127
Lines 27240 27198 -42
============================================
+ Hits 7333 7338 +5
+ Misses 19907 19860 -47 ☔ View full report in Codecov by Sentry. |
WalkthroughThe changes involve a modification to the Changes
Sequence Diagram(s)sequenceDiagram
participant A as Admin
participant B as FrmHooksController
participant C as FrmFormsController
A->>B: Trigger load_admin_hooks
B->>B: Execute load_admin_hooks
B->>C: Call update_form_builder_fields
C-->>B: Return updated fields
B-->>A: Return to Admin
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🔇 Additional comments (1)classes/controllers/FrmHooksController.php (1)
The addition of the form builder fields filter to admin hooks is appropriate since the form builder is an admin-side feature. Let's verify the hook usage and parameters: ✅ Verification successful✓ Hook implementation and usage verified The filter hook is correctly implemented:
🏁 Scripts executedThe following scripts were executed for the analysis: Script: #!/bin/bash
# Description: Verify the hook implementation and usage
# 1. Check the method implementation
# 2. Check for any existing usage of this filter
# Check the method implementation to verify it expects 2 parameters
ast-grep --pattern 'function update_form_builder_fields($_,$_){$$$}'
# Check for existing usage of this filter
rg "apply_filters.*frm_fields_in_form_builder" -A 2
Length of output: 423 Script: #!/bin/bash
# Let's verify the method implementation in FrmFormsController
ast-grep --pattern 'class FrmFormsController {
$$$
static function update_form_builder_fields($_, $_) {
$$$
}
$$$
}'
Length of output: 130 Script: #!/bin/bash
# Let's try a different approach to find the method implementation
rg "function update_form_builder_fields" -A 5
Length of output: 475 Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
No description provided.