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
4 changes: 4 additions & 0 deletions classes/controllers/FrmFormsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -1413,6 +1413,10 @@ private static function get_settings_tabs( $values ) {
),
);

if ( ! has_action( 'frm_add_form_style_tab_options' ) && ! has_action( 'frm_add_form_button_options' ) ) {
unset( $sections['buttons'] );
}

foreach ( array( 'landing', 'chat', 'abandonment' ) as $feature ) {
if ( ! FrmAppHelper::show_new_feature( $feature ) ) {
unset( $sections[ $feature ] );
Expand Down
19 changes: 17 additions & 2 deletions classes/views/frm-forms/settings-buttons.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,20 @@
if ( ! defined( 'ABSPATH' ) ) {
die( 'You are not allowed to call this page directly.' );
}

// Do not deprecate if the Pro version still use these hooks.
$should_deprecate_hook = ! class_exists( 'FrmProDb' ) || version_compare( FrmProDb::$plug_version, '6.16.3' ) >= 0;
?>
<input type="hidden" name="options[custom_style]" value="<?php echo esc_attr( $values['custom_style'] ); ?>" />

<table class="form-table">
<?php do_action( 'frm_add_form_style_tab_options', $values ); ?>
<?php
if ( $should_deprecate_hook ) {
do_action_deprecated( 'frm_add_form_style_tab_options', array( $values ), '6.16.3' );
} else {
do_action( 'frm_add_form_style_tab_options', $values );
}
?>
<tr>
<td colspan="2">
<h3><?php esc_html_e( 'Buttons', 'formidable' ); ?></h3>
Expand All @@ -19,5 +28,11 @@
</div>
</td>
</tr>
<?php do_action( 'frm_add_form_button_options', $values ); ?>
<?php
if ( $should_deprecate_hook ) {
do_action_deprecated( 'frm_add_form_button_options', array( $values ), '6.16.3' );
} else {
do_action( 'frm_add_form_button_options', $values );
}
?>
</table>