-
Notifications
You must be signed in to change notification settings - Fork 92
gpnf-sortable-entries.php: Fixed an issue with Sortable Entries snippet not working with Gravity Flow.
#1113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gpnf-sortable-entries.php: Fixed an issue with Sortable Entries snippet not working with Gravity Flow.
#1113
Conversation
…ppet not working with Gravity Flow.
WalkthroughThe update adds the WordPress Changes
Suggested reviewers
✨ Finishing Touches
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. 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 (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
gp-nested-forms/gpnf-sortable-entries.php (1)
287-287: Remove debug console.log statement.The
console.log(gpnf)statement appears to be debug code that should be removed for production use. This will prevent unnecessary console output in browsers.Apply this diff to remove the debug statement:
- console.log(gpnf)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
gp-nested-forms/gpnf-sortable-entries.php(1 hunks)
🔇 Additional comments (1)
gp-nested-forms/gpnf-sortable-entries.php (1)
185-189: LGTM! Hook addition follows existing pattern correctly.The addition of the
admin_footerhook is implemented correctly and follows the same conditional pattern as the existing hooks. This ensures the sortable entries script will run in the WordPress admin area, which is necessary for Gravity Flow integration.The conditional check
! has_action( 'wp_footer', array( $this, 'output_script' ) )appropriately prevents all hooks from being added multiple times.
Context
⛑️ Ticket(s): https://secure.helpscout.net/conversation/2918586555/82589
Summary
Sortable Entries snippet not working in context of Gravity Flow. The scripts were not fired on the admin side, we add that with
admin_footer. Also, since the code logic already have conditional guards checking foris_applicable_formetc, I can confirm that the script does not get run on other admin pages (or cause any conflicts or console errors etc).BEFORE:

Nested entries do not show up, and console errors.
AFTER:
https://www.loom.com/share/2f3639e609c0449c8e89285613fd55db