Completed
Push — master ( 2a3343...840e0c )
by Jamie
03:21
created
classes/widgets/FrmShowForm.php 2 patches
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -8,12 +8,12 @@  discard block
 block discarded – undo
8 8
 	}
9 9
 
10 10
 	public function widget( $args, $instance ) {
11
-        if ( empty($instance['title']) ) {
12
-            $title = FrmForm::getName( $instance['form'] );
13
-        } else {
14
-            $title = $instance['title'];
15
-        }
16
-        $title = apply_filters('widget_title', $title);
11
+		if ( empty($instance['title']) ) {
12
+			$title = FrmForm::getName( $instance['form'] );
13
+		} else {
14
+			$title = $instance['title'];
15
+		}
16
+		$title = apply_filters('widget_title', $title);
17 17
 
18 18
 		echo $args['before_widget'];
19 19
 
@@ -39,9 +39,9 @@  discard block
 block discarded – undo
39 39
 	}
40 40
 
41 41
 	public function form( $instance ) {
42
-	    //Defaults
42
+		//Defaults
43 43
 		$instance = wp_parse_args( (array) $instance, array(
44
-		    'title' => false, 'form' => false, 'description' => false,
44
+			'title' => false, 'form' => false, 'description' => false,
45 45
 		) );
46 46
 ?>
47 47
 	<p><label for="<?php echo esc_attr( $this->get_field_id('title') ); ?>"><?php _e( 'Title', 'formidable' ) ?>:</label><br/>
@@ -49,10 +49,10 @@  discard block
 block discarded – undo
49 49
 
50 50
 	<p><label for="<?php echo esc_attr( $this->get_field_id('form') ); ?>"><?php _e( 'Form', 'formidable' ) ?>:</label><br/>
51 51
 <?php
52
-	    FrmFormsHelper::forms_dropdown( $this->get_field_name('form'), $instance['form'], array(
53
-	        'blank' => false, 'field_id' => $this->get_field_id('form'),
54
-            'class' => 'widefat',
55
-	    ) );
52
+		FrmFormsHelper::forms_dropdown( $this->get_field_name('form'), $instance['form'], array(
53
+			'blank' => false, 'field_id' => $this->get_field_id('form'),
54
+			'class' => 'widefat',
55
+		) );
56 56
 ?>
57 57
 	</p>
58 58
 
Please login to merge, or discard this patch.
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -4,22 +4,22 @@  discard block
 block discarded – undo
4 4
 
5 5
 	public function __construct() {
6 6
 		$widget_ops = array( 'description' => __( 'Display a Formidable Form', 'formidable' ) );
7
-		parent::__construct('frm_show_form', __( 'Formidable Form', 'formidable' ), $widget_ops);
7
+		parent::__construct( 'frm_show_form', __( 'Formidable Form', 'formidable' ), $widget_ops );
8 8
 	}
9 9
 
10 10
 	public function widget( $args, $instance ) {
11
-        if ( empty($instance['title']) ) {
11
+        if ( empty( $instance['title'] ) ) {
12 12
             $title = FrmForm::getName( $instance['form'] );
13 13
         } else {
14 14
             $title = $instance['title'];
15 15
         }
16
-        $title = apply_filters('widget_title', $title);
16
+        $title = apply_filters( 'widget_title', $title );
17 17
 
18 18
 		echo $args['before_widget'];
19 19
 
20 20
 		echo '<div class="frm_form_widget">';
21 21
 		if ( $title ) {
22
-			echo $args['before_title'] . stripslashes($title) . $args['after_title'];
22
+			echo $args['before_title'] . stripslashes( $title ) . $args['after_title'];
23 23
 		}
24 24
 
25 25
 		$form_atts = array(
@@ -44,19 +44,19 @@  discard block
 block discarded – undo
44 44
 		    'title' => false, 'form' => false, 'description' => false,
45 45
 		) );
46 46
 ?>
47
-	<p><label for="<?php echo esc_attr( $this->get_field_id('title') ); ?>"><?php _e( 'Title', 'formidable' ) ?>:</label><br/>
48
-	<input type="text" class="widefat" id="<?php echo esc_attr( $this->get_field_id('title') ); ?>" name="<?php echo esc_attr( $this->get_field_name('title') ); ?>" value="<?php echo esc_attr( stripslashes($instance['title']) ); ?>" /></p>
47
+	<p><label for="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>"><?php _e( 'Title', 'formidable' ) ?>:</label><br/>
48
+	<input type="text" class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'title' ) ); ?>" value="<?php echo esc_attr( stripslashes( $instance['title'] ) ); ?>" /></p>
49 49
 
50
-	<p><label for="<?php echo esc_attr( $this->get_field_id('form') ); ?>"><?php _e( 'Form', 'formidable' ) ?>:</label><br/>
50
+	<p><label for="<?php echo esc_attr( $this->get_field_id( 'form' ) ); ?>"><?php _e( 'Form', 'formidable' ) ?>:</label><br/>
51 51
 <?php
52
-	    FrmFormsHelper::forms_dropdown( $this->get_field_name('form'), $instance['form'], array(
53
-	        'blank' => false, 'field_id' => $this->get_field_id('form'),
52
+	    FrmFormsHelper::forms_dropdown( $this->get_field_name( 'form' ), $instance['form'], array(
53
+	        'blank' => false, 'field_id' => $this->get_field_id( 'form' ),
54 54
             'class' => 'widefat',
55 55
 	    ) );
56 56
 ?>
57 57
 	</p>
58 58
 
59
-	<p><label for="<?php echo esc_attr( $this->get_field_id('description') ); ?>"><input class="checkbox" type="checkbox" <?php checked($instance['description'], true) ?> id="<?php echo esc_attr( $this->get_field_id('description') ); ?>" name="<?php echo esc_attr( $this->get_field_name('description') ); ?>" value="1" />
59
+	<p><label for="<?php echo esc_attr( $this->get_field_id( 'description' ) ); ?>"><input class="checkbox" type="checkbox" <?php checked( $instance['description'], true ) ?> id="<?php echo esc_attr( $this->get_field_id( 'description' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'description' ) ); ?>" value="1" />
60 60
 	<?php _e( 'Show Description', 'formidable' ) ?></label></p>
61 61
 <?php
62 62
 	}
Please login to merge, or discard this patch.