|
@@ -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
|
} |