Deprecate more code#2140
Conversation
WalkthroughThe pull request introduces several modifications across multiple controller classes and a view file. Key changes include the removal of form style tab options in the Changes
Possibly related PRs
Suggested labels
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 (
|
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (4)
classes/controllers/FrmAppController.php(0 hunks)classes/controllers/FrmFormsController.php(1 hunks)classes/controllers/FrmHooksController.php(1 hunks)classes/views/frm-forms/add_form_style_options.php(1 hunks)
💤 Files with no reviewable changes (1)
- classes/controllers/FrmAppController.php
✅ Files skipped from review due to trivial changes (1)
- classes/views/frm-forms/add_form_style_options.php
🔇 Additional comments (2)
classes/controllers/FrmHooksController.php (2)
140-140: LGTM: Hook removal aligns with deprecation objectives.
The removal of the frm_add_form_style_tab_options hook from load_admin_hooks is consistent with the PR's goal to deprecate this functionality.
140-140: Verify impact on plugin integrations.
Since we're removing a public hook, let's verify if there are any plugin integrations that might be affected by this change.
|
|
||
| /** | ||
| * Education for premium features. | ||
| * | ||
| * @since 4.05 | ||
| * @deprecated x.x | ||
| * | ||
| * @return void | ||
| */ | ||
| public static function add_form_style_tab_options() { | ||
| _deprecated_function( __METHOD__, 'x.x' ); | ||
| include FrmAppHelper::plugin_path() . '/classes/views/frm-forms/add_form_style_options.php'; | ||
| } |
There was a problem hiding this comment.
🛠️ Refactor suggestion
Update the deprecation version number
The deprecation version is currently set to "x.x" which is a placeholder. This should be updated to reflect the actual version number where this method will be deprecated.
Additionally, consider adding a @see tag in the docblock to point users to the new recommended way of handling form styles.
- * @deprecated x.x
+ * @deprecated 6.0
+ * @see FrmStylesController::add_form_style_options() Use this method instead.Committable suggestion skipped: line range outside the PR's diff.
This
frm_add_form_style_tab_optionshook is now deprecated.This update stops calling
FrmFormsController::add_form_style_tab_optionson this hook.I also deprecated and cleared out the view file it renders.