Test Failed
Push — master ( 03d6f1...785694 )
by
unknown
03:01
created
modules/equal-housing/widgets/class-equal-housing-widget.php 1 patch
Spacing   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -18,9 +18,9 @@  discard block
 block discarded – undo
18 18
 
19 19
 		parent::__construct(
20 20
 			'equal_housing_logo',
21
-			__( 'Equal Housing Opportunity', 're-pro' ),
21
+			__('Equal Housing Opportunity', 're-pro'),
22 22
 			array(
23
-				'description' => __( 'Display the Equal Housing Opportunity Logo.', 're-pro' ),
23
+				'description' => __('Display the Equal Housing Opportunity Logo.', 're-pro'),
24 24
 				'classname'   => 're-pro re-pro-widget equal-housing',
25 25
 				'customize_selective_refresh' => true,
26 26
 			)
@@ -36,9 +36,9 @@  discard block
 block discarded – undo
36 36
 	 * @param mixed $instance Instance.
37 37
 	 * @return void
38 38
 	 */
39
-	public function widget( $args, $instance ) {
39
+	public function widget($args, $instance) {
40 40
 
41
-		if ( ! empty( $instance['title'] ) ) {
41
+		if ( ! empty($instance['title'])) {
42 42
 			$title = $instance['title'];
43 43
 		} else {
44 44
 			$title = '';
@@ -47,9 +47,9 @@  discard block
 block discarded – undo
47 47
 
48 48
 		echo $args['before_widget'];
49 49
 
50
-		echo $args['before_title'] . esc_attr( $title ) . $args['after_title'];
50
+		echo $args['before_title'] . esc_attr($title) . $args['after_title'];
51 51
 
52
-		echo '<img src="'. esc_url( plugins_url( '../../../assets/images/equalhousing/equal_housing.svg', __FILE__ ) ) .'" alt="'. __( 'Equal Housing Opportunity', 're-pro' ) .'" height="' . $logo_size . '" width="' . $logo_size . '" class="re-pro equal-housing-opportunity">';
52
+		echo '<img src="' . esc_url(plugins_url('../../../assets/images/equalhousing/equal_housing.svg', __FILE__)) . '" alt="' . __('Equal Housing Opportunity', 're-pro') . '" height="' . $logo_size . '" width="' . $logo_size . '" class="re-pro equal-housing-opportunity">';
53 53
 
54 54
 		echo $args['after_widget'];
55 55
 
@@ -62,38 +62,38 @@  discard block
 block discarded – undo
62 62
 	 * @param mixed $instance Instance.
63 63
 	 * @return void
64 64
 	 */
65
-	public function form( $instance ) {
65
+	public function form($instance) {
66 66
 
67 67
 		// Set default values
68
-		$instance = wp_parse_args( (array) $instance, array(
68
+		$instance = wp_parse_args((array) $instance, array(
69 69
 			'logo-size' => '32',
70 70
 			'title' => '',
71
-		) );
71
+		));
72 72
 
73 73
 		// Retrieve an existing value from the database
74
-		$title = ! empty( $instance['title'] ) ? $instance['title'] : '';
75
-		$logo_size = ! empty( $instance['logo_size'] ) ? $instance['logo_size'] : '';
74
+		$title = ! empty($instance['title']) ? $instance['title'] : '';
75
+		$logo_size = ! empty($instance['logo_size']) ? $instance['logo_size'] : '';
76 76
 
77 77
 		// Form fields
78 78
 		echo '<p>';
79
-		echo '	<label for="' . $this->get_field_id( 'title' ) . '" class="title-label">' . __( 'Tile', 're-pro' ) . '</label>';
80
-		echo '	<input id="' . $this->get_field_id( 'title' ) . '" name="' . $this->get_field_name( 'title' ) . '" value="' . $title  . '" class="widefat">';
79
+		echo '	<label for="' . $this->get_field_id('title') . '" class="title-label">' . __('Tile', 're-pro') . '</label>';
80
+		echo '	<input id="' . $this->get_field_id('title') . '" name="' . $this->get_field_name('title') . '" value="' . $title . '" class="widefat">';
81 81
 		echo '</p>';
82 82
 
83 83
 		echo '<p>';
84
-		echo '	<label for="' . $this->get_field_id( 'logo_size' ) . '" class="logo-size-label">' . __( 'Logo Size', 're-pro' ) . '</label>';
85
-		echo '	<select id="' . $this->get_field_id( 'logo_size' ) . '" name="' . $this->get_field_name( 'logo_size' ) . '" class="widefat">';
86
-		echo '		<option value="" ' . selected( $logo_size, '', false ) . '> ' . __( 'Choose', 're-pro' ) . '</option>';
87
-		echo '		<option value="512" ' . selected( $logo_size, '512', false ) . '> ' . __( '512px', 're-pro' ) . '</option>';
88
-		echo '		<option value="256" ' . selected( $logo_size, '256', false ) . '> ' . __( '256px', 're-pro' ) . '</option>';
89
-		echo '		<option value="128" ' . selected( $logo_size, '128', false ) . '> ' . __( '128px', 're-pro' ) . '</option>';
90
-		echo '		<option value="64" ' . selected( $logo_size, '64', false ) . '> ' . __( '64px', 're-pro' ) . '</option>';
91
-		echo '		<option value="32" ' . selected( $logo_size, '32', false ) . '> ' . __( '32px', 're-pro' ) . '</option>';
92
-		echo '		<option value="24" ' . selected( $logo_size, '24', false ) . '> ' . __( '24px', 're-pro' ) . '</option>';
93
-		echo '		<option value="16" ' . selected( $logo_size, '16', false ) . '> ' . __( '16px', 're-pro' ) . '</option>';
94
-		echo '		<option value="14" ' . selected( $logo_size, '14', false ) . '> ' . __( '14px', 're-pro' ) . '</option>';
84
+		echo '	<label for="' . $this->get_field_id('logo_size') . '" class="logo-size-label">' . __('Logo Size', 're-pro') . '</label>';
85
+		echo '	<select id="' . $this->get_field_id('logo_size') . '" name="' . $this->get_field_name('logo_size') . '" class="widefat">';
86
+		echo '		<option value="" ' . selected($logo_size, '', false) . '> ' . __('Choose', 're-pro') . '</option>';
87
+		echo '		<option value="512" ' . selected($logo_size, '512', false) . '> ' . __('512px', 're-pro') . '</option>';
88
+		echo '		<option value="256" ' . selected($logo_size, '256', false) . '> ' . __('256px', 're-pro') . '</option>';
89
+		echo '		<option value="128" ' . selected($logo_size, '128', false) . '> ' . __('128px', 're-pro') . '</option>';
90
+		echo '		<option value="64" ' . selected($logo_size, '64', false) . '> ' . __('64px', 're-pro') . '</option>';
91
+		echo '		<option value="32" ' . selected($logo_size, '32', false) . '> ' . __('32px', 're-pro') . '</option>';
92
+		echo '		<option value="24" ' . selected($logo_size, '24', false) . '> ' . __('24px', 're-pro') . '</option>';
93
+		echo '		<option value="16" ' . selected($logo_size, '16', false) . '> ' . __('16px', 're-pro') . '</option>';
94
+		echo '		<option value="14" ' . selected($logo_size, '14', false) . '> ' . __('14px', 're-pro') . '</option>';
95 95
 		echo '	</select>';
96
-		echo '	<span class="description">' . __( 'Choose the size of the logo you want to display.', 're-pro' ) . '</span>';
96
+		echo '	<span class="description">' . __('Choose the size of the logo you want to display.', 're-pro') . '</span>';
97 97
 		echo '</p>';
98 98
 
99 99
 	}
@@ -107,12 +107,12 @@  discard block
 block discarded – undo
107 107
 	 * @param mixed $old_instance Old Widget instance.
108 108
 	 * @return void
109 109
 	 */
110
-	public function update( $new_instance, $old_instance ) {
110
+	public function update($new_instance, $old_instance) {
111 111
 
112 112
 		$instance = $old_instance;
113 113
 
114
-		$instance['title'] = ! empty( $new_instance['title'] ) ? strip_tags( $new_instance['title'] ) : '';
115
-		$instance['logo_size'] = ! empty( $new_instance['logo_size'] ) ? strip_tags( $new_instance['logo_size'] ) : '';
114
+		$instance['title'] = ! empty($new_instance['title']) ? strip_tags($new_instance['title']) : '';
115
+		$instance['logo_size'] = ! empty($new_instance['logo_size']) ? strip_tags($new_instance['logo_size']) : '';
116 116
 
117 117
 		return $instance;
118 118
 
@@ -127,6 +127,6 @@  discard block
 block discarded – undo
127 127
  * @return void
128 128
  */
129 129
 function repro_register_widgets() {
130
-	register_widget( 'EqualHousingWidget' );
130
+	register_widget('EqualHousingWidget');
131 131
 }
132
-add_action( 'widgets_init', 'repro_register_widgets' );
132
+add_action('widgets_init', 'repro_register_widgets');
Please login to merge, or discard this patch.
modules/equal-housing/equal-housing.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 // Equal Housing Logo.
4
-include( 'widgets/class-equal-housing-widget.php' );
4
+include('widgets/class-equal-housing-widget.php');
Please login to merge, or discard this patch.
modules/homes-com/widgets/class-mortgage-calculator-widget.php 1 patch
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@  discard block
 block discarded – undo
6 6
  */
7 7
 
8 8
 	/* Exit if accessed directly. */
9
-if ( ! defined( 'ABSPATH' ) ) { exit; }
9
+if ( ! defined('ABSPATH')) { exit; }
10 10
 
11 11
 /**
12 12
  * HomesMortgageCalculatorWidget class.
@@ -25,9 +25,9 @@  discard block
 block discarded – undo
25 25
 
26 26
 		parent::__construct(
27 27
 			'homes_mortgage_calc',
28
-			__( 'Homes Mortgage Calculator', 're-pro' ),
28
+			__('Homes Mortgage Calculator', 're-pro'),
29 29
 			array(
30
-				'description' => __( 'Display a mortgage calculator from Homes.com', 're-pro' ),
30
+				'description' => __('Display a mortgage calculator from Homes.com', 're-pro'),
31 31
 				'classname'   => 're-pro re-pro-widget homes-widget homes-mortgage-calc',
32 32
 				'customize_selective_refresh' => true,
33 33
 			)
@@ -41,19 +41,19 @@  discard block
 block discarded – undo
41 41
 	 * @param mixed $args Arguments.
42 42
 	 * @param mixed $instance Instance.
43 43
 	 */
44
-	public function widget( $args, $instance ) {
44
+	public function widget($args, $instance) {
45 45
 
46
-		$iframe_id = ! empty( $args['widget_id'] ) ? $args['widget_id'] : '';
47
-		$title = ! empty( $instance['title'] ) ? $instance['title'] : '';
48
-		$color = ! empty( $instance['color'] ) ? $instance['color'] : '';
46
+		$iframe_id = ! empty($args['widget_id']) ? $args['widget_id'] : '';
47
+		$title = ! empty($instance['title']) ? $instance['title'] : '';
48
+		$color = ! empty($instance['color']) ? $instance['color'] : '';
49 49
 
50 50
 		echo $args['before_widget'];
51 51
 
52
-		echo $args['before_title'] . esc_attr( $title ) . $args['after_title'];
52
+		echo $args['before_title'] . esc_attr($title) . $args['after_title'];
53 53
 
54 54
 		$homes_widgets = new HomesWidgets();
55 55
 
56
-		$homes_widgets->get_mortgage_calc( $iframe_id, $color );
56
+		$homes_widgets->get_mortgage_calc($iframe_id, $color);
57 57
 
58 58
 		echo $args['after_widget'];
59 59
 	}
@@ -65,28 +65,28 @@  discard block
 block discarded – undo
65 65
 	 * @param mixed $instance Instance.
66 66
 	 * @return void
67 67
 	 */
68
-	public function form( $instance ) {
68
+	public function form($instance) {
69 69
 
70 70
 		// Set default values.
71
-		$instance = wp_parse_args( (array) $instance, array(
71
+		$instance = wp_parse_args((array) $instance, array(
72 72
 			'title' => '',
73 73
 			'color' => '0054a0',
74
-		) );
74
+		));
75 75
 
76 76
 		// Retrieve an existing value from the database.
77
-		$title = ! empty( $instance['title'] ) ? $instance['title'] : '';
78
-		$color = ! empty( $instance['color'] ) ? $instance['color'] : '';
77
+		$title = ! empty($instance['title']) ? $instance['title'] : '';
78
+		$color = ! empty($instance['color']) ? $instance['color'] : '';
79 79
 
80 80
 		// Title.
81 81
 		echo '<p>';
82
-		echo '	<label for="' . $this->get_field_id( 'title' ) . '" class="title-label">' . __( 'Tile:', 're-pro' ) . '</label>';
83
-		echo '	<input id="' . $this->get_field_id( 'title' ) . '" name="' . $this->get_field_name( 'title' ) . '" value="' . $title  . '" class="widefat">';
82
+		echo '	<label for="' . $this->get_field_id('title') . '" class="title-label">' . __('Tile:', 're-pro') . '</label>';
83
+		echo '	<input id="' . $this->get_field_id('title') . '" name="' . $this->get_field_name('title') . '" value="' . $title . '" class="widefat">';
84 84
 		echo '</p>';
85 85
 
86 86
 		// Color.
87 87
 		echo '<p>';
88
-		echo '	<label for="' . $this->get_field_id( 'color' ) . '" class="title-label">' . __( 'Color:', 're-pro' ) . '</label>';
89
-		echo '	<input id="' . $this->get_field_id( 'color' ) . '" name="' . $this->get_field_name( 'color' ) . '" value="' . $color  . '" class="widefat">';
88
+		echo '	<label for="' . $this->get_field_id('color') . '" class="title-label">' . __('Color:', 're-pro') . '</label>';
89
+		echo '	<input id="' . $this->get_field_id('color') . '" name="' . $this->get_field_name('color') . '" value="' . $color . '" class="widefat">';
90 90
 		echo '</p>';
91 91
 
92 92
 	}
@@ -99,12 +99,12 @@  discard block
 block discarded – undo
99 99
 	 * @param mixed $old_instance Old Instance.
100 100
 	 * @return $instance
101 101
 	 */
102
-	public function update( $new_instance, $old_instance ) {
102
+	public function update($new_instance, $old_instance) {
103 103
 
104 104
 		$instance = $old_instance;
105 105
 
106
-		$instance['title'] = ! empty( $new_instance['title'] ) ? strip_tags( $new_instance['title'] ) : '';
107
-		$instance['color'] = ! empty( $new_instance['color'] ) ? strip_tags( $new_instance['color'] ) : '';
106
+		$instance['title'] = ! empty($new_instance['title']) ? strip_tags($new_instance['title']) : '';
107
+		$instance['color'] = ! empty($new_instance['color']) ? strip_tags($new_instance['color']) : '';
108 108
 
109 109
 		return $instance;
110 110
 	}
@@ -117,8 +117,8 @@  discard block
 block discarded – undo
117 117
  * @return void
118 118
  */
119 119
 function repro_homes_com_mortgage_calc() {
120
-	if ( ! is_ssl() ) {
121
-		register_widget( 'HomesMortgageCalculatorWidget' );
120
+	if ( ! is_ssl()) {
121
+		register_widget('HomesMortgageCalculatorWidget');
122 122
 	}
123 123
 }
124
-add_action( 'widgets_init', 'repro_homes_com_mortgage_calc' );
124
+add_action('widgets_init', 'repro_homes_com_mortgage_calc');
Please login to merge, or discard this patch.
modules/homes-com/widgets/class-home-values-widget.php 1 patch
Spacing   +47 added lines, -47 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@  discard block
 block discarded – undo
6 6
  */
7 7
 
8 8
 	/* Exit if accessed directly. */
9
-if ( ! defined( 'ABSPATH' ) ) { exit; }
9
+if ( ! defined('ABSPATH')) { exit; }
10 10
 
11 11
 /**
12 12
  * HomesHomeValuesWidget class.
@@ -25,9 +25,9 @@  discard block
 block discarded – undo
25 25
 
26 26
 		parent::__construct(
27 27
 			'homes_home_values',
28
-			__( 'Homes Home Values', 're-pro' ),
28
+			__('Homes Home Values', 're-pro'),
29 29
 			array(
30
-				'description' => __( 'Display the average home value in a neighborhood from Homes.com', 're-pro' ),
30
+				'description' => __('Display the average home value in a neighborhood from Homes.com', 're-pro'),
31 31
 				'classname'   => 're-pro re-pro-widget homes-widget homes-home-values',
32 32
 				'customize_selective_refresh' => true,
33 33
 			)
@@ -41,23 +41,23 @@  discard block
 block discarded – undo
41 41
 	 * @param mixed $args Arguments.
42 42
 	 * @param mixed $instance Instance.
43 43
 	 */
44
-	public function widget( $args, $instance ) {
44
+	public function widget($args, $instance) {
45 45
 
46
-		$iframe_id = ! empty( $args['widget_id'] ) ? $args['widget_id'] : '';
47
-		$title = ! empty( $instance['title'] ) ? $instance['title'] : '';
48
-		$location = ! empty( $instance['location'] ) ? $instance['location'] : '';
49
-		$firstColor = ! empty( $instance['firstColor'] ) ? $instance['firstColor'] : '';
50
-		$secondColor = ! empty( $instance['secondColor'] ) ? $instance['secondColor'] : '';
51
-		$average = ! empty( $instance['average'] ) ? $instance['average'] : '';
52
-		$median = ! empty( $instance['median'] ) ? $instance['median'] : '';
46
+		$iframe_id = ! empty($args['widget_id']) ? $args['widget_id'] : '';
47
+		$title = ! empty($instance['title']) ? $instance['title'] : '';
48
+		$location = ! empty($instance['location']) ? $instance['location'] : '';
49
+		$firstColor = ! empty($instance['firstColor']) ? $instance['firstColor'] : '';
50
+		$secondColor = ! empty($instance['secondColor']) ? $instance['secondColor'] : '';
51
+		$average = ! empty($instance['average']) ? $instance['average'] : '';
52
+		$median = ! empty($instance['median']) ? $instance['median'] : '';
53 53
 
54 54
 		echo $args['before_widget'];
55 55
 
56
-		echo $args['before_title'] . esc_attr( $title ) . $args['after_title'];
56
+		echo $args['before_title'] . esc_attr($title) . $args['after_title'];
57 57
 
58 58
 		$homes_widgets = new HomesWidgets();
59 59
 
60
-		$homes_widgets->get_home_values( $iframe_id, $location, $firstColor, $secondColor, $average, $median );
60
+		$homes_widgets->get_home_values($iframe_id, $location, $firstColor, $secondColor, $average, $median);
61 61
 
62 62
 		echo $args['after_widget'];
63 63
 	}
@@ -69,64 +69,64 @@  discard block
 block discarded – undo
69 69
 	 * @param mixed $instance Instance.
70 70
 	 * @return void
71 71
 	 */
72
-	public function form( $instance ) {
72
+	public function form($instance) {
73 73
 
74 74
 		// Set default values.
75
-		$instance = wp_parse_args( (array) $instance, array(
75
+		$instance = wp_parse_args((array) $instance, array(
76 76
 			'title' => '',
77 77
 			'location' => '',
78 78
 			'firstColor' => '0054a0',
79 79
 			'secondColor' => 'f7841b',
80 80
 			'average' => 1,
81 81
 			'median' => 1,
82
-		) );
82
+		));
83 83
 
84 84
 		// Retrieve an existing value from the database.
85
-		$title = ! empty( $instance['title'] ) ? $instance['title'] : '';
86
-		$location = ! empty( $instance['location'] ) ? $instance['location'] : '';
87
-		$firstColor = ! empty( $instance['firstColor'] ) ? $instance['firstColor'] : '';
88
-		$secondColor = ! empty( $instance['secondColor'] ) ? $instance['secondColor'] : '';
89
-		$average = ! empty( $instance['average'] ) ? $instance['average'] : '';
90
-		$median = ! empty( $instance['median'] ) ? $instance['median'] : '';
91
-
92
-		if ( empty( $average ) && empty( $median ) ) {
85
+		$title = ! empty($instance['title']) ? $instance['title'] : '';
86
+		$location = ! empty($instance['location']) ? $instance['location'] : '';
87
+		$firstColor = ! empty($instance['firstColor']) ? $instance['firstColor'] : '';
88
+		$secondColor = ! empty($instance['secondColor']) ? $instance['secondColor'] : '';
89
+		$average = ! empty($instance['average']) ? $instance['average'] : '';
90
+		$median = ! empty($instance['median']) ? $instance['median'] : '';
91
+
92
+		if (empty($average) && empty($median)) {
93 93
 			$average = 1;
94 94
 			$median = 1;
95 95
 		}
96 96
 
97 97
 		// Title.
98 98
 		echo '<p>';
99
-		echo '	<label for="' . $this->get_field_id( 'title' ) . '" class="title-label">' . __( 'Tile:', 're-pro' ) . '</label>';
100
-		echo '	<input id="' . $this->get_field_id( 'title' ) . '" name="' . $this->get_field_name( 'title' ) . '" value="' . $title  . '" class="widefat">';
99
+		echo '	<label for="' . $this->get_field_id('title') . '" class="title-label">' . __('Tile:', 're-pro') . '</label>';
100
+		echo '	<input id="' . $this->get_field_id('title') . '" name="' . $this->get_field_name('title') . '" value="' . $title . '" class="widefat">';
101 101
 		echo '</p>';
102 102
 
103 103
 		// Location.
104 104
 		echo '<p>';
105
-		echo '	<label for="' . $this->get_field_id( 'location' ) . '" class="title-label">' . __( 'Location:', 're-pro' ) . '</label>';
106
-		echo '	<input id="' . $this->get_field_id( 'location' ) . '" name="' . $this->get_field_name( 'location' ) . '" value="' . $location . '" class="widefat">';
105
+		echo '	<label for="' . $this->get_field_id('location') . '" class="title-label">' . __('Location:', 're-pro') . '</label>';
106
+		echo '	<input id="' . $this->get_field_id('location') . '" name="' . $this->get_field_name('location') . '" value="' . $location . '" class="widefat">';
107 107
 		echo '</p>';
108 108
 
109 109
 		// Average Color.
110 110
 		echo '<p>';
111
-		echo '	<label for="' . $this->get_field_id( 'firstColor' ) . '" class="title-label">' . __( 'Color 1:', 're-pro' ) . '</label>';
112
-		echo '	<input id="' . $this->get_field_id( 'firstColor' ) . '" name="' . $this->get_field_name( 'firstColor' ) . '" value="' . $firstColor  . '" class="widefat">';
111
+		echo '	<label for="' . $this->get_field_id('firstColor') . '" class="title-label">' . __('Color 1:', 're-pro') . '</label>';
112
+		echo '	<input id="' . $this->get_field_id('firstColor') . '" name="' . $this->get_field_name('firstColor') . '" value="' . $firstColor . '" class="widefat">';
113 113
 		echo '</p>';
114 114
 
115 115
 		// Median Color.
116 116
 		echo '<p>';
117
-		echo '	<label for="' . $this->get_field_id( 'secondColor' ) . '" class="title-label">' . __( 'Color 2:', 're-pro' ) . '</label>';
118
-		echo '	<input id="' . $this->get_field_id( 'secondColor' ) . '" name="' . $this->get_field_name( 'secondColor' ) . '" value="' . $secondColor  . '" class="widefat">';
117
+		echo '	<label for="' . $this->get_field_id('secondColor') . '" class="title-label">' . __('Color 2:', 're-pro') . '</label>';
118
+		echo '	<input id="' . $this->get_field_id('secondColor') . '" name="' . $this->get_field_name('secondColor') . '" value="' . $secondColor . '" class="widefat">';
119 119
 		echo '</p>';
120 120
 
121 121
 		// Home Value Types.
122 122
 		echo '<p>';
123
-		echo '<label for="home-values-type" class="homes_value_type_label">' . __( 'Home Value Types:', 're-pro' ) . '</label>';
123
+		echo '<label for="home-values-type" class="homes_value_type_label">' . __('Home Value Types:', 're-pro') . '</label>';
124 124
 		echo '<br />';
125
-		echo '<input value="1" type="checkbox"' . checked( $average, 1, false ) . 'id="' . $this->get_field_id( 'average' ) . '" name="' . $this->get_field_name( 'average' )  . '" />';
126
-		echo '<label for="' . $this->get_field_id( 'average' ) . '">Average Home Value</label>';
125
+		echo '<input value="1" type="checkbox"' . checked($average, 1, false) . 'id="' . $this->get_field_id('average') . '" name="' . $this->get_field_name('average') . '" />';
126
+		echo '<label for="' . $this->get_field_id('average') . '">Average Home Value</label>';
127 127
 		echo '<br />';
128
-		echo '<input value="1" type="checkbox"' . checked( $median, 1, false ) . 'id="' . $this->get_field_id( 'median' ) . '" name="' . $this->get_field_name( 'median' ) . '" />';
129
-		echo '<label for="' . $this->get_field_id( 'median' ) . '">Median Home Value</label>';
128
+		echo '<input value="1" type="checkbox"' . checked($median, 1, false) . 'id="' . $this->get_field_id('median') . '" name="' . $this->get_field_name('median') . '" />';
129
+		echo '<label for="' . $this->get_field_id('median') . '">Median Home Value</label>';
130 130
 		echo '</p>';
131 131
 	}
132 132
 
@@ -138,16 +138,16 @@  discard block
 block discarded – undo
138 138
 	 * @param mixed $old_instance Old Instance.
139 139
 	 * @return $instance
140 140
 	 */
141
-	public function update( $new_instance, $old_instance ) {
141
+	public function update($new_instance, $old_instance) {
142 142
 
143 143
 		$instance = $old_instance;
144 144
 
145
-		$instance['title'] = ! empty( $new_instance['title'] ) ? strip_tags( $new_instance['title'] ) : '';
146
-		$instance['location'] = ! empty( $new_instance['location'] ) ? strip_tags( $new_instance['location'] ) : '';
147
-		$instance['firstColor'] = ! empty( $new_instance['firstColor'] ) ? strip_tags( $new_instance['firstColor'] ) : '';
148
-		$instance['secondColor'] = ! empty( $new_instance['secondColor'] ) ? strip_tags( $new_instance['secondColor'] ) : '';
149
-		$instance['average'] = ! empty( $new_instance['average'] ) ? strip_tags( $new_instance['average'] ) : '';
150
-		$instance['median'] = ! empty( $new_instance['median'] ) ? strip_tags( $new_instance['median'] ) : '';
145
+		$instance['title'] = ! empty($new_instance['title']) ? strip_tags($new_instance['title']) : '';
146
+		$instance['location'] = ! empty($new_instance['location']) ? strip_tags($new_instance['location']) : '';
147
+		$instance['firstColor'] = ! empty($new_instance['firstColor']) ? strip_tags($new_instance['firstColor']) : '';
148
+		$instance['secondColor'] = ! empty($new_instance['secondColor']) ? strip_tags($new_instance['secondColor']) : '';
149
+		$instance['average'] = ! empty($new_instance['average']) ? strip_tags($new_instance['average']) : '';
150
+		$instance['median'] = ! empty($new_instance['median']) ? strip_tags($new_instance['median']) : '';
151 151
 
152 152
 		return $instance;
153 153
 	}
@@ -160,8 +160,8 @@  discard block
 block discarded – undo
160 160
  * @return void
161 161
  */
162 162
 function repro_homes_com_home_values() {
163
-	if ( ! is_ssl() ) {
164
-		register_widget( 'HomesHomeValuesWidget' );
163
+	if ( ! is_ssl()) {
164
+		register_widget('HomesHomeValuesWidget');
165 165
 	}
166 166
 }
167
-add_action( 'widgets_init', 'repro_homes_com_home_values' );
167
+add_action('widgets_init', 'repro_homes_com_home_values');
Please login to merge, or discard this patch.
modules/homes-com/widgets/class-commute-time-widget.php 1 patch
Spacing   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@  discard block
 block discarded – undo
6 6
  */
7 7
 
8 8
 	/* Exit if accessed directly. */
9
-if ( ! defined( 'ABSPATH' ) ) { exit; }
9
+if ( ! defined('ABSPATH')) { exit; }
10 10
 
11 11
 /**
12 12
  * HomesCommuteTimeWidget class.
@@ -25,9 +25,9 @@  discard block
 block discarded – undo
25 25
 
26 26
 		parent::__construct(
27 27
 			'homes_commute_time',
28
-			__( 'Homes Commute Time', 're-pro' ),
28
+			__('Homes Commute Time', 're-pro'),
29 29
 			array(
30
-				'description' => __( 'Display a form that checks the commute time from Homes.com', 're-pro' ),
30
+				'description' => __('Display a form that checks the commute time from Homes.com', 're-pro'),
31 31
 				'classname'   => 're-pro re-pro-widget homes-widget homes-commute-time',
32 32
 				'customize_selective_refresh' => true,
33 33
 			)
@@ -41,20 +41,20 @@  discard block
 block discarded – undo
41 41
 	 * @param mixed $args Arguments.
42 42
 	 * @param mixed $instance Instance.
43 43
 	 */
44
-	public function widget( $args, $instance ) {
44
+	public function widget($args, $instance) {
45 45
 
46
-		$iframe_id = ! empty( $args['widget_id'] ) ? $args['widget_id'] : '';
47
-		$title = ! empty( $instance['title'] ) ? $instance['title'] : '';
48
-		$addr = ! empty( $instance['addr'] ) ? $instance['addr'] : '';
49
-		$color = ! empty( $instance['color'] ) ? $instance['color'] : '';
46
+		$iframe_id = ! empty($args['widget_id']) ? $args['widget_id'] : '';
47
+		$title = ! empty($instance['title']) ? $instance['title'] : '';
48
+		$addr = ! empty($instance['addr']) ? $instance['addr'] : '';
49
+		$color = ! empty($instance['color']) ? $instance['color'] : '';
50 50
 
51 51
 		echo $args['before_widget'];
52 52
 
53
-		echo $args['before_title'] . esc_attr( $title ) . $args['after_title'];
53
+		echo $args['before_title'] . esc_attr($title) . $args['after_title'];
54 54
 
55 55
 		$homes_widgets = new HomesWidgets();
56 56
 
57
-		$homes_widgets->get_commute_time_widget( $iframe_id, $addr, $color );
57
+		$homes_widgets->get_commute_time_widget($iframe_id, $addr, $color);
58 58
 
59 59
 		echo $args['after_widget'];
60 60
 	}
@@ -66,36 +66,36 @@  discard block
 block discarded – undo
66 66
 	 * @param mixed $instance Instance.
67 67
 	 * @return void
68 68
 	 */
69
-	public function form( $instance ) {
69
+	public function form($instance) {
70 70
 
71 71
 		// Set default values.
72
-		$instance = wp_parse_args( (array) $instance, array(
72
+		$instance = wp_parse_args((array) $instance, array(
73 73
 			'title' => '',
74 74
 			'addr' => '',
75 75
 			'color' => '0054a0',
76
-		) );
76
+		));
77 77
 
78 78
 		// Retrieve an existing value from the database.
79
-		$title = ! empty( $instance['title'] ) ? $instance['title'] : '';
80
-		$addr = ! empty( $instance['addr'] ) ? $instance['addr'] : '';
81
-		$color = ! empty( $instance['color'] ) ? $instance['color'] : '';
79
+		$title = ! empty($instance['title']) ? $instance['title'] : '';
80
+		$addr = ! empty($instance['addr']) ? $instance['addr'] : '';
81
+		$color = ! empty($instance['color']) ? $instance['color'] : '';
82 82
 
83 83
 		// Title.
84 84
 		echo '<p>';
85
-		echo '	<label for="' . $this->get_field_id( 'title' ) . '" class="title-label">' . __( 'Tile:', 're-pro' ) . '</label>';
86
-		echo '	<input id="' . $this->get_field_id( 'title' ) . '" name="' . $this->get_field_name( 'title' ) . '" value="' . $title  . '" class="widefat">';
85
+		echo '	<label for="' . $this->get_field_id('title') . '" class="title-label">' . __('Tile:', 're-pro') . '</label>';
86
+		echo '	<input id="' . $this->get_field_id('title') . '" name="' . $this->get_field_name('title') . '" value="' . $title . '" class="widefat">';
87 87
 		echo '</p>';
88 88
 
89 89
 		// Street Address.
90 90
 		echo '<p>';
91
-		echo '	<label for="' . $this->get_field_id( 'addr' ) . '" class="title-label">' . __( 'Default Start Address:', 're-pro' ) . '</label>';
92
-		echo '	<input id="' . $this->get_field_id( 'addr' ) . '" name="' . $this->get_field_name( 'addr' ) . '" value="' . $addr  . '" class="widefat">';
91
+		echo '	<label for="' . $this->get_field_id('addr') . '" class="title-label">' . __('Default Start Address:', 're-pro') . '</label>';
92
+		echo '	<input id="' . $this->get_field_id('addr') . '" name="' . $this->get_field_name('addr') . '" value="' . $addr . '" class="widefat">';
93 93
 		echo '</p>';
94 94
 
95 95
 		// Button Color
96 96
 		echo '<p>';
97
-		echo '	<label for="' . $this->get_field_id( 'color' ) . '" class="title-label">' . __( 'Button Color:', 're-pro' ) . '</label>';
98
-		echo '	<input id="' . $this->get_field_id( 'color' ) . '" name="' . $this->get_field_name( 'color' ) . '" value="' . $color  . '" class="widefat">';
97
+		echo '	<label for="' . $this->get_field_id('color') . '" class="title-label">' . __('Button Color:', 're-pro') . '</label>';
98
+		echo '	<input id="' . $this->get_field_id('color') . '" name="' . $this->get_field_name('color') . '" value="' . $color . '" class="widefat">';
99 99
 		echo '</p>';
100 100
 
101 101
 	}
@@ -108,13 +108,13 @@  discard block
 block discarded – undo
108 108
 	 * @param mixed $old_instance Old Instance.
109 109
 	 * @return $instance
110 110
 	 */
111
-	public function update( $new_instance, $old_instance ) {
111
+	public function update($new_instance, $old_instance) {
112 112
 
113 113
 		$instance = $old_instance;
114 114
 
115
-		$instance['title'] = ! empty( $new_instance['title'] ) ? strip_tags( $new_instance['title'] ) : '';
116
-		$instance['addr'] = ! empty( $new_instance['addr'] ) ? strip_tags( $new_instance['addr'] ) : '';
117
-		$instance['color'] = ! empty( $new_instance['color'] ) ? strip_tags( $new_instance['color'] ) : '';
115
+		$instance['title'] = ! empty($new_instance['title']) ? strip_tags($new_instance['title']) : '';
116
+		$instance['addr'] = ! empty($new_instance['addr']) ? strip_tags($new_instance['addr']) : '';
117
+		$instance['color'] = ! empty($new_instance['color']) ? strip_tags($new_instance['color']) : '';
118 118
 
119 119
 		return $instance;
120 120
 	}
@@ -127,8 +127,8 @@  discard block
 block discarded – undo
127 127
  * @return void
128 128
  */
129 129
 function repro_homes_com_commute_widget() {
130
-	if ( ! is_ssl() ) {
131
-		register_widget( 'HomesCommuteTimeWidget' );
130
+	if ( ! is_ssl()) {
131
+		register_widget('HomesCommuteTimeWidget');
132 132
 	}
133 133
 }
134
-add_action( 'widgets_init', 'repro_homes_com_commute_widget' );
134
+add_action('widgets_init', 'repro_homes_com_commute_widget');
Please login to merge, or discard this patch.
modules/homes-com/widgets/class-search-widget.php 1 patch
Spacing   +40 added lines, -40 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@  discard block
 block discarded – undo
6 6
  */
7 7
 
8 8
 	/* Exit if accessed directly. */
9
-if ( ! defined( 'ABSPATH' ) ) { exit; }
9
+if ( ! defined('ABSPATH')) { exit; }
10 10
 
11 11
 /**
12 12
  * HomesSearchWidget class.
@@ -25,9 +25,9 @@  discard block
 block discarded – undo
25 25
 
26 26
 		parent::__construct(
27 27
 			'homes_search',
28
-			__( 'Homes Search', 're-pro' ),
28
+			__('Homes Search', 're-pro'),
29 29
 			array(
30
-				'description' => __( 'Display a search box from Homes.com', 're-pro' ),
30
+				'description' => __('Display a search box from Homes.com', 're-pro'),
31 31
 				'classname'   => 're-pro re-pro-widget homes-widget homes-search',
32 32
 				'customize_selective_refresh' => true,
33 33
 			)
@@ -41,22 +41,22 @@  discard block
 block discarded – undo
41 41
 	 * @param mixed $args Arguments.
42 42
 	 * @param mixed $instance Instance.
43 43
 	 */
44
-	public function widget( $args, $instance ) {
44
+	public function widget($args, $instance) {
45 45
 
46
-		$iframe_id = ! empty( $args['widget_id'] ) ? $args['widget_id'] : '';
47
-		$title = ! empty( $instance['title'] ) ? $instance['title'] : '';
48
-		$location = ! empty( $instance['location'] ) ? $instance['location'] : '';
49
-		$color = ! empty( $instance['color'] ) ? $instance['color'] : '';
50
-		$sale = ! empty( $instance['sale'] ) ? $instance['sale'] : '';
51
-		$rent = ! empty( $instance['rent'] ) ? $instance['rent'] : '';
46
+		$iframe_id = ! empty($args['widget_id']) ? $args['widget_id'] : '';
47
+		$title = ! empty($instance['title']) ? $instance['title'] : '';
48
+		$location = ! empty($instance['location']) ? $instance['location'] : '';
49
+		$color = ! empty($instance['color']) ? $instance['color'] : '';
50
+		$sale = ! empty($instance['sale']) ? $instance['sale'] : '';
51
+		$rent = ! empty($instance['rent']) ? $instance['rent'] : '';
52 52
 
53 53
 		echo $args['before_widget'];
54 54
 
55
-		echo $args['before_title'] . esc_attr( $title ) . $args['after_title'];
55
+		echo $args['before_title'] . esc_attr($title) . $args['after_title'];
56 56
 
57 57
 		$homes_widgets = new HomesWidgets();
58 58
 
59
-		$homes_widgets->get_search( $iframe_id, $location, $color, $sale, $rent );
59
+		$homes_widgets->get_search($iframe_id, $location, $color, $sale, $rent);
60 60
 
61 61
 		echo $args['after_widget'];
62 62
 	}
@@ -68,51 +68,51 @@  discard block
 block discarded – undo
68 68
 	 * @param mixed $instance Instance.
69 69
 	 * @return void
70 70
 	 */
71
-	public function form( $instance ) {
71
+	public function form($instance) {
72 72
 
73 73
 		// Set default values.
74
-		$instance = wp_parse_args( (array) $instance, array(
74
+		$instance = wp_parse_args((array) $instance, array(
75 75
 			'title' => '',
76 76
 			'location' => '',
77 77
 			'color' => '0054a0',
78 78
 			'sale' => 1,
79 79
 			'rent' => 1,
80
-		) );
80
+		));
81 81
 
82 82
 		// Retrieve an existing value from the database.
83
-		$title = ! empty( $instance['title'] ) ? $instance['title'] : '';
84
-		$location = ! empty( $instance['location'] ) ? $instance['location'] : '';
85
-		$color = ! empty( $instance['color'] ) ? $instance['color'] : '';
86
-		$sale = ! empty( $instance['sale'] ) ? $instance['sale'] : '';
87
-		$rent = ! empty( $instance['rent'] ) ? $instance['rent'] : '';
83
+		$title = ! empty($instance['title']) ? $instance['title'] : '';
84
+		$location = ! empty($instance['location']) ? $instance['location'] : '';
85
+		$color = ! empty($instance['color']) ? $instance['color'] : '';
86
+		$sale = ! empty($instance['sale']) ? $instance['sale'] : '';
87
+		$rent = ! empty($instance['rent']) ? $instance['rent'] : '';
88 88
 
89 89
 		// Title.
90 90
 		echo '<p>';
91
-		echo '	<label for="' . $this->get_field_id( 'title' ) . '" class="title-label">' . __( 'Tile:', 're-pro' ) . '</label>';
92
-		echo '	<input id="' . $this->get_field_id( 'title' ) . '" name="' . $this->get_field_name( 'title' ) . '" value="' . $title  . '" class="widefat">';
91
+		echo '	<label for="' . $this->get_field_id('title') . '" class="title-label">' . __('Tile:', 're-pro') . '</label>';
92
+		echo '	<input id="' . $this->get_field_id('title') . '" name="' . $this->get_field_name('title') . '" value="' . $title . '" class="widefat">';
93 93
 		echo '</p>';
94 94
 
95 95
 		// Location.
96 96
 		echo '<p>';
97
-		echo '	<label for="' . $this->get_field_id( 'location' ) . '" class="title-label">' . __( 'Location:', 're-pro' ) . '</label>';
98
-		echo '	<input id="' . $this->get_field_id( 'location' ) . '" name="' . $this->get_field_name( 'location' ) . '" value="' . $location . '" class="widefat">';
97
+		echo '	<label for="' . $this->get_field_id('location') . '" class="title-label">' . __('Location:', 're-pro') . '</label>';
98
+		echo '	<input id="' . $this->get_field_id('location') . '" name="' . $this->get_field_name('location') . '" value="' . $location . '" class="widefat">';
99 99
 		echo '</p>';
100 100
 
101 101
 		// Color.
102 102
 		echo '<p>';
103
-		echo '	<label for="' . $this->get_field_id( 'color' ) . '" class="title-label">' . __( 'Color:', 're-pro' ) . '</label>';
104
-		echo '	<input id="' . $this->get_field_id( 'color' ) . '" name="' . $this->get_field_name( 'color' ) . '" value="' . $color  . '" class="widefat">';
103
+		echo '	<label for="' . $this->get_field_id('color') . '" class="title-label">' . __('Color:', 're-pro') . '</label>';
104
+		echo '	<input id="' . $this->get_field_id('color') . '" name="' . $this->get_field_name('color') . '" value="' . $color . '" class="widefat">';
105 105
 		echo '</p>';
106 106
 
107 107
 		// Search Types.
108 108
 		echo '<p>';
109
-		echo '<label for="search-type" class="search_type_label">' . __( 'Search Types:', 're-pro' ) . '</label>';
109
+		echo '<label for="search-type" class="search_type_label">' . __('Search Types:', 're-pro') . '</label>';
110 110
 		echo '<br />';
111
-		echo '<input value="1" type="checkbox"' . checked( $sale, 1, false ) . 'id="' . $this->get_field_id( 'sale' ) . '" name="' . $this->get_field_name( 'sale' )  . '" />';
112
-		echo '<label for="' . $this->get_field_id( 'sale' ) . '">For Sale</label>';
111
+		echo '<input value="1" type="checkbox"' . checked($sale, 1, false) . 'id="' . $this->get_field_id('sale') . '" name="' . $this->get_field_name('sale') . '" />';
112
+		echo '<label for="' . $this->get_field_id('sale') . '">For Sale</label>';
113 113
 		echo '<br />';
114
-		echo '<input value="1" type="checkbox"' . checked( $rent, 1, false ) . 'id="' . $this->get_field_id( 'rent' ) . '" name="' . $this->get_field_name( 'rent' ) . '" />';
115
-		echo '<label for="' . $this->get_field_id( 'rent' ) . '">For Rent</label>';
114
+		echo '<input value="1" type="checkbox"' . checked($rent, 1, false) . 'id="' . $this->get_field_id('rent') . '" name="' . $this->get_field_name('rent') . '" />';
115
+		echo '<label for="' . $this->get_field_id('rent') . '">For Rent</label>';
116 116
 		echo '</p>';
117 117
 	}
118 118
 
@@ -124,15 +124,15 @@  discard block
 block discarded – undo
124 124
 	 * @param mixed $old_instance Old Instance.
125 125
 	 * @return $instance
126 126
 	 */
127
-	public function update( $new_instance, $old_instance ) {
127
+	public function update($new_instance, $old_instance) {
128 128
 
129 129
 		$instance = $old_instance;
130 130
 
131
-		$instance['title'] = ! empty( $new_instance['title'] ) ? strip_tags( $new_instance['title'] ) : '';
132
-		$instance['location'] = ! empty( $new_instance['location'] ) ? strip_tags( $new_instance['location'] ) : '';
133
-		$instance['color'] = ! empty( $new_instance['color'] ) ? strip_tags( $new_instance['color'] ) : '';
134
-		$instance['sale'] = ! empty( $new_instance['sale'] ) ? strip_tags( $new_instance['sale'] ) : '';
135
-		$instance['rent'] = ! empty( $new_instance['rent'] ) ? strip_tags( $new_instance['rent'] ) : '';
131
+		$instance['title'] = ! empty($new_instance['title']) ? strip_tags($new_instance['title']) : '';
132
+		$instance['location'] = ! empty($new_instance['location']) ? strip_tags($new_instance['location']) : '';
133
+		$instance['color'] = ! empty($new_instance['color']) ? strip_tags($new_instance['color']) : '';
134
+		$instance['sale'] = ! empty($new_instance['sale']) ? strip_tags($new_instance['sale']) : '';
135
+		$instance['rent'] = ! empty($new_instance['rent']) ? strip_tags($new_instance['rent']) : '';
136 136
 
137 137
 		return $instance;
138 138
 	}
@@ -145,8 +145,8 @@  discard block
 block discarded – undo
145 145
  * @return void
146 146
  */
147 147
 function repro_homes_com_search() {
148
-	if ( ! is_ssl() ) {
149
-		register_widget( 'HomesSearchWidget' );
148
+	if ( ! is_ssl()) {
149
+		register_widget('HomesSearchWidget');
150 150
 	}
151 151
 }
152
-add_action( 'widgets_init', 'repro_homes_com_search' );
152
+add_action('widgets_init', 'repro_homes_com_search');
Please login to merge, or discard this patch.
modules/homes-com/widgets/class-simple-search-widget.php 1 patch
Spacing   +40 added lines, -40 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@  discard block
 block discarded – undo
6 6
  */
7 7
 
8 8
 	/* Exit if accessed directly. */
9
-if ( ! defined( 'ABSPATH' ) ) { exit; }
9
+if ( ! defined('ABSPATH')) { exit; }
10 10
 
11 11
 /**
12 12
  * HomesSimpleSearchWidget class.
@@ -25,9 +25,9 @@  discard block
 block discarded – undo
25 25
 
26 26
 		parent::__construct(
27 27
 			'homes_simple_search',
28
-			__( 'Homes Real Estate Search', 're-pro' ),
28
+			__('Homes Real Estate Search', 're-pro'),
29 29
 			array(
30
-				'description' => __( 'Display a simple search box from Homes.com', 're-pro' ),
30
+				'description' => __('Display a simple search box from Homes.com', 're-pro'),
31 31
 				'classname'   => 're-pro re-pro-widget homes-widget homes-simple-search',
32 32
 				'customize_selective_refresh' => true,
33 33
 			)
@@ -41,22 +41,22 @@  discard block
 block discarded – undo
41 41
 	 * @param mixed $args Arguments.
42 42
 	 * @param mixed $instance Instance.
43 43
 	 */
44
-	public function widget( $args, $instance ) {
44
+	public function widget($args, $instance) {
45 45
 
46
-		$iframe_id = ! empty( $args['widget_id'] ) ? $args['widget_id'] : '';
47
-		$title = ! empty( $instance['title'] ) ? $instance['title'] : '';
48
-		$location = ! empty( $instance['location'] ) ? $instance['location'] : '';
49
-		$color = ! empty( $instance['color'] ) ? $instance['color'] : '';
50
-		$sale = ! empty( $instance['sale'] ) ? $instance['sale'] : '';
51
-		$rent = ! empty( $instance['rent'] ) ? $instance['rent'] : '';
46
+		$iframe_id = ! empty($args['widget_id']) ? $args['widget_id'] : '';
47
+		$title = ! empty($instance['title']) ? $instance['title'] : '';
48
+		$location = ! empty($instance['location']) ? $instance['location'] : '';
49
+		$color = ! empty($instance['color']) ? $instance['color'] : '';
50
+		$sale = ! empty($instance['sale']) ? $instance['sale'] : '';
51
+		$rent = ! empty($instance['rent']) ? $instance['rent'] : '';
52 52
 
53 53
 		echo $args['before_widget'];
54 54
 
55
-		echo $args['before_title'] . esc_attr( $title ) . $args['after_title'];
55
+		echo $args['before_title'] . esc_attr($title) . $args['after_title'];
56 56
 
57 57
 		$homes_widgets = new HomesWidgets();
58 58
 
59
-		$homes_widgets->get_simple_search( $iframe_id, $location, $color, $sale, $rent );
59
+		$homes_widgets->get_simple_search($iframe_id, $location, $color, $sale, $rent);
60 60
 
61 61
 		echo $args['after_widget'];
62 62
 	}
@@ -68,51 +68,51 @@  discard block
 block discarded – undo
68 68
 	 * @param mixed $instance Instance.
69 69
 	 * @return void
70 70
 	 */
71
-	public function form( $instance ) {
71
+	public function form($instance) {
72 72
 
73 73
 		// Set default values.
74
-		$instance = wp_parse_args( (array) $instance, array(
74
+		$instance = wp_parse_args((array) $instance, array(
75 75
 			'title' => '',
76 76
 			'location' => '',
77 77
 			'color' => '0054a0',
78 78
 			'sale' => 1,
79 79
 			'rent' => 1,
80
-		) );
80
+		));
81 81
 
82 82
 		// Retrieve an existing value from the database.
83
-		$title = ! empty( $instance['title'] ) ? $instance['title'] : '';
84
-		$location = ! empty( $instance['location'] ) ? $instance['location'] : '';
85
-		$color = ! empty( $instance['color'] ) ? $instance['color'] : '';
86
-		$sale = ! empty( $instance['sale'] ) ? $instance['sale'] : '';
87
-		$rent = ! empty( $instance['rent'] ) ? $instance['rent'] : '';
83
+		$title = ! empty($instance['title']) ? $instance['title'] : '';
84
+		$location = ! empty($instance['location']) ? $instance['location'] : '';
85
+		$color = ! empty($instance['color']) ? $instance['color'] : '';
86
+		$sale = ! empty($instance['sale']) ? $instance['sale'] : '';
87
+		$rent = ! empty($instance['rent']) ? $instance['rent'] : '';
88 88
 
89 89
 		// Title.
90 90
 		echo '<p>';
91
-		echo '	<label for="' . $this->get_field_id( 'title' ) . '" class="title-label">' . __( 'Tile:', 're-pro' ) . '</label>';
92
-		echo '	<input id="' . $this->get_field_id( 'title' ) . '" name="' . $this->get_field_name( 'title' ) . '" value="' . $title  . '" class="widefat">';
91
+		echo '	<label for="' . $this->get_field_id('title') . '" class="title-label">' . __('Tile:', 're-pro') . '</label>';
92
+		echo '	<input id="' . $this->get_field_id('title') . '" name="' . $this->get_field_name('title') . '" value="' . $title . '" class="widefat">';
93 93
 		echo '</p>';
94 94
 
95 95
 		// Location.
96 96
 		echo '<p>';
97
-		echo '	<label for="' . $this->get_field_id( 'location' ) . '" class="title-label">' . __( 'Location:', 're-pro' ) . '</label>';
98
-		echo '	<input id="' . $this->get_field_id( 'location' ) . '" name="' . $this->get_field_name( 'location' ) . '" value="' . $location . '" class="widefat">';
97
+		echo '	<label for="' . $this->get_field_id('location') . '" class="title-label">' . __('Location:', 're-pro') . '</label>';
98
+		echo '	<input id="' . $this->get_field_id('location') . '" name="' . $this->get_field_name('location') . '" value="' . $location . '" class="widefat">';
99 99
 		echo '</p>';
100 100
 
101 101
 		// Color.
102 102
 		echo '<p>';
103
-		echo '	<label for="' . $this->get_field_id( 'color' ) . '" class="title-label">' . __( 'Color:', 're-pro' ) . '</label>';
104
-		echo '	<input id="' . $this->get_field_id( 'color' ) . '" name="' . $this->get_field_name( 'color' ) . '" value="' . $color  . '" class="widefat">';
103
+		echo '	<label for="' . $this->get_field_id('color') . '" class="title-label">' . __('Color:', 're-pro') . '</label>';
104
+		echo '	<input id="' . $this->get_field_id('color') . '" name="' . $this->get_field_name('color') . '" value="' . $color . '" class="widefat">';
105 105
 		echo '</p>';
106 106
 
107 107
 		// Search Types.
108 108
 		echo '<p>';
109
-		echo '<label for="search-type" class="search_type_label">' . __( 'Search Types:', 're-pro' ) . '</label>';
109
+		echo '<label for="search-type" class="search_type_label">' . __('Search Types:', 're-pro') . '</label>';
110 110
 		echo '<br />';
111
-		echo '<input value="1" type="checkbox"' . checked( $sale, 1, false ) . 'id="' . $this->get_field_id( 'sale' ) . '" name="' . $this->get_field_name( 'sale' )  . '" />';
112
-		echo '<label for="' . $this->get_field_id( 'sale' ) . '">For Sale</label>';
111
+		echo '<input value="1" type="checkbox"' . checked($sale, 1, false) . 'id="' . $this->get_field_id('sale') . '" name="' . $this->get_field_name('sale') . '" />';
112
+		echo '<label for="' . $this->get_field_id('sale') . '">For Sale</label>';
113 113
 		echo '<br />';
114
-		echo '<input value="1" type="checkbox"' . checked( $rent, 1, false ) . 'id="' . $this->get_field_id( 'rent' ) . '" name="' . $this->get_field_name( 'rent' ) . '" />';
115
-		echo '<label for="' . $this->get_field_id( 'rent' ) . '">For Rent</label>';
114
+		echo '<input value="1" type="checkbox"' . checked($rent, 1, false) . 'id="' . $this->get_field_id('rent') . '" name="' . $this->get_field_name('rent') . '" />';
115
+		echo '<label for="' . $this->get_field_id('rent') . '">For Rent</label>';
116 116
 		echo '</p>';
117 117
 	}
118 118
 
@@ -124,15 +124,15 @@  discard block
 block discarded – undo
124 124
 	 * @param mixed $old_instance Old Instance.
125 125
 	 * @return $instance
126 126
 	 */
127
-	public function update( $new_instance, $old_instance ) {
127
+	public function update($new_instance, $old_instance) {
128 128
 
129 129
 		$instance = $old_instance;
130 130
 
131
-		$instance['title'] = ! empty( $new_instance['title'] ) ? strip_tags( $new_instance['title'] ) : '';
132
-		$instance['location'] = ! empty( $new_instance['location'] ) ? strip_tags( $new_instance['location'] ) : '';
133
-		$instance['color'] = ! empty( $new_instance['color'] ) ? strip_tags( $new_instance['color'] ) : '';
134
-		$instance['sale'] = ! empty( $new_instance['sale'] ) ? strip_tags( $new_instance['sale'] ) : '';
135
-		$instance['rent'] = ! empty( $new_instance['rent'] ) ? strip_tags( $new_instance['rent'] ) : '';
131
+		$instance['title'] = ! empty($new_instance['title']) ? strip_tags($new_instance['title']) : '';
132
+		$instance['location'] = ! empty($new_instance['location']) ? strip_tags($new_instance['location']) : '';
133
+		$instance['color'] = ! empty($new_instance['color']) ? strip_tags($new_instance['color']) : '';
134
+		$instance['sale'] = ! empty($new_instance['sale']) ? strip_tags($new_instance['sale']) : '';
135
+		$instance['rent'] = ! empty($new_instance['rent']) ? strip_tags($new_instance['rent']) : '';
136 136
 
137 137
 		return $instance;
138 138
 	}
@@ -145,8 +145,8 @@  discard block
 block discarded – undo
145 145
  * @return void
146 146
  */
147 147
 function repro_homes_com_simple_search() {
148
-	if ( ! is_ssl() ) {
149
-		register_widget( 'HomesSimpleSearchWidget' );
148
+	if ( ! is_ssl()) {
149
+		register_widget('HomesSimpleSearchWidget');
150 150
 	}
151 151
 }
152
-add_action( 'widgets_init', 'repro_homes_com_simple_search' );
152
+add_action('widgets_init', 'repro_homes_com_simple_search');
Please login to merge, or discard this patch.
modules/homes-com/widgets/class-featured-listings-widget.php 1 patch
Spacing   +35 added lines, -35 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@  discard block
 block discarded – undo
6 6
  */
7 7
 
8 8
 	/* Exit if accessed directly. */
9
-if ( ! defined( 'ABSPATH' ) ) { exit; }
9
+if ( ! defined('ABSPATH')) { exit; }
10 10
 
11 11
 /**
12 12
  * HomesFeaturedListingsWidget class.
@@ -25,9 +25,9 @@  discard block
 block discarded – undo
25 25
 
26 26
 		parent::__construct(
27 27
 			'homes_featured_listings',
28
-			__( 'Homes Featured Listings', 're-pro' ),
28
+			__('Homes Featured Listings', 're-pro'),
29 29
 			array(
30
-				'description' => __( 'Display featured listings from Homes.com', 're-pro' ),
30
+				'description' => __('Display featured listings from Homes.com', 're-pro'),
31 31
 				'classname'   => 're-pro re-pro-widget homes-widget homes-featured-listings',
32 32
 				'customize_selective_refresh' => true,
33 33
 			)
@@ -41,21 +41,21 @@  discard block
 block discarded – undo
41 41
 	 * @param mixed $args Arguments.
42 42
 	 * @param mixed $instance Instance.
43 43
 	 */
44
-	public function widget( $args, $instance ) {
44
+	public function widget($args, $instance) {
45 45
 
46
-		$iframe_id = ! empty( $args['widget_id'] ) ? $args['widget_id'] : '';
47
-		$title = ! empty( $instance['title'] ) ? $instance['title'] : '';
48
-		$location = ! empty( $instance['location'] ) ? $instance['location'] : '';
49
-		$color = ! empty( $instance['color'] ) ? $instance['color'] : '';
50
-		$status = ! empty( $instance['status'] ) ? $instance['status'] : '';
46
+		$iframe_id = ! empty($args['widget_id']) ? $args['widget_id'] : '';
47
+		$title = ! empty($instance['title']) ? $instance['title'] : '';
48
+		$location = ! empty($instance['location']) ? $instance['location'] : '';
49
+		$color = ! empty($instance['color']) ? $instance['color'] : '';
50
+		$status = ! empty($instance['status']) ? $instance['status'] : '';
51 51
 
52 52
 		echo $args['before_widget'];
53 53
 
54
-		echo $args['before_title'] . esc_attr( $title ) . $args['after_title'];
54
+		echo $args['before_title'] . esc_attr($title) . $args['after_title'];
55 55
 
56 56
 		$homes_widgets = new HomesWidgets();
57 57
 
58
-		$homes_widgets->get_featured_listings( $iframe_id, $location, $color, $status );
58
+		$homes_widgets->get_featured_listings($iframe_id, $location, $color, $status);
59 59
 
60 60
 		echo $args['after_widget'];
61 61
 	}
@@ -67,46 +67,46 @@  discard block
 block discarded – undo
67 67
 	 * @param mixed $instance Instance.
68 68
 	 * @return void
69 69
 	 */
70
-	public function form( $instance ) {
70
+	public function form($instance) {
71 71
 
72 72
 		// Set default values.
73
-		$instance = wp_parse_args( (array) $instance, array(
73
+		$instance = wp_parse_args((array) $instance, array(
74 74
 			'title' => '',
75 75
 			'location' => '',
76 76
 			'color' => '0054a0',
77 77
 			'status' => 'SALE',
78
-		) );
78
+		));
79 79
 
80 80
 		// Retrieve an existing value from the database.
81
-		$title = ! empty( $instance['title'] ) ? $instance['title'] : '';
82
-		$location = ! empty( $instance['location'] ) ? $instance['location'] : '';
83
-		$color = ! empty( $instance['color'] ) ? $instance['color'] : '';
84
-		$status = ! empty( $instance['status'] ) ? $instance['status'] : '';
81
+		$title = ! empty($instance['title']) ? $instance['title'] : '';
82
+		$location = ! empty($instance['location']) ? $instance['location'] : '';
83
+		$color = ! empty($instance['color']) ? $instance['color'] : '';
84
+		$status = ! empty($instance['status']) ? $instance['status'] : '';
85 85
 
86 86
 		// Title.
87 87
 		echo '<p>';
88
-		echo '	<label for="' . $this->get_field_id( 'title' ) . '" class="title-label">' . __( 'Tile:', 're-pro' ) . '</label>';
89
-		echo '	<input id="' . $this->get_field_id( 'title' ) . '" name="' . $this->get_field_name( 'title' ) . '" value="' . $title  . '" class="widefat">';
88
+		echo '	<label for="' . $this->get_field_id('title') . '" class="title-label">' . __('Tile:', 're-pro') . '</label>';
89
+		echo '	<input id="' . $this->get_field_id('title') . '" name="' . $this->get_field_name('title') . '" value="' . $title . '" class="widefat">';
90 90
 		echo '</p>';
91 91
 
92 92
 		// Location.
93 93
 		echo '<p>';
94
-		echo '	<label for="' . $this->get_field_id( 'location' ) . '" class="title-label">' . __( 'Location:', 're-pro' ) . '</label>';
95
-		echo '	<input id="' . $this->get_field_id( 'location' ) . '" name="' . $this->get_field_name( 'location' ) . '" value="' . $location . '" class="widefat">';
94
+		echo '	<label for="' . $this->get_field_id('location') . '" class="title-label">' . __('Location:', 're-pro') . '</label>';
95
+		echo '	<input id="' . $this->get_field_id('location') . '" name="' . $this->get_field_name('location') . '" value="' . $location . '" class="widefat">';
96 96
 		echo '</p>';
97 97
 
98 98
 		// Text Color
99 99
 		echo '<p>';
100
-		echo '	<label for="' . $this->get_field_id( 'color' ) . '" class="title-label">' . __( 'Button Color:', 're-pro' ) . '</label>';
101
-		echo '	<input id="' . $this->get_field_id( 'color' ) . '" name="' . $this->get_field_name( 'color' ) . '" value="' . $color  . '" class="widefat">';
100
+		echo '	<label for="' . $this->get_field_id('color') . '" class="title-label">' . __('Button Color:', 're-pro') . '</label>';
101
+		echo '	<input id="' . $this->get_field_id('color') . '" name="' . $this->get_field_name('color') . '" value="' . $color . '" class="widefat">';
102 102
 		echo '</p>';
103 103
 
104 104
 		// Listing Status
105 105
 		echo '<p>';
106
-		echo '	<label for="' . $this->get_field_id( 'status' ) . '" class="title-label">' . __( 'Listing Status:', 're-pro' ) . '</label>';
106
+		echo '	<label for="' . $this->get_field_id('status') . '" class="title-label">' . __('Listing Status:', 're-pro') . '</label>';
107 107
 		echo '	<br />';
108
-		echo '	<input id="' . $this->get_field_id( 'status' ) . '" type="radio" name="' . $this->get_field_name( 'status' ) . '" value="SALE"' . checked( $status, 'SALE', false ) . '>For Sale<br />' . "\n";
109
-		echo '	<input id="' . $this->get_field_id( 'status' ) . '" type="radio" name="' . $this->get_field_name( 'status' ) . '" value="RENT"' . checked( $status, 'RENT', false ) . '>For Rent<br />' . "\n";
108
+		echo '	<input id="' . $this->get_field_id('status') . '" type="radio" name="' . $this->get_field_name('status') . '" value="SALE"' . checked($status, 'SALE', false) . '>For Sale<br />' . "\n";
109
+		echo '	<input id="' . $this->get_field_id('status') . '" type="radio" name="' . $this->get_field_name('status') . '" value="RENT"' . checked($status, 'RENT', false) . '>For Rent<br />' . "\n";
110 110
 		echo '</p>';
111 111
 
112 112
 	}
@@ -119,14 +119,14 @@  discard block
 block discarded – undo
119 119
 	 * @param mixed $old_instance Old Instance.
120 120
 	 * @return $instance
121 121
 	 */
122
-	public function update( $new_instance, $old_instance ) {
122
+	public function update($new_instance, $old_instance) {
123 123
 
124 124
 		$instance = $old_instance;
125 125
 
126
-		$instance['title'] = ! empty( $new_instance['title'] ) ? strip_tags( $new_instance['title'] ) : '';
127
-		$instance['location'] = ! empty( $new_instance['location'] ) ? strip_tags( $new_instance['location'] ) : '';
128
-		$instance['color'] = ! empty( $new_instance['color'] ) ? strip_tags( $new_instance['color'] ) : '';
129
-		$instance['status'] = ! empty( $new_instance['status'] ) ? strip_tags( $new_instance['status'] ) : '';
126
+		$instance['title'] = ! empty($new_instance['title']) ? strip_tags($new_instance['title']) : '';
127
+		$instance['location'] = ! empty($new_instance['location']) ? strip_tags($new_instance['location']) : '';
128
+		$instance['color'] = ! empty($new_instance['color']) ? strip_tags($new_instance['color']) : '';
129
+		$instance['status'] = ! empty($new_instance['status']) ? strip_tags($new_instance['status']) : '';
130 130
 
131 131
 		return $instance;
132 132
 	}
@@ -139,8 +139,8 @@  discard block
 block discarded – undo
139 139
  * @return void
140 140
  */
141 141
 function repro_homes_com_featured_listings() {
142
-	if ( ! is_ssl() ) {
143
-		register_widget( 'HomesFeaturedListingsWidget' );
142
+	if ( ! is_ssl()) {
143
+		register_widget('HomesFeaturedListingsWidget');
144 144
 	}
145 145
 }
146
-add_action( 'widgets_init', 'repro_homes_com_featured_listings' );
146
+add_action('widgets_init', 'repro_homes_com_featured_listings');
Please login to merge, or discard this patch.
modules/homes-com/widgets/class-homes-com-widgets.php 1 patch
Spacing   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -6,9 +6,9 @@  discard block
 block discarded – undo
6 6
  */
7 7
 
8 8
 // Exit if accessed directly.
9
-if ( ! defined( 'ABSPATH' ) ) { exit; }
9
+if ( ! defined('ABSPATH')) { exit; }
10 10
 
11
-if ( ! class_exists( 'HomesWidgets' ) ) {
11
+if ( ! class_exists('HomesWidgets')) {
12 12
 	/**
13 13
 	 * HomesWidgets class.
14 14
 	 */
@@ -50,10 +50,10 @@  discard block
 block discarded – undo
50 50
 		 * @param string $iframe_id (default: '').
51 51
 		 * @return string $iframe_id.
52 52
 		 */
53
-		public function homes_iframe_id( $iframe_id = '' ) {
53
+		public function homes_iframe_id($iframe_id = '') {
54 54
 
55
-			if ( '' !== $iframe_id  ) {
56
-				return sanitize_html_class( $iframe_id ) . '-iframe';
55
+			if ('' !== $iframe_id) {
56
+				return sanitize_html_class($iframe_id) . '-iframe';
57 57
 			}
58 58
 
59 59
 		}
@@ -65,10 +65,10 @@  discard block
 block discarded – undo
65 65
 		 * @param string $widget_name (default: '').
66 66
 		 * @return string class name.
67 67
 		 */
68
-		public function homes_iframe_class( $widget_name = '' ) {
68
+		public function homes_iframe_class($widget_name = '') {
69 69
 
70
-			if ( '' !== $widget_name ) {
71
-				return 'homes homes-iframe homes-' . sanitize_html_class( $widget_name ) . '-iframe';
70
+			if ('' !== $widget_name) {
71
+				return 'homes homes-iframe homes-' . sanitize_html_class($widget_name) . '-iframe';
72 72
 			} else {
73 73
 				return 'homes homes-iframe';
74 74
 			}
@@ -86,11 +86,11 @@  discard block
 block discarded – undo
86 86
 		 * @param mixed  $color Button Color.
87 87
 		 * @return void
88 88
 		 */
89
-		public function get_commute_time_widget( $iframe_id = '', $start_addr, $color ) {
89
+		public function get_commute_time_widget($iframe_id = '', $start_addr, $color) {
90 90
 
91 91
 			echo '<div class="commute-time-widget">';
92 92
 			echo '	<h1 style="color:#' . $color . '">Commute Time</h1>';
93
-			echo '	<iframe id="'. $this->homes_iframe_id( $iframe_id ) .'" class="commute-time-frame '. $this->homes_iframe_class( 'commute-time-widget' ) .'" scrolling="no" title="'. __( 'Commute Time on Homes', 're-pro' ) .'" src="http://www.homes.com/widget/commute-time/frame/?show_only_destination=NO&text_color=%230054a0&direction_link=%2FHomesCom%2FInclude%2FListingDetail%2FMap%2FPrintDirections%2Ecfm%3FstartAddress%3D%25%25source%5Faddress%25%25%26endAddress%3D%25%25destination%5Faddress%25%25&button_color=%23' . $color .'&cobrand=&source_address=' . $start_addr . '"&property_id=" width="100%" seamless frameborder="0"></iframe>';
93
+			echo '	<iframe id="' . $this->homes_iframe_id($iframe_id) . '" class="commute-time-frame ' . $this->homes_iframe_class('commute-time-widget') . '" scrolling="no" title="' . __('Commute Time on Homes', 're-pro') . '" src="http://www.homes.com/widget/commute-time/frame/?show_only_destination=NO&text_color=%230054a0&direction_link=%2FHomesCom%2FInclude%2FListingDetail%2FMap%2FPrintDirections%2Ecfm%3FstartAddress%3D%25%25source%5Faddress%25%25%26endAddress%3D%25%25destination%5Faddress%25%25&button_color=%23' . $color . '&cobrand=&source_address=' . $start_addr . '"&property_id=" width="100%" seamless frameborder="0"></iframe>';
94 94
 			echo '	<div class="footer">';
95 95
 			echo '		<a href="http://www.homes.com/widgets/" title="Homes.com" class="logo">';
96 96
 			echo '			Powered By Homes.com';
@@ -110,9 +110,9 @@  discard block
 block discarded – undo
110 110
 		 * @param mixed  $status Listing Status.
111 111
 		 * @return void
112 112
 		 */
113
-		public function get_featured_listings( $iframe_id = '', $location, $color, $status ) {
113
+		public function get_featured_listings($iframe_id = '', $location, $color, $status) {
114 114
 
115
-			if ( 'RENT' === $status ) {
115
+			if ('RENT' === $status) {
116 116
 				$showTitle = 'Rent';
117 117
 			} else {
118 118
 				$showTitle = 'Sale';
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
 
121 121
 			echo '<div class="featured-listings-widget">';
122 122
 			echo '	<h1 style="color:#' . $color . '">Featured Homes for <span class="listing-stat">' . $showTitle . '</span></h1>';
123
-			echo '	<iframe id="'. $this->homes_iframe_id( $iframe_id ) .'" class="featured-listings-frame '. $this->homes_iframe_class( 'featured-listings-widget' ) .'" scrolling="no" title="'. __( 'Featured Listings on Homes', 're-pro' ) .'" src="http://www.homes.com/widget/featured-listings/frame/?text_color=%23' . $color .'&listing_status=FOR%20' . $status .'&inner_color=%23' . $color .'&cobrand=&location=' . $location .'" width="100%" seamless frameborder="0"></iframe>';
123
+			echo '	<iframe id="' . $this->homes_iframe_id($iframe_id) . '" class="featured-listings-frame ' . $this->homes_iframe_class('featured-listings-widget') . '" scrolling="no" title="' . __('Featured Listings on Homes', 're-pro') . '" src="http://www.homes.com/widget/featured-listings/frame/?text_color=%23' . $color . '&listing_status=FOR%20' . $status . '&inner_color=%23' . $color . '&cobrand=&location=' . $location . '" width="100%" seamless frameborder="0"></iframe>';
124 124
 			echo '	<a href="http://www.homes.com/widgets/" title="Homes.com" class="logo">';
125 125
 			echo '		Powered By Homes.com';
126 126
 			echo '	</a>';
@@ -140,20 +140,20 @@  discard block
 block discarded – undo
140 140
 		 * @param mixed  $median Median Value.
141 141
 		 * @return void
142 142
 		 */
143
-		public function get_home_values( $iframe_id = '', $location, $firstColor, $secondColor, $average, $median ) {
143
+		public function get_home_values($iframe_id = '', $location, $firstColor, $secondColor, $average, $median) {
144 144
 
145 145
 			$valueTypes = 'MEAN,MEDIAN';
146
-			if ( $average && $median ) {
146
+			if ($average && $median) {
147 147
 				$valueTypes = 'MEAN,MEDIAN';
148
-			} else if ( $average ) {
148
+			} else if ($average) {
149 149
 				$valueTypes = 'MEAN';
150
-			} else if ( $median ) {
150
+			} else if ($median) {
151 151
 				$valueTypes = 'MEDIAN';
152 152
 			}
153 153
 
154 154
 			echo '<div class="home-values-widget">';
155 155
 			echo '	<h1 style="color:#' . $firstColor . '">Search Home Values</h1>';
156
-			echo '	<iframe id="'. $this->homes_iframe_id( $iframe_id ) .'" class="home-values-frame '. $this->homes_iframe_class( 'home-values-widget' ) .'" scrolling="no" title="'. __( 'Home Values on Homes', 're-pro' ) .'"src="http://www.homes.com/widget/home-values/frame/?avm_types=' . $valueTypes .'&text_color=%23' . $firstColor .'&button_color=%23' . $secondColor .'&cobrand=&location=' . $location .'" width="100%" seamless frameborder="0"></iframe>';
156
+			echo '	<iframe id="' . $this->homes_iframe_id($iframe_id) . '" class="home-values-frame ' . $this->homes_iframe_class('home-values-widget') . '" scrolling="no" title="' . __('Home Values on Homes', 're-pro') . '"src="http://www.homes.com/widget/home-values/frame/?avm_types=' . $valueTypes . '&text_color=%23' . $firstColor . '&button_color=%23' . $secondColor . '&cobrand=&location=' . $location . '" width="100%" seamless frameborder="0"></iframe>';
157 157
 			echo '	<div class="footer">';
158 158
 			echo	'		<a href="http://www.homes.com/widgets/" title="Homes.com" class="logo">';
159 159
 			echo '			Powered By Homes.com';
@@ -174,22 +174,22 @@  discard block
 block discarded – undo
174 174
 		 * @param bool   $rent (default: true) For Rent homes.
175 175
 		 * @return void
176 176
 		 */
177
-		public function get_search( $iframe_id = '', $location, $color, $sale, $rent ) {
177
+		public function get_search($iframe_id = '', $location, $color, $sale, $rent) {
178 178
 
179
-			if ( ( empty( $sale ) && empty( $rent ) ) || ( $sale && $rent ) ) {
179
+			if ((empty($sale) && empty($rent)) || ($sale && $rent)) {
180 180
 				$searchTypes = 'FOR SALE,FOR RENT';
181 181
 				$showTitle = '';
182
-			} else if ( $sale ) {
182
+			} else if ($sale) {
183 183
 				$searchTypes = 'FOR SALE';
184 184
 				$showTitle = 'for Sale';
185
-			} else if ( $rent ) {
185
+			} else if ($rent) {
186 186
 				$searchTypes = 'FOR RENT';
187 187
 				$showTitle = 'for Rent';
188 188
 			}
189 189
 
190 190
 			echo '<div class="medium-search-widget">';
191 191
 			echo '	<h1 style="color:#' . $color . '">Search Homes <span class="listing-stat">' . $showTitle . '</span> </h1>';
192
-			echo '	<iframe id="'. $this->homes_iframe_id( $iframe_id ) .'" class="medium-search-frame '. $this->homes_iframe_class( 'search-widget' ) .'" scrolling="no" title="'. __( 'Search on Homes', 're-pro' ) .'"src="http://www.homes.com/widget/medium-search/frame/?text_color=%23' . $color .'&listing_status=' . $searchTypes .'&cobrand=&location=' . $location .'" width="100%" seamless frameborder="0"></iframe>';
192
+			echo '	<iframe id="' . $this->homes_iframe_id($iframe_id) . '" class="medium-search-frame ' . $this->homes_iframe_class('search-widget') . '" scrolling="no" title="' . __('Search on Homes', 're-pro') . '"src="http://www.homes.com/widget/medium-search/frame/?text_color=%23' . $color . '&listing_status=' . $searchTypes . '&cobrand=&location=' . $location . '" width="100%" seamless frameborder="0"></iframe>';
193 193
 			echo '	<a href="http://www.homes.com/widgets/" title="Homes.com" class="logo">';
194 194
 			echo '		Powered By Homes.com';
195 195
 			echo '	</a>';
@@ -205,14 +205,14 @@  discard block
 block discarded – undo
205 205
 		 * @param mixed  $color Color.
206 206
 		 * @return void
207 207
 		 */
208
-		public function get_mortgage_calc( $iframe_id = '', $color ) {
208
+		public function get_mortgage_calc($iframe_id = '', $color) {
209 209
 
210 210
 			echo '<div class="mortgage-calculator-widget">';
211 211
 			echo '	<h1 style="color:#' . $color . '">Mortgage Calculator</h1>';
212 212
 			echo '	<a href="http://www.homes.com/widgets/" title="Homes.com" class="logo">';
213 213
 			echo '		Powered By Homes.com';
214 214
 			echo '	</a>';
215
-			echo '	<iframe id="'. $this->homes_iframe_id( $iframe_id ) .'" class="mortgage-calculator-frame '. $this->homes_iframe_class( 'mortgage-calc-widget' ) .'" scrolling="no" title="'. __( 'Mortgage Calculator on Homes', 're-pro' ) .'"src="http://www.homes.com/widget/mortgage-calculator/frame/?text_color=%23' . $color .'&cobrand=" width="100%" seamless frameborder="0"></iframe>';
215
+			echo '	<iframe id="' . $this->homes_iframe_id($iframe_id) . '" class="mortgage-calculator-frame ' . $this->homes_iframe_class('mortgage-calc-widget') . '" scrolling="no" title="' . __('Mortgage Calculator on Homes', 're-pro') . '"src="http://www.homes.com/widget/mortgage-calculator/frame/?text_color=%23' . $color . '&cobrand=" width="100%" seamless frameborder="0"></iframe>';
216 216
 			echo '</div>';
217 217
 
218 218
 		}
@@ -228,22 +228,22 @@  discard block
 block discarded – undo
228 228
 		 * @param bool   $rent (default: true) For Rent homes.
229 229
 		 * @return void
230 230
 		 */
231
-		public function get_simple_search( $iframe_id = '', $location, $color, $sale, $rent ) {
231
+		public function get_simple_search($iframe_id = '', $location, $color, $sale, $rent) {
232 232
 
233
-			if ( ( empty( $sale ) && empty( $rent ) ) || ( $sale && $rent ) ) {
233
+			if ((empty($sale) && empty($rent)) || ($sale && $rent)) {
234 234
 				$searchTypes = 'FOR SALE,FOR RENT';
235 235
 				$showTitle = '';
236
-			} else if ( $sale ) {
236
+			} else if ($sale) {
237 237
 				$searchTypes = 'FOR SALE';
238 238
 				$showTitle = 'for Sale';
239
-			} else if ( $rent ) {
239
+			} else if ($rent) {
240 240
 				$searchTypes = 'FOR RENT';
241 241
 				$showTitle = 'for Rent';
242 242
 			}
243 243
 
244 244
 			echo '<div class="simple-search-widget">';
245 245
 			echo '<h1 style="color:#' . $color . '">Search Homes <span class="listing-stat">' . $showTitle . '</span></h1>';
246
-			echo '	<iframe id="'. $this->homes_iframe_id( $iframe_id ) .'" class="simple-search-frame '. $this->homes_iframe_class( 'simple-search-widget' ) .'" scrolling="no" title="'. __( 'Simple Search on Homes', 're-pro' ) .'"src="http://www.homes.com/widget/simple-search/frame/?text_color=%23' . $color .'&listing_status=' . $searchTypes .'&cobrand=&location=' . $location .'" width="100%" seamless frameborder="0"></iframe>';
246
+			echo '	<iframe id="' . $this->homes_iframe_id($iframe_id) . '" class="simple-search-frame ' . $this->homes_iframe_class('simple-search-widget') . '" scrolling="no" title="' . __('Simple Search on Homes', 're-pro') . '"src="http://www.homes.com/widget/simple-search/frame/?text_color=%23' . $color . '&listing_status=' . $searchTypes . '&cobrand=&location=' . $location . '" width="100%" seamless frameborder="0"></iframe>';
247 247
 			echo '	<a href="http://www.homes.com/widgets/" title="Homes.com" class="logo">';
248 248
 			echo '		Powered By Homes.com';
249 249
 			echo '	</a>';
@@ -260,11 +260,11 @@  discard block
 block discarded – undo
260 260
 		 * @param mixed  $status Listing Status.
261 261
 		 * @return void
262 262
 		 */
263
-		public function get_tall_search( $iframe_id = '', $location, $color, $status ) {
263
+		public function get_tall_search($iframe_id = '', $location, $color, $status) {
264 264
 
265 265
 			echo '<div class="tall-search-widget">';
266 266
 			echo '	<h1 style="color:#' . $color . '">Search Homes</h1>';
267
-			echo '	<iframe id="'. $this->homes_iframe_id( $iframe_id ) .'" class="tall-search-frame '. $this->homes_iframe_class( 'tall-search-widget' ) .'" scrolling="no" title="'. __( 'Tall Search on Homes', 're-pro' ) .'"src="http://www.homes.com/widget/tall-search/frame/?text_color=%23' . $color .'&listing_status=' . $status .'&cobrand=&location=' . $location .'" width="100%" seamless frameborder="0"></iframe>';
267
+			echo '	<iframe id="' . $this->homes_iframe_id($iframe_id) . '" class="tall-search-frame ' . $this->homes_iframe_class('tall-search-widget') . '" scrolling="no" title="' . __('Tall Search on Homes', 're-pro') . '"src="http://www.homes.com/widget/tall-search/frame/?text_color=%23' . $color . '&listing_status=' . $status . '&cobrand=&location=' . $location . '" width="100%" seamless frameborder="0"></iframe>';
268 268
 			echo '	<a href="http://www.homes.com/widgets/" title="Homes.com" class="logo">';
269 269
 			echo '		Powered By Homes.com';
270 270
 			echo '	</a>';
Please login to merge, or discard this patch.