Test Failed
Push — master ( dd5863...6ad539 )
by
unknown
03:08
created
modules/homefinder/widgets/class-affiliate-search-widget.php 1 patch
Spacing   +79 added lines, -79 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
  * HomeFinderAffiliateSearch class.
@@ -25,9 +25,9 @@  discard block
 block discarded – undo
25 25
 
26 26
 		parent::__construct(
27 27
 			'homefinder_affiliate_search',
28
-			__( 'HomeFinder Affiliate Search', 're-pro' ),
28
+			__('HomeFinder Affiliate Search', 're-pro'),
29 29
 			array(
30
-				'description' => __( 'Display an affiliate search box from HomeFinder.com', 're-pro' ),
30
+				'description' => __('Display an affiliate search box from HomeFinder.com', 're-pro'),
31 31
 				'classname'   => 're-pro re-pro-widget homefinder-widget homefinder-affiliate-search',
32 32
 				'customize_selective_refresh' => true,
33 33
 			)
@@ -41,28 +41,28 @@  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 ) {
45
-
46
-		$title = ! empty( $instance['title'] ) ? $instance['title'] : '';
47
-		$affiliate = ! empty( $instance['affiliate'] ) ? $instance['affiliate'] : '';
48
-		$primary_city = ! empty( $instance['primary_city'] ) ? $instance['primary_city'] : '';
49
-		$primary_state = ! empty( $instance['primary_state'] ) ? $instance['primary_state'] : '';
50
-		$nearby_city_1 = ! empty( $instance['nearby_city_1'] ) ? $instance['nearby_city_1'] : '';
51
-		$nearby_state_1 = ! empty( $instance['nearby_state_1'] ) ? $instance['nearby_state_1'] : '';
52
-		$nearby_city_2 = ! empty( $instance['nearby_city_2'] ) ? $instance['nearby_city_2'] : '';
53
-		$nearby_state_2 = ! empty( $instance['nearby_state_2'] ) ? $instance['nearby_state_2'] : '';
54
-		$nearby_city_3 = ! empty( $instance['nearby_city_3'] ) ? $instance['nearby_city_3'] : '';
55
-		$nearby_state_3 = ! empty( $instance['nearby_state_3'] ) ? $instance['nearby_state_3'] : '';
56
-		$nearby_city_4 = ! empty( $instance['nearby_city_4'] ) ? $instance['nearby_city_4'] : '';
57
-		$nearby_state_4 = ! empty( $instance['nearby_state_4'] ) ? $instance['nearby_state_4'] : '';
44
+	public function widget($args, $instance) {
45
+
46
+		$title = ! empty($instance['title']) ? $instance['title'] : '';
47
+		$affiliate = ! empty($instance['affiliate']) ? $instance['affiliate'] : '';
48
+		$primary_city = ! empty($instance['primary_city']) ? $instance['primary_city'] : '';
49
+		$primary_state = ! empty($instance['primary_state']) ? $instance['primary_state'] : '';
50
+		$nearby_city_1 = ! empty($instance['nearby_city_1']) ? $instance['nearby_city_1'] : '';
51
+		$nearby_state_1 = ! empty($instance['nearby_state_1']) ? $instance['nearby_state_1'] : '';
52
+		$nearby_city_2 = ! empty($instance['nearby_city_2']) ? $instance['nearby_city_2'] : '';
53
+		$nearby_state_2 = ! empty($instance['nearby_state_2']) ? $instance['nearby_state_2'] : '';
54
+		$nearby_city_3 = ! empty($instance['nearby_city_3']) ? $instance['nearby_city_3'] : '';
55
+		$nearby_state_3 = ! empty($instance['nearby_state_3']) ? $instance['nearby_state_3'] : '';
56
+		$nearby_city_4 = ! empty($instance['nearby_city_4']) ? $instance['nearby_city_4'] : '';
57
+		$nearby_state_4 = ! empty($instance['nearby_state_4']) ? $instance['nearby_state_4'] : '';
58 58
 
59 59
 		echo $args['before_widget'];
60 60
 
61
-		echo $args['before_title'] . esc_attr( $title ) . $args['after_title'];
61
+		echo $args['before_title'] . esc_attr($title) . $args['after_title'];
62 62
 
63 63
 		$homefinder_widgets = new HomeFinderWidgets();
64 64
 
65
-		$homefinder_widgets->get_affiliates_widget( 'search', $instance );
65
+		$homefinder_widgets->get_affiliates_widget('search', $instance);
66 66
 
67 67
 		echo $args['after_widget'];
68 68
 	}
@@ -74,10 +74,10 @@  discard block
 block discarded – undo
74 74
 	 * @param mixed $instance Instance.
75 75
 	 * @return void
76 76
 	 */
77
-	public function form( $instance ) {
77
+	public function form($instance) {
78 78
 
79 79
 		// Set default values.
80
-		$instance = wp_parse_args( (array) $instance, array(
80
+		$instance = wp_parse_args((array) $instance, array(
81 81
 			'title' => '',
82 82
 			'affiliate' => '',
83 83
 			'primary_city' => '',
@@ -90,77 +90,77 @@  discard block
 block discarded – undo
90 90
 			'nearby_state_3' => '',
91 91
 			'nearby_city_4' => '',
92 92
 			'nearby_state_4' => '',
93
-		) );
93
+		));
94 94
 
95 95
 		// Retrieve an existing value from the database.
96
-		$title = ! empty( $instance['title'] ) ? $instance['title'] : '';
97
-		$affiliate = ! empty( $instance['affiliate'] ) ? $instance['affiliate'] : '';
98
-		$primary_city = ! empty( $instance['primary_city'] ) ? $instance['primary_city'] : '';
99
-		$primary_state = ! empty( $instance['primary_state'] ) ? $instance['primary_state'] : '';
100
-		$nearby_city_1 = ! empty( $instance['nearby_city_1'] ) ? $instance['nearby_city_1'] : '';
101
-		$nearby_state_1 = ! empty( $instance['nearby_state_1'] ) ? $instance['nearby_state_1'] : '';
102
-		$nearby_city_2 = ! empty( $instance['nearby_city_2'] ) ? $instance['nearby_city_2'] : '';
103
-		$nearby_state_2 = ! empty( $instance['nearby_state_2'] ) ? $instance['nearby_state_2'] : '';
104
-		$nearby_city_3 = ! empty( $instance['nearby_city_3'] ) ? $instance['nearby_city_3'] : '';
105
-		$nearby_state_3 = ! empty( $instance['nearby_state_3'] ) ? $instance['nearby_state_3'] : '';
106
-		$nearby_city_4 = ! empty( $instance['nearby_city_4'] ) ? $instance['nearby_city_4'] : '';
107
-		$nearby_state_4 = ! empty( $instance['nearby_state_4'] ) ? $instance['nearby_state_4'] : '';
96
+		$title = ! empty($instance['title']) ? $instance['title'] : '';
97
+		$affiliate = ! empty($instance['affiliate']) ? $instance['affiliate'] : '';
98
+		$primary_city = ! empty($instance['primary_city']) ? $instance['primary_city'] : '';
99
+		$primary_state = ! empty($instance['primary_state']) ? $instance['primary_state'] : '';
100
+		$nearby_city_1 = ! empty($instance['nearby_city_1']) ? $instance['nearby_city_1'] : '';
101
+		$nearby_state_1 = ! empty($instance['nearby_state_1']) ? $instance['nearby_state_1'] : '';
102
+		$nearby_city_2 = ! empty($instance['nearby_city_2']) ? $instance['nearby_city_2'] : '';
103
+		$nearby_state_2 = ! empty($instance['nearby_state_2']) ? $instance['nearby_state_2'] : '';
104
+		$nearby_city_3 = ! empty($instance['nearby_city_3']) ? $instance['nearby_city_3'] : '';
105
+		$nearby_state_3 = ! empty($instance['nearby_state_3']) ? $instance['nearby_state_3'] : '';
106
+		$nearby_city_4 = ! empty($instance['nearby_city_4']) ? $instance['nearby_city_4'] : '';
107
+		$nearby_state_4 = ! empty($instance['nearby_state_4']) ? $instance['nearby_state_4'] : '';
108 108
 
109 109
 		// Title.
110 110
 		echo '<p>';
111
-		echo '	<label for="' . $this->get_field_id( 'title' ) . '" class="title-label">' . __( 'Tile:', 're-pro' ) . '</label>';
112
-		echo '	<input id="' . $this->get_field_id( 'title' ) . '" name="' . $this->get_field_name( 'title' ) . '" value="' . $title  . '" class="widefat">';
111
+		echo '	<label for="' . $this->get_field_id('title') . '" class="title-label">' . __('Tile:', 're-pro') . '</label>';
112
+		echo '	<input id="' . $this->get_field_id('title') . '" name="' . $this->get_field_name('title') . '" value="' . $title . '" class="widefat">';
113 113
 		echo '</p>';
114 114
 
115 115
 		// Affiliate Name.
116 116
 		echo '<p>';
117
-		echo '	<label for="' . $this->get_field_id( 'affiliate' ) . '" class="title-label">' . __( 'Affiliate Name:', 're-pro' ) . '</label>';
118
-		echo '	<input id="' . $this->get_field_id( 'affiliate' ) . '" name="' . $this->get_field_name( 'affiliate' ) . '" value="' . $affiliate . '" class="widefat">';
117
+		echo '	<label for="' . $this->get_field_id('affiliate') . '" class="title-label">' . __('Affiliate Name:', 're-pro') . '</label>';
118
+		echo '	<input id="' . $this->get_field_id('affiliate') . '" name="' . $this->get_field_name('affiliate') . '" value="' . $affiliate . '" class="widefat">';
119 119
 		echo '</p>';
120 120
 
121 121
 		// Primary Search Area.
122 122
 		echo '<p>';
123
-		echo '	<label for="primary-search-area" class="title-label">' . __( 'Primary Search Area:', 're-pro' ) . '</label>';
124
-		echo '	<input id="' . $this->get_field_id( 'primary_city' ) . '" name="' . $this->get_field_name( 'primary_city' ) . '" value="' . $primary_city . '" class="widefat">';
125
-		echo '	<span class="description">' . __( 'City', 're-pro' ) . '</span>';
126
-		echo '	<input id="' . $this->get_field_id( 'primary_state' ) . '" name="' . $this->get_field_name( 'primary_state' ) . '" value="' . $primary_state . '" class="widefat">';
127
-		echo '	<span class="description">' . __( 'State', 're-pro' ) . '</span>';
123
+		echo '	<label for="primary-search-area" class="title-label">' . __('Primary Search Area:', 're-pro') . '</label>';
124
+		echo '	<input id="' . $this->get_field_id('primary_city') . '" name="' . $this->get_field_name('primary_city') . '" value="' . $primary_city . '" class="widefat">';
125
+		echo '	<span class="description">' . __('City', 're-pro') . '</span>';
126
+		echo '	<input id="' . $this->get_field_id('primary_state') . '" name="' . $this->get_field_name('primary_state') . '" value="' . $primary_state . '" class="widefat">';
127
+		echo '	<span class="description">' . __('State', 're-pro') . '</span>';
128 128
 		echo '</p>';
129 129
 
130 130
 		// Nearby Area 1.
131 131
 		echo '<p>';
132
-		echo '	<label for="nearby-area-1" class="title-label">' . __( 'Nearby Area 1:', 're-pro' ) . '</label>';
133
-		echo '	<input id="' . $this->get_field_id( 'nearby_city_1' ) . '" name="' . $this->get_field_name( 'nearby_city_1' ) . '" value="' . $nearby_city_1 . '" class="widefat">';
134
-		echo '	<span class="description">' . __( 'City', 're-pro' ) . '</span>';
135
-		echo '	<input id="' . $this->get_field_id( 'nearby_state_1' ) . '" name="' . $this->get_field_name( 'nearby_state_1' ) . '" value="' . $nearby_state_1 . '" class="widefat">';
136
-		echo '	<span class="description">' . __( 'State', 're-pro' ) . '</span>';
132
+		echo '	<label for="nearby-area-1" class="title-label">' . __('Nearby Area 1:', 're-pro') . '</label>';
133
+		echo '	<input id="' . $this->get_field_id('nearby_city_1') . '" name="' . $this->get_field_name('nearby_city_1') . '" value="' . $nearby_city_1 . '" class="widefat">';
134
+		echo '	<span class="description">' . __('City', 're-pro') . '</span>';
135
+		echo '	<input id="' . $this->get_field_id('nearby_state_1') . '" name="' . $this->get_field_name('nearby_state_1') . '" value="' . $nearby_state_1 . '" class="widefat">';
136
+		echo '	<span class="description">' . __('State', 're-pro') . '</span>';
137 137
 		echo '</p>';
138 138
 
139 139
 		// Nearby Area 2.
140 140
 		echo '<p>';
141
-		echo '	<label for="nearby-area-2" class="title-label">' . __( 'Nearby Area 2:', 're-pro' ) . '</label>';
142
-		echo '	<input id="' . $this->get_field_id( 'nearby_city_2' ) . '" name="' . $this->get_field_name( 'nearby_city_2' ) . '" value="' . $nearby_city_2 . '" class="widefat">';
143
-		echo '	<span class="description">' . __( 'City', 're-pro' ) . '</span>';
144
-		echo '	<input id="' . $this->get_field_id( 'nearby_state_2' ) . '" name="' . $this->get_field_name( 'nearby_state_2' ) . '" value="' . $nearby_state_2 . '" class="widefat">';
145
-		echo '	<span class="description">' . __( 'State', 're-pro' ) . '</span>';
141
+		echo '	<label for="nearby-area-2" class="title-label">' . __('Nearby Area 2:', 're-pro') . '</label>';
142
+		echo '	<input id="' . $this->get_field_id('nearby_city_2') . '" name="' . $this->get_field_name('nearby_city_2') . '" value="' . $nearby_city_2 . '" class="widefat">';
143
+		echo '	<span class="description">' . __('City', 're-pro') . '</span>';
144
+		echo '	<input id="' . $this->get_field_id('nearby_state_2') . '" name="' . $this->get_field_name('nearby_state_2') . '" value="' . $nearby_state_2 . '" class="widefat">';
145
+		echo '	<span class="description">' . __('State', 're-pro') . '</span>';
146 146
 		echo '</p>';
147 147
 
148 148
 		// Nearby Area 3.
149 149
 		echo '<p>';
150
-		echo '	<label for="nearby-area-3" class="title-label">' . __( 'Nearby Area 3:', 're-pro' ) . '</label>';
151
-		echo '	<input id="' . $this->get_field_id( 'nearby_city_3' ) . '" name="' . $this->get_field_name( 'nearby_city_3' ) . '" value="' . $nearby_city_3 . '" class="widefat">';
152
-		echo '	<span class="description">' . __( 'City', 're-pro' ) . '</span>';
153
-		echo '	<input id="' . $this->get_field_id( 'nearby_state_3' ) . '" name="' . $this->get_field_name( 'nearby_state_3' ) . '" value="' . $nearby_state_3 . '" class="widefat">';
154
-		echo '	<span class="description">' . __( 'State', 're-pro' ) . '</span>';
150
+		echo '	<label for="nearby-area-3" class="title-label">' . __('Nearby Area 3:', 're-pro') . '</label>';
151
+		echo '	<input id="' . $this->get_field_id('nearby_city_3') . '" name="' . $this->get_field_name('nearby_city_3') . '" value="' . $nearby_city_3 . '" class="widefat">';
152
+		echo '	<span class="description">' . __('City', 're-pro') . '</span>';
153
+		echo '	<input id="' . $this->get_field_id('nearby_state_3') . '" name="' . $this->get_field_name('nearby_state_3') . '" value="' . $nearby_state_3 . '" class="widefat">';
154
+		echo '	<span class="description">' . __('State', 're-pro') . '</span>';
155 155
 		echo '</p>';
156 156
 
157 157
 		// Nearby Area 4.
158 158
 		echo '<p>';
159
-		echo '	<label for="nearby-area-4" class="title-label">' . __( 'Nearby Area 4:', 're-pro' ) . '</label>';
160
-		echo '	<input id="' . $this->get_field_id( 'nearby_city_4' ) . '" name="' . $this->get_field_name( 'nearby_city_4' ) . '" value="' . $nearby_city_4 . '" class="widefat">';
161
-		echo '	<span class="description">' . __( 'City', 're-pro' ) . '</span>';
162
-		echo '	<input id="' . $this->get_field_id( 'nearby_state_4' ) . '" name="' . $this->get_field_name( 'nearby_state_4' ) . '" value="' . $nearby_state_4 . '" class="widefat">';
163
-		echo '	<span class="description">' . __( 'State', 're-pro' ) . '</span>';
159
+		echo '	<label for="nearby-area-4" class="title-label">' . __('Nearby Area 4:', 're-pro') . '</label>';
160
+		echo '	<input id="' . $this->get_field_id('nearby_city_4') . '" name="' . $this->get_field_name('nearby_city_4') . '" value="' . $nearby_city_4 . '" class="widefat">';
161
+		echo '	<span class="description">' . __('City', 're-pro') . '</span>';
162
+		echo '	<input id="' . $this->get_field_id('nearby_state_4') . '" name="' . $this->get_field_name('nearby_state_4') . '" value="' . $nearby_state_4 . '" class="widefat">';
163
+		echo '	<span class="description">' . __('State', 're-pro') . '</span>';
164 164
 		echo '</p>';
165 165
 
166 166
 	}
@@ -173,22 +173,22 @@  discard block
 block discarded – undo
173 173
 	 * @param mixed $old_instance Old Instance.
174 174
 	 * @return $instance
175 175
 	 */
176
-	public function update( $new_instance, $old_instance ) {
176
+	public function update($new_instance, $old_instance) {
177 177
 
178 178
 		$instance = $old_instance;
179 179
 
180
-		$instance['title'] = ! empty( $new_instance['title'] ) ? strip_tags( $new_instance['title'] ) : '';
181
-		$instance['affiliate'] = ! empty( $new_instance['affiliate'] ) ? strip_tags( $new_instance['affiliate'] ) : '';
182
-		$instance['primary_city'] = ! empty( $new_instance['primary_city'] ) ? strip_tags( $new_instance['primary_city'] ) : '';
183
-		$instance['primary_state'] = ! empty( $new_instance['primary_state'] ) ? strip_tags( $new_instance['primary_state'] ) : '';
184
-		$instance['nearby_city_1'] = ! empty( $new_instance['nearby_city_1'] ) ? strip_tags( $new_instance['nearby_city_1'] ) : '';
185
-		$instance['nearby_city_2'] = ! empty( $new_instance['nearby_city_2'] ) ? strip_tags( $new_instance['nearby_city_2'] ) : '';
186
-		$instance['nearby_city_3'] = ! empty( $new_instance['nearby_city_3'] ) ? strip_tags( $new_instance['nearby_city_3'] ) : '';
187
-		$instance['nearby_city_4'] = ! empty( $new_instance['nearby_city_4'] ) ? strip_tags( $new_instance['nearby_city_4'] ) : '';
188
-		$instance['nearby_state_1'] = ! empty( $new_instance['nearby_state_1'] ) ? strip_tags( $new_instance['nearby_state_1'] ) : '';
189
-		$instance['nearby_state_2'] = ! empty( $new_instance['nearby_state_2'] ) ? strip_tags( $new_instance['nearby_state_2'] ) : '';
190
-		$instance['nearby_state_3'] = ! empty( $new_instance['nearby_state_3'] ) ? strip_tags( $new_instance['nearby_state_3'] ) : '';
191
-		$instance['nearby_state_4'] = ! empty( $new_instance['nearby_state_4'] ) ? strip_tags( $new_instance['nearby_state_4'] ) : '';
180
+		$instance['title'] = ! empty($new_instance['title']) ? strip_tags($new_instance['title']) : '';
181
+		$instance['affiliate'] = ! empty($new_instance['affiliate']) ? strip_tags($new_instance['affiliate']) : '';
182
+		$instance['primary_city'] = ! empty($new_instance['primary_city']) ? strip_tags($new_instance['primary_city']) : '';
183
+		$instance['primary_state'] = ! empty($new_instance['primary_state']) ? strip_tags($new_instance['primary_state']) : '';
184
+		$instance['nearby_city_1'] = ! empty($new_instance['nearby_city_1']) ? strip_tags($new_instance['nearby_city_1']) : '';
185
+		$instance['nearby_city_2'] = ! empty($new_instance['nearby_city_2']) ? strip_tags($new_instance['nearby_city_2']) : '';
186
+		$instance['nearby_city_3'] = ! empty($new_instance['nearby_city_3']) ? strip_tags($new_instance['nearby_city_3']) : '';
187
+		$instance['nearby_city_4'] = ! empty($new_instance['nearby_city_4']) ? strip_tags($new_instance['nearby_city_4']) : '';
188
+		$instance['nearby_state_1'] = ! empty($new_instance['nearby_state_1']) ? strip_tags($new_instance['nearby_state_1']) : '';
189
+		$instance['nearby_state_2'] = ! empty($new_instance['nearby_state_2']) ? strip_tags($new_instance['nearby_state_2']) : '';
190
+		$instance['nearby_state_3'] = ! empty($new_instance['nearby_state_3']) ? strip_tags($new_instance['nearby_state_3']) : '';
191
+		$instance['nearby_state_4'] = ! empty($new_instance['nearby_state_4']) ? strip_tags($new_instance['nearby_state_4']) : '';
192 192
 
193 193
 		return $instance;
194 194
 	}
@@ -201,8 +201,8 @@  discard block
 block discarded – undo
201 201
  * @return void
202 202
  */
203 203
 function repro_homefinder_affiliate_search() {
204
-	if ( ! is_ssl() ) {
205
-		register_widget( 'HomeFinderAffiliateSearch' );
204
+	if ( ! is_ssl()) {
205
+		register_widget('HomeFinderAffiliateSearch');
206 206
 	}
207 207
 }
208
-add_action( 'widgets_init', 'repro_homefinder_affiliate_search' );
208
+add_action('widgets_init', 'repro_homefinder_affiliate_search');
Please login to merge, or discard this patch.
modules/homefinder/widgets/class-homefinder-widgets.php 1 patch
Spacing   +24 added lines, -24 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( 'HomeFinderWidgets' ) ) {
11
+if ( ! class_exists('HomeFinderWidgets')) {
12 12
 	/**
13 13
 	 * HomeFinderWidgets class.
14 14
 	 */
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 		 * @return void
29 29
 		 */
30 30
 		public function __construct() {
31
-			add_action( 'wp_footer', array( $this, 'hf_enqueue' ) );
31
+			add_action('wp_footer', array($this, 'hf_enqueue'));
32 32
 
33 33
 		}
34 34
 
@@ -36,9 +36,9 @@  discard block
 block discarded – undo
36 36
 		 * Enqueue JS on footer and handle multiple widgets.
37 37
 		 */
38 38
 		public function hf_enqueue() {
39
-			wp_enqueue_script( 'hf-widget-loader', 'http://www.homefinder.com/widgets/js/widgetLoader.js', array( 'jquery' ), null, true );
40
-			wp_enqueue_script( 'hf-widgets-js', plugins_url( 'homefinder-widgets.js', __FILE__ ), array( 'jquery' ), null, true );
41
-			wp_localize_script( 'hf-widgets-js', 'hf_data', static::$hf_data );
39
+			wp_enqueue_script('hf-widget-loader', 'http://www.homefinder.com/widgets/js/widgetLoader.js', array('jquery'), null, true);
40
+			wp_enqueue_script('hf-widgets-js', plugins_url('homefinder-widgets.js', __FILE__), array('jquery'), null, true);
41
+			wp_localize_script('hf-widgets-js', 'hf_data', static::$hf_data);
42 42
 
43 43
 		}
44 44
 
@@ -49,10 +49,10 @@  discard block
 block discarded – undo
49 49
 		 * @param string $widget_id (default: '').
50 50
 		 * @return string $widget_id.
51 51
 		 */
52
-		public function homefinder_id( $widget_id = '' ) {
52
+		public function homefinder_id($widget_id = '') {
53 53
 
54
-			if ( '' !== $widget_id  ) {
55
-				return sanitize_html_class( $widget_id );
54
+			if ('' !== $widget_id) {
55
+				return sanitize_html_class($widget_id);
56 56
 			}
57 57
 
58 58
 		}
@@ -64,10 +64,10 @@  discard block
 block discarded – undo
64 64
 		 * @param string $widget_name (default: '').
65 65
 		 * @return string class name.
66 66
 		 */
67
-		public function homefinder_class( $widget_name = '' ) {
67
+		public function homefinder_class($widget_name = '') {
68 68
 
69
-			if ( '' !== $widget_name ) {
70
-				return 'homefinder homefinder-widget homefinder-' . sanitize_html_class( $widget_name ) . '-widget';
69
+			if ('' !== $widget_name) {
70
+				return 'homefinder homefinder-widget homefinder-' . sanitize_html_class($widget_name) . '-widget';
71 71
 			} else {
72 72
 				return 'homefinder homefinder-widget';
73 73
 			}
@@ -90,9 +90,9 @@  discard block
 block discarded – undo
90 90
 			);
91 91
 			static::$hf_data[] = $widget_data;
92 92
 
93
-			$index = count( static::$hf_data ) - 1;
93
+			$index = count(static::$hf_data) - 1;
94 94
 
95
-			echo '<div id="homeSearchWidget-'. $index .'" class="'. $this->homefinder_class( 'homes-for-sale' ) .'"></div>';
95
+			echo '<div id="homeSearchWidget-' . $index . '" class="' . $this->homefinder_class('homes-for-sale') . '"></div>';
96 96
 
97 97
 		}
98 98
 
@@ -110,9 +110,9 @@  discard block
 block discarded – undo
110 110
 			);
111 111
 			static::$hf_data[] = $widget_data;
112 112
 
113
-			$index = count( static::$hf_data ) - 1;
113
+			$index = count(static::$hf_data) - 1;
114 114
 
115
-			echo '<div id="openHouseSearchWidget-'. $index .'" class="'. $this->homefinder_class( 'open-house' ) .'"></div>';
115
+			echo '<div id="openHouseSearchWidget-' . $index . '" class="' . $this->homefinder_class('open-house') . '"></div>';
116 116
 
117 117
 		}
118 118
 
@@ -130,9 +130,9 @@  discard block
 block discarded – undo
130 130
 			);
131 131
 			static::$hf_data[] = $widget_data;
132 132
 
133
-			$index = count( static::$hf_data ) - 1;
133
+			$index = count(static::$hf_data) - 1;
134 134
 
135
-			echo '<div id="foreclosureSearchWidget-'. $index .'" class="'. $this->homefinder_class( 'foreclosure-homes' ) .'"></div>';
135
+			echo '<div id="foreclosureSearchWidget-' . $index . '" class="' . $this->homefinder_class('foreclosure-homes') . '"></div>';
136 136
 
137 137
 		}
138 138
 
@@ -144,17 +144,17 @@  discard block
 block discarded – undo
144 144
 		 * @param  [Mixed] $widget_data : Array of widget data to send to js.
145 145
 		 * @return void
146 146
 		 */
147
-		public function get_affiliates_widget( $type, $widget_data ) {
147
+		public function get_affiliates_widget($type, $widget_data) {
148 148
 
149 149
 			$widget_data['type'] = $type;
150 150
 			static::$hf_data[] = $widget_data;
151 151
 
152
-			$index = count( static::$hf_data ) - 1;
152
+			$index = count(static::$hf_data) - 1;
153 153
 
154
-			if ( 'search' === $type ) {
155
-				echo '<div id="searchPreview-' . $index . '" class="'. $this->homefinder_class( 'affiliate-search' ) .'"><div>';
156
-			} else if ( 'directory' === $type ) {
157
-				echo '<div id="directoryPreview-' . $index . '" class="'. $this->homefinder_class( 'adveritser-directory' ) .'"></div>';
154
+			if ('search' === $type) {
155
+				echo '<div id="searchPreview-' . $index . '" class="' . $this->homefinder_class('affiliate-search') . '"><div>';
156
+			} else if ('directory' === $type) {
157
+				echo '<div id="directoryPreview-' . $index . '" class="' . $this->homefinder_class('adveritser-directory') . '"></div>';
158 158
 			}
159 159
 
160 160
 		}
Please login to merge, or discard this patch.
modules/homefinder/widgets/class-open-house-widget.php 1 patch
Spacing   +18 added lines, -18 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
  * HomeFinderOpenHouse class.
@@ -25,9 +25,9 @@  discard block
 block discarded – undo
25 25
 
26 26
 		parent::__construct(
27 27
 			'homefinder_open_house',
28
-			__( 'HomeFinder Open House', 're-pro' ),
28
+			__('HomeFinder Open House', 're-pro'),
29 29
 			array(
30
-				'description' => __( 'Display a open house search box from HomeFinder.com', 're-pro' ),
30
+				'description' => __('Display a open house search box from HomeFinder.com', 're-pro'),
31 31
 				'classname'   => 're-pro re-pro-widget homefinder-widget homefinder-open-house',
32 32
 				'customize_selective_refresh' => true,
33 33
 			)
@@ -41,14 +41,14 @@  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
-		$widget_id = ! empty( $args['widget_id'] ) ? $args['widget_id'] : '';
47
-		$title = ! empty( $instance['title'] ) ? $instance['title'] : '';
46
+		$widget_id = ! empty($args['widget_id']) ? $args['widget_id'] : '';
47
+		$title = ! empty($instance['title']) ? $instance['title'] : '';
48 48
 
49 49
 		echo $args['before_widget'];
50 50
 
51
-		echo $args['before_title'] . esc_attr( $title ) . $args['after_title'];
51
+		echo $args['before_title'] . esc_attr($title) . $args['after_title'];
52 52
 
53 53
 		$homefinder_widgets = new HomeFinderWidgets();
54 54
 
@@ -64,20 +64,20 @@  discard block
 block discarded – undo
64 64
 	 * @param mixed $instance Instance.
65 65
 	 * @return void
66 66
 	 */
67
-	public function form( $instance ) {
67
+	public function form($instance) {
68 68
 
69 69
 		// Set default values.
70
-		$instance = wp_parse_args( (array) $instance, array(
70
+		$instance = wp_parse_args((array) $instance, array(
71 71
 			'title' => '',
72
-		) );
72
+		));
73 73
 
74 74
 		// Retrieve an existing value from the database.
75
-		$title = ! empty( $instance['title'] ) ? $instance['title'] : '';
75
+		$title = ! empty($instance['title']) ? $instance['title'] : '';
76 76
 
77 77
 		// Title.
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
 	}
@@ -90,11 +90,11 @@  discard block
 block discarded – undo
90 90
 	 * @param mixed $old_instance Old Instance.
91 91
 	 * @return $instance
92 92
 	 */
93
-	public function update( $new_instance, $old_instance ) {
93
+	public function update($new_instance, $old_instance) {
94 94
 
95 95
 		$instance = $old_instance;
96 96
 
97
-		$instance['title'] = ! empty( $new_instance['title'] ) ? strip_tags( $new_instance['title'] ) : '';
97
+		$instance['title'] = ! empty($new_instance['title']) ? strip_tags($new_instance['title']) : '';
98 98
 
99 99
 		return $instance;
100 100
 	}
@@ -107,8 +107,8 @@  discard block
 block discarded – undo
107 107
  * @return void
108 108
  */
109 109
 function repro_homefinder_open_house() {
110
-	if ( ! is_ssl() ) {
111
-		register_widget( 'HomeFinderOpenHouse' );
110
+	if ( ! is_ssl()) {
111
+		register_widget('HomeFinderOpenHouse');
112 112
 	}
113 113
 }
114
-add_action( 'widgets_init', 'repro_homefinder_open_house' );
114
+add_action('widgets_init', 'repro_homefinder_open_house');
Please login to merge, or discard this patch.
modules/rentbits/rentbits.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -6,10 +6,10 @@
 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
-include( 'widgets/class-rentbits-widgets.php' );
11
+include('widgets/class-rentbits-widgets.php');
12 12
 
13
-include( 'widgets/class-rental-comparison-widget.php' );
13
+include('widgets/class-rental-comparison-widget.php');
14 14
 
15
-include( 'widgets/class-average-rental-rates-widget.php' );
15
+include('widgets/class-average-rental-rates-widget.php');
Please login to merge, or discard this patch.
modules/rentbits/widgets/class-average-rental-rates-widget.php 1 patch
Spacing   +23 added lines, -23 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
  * RentbitsAverageRentalRatesWidget class.
@@ -25,9 +25,9 @@  discard block
 block discarded – undo
25 25
 
26 26
 		parent::__construct(
27 27
 			'rentbits_avg_rental_rates',
28
-			__( 'Rentbits Average Rental Rates', 're-pro' ),
28
+			__('Rentbits Average Rental Rates', 're-pro'),
29 29
 			array(
30
-				'description' => __( 'Display the current average rental price for any location.', 're-pro' ),
30
+				'description' => __('Display the current average rental price for any location.', 're-pro'),
31 31
 				'classname'   => 're-pro re-pro-widget rentbits-widget rentbits-avg-rental-rates',
32 32
 				'customize_selective_refresh' => true,
33 33
 			)
@@ -41,18 +41,18 @@  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
-		$title = ! empty( $instance['title'] ) ? $instance['title'] : '';
47
-		$location = ! empty( $instance['location'] ) ? $instance['location'] : '';
46
+		$title = ! empty($instance['title']) ? $instance['title'] : '';
47
+		$location = ! empty($instance['location']) ? $instance['location'] : '';
48 48
 
49 49
 		echo $args['before_widget'];
50 50
 
51
-		echo $args['before_title'] . esc_attr( $title ) . $args['after_title'];
51
+		echo $args['before_title'] . esc_attr($title) . $args['after_title'];
52 52
 
53 53
 		$rentbits_widgets = new RentbitsWidgets();
54 54
 
55
-		$rentbits_widgets->get_average_rental_rates_widget( $location );
55
+		$rentbits_widgets->get_average_rental_rates_widget($location);
56 56
 
57 57
 		echo $args['after_widget'];
58 58
 	}
@@ -64,28 +64,28 @@  discard block
 block discarded – undo
64 64
 	 * @param mixed $instance Instance.
65 65
 	 * @return void
66 66
 	 */
67
-	public function form( $instance ) {
67
+	public function form($instance) {
68 68
 
69 69
 		// Set default values.
70
-		$instance = wp_parse_args( (array) $instance, array(
70
+		$instance = wp_parse_args((array) $instance, array(
71 71
 			'title' => '',
72 72
 			'location' => '',
73
-		) );
73
+		));
74 74
 
75 75
 		// Retrieve an existing value from the database.
76
-		$title = ! empty( $instance['title'] ) ? $instance['title'] : '';
77
-		$location = ! empty( $instance['location'] ) ? $instance['location'] : '';
76
+		$title = ! empty($instance['title']) ? $instance['title'] : '';
77
+		$location = ! empty($instance['location']) ? $instance['location'] : '';
78 78
 
79 79
 		// Title.
80 80
 		echo '<p>';
81
-		echo '	<label for="' . $this->get_field_id( 'title' ) . '" class="title-label">' . __( 'Tile:', 're-pro' ) . '</label>';
82
-		echo '	<input id="' . $this->get_field_id( 'title' ) . '" name="' . $this->get_field_name( 'title' ) . '" value="' . $title  . '" class="widefat">';
81
+		echo '	<label for="' . $this->get_field_id('title') . '" class="title-label">' . __('Tile:', 're-pro') . '</label>';
82
+		echo '	<input id="' . $this->get_field_id('title') . '" name="' . $this->get_field_name('title') . '" value="' . $title . '" class="widefat">';
83 83
 		echo '</p>';
84 84
 
85 85
 		// Location.
86 86
 		echo '<p>';
87
-		echo '	<label for="' . $this->get_field_id( 'location' ) . '" class="title-label">' . __( 'Location:', 're-pro' ) . '</label>';
88
-		echo '	<input id="' . $this->get_field_id( 'location' ) . '" name="' . $this->get_field_name( 'location' ) . '" value="' . $location . '" class="widefat">';
87
+		echo '	<label for="' . $this->get_field_id('location') . '" class="title-label">' . __('Location:', 're-pro') . '</label>';
88
+		echo '	<input id="' . $this->get_field_id('location') . '" name="' . $this->get_field_name('location') . '" value="' . $location . '" class="widefat">';
89 89
 		echo '</p>';
90 90
 
91 91
 	}
@@ -98,12 +98,12 @@  discard block
 block discarded – undo
98 98
 	 * @param mixed $old_instance Old Instance.
99 99
 	 * @return $instance
100 100
 	 */
101
-	public function update( $new_instance, $old_instance ) {
101
+	public function update($new_instance, $old_instance) {
102 102
 
103 103
 		$instance = $old_instance;
104 104
 
105
-		$instance['title'] = ! empty( $new_instance['title'] ) ? strip_tags( $new_instance['title'] ) : '';
106
-		$instance['location'] = ! empty( $new_instance['location'] ) ? strip_tags( $new_instance['location'] ) : '';
105
+		$instance['title'] = ! empty($new_instance['title']) ? strip_tags($new_instance['title']) : '';
106
+		$instance['location'] = ! empty($new_instance['location']) ? strip_tags($new_instance['location']) : '';
107 107
 
108 108
 		return $instance;
109 109
 	}
@@ -116,8 +116,8 @@  discard block
 block discarded – undo
116 116
  * @return void
117 117
  */
118 118
 function repro_rentbits_avg_rental_rates() {
119
-	if ( ! is_ssl() ) {
120
-		register_widget( 'RentbitsAverageRentalRatesWidget' );
119
+	if ( ! is_ssl()) {
120
+		register_widget('RentbitsAverageRentalRatesWidget');
121 121
 	}
122 122
 }
123
-add_action( 'widgets_init', 'repro_rentbits_avg_rental_rates' );
123
+add_action('widgets_init', 'repro_rentbits_avg_rental_rates');
Please login to merge, or discard this patch.
modules/rentbits/widgets/class-rentbits-widgets.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@
 block discarded – undo
48 48
 		 * @access public
49 49
 		 * @param mixed $loc1 First Location.
50 50
 		 * @param mixed $loc2 Second Location.
51
-	 	 * @param mixed $loc3 Third Location.
51
+		 * @param mixed $loc3 Third Location.
52 52
 		 * @param mixed $loc4 Fourth Location.
53 53
 		 * @return void
54 54
 		 */
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 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( 'RentbitsWidgets' ) ) {
11
+if ( ! class_exists('RentbitsWidgets')) {
12 12
 	/**
13 13
 	 * HomeFinderWidgets class.
14 14
 	 */
@@ -28,15 +28,15 @@  discard block
 block discarded – undo
28 28
 		 * @return void
29 29
 		 */
30 30
 		public function __construct() {
31
-			add_action( 'wp_footer', array( $this, 'rb_enqueue' ) );
31
+			add_action('wp_footer', array($this, 'rb_enqueue'));
32 32
 		}
33 33
 
34 34
 		/**
35 35
 		 * Handle multiple rb widgets js enqueues.
36 36
 		 */
37 37
 		public function rb_enqueue() {
38
-			wp_enqueue_script( 'rb-widgets-js', plugins_url( 'rb-widgets.js', __FILE__ ), array( 'jquery' ), null, true );
39
-			wp_localize_script( 'rb-widgets-js', 'rb_data', static::$rb_data );
38
+			wp_enqueue_script('rb-widgets-js', plugins_url('rb-widgets.js', __FILE__), array('jquery'), null, true);
39
+			wp_localize_script('rb-widgets-js', 'rb_data', static::$rb_data);
40 40
 
41 41
 		}
42 42
 
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
 		 * @param mixed $loc4 Fourth Location.
53 53
 		 * @return void
54 54
 		 */
55
-		public function get_rental_comparison_widget( $loc1, $loc2, $loc3, $loc4 ) {
55
+		public function get_rental_comparison_widget($loc1, $loc2, $loc3, $loc4) {
56 56
 
57 57
 			$url = 'http://rentbits.com/rb/pageinc.do?p=widget-cmp-price&loc1=' . $loc1 . '&loc2=' . $loc2 . '&loc3=' . $loc3 . '&loc4=' . $loc4;
58 58
 
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
 			);
64 64
 			static::$rb_data[] = $rb_data;
65 65
 
66
-			$index = count( static::$rb_data ) - 1;
66
+			$index = count(static::$rb_data) - 1;
67 67
 			echo '<div id="rb-widget-' . $index . '"></div>';
68 68
 
69 69
 		}
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
 		 * @param mixed $loc Location.
76 76
 		 * @return void
77 77
 		 */
78
-		public function get_average_rental_rates_widget( $loc ) {
78
+		public function get_average_rental_rates_widget($loc) {
79 79
 
80 80
 			$url = 'http://rentbits.com/rb/pageinc.do?p=widget-avg-price&loc=' . $loc;
81 81
 
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
 			);
87 87
 			static::$rb_data[] = $rb_data;
88 88
 
89
-			$index = count( static::$rb_data ) - 1;
89
+			$index = count(static::$rb_data) - 1;
90 90
 			echo '<div id="rb-widget-' . $index . '"></div>';
91 91
 
92 92
 		}
Please login to merge, or discard this patch.
modules/rentbits/widgets/class-rental-comparison-widget.php 1 patch
Spacing   +38 added lines, -38 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
  * RentbitsRentalComparisonWidget class.
@@ -25,9 +25,9 @@  discard block
 block discarded – undo
25 25
 
26 26
 		parent::__construct(
27 27
 			'rentbits_rental_comparison',
28
-			__( 'Rentbits Rental Comparison', 're-pro' ),
28
+			__('Rentbits Rental Comparison', 're-pro'),
29 29
 			array(
30
-				'description' => __( 'Display the current average rental price for up to any four locations.', 're-pro' ),
30
+				'description' => __('Display the current average rental price for up to any four locations.', 're-pro'),
31 31
 				'classname'   => 're-pro re-pro-widget rentbits-widget rentbits-rental-comparison',
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
-		$title = ! empty( $instance['title'] ) ? $instance['title'] : '';
47
-		$location1 = ! empty( $instance['location1'] ) ? $instance['location1'] : '';
48
-		$location2 = ! empty( $instance['location2'] ) ? $instance['location2'] : '';
49
-		$location3 = ! empty( $instance['location3'] ) ? $instance['location3'] : '';
50
-		$location4 = ! empty( $instance['location4'] ) ? $instance['location4'] : '';
46
+		$title = ! empty($instance['title']) ? $instance['title'] : '';
47
+		$location1 = ! empty($instance['location1']) ? $instance['location1'] : '';
48
+		$location2 = ! empty($instance['location2']) ? $instance['location2'] : '';
49
+		$location3 = ! empty($instance['location3']) ? $instance['location3'] : '';
50
+		$location4 = ! empty($instance['location4']) ? $instance['location4'] : '';
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
 		$rentbits_widgets = new RentbitsWidgets();
57 57
 
58
-		$rentbits_widgets->get_rental_comparison_widget( $location1, $location2, $location3, $location4 );
58
+		$rentbits_widgets->get_rental_comparison_widget($location1, $location2, $location3, $location4);
59 59
 
60 60
 		echo $args['after_widget'];
61 61
 	}
@@ -67,52 +67,52 @@  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
 			'location1' => '',
76 76
 			'location2' => '',
77 77
 			'location3' => '',
78 78
 			'location4' => '',
79
-		) );
79
+		));
80 80
 
81 81
 		// Retrieve an existing value from the database.
82
-		$title = ! empty( $instance['title'] ) ? $instance['title'] : '';
83
-		$location1 = ! empty( $instance['location1'] ) ? $instance['location1'] : '';
84
-		$location2 = ! empty( $instance['location2'] ) ? $instance['location2'] : '';
85
-		$location3 = ! empty( $instance['location3'] ) ? $instance['location3'] : '';
86
-		$location4 = ! empty( $instance['location4'] ) ? $instance['location4'] : '';
82
+		$title = ! empty($instance['title']) ? $instance['title'] : '';
83
+		$location1 = ! empty($instance['location1']) ? $instance['location1'] : '';
84
+		$location2 = ! empty($instance['location2']) ? $instance['location2'] : '';
85
+		$location3 = ! empty($instance['location3']) ? $instance['location3'] : '';
86
+		$location4 = ! empty($instance['location4']) ? $instance['location4'] : '';
87 87
 
88 88
 		// Title.
89 89
 		echo '<p>';
90
-		echo '	<label for="' . $this->get_field_id( 'title' ) . '" class="title-label">' . __( 'Tile:', 're-pro' ) . '</label>';
91
-		echo '	<input id="' . $this->get_field_id( 'title' ) . '" name="' . $this->get_field_name( 'title' ) . '" value="' . $title  . '" class="widefat">';
90
+		echo '	<label for="' . $this->get_field_id('title') . '" class="title-label">' . __('Tile:', 're-pro') . '</label>';
91
+		echo '	<input id="' . $this->get_field_id('title') . '" name="' . $this->get_field_name('title') . '" value="' . $title . '" class="widefat">';
92 92
 		echo '</p>';
93 93
 
94 94
 		// Location 1.
95 95
 		echo '<p>';
96
-		echo '	<label for="' . $this->get_field_id( 'location1' ) . '" class="title-label">' . __( 'Location:', 're-pro' ) . '</label>';
97
-		echo '	<input id="' . $this->get_field_id( 'location1' ) . '" name="' . $this->get_field_name( 'location1' ) . '" value="' . $location1 . '" class="widefat">';
96
+		echo '	<label for="' . $this->get_field_id('location1') . '" class="title-label">' . __('Location:', 're-pro') . '</label>';
97
+		echo '	<input id="' . $this->get_field_id('location1') . '" name="' . $this->get_field_name('location1') . '" value="' . $location1 . '" class="widefat">';
98 98
 		echo '</p>';
99 99
 
100 100
 		// Location 2.
101 101
 		echo '<p>';
102
-		echo '	<label for="' . $this->get_field_id( 'location2' ) . '" class="title-label">' . __( 'Location:', 're-pro' ) . '</label>';
103
-		echo '	<input id="' . $this->get_field_id( 'location2' ) . '" name="' . $this->get_field_name( 'location2' ) . '" value="' . $location2 . '" class="widefat">';
102
+		echo '	<label for="' . $this->get_field_id('location2') . '" class="title-label">' . __('Location:', 're-pro') . '</label>';
103
+		echo '	<input id="' . $this->get_field_id('location2') . '" name="' . $this->get_field_name('location2') . '" value="' . $location2 . '" class="widefat">';
104 104
 		echo '</p>';
105 105
 
106 106
 		// Location 3.
107 107
 		echo '<p>';
108
-		echo '	<label for="' . $this->get_field_id( 'location3' ) . '" class="title-label">' . __( 'Location:', 're-pro' ) . '</label>';
109
-		echo '	<input id="' . $this->get_field_id( 'location3' ) . '" name="' . $this->get_field_name( 'location3' ) . '" value="' . $location3 . '" class="widefat">';
108
+		echo '	<label for="' . $this->get_field_id('location3') . '" class="title-label">' . __('Location:', 're-pro') . '</label>';
109
+		echo '	<input id="' . $this->get_field_id('location3') . '" name="' . $this->get_field_name('location3') . '" value="' . $location3 . '" class="widefat">';
110 110
 		echo '</p>';
111 111
 
112 112
 		// Location 4.
113 113
 		echo '<p>';
114
-		echo '	<label for="' . $this->get_field_id( 'location4' ) . '" class="title-label">' . __( 'Location:', 're-pro' ) . '</label>';
115
-		echo '	<input id="' . $this->get_field_id( 'location4' ) . '" name="' . $this->get_field_name( 'location4' ) . '" value="' . $location4 . '" class="widefat">';
114
+		echo '	<label for="' . $this->get_field_id('location4') . '" class="title-label">' . __('Location:', 're-pro') . '</label>';
115
+		echo '	<input id="' . $this->get_field_id('location4') . '" name="' . $this->get_field_name('location4') . '" value="' . $location4 . '" class="widefat">';
116 116
 		echo '</p>';
117 117
 
118 118
 	}
@@ -125,15 +125,15 @@  discard block
 block discarded – undo
125 125
 	 * @param mixed $old_instance Old Instance.
126 126
 	 * @return $instance
127 127
 	 */
128
-	public function update( $new_instance, $old_instance ) {
128
+	public function update($new_instance, $old_instance) {
129 129
 
130 130
 		$instance = $old_instance;
131 131
 
132
-		$instance['title'] = ! empty( $new_instance['title'] ) ? strip_tags( $new_instance['title'] ) : '';
133
-		$instance['location1'] = ! empty( $new_instance['location1'] ) ? strip_tags( $new_instance['location1'] ) : '';
134
-		$instance['location2'] = ! empty( $new_instance['location2'] ) ? strip_tags( $new_instance['location2'] ) : '';
135
-		$instance['location3'] = ! empty( $new_instance['location3'] ) ? strip_tags( $new_instance['location3'] ) : '';
136
-		$instance['location4'] = ! empty( $new_instance['location4'] ) ? strip_tags( $new_instance['location4'] ) : '';
132
+		$instance['title'] = ! empty($new_instance['title']) ? strip_tags($new_instance['title']) : '';
133
+		$instance['location1'] = ! empty($new_instance['location1']) ? strip_tags($new_instance['location1']) : '';
134
+		$instance['location2'] = ! empty($new_instance['location2']) ? strip_tags($new_instance['location2']) : '';
135
+		$instance['location3'] = ! empty($new_instance['location3']) ? strip_tags($new_instance['location3']) : '';
136
+		$instance['location4'] = ! empty($new_instance['location4']) ? strip_tags($new_instance['location4']) : '';
137 137
 
138 138
 		return $instance;
139 139
 	}
@@ -146,8 +146,8 @@  discard block
 block discarded – undo
146 146
  * @return void
147 147
  */
148 148
 function repro_rentbits_rental_comparison() {
149
-	if ( ! is_ssl() ) {
150
-		register_widget( 'RentbitsRentalComparisonWidget' );
149
+	if ( ! is_ssl()) {
150
+		register_widget('RentbitsRentalComparisonWidget');
151 151
 	}
152 152
 }
153
-add_action( 'widgets_init', 'repro_rentbits_rental_comparison' );
153
+add_action('widgets_init', 'repro_rentbits_rental_comparison');
Please login to merge, or discard this patch.
modules/google-maps/gmaps.php 1 patch
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -17,9 +17,9 @@  discard block
 block discarded – undo
17 17
  */
18 18
 
19 19
 // Exit if accessed directly.
20
-if ( ! defined( 'ABSPATH' ) ) { exit; }
21
-if ( ! class_exists( 'WPAPI_GOOGLE_MAPS' ) ) {
22
-	require_once( 'maps-widget.php' );
20
+if ( ! defined('ABSPATH')) { exit; }
21
+if ( ! class_exists('WPAPI_GOOGLE_MAPS')) {
22
+	require_once('maps-widget.php');
23 23
 
24 24
 	/**
25 25
 	 * Google Maps Class.
@@ -69,31 +69,31 @@  discard block
 block discarded – undo
69 69
 		 * @access public
70 70
 		 * @param String $api_key : API Key.
71 71
 		 */
72
-		public function __construct( $api_key ) {
72
+		public function __construct($api_key) {
73 73
 			static::$api_key = $api_key;
74 74
 
75
-			add_action( 'wp_footer', array( $this, 'footer' ),  11 );
76
-			add_action( 'widgets_init', array( $this, 'register_widgets' ) );
77
-			add_action( 'wp_enqueue_scripts', array( $this, 'enqueue' ) );
78
-			add_shortcode( 'wp_google_maps', array( $this, 'shortcode' ) );
75
+			add_action('wp_footer', array($this, 'footer'), 11);
76
+			add_action('widgets_init', array($this, 'register_widgets'));
77
+			add_action('wp_enqueue_scripts', array($this, 'enqueue'));
78
+			add_shortcode('wp_google_maps', array($this, 'shortcode'));
79 79
 		}
80 80
 
81 81
 		/**
82 82
 		 * Enqueue JS.
83 83
 		 */
84 84
 		public function enqueue() {
85
-			wp_enqueue_script( 'wpapi-google-maps', plugins_url( 'assets/js/google-maps.min.js', REPRO_PLUGIN_FILE ), array( 'jquery' ), null, true );
85
+			wp_enqueue_script('wpapi-google-maps', plugins_url('assets/js/google-maps.min.js', REPRO_PLUGIN_FILE), array('jquery'), null, true);
86 86
 		}
87 87
 
88 88
 		/**
89 89
 		 * Handle multiple google maps js api enqueues on the footer.
90 90
 		 */
91 91
 		public function footer() {
92
-			wp_localize_script( 'wpapi-google-maps', 'wpapi_gmaps', static::$map_data );
92
+			wp_localize_script('wpapi-google-maps', 'wpapi_gmaps', static::$map_data);
93 93
 
94 94
 			// Only enqueue google maps API if yoast hasnt enqueued it already.
95
-			if ( ! wp_script_is( 'maps-geocoder' ) ) {
96
-				wp_enqueue_script( 'google-maps-api', 'https://maps.googleapis.com/maps/api/js?key=' . static::$api_key, array(), null );
95
+			if ( ! wp_script_is('maps-geocoder')) {
96
+				wp_enqueue_script('google-maps-api', 'https://maps.googleapis.com/maps/api/js?key=' . static::$api_key, array(), null);
97 97
 			}
98 98
 		}
99 99
 
@@ -103,16 +103,16 @@  discard block
 block discarded – undo
103 103
 		 * @param  [Mixed] $map_data : Array of map data to send to js.
104 104
 		 * @param  [Bool]  $echo     : If html should be returned or echoed, defaults to true.
105 105
 		 */
106
-		public static function print_map( $map_data, $echo = true ) {
106
+		public static function print_map($map_data, $echo = true) {
107 107
 
108
-			$map_data = apply_filters( 'wpapi_google_map_data', wp_parse_args( $map_data, static::$defaults ) );
108
+			$map_data = apply_filters('wpapi_google_map_data', wp_parse_args($map_data, static::$defaults));
109 109
 			static::$map_data[] = $map_data;
110 110
 
111
-			$index = count( static::$map_data ) - 1;
111
+			$index = count(static::$map_data) - 1;
112 112
 
113
-			$html = '<div id="wpapi-gmap-' . $index . '" style="width:' . esc_attr( $map_data['width'] ) . ';height:' . esc_attr( $map_data['height'] ) . '"></div>';
113
+			$html = '<div id="wpapi-gmap-' . $index . '" style="width:' . esc_attr($map_data['width']) . ';height:' . esc_attr($map_data['height']) . '"></div>';
114 114
 
115
-			if ( $echo ) {
115
+			if ($echo) {
116 116
 				echo $html;
117 117
 			} else {
118 118
 				return $html;
@@ -124,11 +124,11 @@  discard block
 block discarded – undo
124 124
 		 *
125 125
 		 * @param  [type] $atts : shortcode attributes.
126 126
 		 */
127
-		public function shortcode( $atts ) {
127
+		public function shortcode($atts) {
128 128
 			// Set widget info.
129
-			$atts = shortcode_atts( static::$defaults, $atts, 'wp_google_maps' );
129
+			$atts = shortcode_atts(static::$defaults, $atts, 'wp_google_maps');
130 130
 
131
-			return static::print_map( $atts, false );
131
+			return static::print_map($atts, false);
132 132
 
133 133
 		}
134 134
 
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
 		 * @return void
140 140
 		 */
141 141
 		public function register_widgets() {
142
-			register_widget( 'WP_API_MAPS_WIDGET' );
142
+			register_widget('WP_API_MAPS_WIDGET');
143 143
 		}
144 144
 	}
145 145
 
Please login to merge, or discard this patch.
modules/google-maps/maps-widget.php 1 patch
Spacing   +63 added lines, -63 removed lines patch added patch discarded remove patch
@@ -22,9 +22,9 @@  discard block
 block discarded – undo
22 22
 
23 23
 		parent::__construct(
24 24
 			'wp-api-maps',
25
-			__( 'Google Maps' ),
25
+			__('Google Maps'),
26 26
 			array(
27
-				'description' => __( 'Display a location on google maps' ),
27
+				'description' => __('Display a location on google maps'),
28 28
 				'classname'   => 'wp-api-libraries',
29 29
 			)
30 30
 		);
@@ -38,17 +38,17 @@  discard block
 block discarded – undo
38 38
 	 * @param mixed $instance Instance.
39 39
 	 * @return void
40 40
 	 */
41
-	public function widget( $args, $instance ) {
42
-		$instance = $this->parse_args( $instance );
41
+	public function widget($args, $instance) {
42
+		$instance = $this->parse_args($instance);
43 43
 
44 44
 		// Display widget title.
45
-		if ( isset( $instance['title'] ) ) {
45
+		if (isset($instance['title'])) {
46 46
 			echo $args['before_title'];
47
-			echo esc_attr( $instance['title'] );
47
+			echo esc_attr($instance['title']);
48 48
 			echo $args['after_title'];
49 49
 		}
50 50
 
51
-		WPAPI_GOOGLE_MAPS::print_map( $instance );
51
+		WPAPI_GOOGLE_MAPS::print_map($instance);
52 52
 	}
53 53
 
54 54
 	/**
@@ -58,84 +58,84 @@  discard block
 block discarded – undo
58 58
 	 * @param mixed $instance Instance.
59 59
 	 * @return void
60 60
 	 */
61
-	public function form( $instance ) {
61
+	public function form($instance) {
62 62
 		// Set default values.
63
-		$instance = $this->parse_args( $instance );
63
+		$instance = $this->parse_args($instance);
64 64
 
65 65
 		// Retrieve an existing value from the database.
66
-		$title['val']  = ! empty( $instance['title'] ) ? $instance['title'] : '';
67
-		$lat['val']    = ! empty( $instance['lat'] ) ? $instance['lat'] : '';
68
-		$lng['val']    = ! empty( $instance['lng'] ) ? $instance['lng'] : '';
69
-		$info['val'] 	 = ! empty( $instance['info'] ) ? $instance['info'] : '';
70
-		$width['val']  = ! empty( $instance['width'] ) ? $instance['width'] : '';
71
-		$height['val'] = ! empty( $instance['height'] ) ? $instance['height'] : '';
72
-		$zoom['val'] 	 = ! empty( $instance['zoom'] ) ? $instance['zoom'] : '';
73
-		$scrollwheel['val'] 	 = ! empty( $instance['scrollwheel'] ) ? $instance['scrollwheel'] : 0;
74
-
75
-		$title['id'] 	= $this->get_field_id( 'title' );
76
-		$lat['id'] 		= $this->get_field_id( 'lat' );
77
-		$lng['id']		= $this->get_field_id( 'lng' );
78
-		$info['id']		= $this->get_field_id( 'info' );
79
-		$width['id'] 	= $this->get_field_id( 'width' );
80
-		$height['id'] = $this->get_field_id( 'height' );
81
-		$zoom['id'] 	= $this->get_field_id( 'zoom' );
82
-		$scrollwheel['id'] 	= $this->get_field_id( 'scrollwheel' );
83
-
84
-		$title['name'] 	= $this->get_field_name( 'title' );
85
-		$lat['name'] 	 	= $this->get_field_name( 'lat' );
86
-		$lng['name']	 	= $this->get_field_name( 'lng' );
87
-		$info['name']  	= $this->get_field_name( 'info' );
88
-		$width['name'] 	= $this->get_field_name( 'width' );
89
-		$height['name'] = $this->get_field_name( 'height' );
90
-		$zoom['name'] 	= $this->get_field_name( 'zoom' );
91
-		$scrollwheel['name'] 	= $this->get_field_name( 'scrollwheel' );
66
+		$title['val']  = ! empty($instance['title']) ? $instance['title'] : '';
67
+		$lat['val']    = ! empty($instance['lat']) ? $instance['lat'] : '';
68
+		$lng['val']    = ! empty($instance['lng']) ? $instance['lng'] : '';
69
+		$info['val'] 	 = ! empty($instance['info']) ? $instance['info'] : '';
70
+		$width['val']  = ! empty($instance['width']) ? $instance['width'] : '';
71
+		$height['val'] = ! empty($instance['height']) ? $instance['height'] : '';
72
+		$zoom['val'] 	 = ! empty($instance['zoom']) ? $instance['zoom'] : '';
73
+		$scrollwheel['val'] = ! empty($instance['scrollwheel']) ? $instance['scrollwheel'] : 0;
74
+
75
+		$title['id'] = $this->get_field_id('title');
76
+		$lat['id'] 		= $this->get_field_id('lat');
77
+		$lng['id'] = $this->get_field_id('lng');
78
+		$info['id']		= $this->get_field_id('info');
79
+		$width['id'] 	= $this->get_field_id('width');
80
+		$height['id'] = $this->get_field_id('height');
81
+		$zoom['id'] 	= $this->get_field_id('zoom');
82
+		$scrollwheel['id'] = $this->get_field_id('scrollwheel');
83
+
84
+		$title['name'] 	= $this->get_field_name('title');
85
+		$lat['name'] 	 	= $this->get_field_name('lat');
86
+		$lng['name'] = $this->get_field_name('lng');
87
+		$info['name']  	= $this->get_field_name('info');
88
+		$width['name'] 	= $this->get_field_name('width');
89
+		$height['name'] = $this->get_field_name('height');
90
+		$zoom['name'] = $this->get_field_name('zoom');
91
+		$scrollwheel['name'] = $this->get_field_name('scrollwheel');
92 92
 
93 93
 		// Widget title.
94 94
 		echo '<p>';
95
-		echo '	<label for="' . esc_attr( $title['id'] ) . '" class="wp-api-maps_title_label">' . esc_attr( 'Title:' ) . '</label>';
96
-		echo '	<input type="text" id="' . esc_attr( $title['id'] ) . '" name="' . esc_attr( $title['name'] ) . '" class="widefat" value="' . esc_attr( $title['val'] ) . '">';
95
+		echo '	<label for="' . esc_attr($title['id']) . '" class="wp-api-maps_title_label">' . esc_attr('Title:') . '</label>';
96
+		echo '	<input type="text" id="' . esc_attr($title['id']) . '" name="' . esc_attr($title['name']) . '" class="widefat" value="' . esc_attr($title['val']) . '">';
97 97
 		echo '</p>';
98 98
 
99 99
 		// Widget width.
100 100
 		echo '<p>';
101
-		echo '	<label for="' . esc_attr( $width['id'] ) . '" class="wp-api-maps_width_label">' . esc_attr( 'Width:' ) . '</label>';
102
-		echo '	<input type="text" id="' . esc_attr( $width['id'] ) . '" name="' . esc_attr( $width['name'] ) . '" class="widefat" value="' . esc_attr( $width['val'] ) . '">';
101
+		echo '	<label for="' . esc_attr($width['id']) . '" class="wp-api-maps_width_label">' . esc_attr('Width:') . '</label>';
102
+		echo '	<input type="text" id="' . esc_attr($width['id']) . '" name="' . esc_attr($width['name']) . '" class="widefat" value="' . esc_attr($width['val']) . '">';
103 103
 		echo '</p>';
104 104
 
105 105
 		// Widget height.
106 106
 		echo '<p>';
107
-		echo '	<label for="' . esc_attr( $height['id'] ) . '" class="wp-api-maps_height_label">' . esc_attr( 'Height:' ) . '</label>';
108
-		echo '	<input type="text" id="' . esc_attr( $height['id'] ) . '" name="' . esc_attr( $height['name'] ) . '" class="widefat" value="' . esc_attr( $height['val'] ) . '">';
107
+		echo '	<label for="' . esc_attr($height['id']) . '" class="wp-api-maps_height_label">' . esc_attr('Height:') . '</label>';
108
+		echo '	<input type="text" id="' . esc_attr($height['id']) . '" name="' . esc_attr($height['name']) . '" class="widefat" value="' . esc_attr($height['val']) . '">';
109 109
 		echo '</p>';
110 110
 
111 111
 		// Latitude input.
112 112
 		echo '<p>';
113
-		echo '	<label for="' . esc_attr( $lat['id'] ) . '" class="wp-api-maps_lat_label">' . esc_attr( 'Latitude:' ) . '</label>';
114
-		echo '	<input type="text" id="' . esc_attr( $lat['id'] ) . '" name="' . esc_attr( $lat['name'] ) . '" class="widefat" value="' . esc_attr( $lat['val'] ) . '">';
113
+		echo '	<label for="' . esc_attr($lat['id']) . '" class="wp-api-maps_lat_label">' . esc_attr('Latitude:') . '</label>';
114
+		echo '	<input type="text" id="' . esc_attr($lat['id']) . '" name="' . esc_attr($lat['name']) . '" class="widefat" value="' . esc_attr($lat['val']) . '">';
115 115
 		echo '</p>';
116 116
 
117 117
 		// Longitude input.
118 118
 		echo '<p>';
119
-		echo '	<label for="' . esc_attr( $lng['id'] ) . '" class="wp-api-maps_lng_label">' . esc_attr( 'Longitude:' ) . '</label>';
120
-		echo '	<input type="text" id="' . esc_attr( $lng['id'] ) . '" name="' . esc_attr( $lng['name'] ) . '" class="widefat" value="' . esc_attr( $lng['val'] ) . '">';
119
+		echo '	<label for="' . esc_attr($lng['id']) . '" class="wp-api-maps_lng_label">' . esc_attr('Longitude:') . '</label>';
120
+		echo '	<input type="text" id="' . esc_attr($lng['id']) . '" name="' . esc_attr($lng['name']) . '" class="widefat" value="' . esc_attr($lng['val']) . '">';
121 121
 		echo '</p>';
122 122
 
123 123
 		// Info content input.
124 124
 		echo '<p>';
125
-		echo '	<label for="' . esc_attr( $info['id'] ) . '" class="wp-api-maps_info_label">' . esc_attr( 'Info window content:' ) . '</label>';
126
-		echo '	<input type="text" id="' . esc_attr( $info['id'] ) . '" name="' . esc_attr( $info['name'] ) . '" class="widefat" value="' . esc_attr( $info['val'] ) . '">';
125
+		echo '	<label for="' . esc_attr($info['id']) . '" class="wp-api-maps_info_label">' . esc_attr('Info window content:') . '</label>';
126
+		echo '	<input type="text" id="' . esc_attr($info['id']) . '" name="' . esc_attr($info['name']) . '" class="widefat" value="' . esc_attr($info['val']) . '">';
127 127
 		echo '</p>';
128 128
 
129 129
 		// Zoom input.
130 130
 		echo '<p>';
131
-		echo '	<label for="' . esc_attr( $zoom['id'] ) . '" class="wp-api-maps_zoom_label">' . esc_attr( 'Zoom:' ) . '</label>';
132
-		echo '	<input type="text" id="' . esc_attr( $zoom['id'] ) . '" name="' . esc_attr( $zoom['name'] ) . '" class="widefat" value="' . esc_attr( $zoom['val'] ) . '">';
131
+		echo '	<label for="' . esc_attr($zoom['id']) . '" class="wp-api-maps_zoom_label">' . esc_attr('Zoom:') . '</label>';
132
+		echo '	<input type="text" id="' . esc_attr($zoom['id']) . '" name="' . esc_attr($zoom['name']) . '" class="widefat" value="' . esc_attr($zoom['val']) . '">';
133 133
 		echo '</p>';
134 134
 
135 135
 		// ScrollWheel option.
136 136
 		echo '<p>';
137
-		echo '	<input value="1" type="checkbox"' . checked( esc_attr( $scrollwheel['val'] ), 1, false ) . 'id="' . esc_attr( $scrollwheel['id'] ) . '" name="' . esc_attr( $scrollwheel['name'] ) . '" />';
138
-		echo '	<label for="' .  esc_attr( $scrollwheel['id'] ) . '">Disable Scroll Zoom</label>';
137
+		echo '	<input value="1" type="checkbox"' . checked(esc_attr($scrollwheel['val']), 1, false) . 'id="' . esc_attr($scrollwheel['id']) . '" name="' . esc_attr($scrollwheel['name']) . '" />';
138
+		echo '	<label for="' . esc_attr($scrollwheel['id']) . '">Disable Scroll Zoom</label>';
139 139
 		echo '</p>';
140 140
 	}
141 141
 
@@ -147,18 +147,18 @@  discard block
 block discarded – undo
147 147
 	 * @param mixed $old_instance Old Instance.
148 148
 	 * @return $instance Instance.
149 149
 	 */
150
-	public function update( $new_instance, $old_instance ) {
150
+	public function update($new_instance, $old_instance) {
151 151
 
152 152
 		$instance = $old_instance;
153 153
 
154
-		$instance['title'] = ! empty( $new_instance['title'] ) ? strip_tags( $new_instance['title'] ) : '';
155
-		$instance['width'] = ! empty( $new_instance['width'] ) ? strip_tags( $new_instance['width'] ) : '';
156
-		$instance['height'] = ! empty( $new_instance['height'] ) ? strip_tags( $new_instance['height'] ) : '';
157
-		$instance['lat'] = ! empty( $new_instance['lat'] ) ? strip_tags( $new_instance['lat'] ) : '';
158
-		$instance['lng'] = ! empty( $new_instance['lng'] ) ? strip_tags( $new_instance['lng'] ) : '';
159
-		$instance['info'] = ! empty( $new_instance['info'] ) ? strip_tags( $new_instance['info'] ) : '';
160
-		$instance['zoom'] = ! empty( $new_instance['zoom'] ) ? strip_tags( $new_instance['zoom'] ) : null;
161
-		$instance['scrollwheel'] = ! empty( $new_instance['scrollwheel'] ) ? strip_tags( $new_instance['scrollwheel'] ) : 0;
154
+		$instance['title'] = ! empty($new_instance['title']) ? strip_tags($new_instance['title']) : '';
155
+		$instance['width'] = ! empty($new_instance['width']) ? strip_tags($new_instance['width']) : '';
156
+		$instance['height'] = ! empty($new_instance['height']) ? strip_tags($new_instance['height']) : '';
157
+		$instance['lat'] = ! empty($new_instance['lat']) ? strip_tags($new_instance['lat']) : '';
158
+		$instance['lng'] = ! empty($new_instance['lng']) ? strip_tags($new_instance['lng']) : '';
159
+		$instance['info'] = ! empty($new_instance['info']) ? strip_tags($new_instance['info']) : '';
160
+		$instance['zoom'] = ! empty($new_instance['zoom']) ? strip_tags($new_instance['zoom']) : null;
161
+		$instance['scrollwheel'] = ! empty($new_instance['scrollwheel']) ? strip_tags($new_instance['scrollwheel']) : 0;
162 162
 
163 163
 		return $instance;
164 164
 	}
@@ -169,9 +169,9 @@  discard block
 block discarded – undo
169 169
 	 * @param  [Array] $args : Array of arguments to parse.
170 170
 	 * @return [Array]       : Parsed arguments.
171 171
 	 */
172
-	private function parse_args( $args ) {
172
+	private function parse_args($args) {
173 173
 		// Set default values.
174
-		$args = wp_parse_args( $args, array(
174
+		$args = wp_parse_args($args, array(
175 175
 			'title' => '',
176 176
 			'width'	 => '300px',
177 177
 			'height' => '300px',
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
 			'info'	 => '',
181 181
 			'zoom'	 => 14,
182 182
 			'scrollwheel' => 0,
183
-		) );
183
+		));
184 184
 
185 185
 		return $args;
186 186
 	}
Please login to merge, or discard this patch.