wp-content/plugins/contact-form-7-multi-step-module/form-tags/module-back.php
/**
 * Handle the back form shortcode.
 */
Handle the back form shortcode.
Handle the back form shortcode .
function cf7msm_back_shortcode_handler( $tag ) {
	if (!class_exists('WPCF7_FormTag') || !function_exists('wpcf7_form_controls_class'))
		return;
	$tag = new WPCF7_FormTag( $tag );
	$class = wpcf7_form_controls_class( $tag->type );
	$atts = array();
	$atts['class'] = $tag->get_class_option( $class );
    $atts['id'] = $tag->get_id_option();
	$atts['tabindex'] = $tag->get_option( 'tabindex', 'int', true );
	$value = isset( $tag->values[0] ) ? $tag->values[0] : '';
	if ( empty( $value ) ) {
		if ( $tag->type == 'previous') {
			$value = esc_html( __( 'Previous', 'contact-form-7-multi-step-module' ) );
		}
		else {
			$value = esc_html( __( 'Back', 'contact-form-7-multi-step-module' ) );
		}
	}
	$atts['type'] = 'button';
	$atts['value'] = $value;
	$atts = wpcf7_format_atts( $atts );
	$html = sprintf( '<input %1$s />', $atts );
	return $html;
}
function cf7msm_back_shortcode_handler ( $ tag ) { if ( ! class_exists ( 'WPCF7_FormTag' ) || ! function_exists ( 'wpcf7_form_controls_class' ) ) return ; $ tag = new WPCF7_FormTag ( $ tag ) ; $ class = wpcf7_form_controls_class ( $ tag -> type ) ; $ atts = array ( ) ; $ atts [ 'class' ] = $ tag -> get_class_option ( $ class ) ; $ atts [ 'id' ] = $ tag -> get_id_option ( ) ; $ atts [ 'tabindex' ] = $ tag -> get_option ( 'tabindex' , 'int' , true ) ; $ value = isset ( $ tag -> values [ 0 ] ) ? $ tag -> values [ 0 ] : '' ; if ( empty ( $ value ) ) { if ( $ tag -> type == 'previous' ) { $ value = esc_html ( __ ( 'Previous' , 'contact-form-7-multi-step-module' ) ) ; } else { $ value = esc_html ( __ ( 'Back' , 'contact-form-7-multi-step-module' ) ) ; } } $ atts [ 'type' ] = 'button' ; $ atts [ 'value' ] = $ value ; $ atts = wpcf7_format_atts ( $ atts ) ; $ html = sprintf ( '<input %1$s />' , $ atts ) ; return $ html ; }
Handle the back form shortcode.
Handle the back form shortcode .
//using old version