Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion classes/controllers/FrmAppController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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' );
}

Expand Down
23 changes: 13 additions & 10 deletions classes/controllers/FrmFormsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand Down Expand Up @@ -3277,4 +3267,17 @@ 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() {
_deprecated_function( __METHOD__, 'x.x' );
include FrmAppHelper::plugin_path() . '/classes/views/frm-forms/add_form_style_options.php';
}
Comment on lines +3270 to +3282
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ 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.

}
2 changes: 1 addition & 1 deletion classes/controllers/FrmHooksController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
9 changes: 1 addition & 8 deletions classes/views/frm-forms/add_form_style_options.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,4 @@
if ( ! defined( 'ABSPATH' ) ) {
die( 'You are not allowed to call this page directly.' );
}
?>
<tr>
<td colspan="2">
<div class="frm_note_style" style="margin-top: 0;">
<?php esc_html_e( 'Page Turn Transitions setting was moved to the page break field settings in the form builder.', 'formidable' ); ?>
</div>
</td>
</tr>
_deprecated_file( esc_html( basename( __FILE__ ) ), 'x.x' );