Fix hidden column reset when inbox count changes#2777
Conversation
Move badge addition after add_menu_page to maintain stable WordPress screen IDs which use sanitize_title($menu_title). Extract badge logic into separate add_menu_badge() method that modifies global $menu array directly instead of concatenating to menu name before registration.
…D conflicts
Stop concatenating unread inbox count to filter hook name which was causing WordPress screen ID mismatches. Use base sanitized menu name only in manage_{screen}_columns filter to maintain stable screen identification.
…n ID conflicts Stop concatenating unread inbox count to screen ID which was causing WordPress screen ID mismatches. Use base sanitized menu name only in remove_screen_options() and get_screen_id() to maintain stable screen identification.
…en ID conflicts Stop concatenating unread inbox count to screen ID which was causing WordPress screen ID mismatches. Use base sanitized menu name only in add_list_hooks() and remove_screen_options() to maintain stable screen identification.
Mark FrmEntriesHelper::get_visible_unread_inbox_count() as deprecated and return 0. Remove inbox count calculation logic that was causing WordPress screen ID conflicts by modifying menu names after registration.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthroughCentralizes admin menu badge logic into FrmAppController::add_menu_badge(), removes dynamic unread-count suffixes from hook/screen identifiers in dashboard, entries, and payments controllers, and deprecates FrmEntriesHelper::get_visible_unread_inbox_count() which now returns 0. ChangesMenu badge centralization and suffix removal
Sequence Diagram(s)(omitted) Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested labelsaction: needs qa Suggested reviewers
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
Crabcyborg
left a comment
There was a problem hiding this comment.
I think this should be good.
We'll likely lose some settings for people who were at a certain inbox number, but it's probably not worth any extra work trying to pull the last setting they had.
🚀
|
Actually, I'm going to hold it here. It looks like |
|
|
Overall Grade |
Security Reliability Complexity Hygiene |
Code Review Summary
| Analyzer | Status | Updated (UTC) | Details |
|---|---|---|---|
| PHP | Jun 3, 2026 3:57p.m. | Review ↗ | |
| JavaScript | Jun 3, 2026 3:57p.m. | Review ↗ |
Important
AI Review is run only on demand for your team. We're only showing results of static analysis review right now. To trigger AI Review, comment @deepsourcebot review on this thread.
Fixes https://github.com/Strategy11/formidable-pro/issues/5794
This PR fixes an issue where hidden column preferences reset when the inbox unread count changes.
Pro PR
Summary by CodeRabbit
Refactor
Deprecation