From 6a56a0bcab47890d44ad0cc72343475a86f8325e Mon Sep 17 00:00:00 2001 From: Mike Letellier Date: Tue, 26 Nov 2024 16:10:59 -0400 Subject: [PATCH 1/3] Deprecate more code --- classes/controllers/FrmFormsController.php | 22 ++++++++++--------- classes/controllers/FrmHooksController.php | 2 +- .../frm-forms/add_form_style_options.php | 9 +------- 3 files changed, 14 insertions(+), 19 deletions(-) diff --git a/classes/controllers/FrmFormsController.php b/classes/controllers/FrmFormsController.php index 0ed4a12326..21e1ccc330 100644 --- a/classes/controllers/FrmFormsController.php +++ b/classes/controllers/FrmFormsController.php @@ -1981,16 +1981,6 @@ public static function json_error( $errors ) { return $errors; } - /** - * Education for premium features. - * - * @since 4.05 - * @return void - */ - public static function add_form_style_tab_options() { - include FrmAppHelper::plugin_path() . '/classes/views/frm-forms/add_form_style_options.php'; - } - /** * Add education about views. * @@ -3277,4 +3267,16 @@ public static function create( $values = array() ) { _deprecated_function( __METHOD__, '4.0', 'FrmFormsController::update' ); self::update( $values ); } + + /** + * Education for premium features. + * + * @since 4.05 + * @deprecated x.x + * + * @return void + */ + public static function add_form_style_tab_options() { + include FrmAppHelper::plugin_path() . '/classes/views/frm-forms/add_form_style_options.php'; + } } diff --git a/classes/controllers/FrmHooksController.php b/classes/controllers/FrmHooksController.php index e04bb4aa81..f193723f05 100644 --- a/classes/controllers/FrmHooksController.php +++ b/classes/controllers/FrmHooksController.php @@ -136,8 +136,8 @@ public static function load_admin_hooks() { // Form Actions Controller. if ( FrmAppHelper::is_admin_page( 'formidable' ) ) { add_action( 'frm_before_update_form_settings', 'FrmFormActionsController::update_settings' ); - add_action( 'frm_add_form_style_tab_options', 'FrmFormsController::add_form_style_tab_options' ); } + add_action( 'frm_after_duplicate_form', 'FrmFormActionsController::duplicate_form_actions', 20, 3 ); // Forms Controller. diff --git a/classes/views/frm-forms/add_form_style_options.php b/classes/views/frm-forms/add_form_style_options.php index 547ad73828..83f9383ac9 100644 --- a/classes/views/frm-forms/add_form_style_options.php +++ b/classes/views/frm-forms/add_form_style_options.php @@ -2,11 +2,4 @@ if ( ! defined( 'ABSPATH' ) ) { die( 'You are not allowed to call this page directly.' ); } -?> - - -
- -
- - +_deprecated_file( esc_html( basename( __FILE__ ) ), 'x.x' ); From 3965e9ba8a541710729338ec437435e20c3a76bc Mon Sep 17 00:00:00 2001 From: Mike Letellier Date: Tue, 26 Nov 2024 16:12:17 -0400 Subject: [PATCH 2/3] Stop removing since it is removed --- classes/controllers/FrmAppController.php | 1 - 1 file changed, 1 deletion(-) diff --git a/classes/controllers/FrmAppController.php b/classes/controllers/FrmAppController.php index 8a90f1e9b2..c4a3eca9da 100644 --- a/classes/controllers/FrmAppController.php +++ b/classes/controllers/FrmAppController.php @@ -543,7 +543,6 @@ public static function info_overlay_html() { public static function remove_upsells() { remove_action( 'frm_before_settings', 'FrmSettingsController::license_box' ); remove_action( 'frm_after_settings', 'FrmSettingsController::settings_cta' ); - remove_action( 'frm_add_form_style_tab_options', 'FrmFormsController::add_form_style_tab_options' ); remove_action( 'frm_after_field_options', 'FrmFormsController::logic_tip' ); } From 6a83f282339bf9c4642e1a466604e84a7bb02f58 Mon Sep 17 00:00:00 2001 From: Mike Letellier Date: Tue, 26 Nov 2024 16:13:22 -0400 Subject: [PATCH 3/3] Also call deprecated function --- classes/controllers/FrmFormsController.php | 1 + 1 file changed, 1 insertion(+) diff --git a/classes/controllers/FrmFormsController.php b/classes/controllers/FrmFormsController.php index 21e1ccc330..63ae0f2343 100644 --- a/classes/controllers/FrmFormsController.php +++ b/classes/controllers/FrmFormsController.php @@ -3277,6 +3277,7 @@ public static function create( $values = array() ) { * @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'; } }