Test Failed
Push — master ( ae4d5f...03780b )
by Brandon
02:22
created
modules/class-realestate-tools.php 4 patches
Doc Comments   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
 		 *
23 23
 		 * @access public
24 24
 		 * @param mixed $address
25
-		 * @return void
25
+		 * @return string
26 26
 		 */
27 27
 		public function extract_zipcode( $address ) {
28 28
 			$zipcode = preg_match("/\b[A-Z]{2}\s+\d{5}(-\d{4})?\b/", $address, $matches);
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
 		 *
61 61
 		 * @access public
62 62
 		 * @param mixed $zip_code
63
-		 * @return void
63
+		 * @return boolean
64 64
 		 */
65 65
 		public function validate_usa_zipcode( $zip_code ) {
66 66
 			if ( preg_match("/^([0-9]{5})(-[0-9]{4})?$/i", $zip_code) )
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
 		 *
76 76
 		 * @access public
77 77
 		 * @param mixed $latitude
78
-		 * @return void
78
+		 * @return boolean
79 79
 		 */
80 80
 		public function is_valid_latitude($latitude) {
81 81
 			if ( preg_match("/^-?([1-8]?[1-9]|[1-9]0)\.{1}\d{1,6}$/", $latitude) ) {
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
 		 *
92 92
 		 * @access public
93 93
 		 * @param mixed $longitude
94
-		 * @return void
94
+		 * @return boolean
95 95
 		 */
96 96
 		public function is_valid_longitude($longitude) {
97 97
 			if (preg_match("/^-?([1]?[1-7][1-9]|[1]?[1-8][0]|[1-9]?[0-9])\.{1}\d{1,6}$/",
Please login to merge, or discard this patch.
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 		 * @return void
38 38
 		 */
39 39
 		public function extract_bed_count( $text ) {
40
-    		$beds = preg_match("/\d (beds|Beds|Bedrooms)/", $text, $matches);
40
+			$beds = preg_match("/\d (beds|Beds|Bedrooms)/", $text, $matches);
41 41
 			$beds_text = $matches[0];
42 42
 			return $int = filter_var($beds_text, FILTER_SANITIZE_NUMBER_INT);
43 43
 		}
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
 		 * @return void
51 51
 		 */
52 52
 		public function extract_bath_count( $text ) {
53
-    		$baths = preg_match("/\d (bath|Baths|Bathrooms)/", $text, $matches);
53
+			$baths = preg_match("/\d (bath|Baths|Bathrooms)/", $text, $matches);
54 54
 			$baths_text = $matches[0];
55 55
 			return $int = filter_var($beds_text, FILTER_SANITIZE_NUMBER_INT);
56 56
 		}
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-if ( ! class_exists( 'RealEstateTools' ) ) {
3
+if ( ! class_exists('RealEstateTools')) {
4 4
 
5 5
 	/**
6 6
 	 * RealEstateTools class.
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
 		 * @param mixed $address
25 25
 		 * @return void
26 26
 		 */
27
-		public function extract_zipcode( $address ) {
27
+		public function extract_zipcode($address) {
28 28
 			$zipcode = preg_match("/\b[A-Z]{2}\s+\d{5}(-\d{4})?\b/", $address, $matches);
29 29
 			return $matches[0];
30 30
 		}
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 		 * @param mixed $text
37 37
 		 * @return void
38 38
 		 */
39
-		public function extract_bed_count( $text ) {
39
+		public function extract_bed_count($text) {
40 40
     		$beds = preg_match("/\d (beds|Beds|Bedrooms)/", $text, $matches);
41 41
 			$beds_text = $matches[0];
42 42
 			return $int = filter_var($beds_text, FILTER_SANITIZE_NUMBER_INT);
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
 		 * @param mixed $text
50 50
 		 * @return void
51 51
 		 */
52
-		public function extract_bath_count( $text ) {
52
+		public function extract_bath_count($text) {
53 53
     		$baths = preg_match("/\d (bath|Baths|Bathrooms)/", $text, $matches);
54 54
 			$baths_text = $matches[0];
55 55
 			return $int = filter_var($beds_text, FILTER_SANITIZE_NUMBER_INT);
@@ -62,8 +62,8 @@  discard block
 block discarded – undo
62 62
 		 * @param mixed $zip_code
63 63
 		 * @return void
64 64
 		 */
65
-		public function validate_usa_zipcode( $zip_code ) {
66
-			if ( preg_match("/^([0-9]{5})(-[0-9]{4})?$/i", $zip_code) )
65
+		public function validate_usa_zipcode($zip_code) {
66
+			if (preg_match("/^([0-9]{5})(-[0-9]{4})?$/i", $zip_code))
67 67
 				return true;
68 68
 			else
69 69
 				return false;
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
 		 * @return void
79 79
 		 */
80 80
 		public function is_valid_latitude($latitude) {
81
-			if ( preg_match("/^-?([1-8]?[1-9]|[1-9]0)\.{1}\d{1,6}$/", $latitude) ) {
81
+			if (preg_match("/^-?([1-8]?[1-9]|[1-9]0)\.{1}\d{1,6}$/", $latitude)) {
82 82
 				return true;
83 83
 			} else {
84 84
 				return false;
Please login to merge, or discard this patch.
Braces   +5 added lines, -4 removed lines patch added patch discarded remove patch
@@ -63,10 +63,11 @@
 block discarded – undo
63 63
 		 * @return void
64 64
 		 */
65 65
 		public function validate_usa_zipcode( $zip_code ) {
66
-			if ( preg_match("/^([0-9]{5})(-[0-9]{4})?$/i", $zip_code) )
67
-				return true;
68
-			else
69
-				return false;
66
+			if ( preg_match("/^([0-9]{5})(-[0-9]{4})?$/i", $zip_code) ) {
67
+							return true;
68
+			} else {
69
+							return false;
70
+			}
70 71
 		}
71 72
 
72 73
 
Please login to merge, or discard this patch.
modules/enerscore/wp-enerscore-api.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
 		 * Fetch the request from the API.
41 41
 		 *
42 42
 		 * @access private
43
-		 * @param mixed $request Request URL.
43
+		 * @param string $request Request URL.
44 44
 		 * @return $body Body.
45 45
 		 */
46 46
 		private function fetch( $request ) {
Please login to merge, or discard this patch.
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -23,10 +23,10 @@  discard block
 block discarded – undo
23 23
 	 */
24 24
 	class EnerscoreAPI {
25 25
 		 /**
26
-		 * URL to the API.
27
-		 *
28
-		 * @var string
29
-		 */
26
+		  * URL to the API.
27
+		  *
28
+		  * @var string
29
+		  */
30 30
 		private $base_uri = 'http://api-alpha.enerscore.com/api/address/neighbors/';
31 31
 		/**
32 32
 		 * __construct function.
@@ -37,12 +37,12 @@  discard block
 block discarded – undo
37 37
 		public function __construct() {
38 38
 		}
39 39
 		 /**
40
-		 * Fetch the request from the API.
41
-		 *
42
-		 * @access private
43
-		 * @param mixed $request Request URL.
44
-		 * @return $body Body.
45
-		 */
40
+		  * Fetch the request from the API.
41
+		  *
42
+		  * @access private
43
+		  * @param mixed $request Request URL.
44
+		  * @return $body Body.
45
+		  */
46 46
 		private function fetch( $request ) {
47 47
 			$response = wp_remote_get( $request );
48 48
 			$code = wp_remote_retrieve_response_code( $response );
Please login to merge, or discard this patch.
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -15,9 +15,9 @@  discard block
 block discarded – undo
15 15
 GitHub Branch: master
16 16
 */
17 17
 /* Exit if accessed directly */
18
-if ( ! defined( 'ABSPATH' ) ) { exit; }
18
+if ( ! defined('ABSPATH')) { exit; }
19 19
 /* Check if class exists. */
20
-if ( ! class_exists( 'EnerscoreAPI' ) ) {
20
+if ( ! class_exists('EnerscoreAPI')) {
21 21
 	/**
22 22
 	 * EnerscoreAPI class.
23 23
 	 */
@@ -43,14 +43,14 @@  discard block
 block discarded – undo
43 43
 		 * @param mixed $request Request URL.
44 44
 		 * @return $body Body.
45 45
 		 */
46
-		private function fetch( $request ) {
47
-			$response = wp_remote_get( $request );
48
-			$code = wp_remote_retrieve_response_code( $response );
49
-			if ( 200 !== $code ) {
50
-				return new WP_Error( 'response-error', sprintf( __( 'Server response code: %d', 'text-domain' ), $code ) );
46
+		private function fetch($request) {
47
+			$response = wp_remote_get($request);
48
+			$code = wp_remote_retrieve_response_code($response);
49
+			if (200 !== $code) {
50
+				return new WP_Error('response-error', sprintf(__('Server response code: %d', 'text-domain'), $code));
51 51
 			}
52
-			$body = wp_remote_retrieve_body( $response );
53
-			return json_decode( $body );
52
+			$body = wp_remote_retrieve_body($response);
53
+			return json_decode($body);
54 54
 		}
55 55
 		/**
56 56
 		 * Get Energy Score for Address.
@@ -59,12 +59,12 @@  discard block
 block discarded – undo
59 59
 		 * @param mixed $address Address.
60 60
 		 * @return void
61 61
 		 */
62
-		public function get_enerscore( $address ) {
63
-			if ( empty( $address ) ) {
64
-				return new WP_Error( 'required-fields', __( 'Required fields are empty.', 'text-domain' ) );
62
+		public function get_enerscore($address) {
63
+			if (empty($address)) {
64
+				return new WP_Error('required-fields', __('Required fields are empty.', 'text-domain'));
65 65
 			}
66 66
 			$request = $this->base_uri . $address;
67
-			return $this->fetch( $request );
67
+			return $this->fetch($request);
68 68
 		}
69 69
 	}
70 70
 }
Please login to merge, or discard this patch.
modules/nar/widgets/class-nar-widgets.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
 		 *
26 26
 		 * @access public
27 27
 		 * @param string $iframe_id (default: '')
28
-		 * @return void
28
+		 * @return string|null
29 29
 		 */
30 30
 		public function nar_iframe_id( $iframe_id = '' ) {
31 31
 
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
 		 *
41 41
 		 * @access public
42 42
 		 * @param string $widget_name (default: '')
43
-		 * @return void
43
+		 * @return string
44 44
 		 */
45 45
 		public function nar_iframe_class( $widget_name = '' ) {
46 46
 
Please login to merge, or discard this patch.
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -1,9 +1,9 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 /* Exit if accessed directly. */
4
-if ( ! defined( 'ABSPATH' ) ) { exit; }
4
+if ( ! defined('ABSPATH')) { exit; }
5 5
 
6
-if ( ! class_exists( 'NarWidgets' ) ) {
6
+if ( ! class_exists('NarWidgets')) {
7 7
 
8 8
 	/**
9 9
 	 * NarWidgets class.
@@ -27,10 +27,10 @@  discard block
 block discarded – undo
27 27
 		 * @param string $iframe_id (default: '')
28 28
 		 * @return void
29 29
 		 */
30
-		public function nar_iframe_id( $iframe_id = '' ) {
30
+		public function nar_iframe_id($iframe_id = '') {
31 31
 
32
-			if ( '' !== $iframe_id  ) {
33
-				return sanitize_html_class( $iframe_id ) . '-iframe';
32
+			if ('' !== $iframe_id) {
33
+				return sanitize_html_class($iframe_id) . '-iframe';
34 34
 			}
35 35
 
36 36
 		}
@@ -42,10 +42,10 @@  discard block
 block discarded – undo
42 42
 		 * @param string $widget_name (default: '')
43 43
 		 * @return void
44 44
 		 */
45
-		public function nar_iframe_class( $widget_name = '' ) {
45
+		public function nar_iframe_class($widget_name = '') {
46 46
 
47
-			if ( '' !== $widget_name ) {
48
-				return 'nar nar-iframe nar-' . sanitize_html_class( $widget_name ) . '-iframe';
47
+			if ('' !== $widget_name) {
48
+				return 'nar nar-iframe nar-' . sanitize_html_class($widget_name) . '-iframe';
49 49
 			} else {
50 50
 				return 'nar nar-iframe';
51 51
 			}
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
 		 */
61 61
 		public function get_mvp_program_widget() {
62 62
 
63
-			echo '<iframe frameborder="0" id="'. nar_iframe_id() .'" class="'. $this->zillow_iframe_class( 'mvp-program' ) .'" title="'. __('NAR MVP Program.', 're-pro') .'" src="https://static.realtor.org/ro/widget/mvpwidget.html" scrolling="no" width="300"  height="250"></iframe>';
63
+			echo '<iframe frameborder="0" id="' . nar_iframe_id() . '" class="' . $this->zillow_iframe_class('mvp-program') . '" title="' . __('NAR MVP Program.', 're-pro') . '" src="https://static.realtor.org/ro/widget/mvpwidget.html" scrolling="no" width="300"  height="250"></iframe>';
64 64
 		}
65 65
 
66 66
 		/**
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
 
74 74
 			// wp_enqueue_script( 'nar-message', 'http://www.realtor.org/sites/all/themes/rotheme/js/narmessage.js', 'jquery', null, true);
75 75
 
76
-			echo '<iframe id="'. nar_iframe_id() .' class="'. $this->zillow_iframe_class( 'home-ownership-matters' ) .'"  title="'. __('NAR Home Hownership Matters.', 're-pro') .'"  src="https://www.realtor.org/sites/all/themes/rotheme/html/narmessage.html" frameborder="0" width="180" height="250" scrolling="no"></iframe></noscript>';
76
+			echo '<iframe id="' . nar_iframe_id() . ' class="' . $this->zillow_iframe_class('home-ownership-matters') . '"  title="' . __('NAR Home Hownership Matters.', 're-pro') . '"  src="https://www.realtor.org/sites/all/themes/rotheme/html/narmessage.html" frameborder="0" width="180" height="250" scrolling="no"></iframe></noscript>';
77 77
 		}
78 78
 
79 79
 		/**
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
 		 * @return void
84 84
 		 */
85 85
 		public function get_code_of_ethics_widget() {
86
-			echo '<iframe id="'. nar_iframe_id() .' class="'. $this->zillow_iframe_class( 'code-of-ethics' ) .'" title="'. __('NAR Code of Ethics.', 're-pro') .'" frameborder="0" width="300" height="250" src="https://www.realtor.org/node/7504/embed" scrolling="no"></iframe>';
86
+			echo '<iframe id="' . nar_iframe_id() . ' class="' . $this->zillow_iframe_class('code-of-ethics') . '" title="' . __('NAR Code of Ethics.', 're-pro') . '" frameborder="0" width="300" height="250" src="https://www.realtor.org/node/7504/embed" scrolling="no"></iframe>';
87 87
 		}
88 88
 
89 89
 		/**
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
 		 * @return void
94 94
 		 */
95 95
 		public function get_nar_conf_expo_widget() {
96
-			echo '<iframe id="'. nar_iframe_id() .' class="'. $this->zillow_iframe_class( 'conference-expo' ) .'" title="'. __('NAR Conferences and Expos.', 're-pro') .'" frameborder="0" width="300" height="250" src="https://www.realtor.org/node/10695/embed" scrolling="no"></iframe>';
96
+			echo '<iframe id="' . nar_iframe_id() . ' class="' . $this->zillow_iframe_class('conference-expo') . '" title="' . __('NAR Conferences and Expos.', 're-pro') . '" frameborder="0" width="300" height="250" src="https://www.realtor.org/node/10695/embed" scrolling="no"></iframe>';
97 97
 		}
98 98
 
99 99
 	}
Please login to merge, or discard this patch.
modules/streetadvisor/wp-streetadvisor-api.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
 		 * __construct function.
40 40
 		 *
41 41
 		 * @access public
42
-		 * @param mixed $api_key API Key.
42
+		 * @param string $api_key API Key.
43 43
 		 * @return void
44 44
 		 */
45 45
 		public function __construct( $api_key ) {
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
 		 * Fetch the request from the API.
54 54
 		 *
55 55
 		 * @access private
56
-		 * @param mixed $request Request URL.
56
+		 * @param string $request Request URL.
57 57
 		 * @return $body Body.
58 58
 		 */
59 59
 		private function fetch( $request ) {
Please login to merge, or discard this patch.
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -16,9 +16,9 @@  discard block
 block discarded – undo
16 16
 * GitHub Branch: master
17 17
 */
18 18
 /* Exit if accessed directly */
19
-if ( ! defined( 'ABSPATH' ) ) { exit; }
19
+if ( ! defined('ABSPATH')) { exit; }
20 20
 /* Check if Class Exists. */
21
-if ( ! class_exists( 'StreetAdvisorAPI' ) ) {
21
+if ( ! class_exists('StreetAdvisorAPI')) {
22 22
 	/**
23 23
 	 * StreetAdvisor API Class.
24 24
 	 */
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
 		 * @param mixed $api_key API Key.
43 43
 		 * @return void
44 44
 		 */
45
-		public function __construct( $api_key ) {
45
+		public function __construct($api_key) {
46 46
 			static::$api_key = $api_key;
47 47
 			$this->args['headers'] = array(
48 48
 				'Content-Type' => 'application/json',
@@ -56,14 +56,14 @@  discard block
 block discarded – undo
56 56
 		 * @param mixed $request Request URL.
57 57
 		 * @return $body Body.
58 58
 		 */
59
-		private function fetch( $request ) {
60
-			$response = wp_remote_get( $request, $this->args );
61
-			$code = wp_remote_retrieve_response_code( $response );
62
-			if ( 200 !== $code ) {
63
-				return new WP_Error( 'response-error', sprintf( __( 'Server response code: %d', 'text-domain' ), $code ) );
59
+		private function fetch($request) {
60
+			$response = wp_remote_get($request, $this->args);
61
+			$code = wp_remote_retrieve_response_code($response);
62
+			if (200 !== $code) {
63
+				return new WP_Error('response-error', sprintf(__('Server response code: %d', 'text-domain'), $code));
64 64
 			}
65
-			$body = wp_remote_retrieve_body( $response );
66
-			return json_decode( $body, true );
65
+			$body = wp_remote_retrieve_body($response);
66
+			return json_decode($body, true);
67 67
 		}
68 68
 		/**
69 69
 		 * Get Location Data.
@@ -74,9 +74,9 @@  discard block
 block discarded – undo
74 74
 		 * @param mixed $level Level.
75 75
 		 * @return void
76 76
 		 */
77
-		public function get_location_data( $latitude, $longitude, $level ) {
78
-			$request = $this->base_uri . '/locations/overview/'.$latitude.'/'.$longitude.'/'.$level;
79
-			return $this->fetch( $request );
77
+		public function get_location_data($latitude, $longitude, $level) {
78
+			$request = $this->base_uri . '/locations/overview/' . $latitude . '/' . $longitude . '/' . $level;
79
+			return $this->fetch($request);
80 80
 		}
81 81
 		/**
82 82
 		 * Get Location Reviews.
@@ -88,9 +88,9 @@  discard block
 block discarded – undo
88 88
 		 * @param int $review_count (default: 5) Total # of Reviews to display.
89 89
 		 * @return void
90 90
 		 */
91
-		public function get_location_reviews( $latitude, $longitude, $level, $review_count = '5' ) {
92
-			$request = $this->base_uri . '/reviews/'.$latitude.'/'.$longitude.'/'.$level . '?take='. $review_count;
93
-			return $this->fetch( $request );
91
+		public function get_location_reviews($latitude, $longitude, $level, $review_count = '5') {
92
+			$request = $this->base_uri . '/reviews/' . $latitude . '/' . $longitude . '/' . $level . '?take=' . $review_count;
93
+			return $this->fetch($request);
94 94
 		}
95 95
 	}
96 96
 }
Please login to merge, or discard this patch.
modules/trulia/trulia-helpers.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -5,8 +5,8 @@
 block discarded – undo
5 5
  *
6 6
  * @access public
7 7
  * @param string $type (default: 'for_sale')
8
- * @param mixed $city
9
- * @param mixed $state
8
+ * @param string $city
9
+ * @param string $state
10 10
  * @param string $min_price (default: '')
11 11
  * @param string $max_price (default: '')
12 12
  * @param string $property_type (default: '')
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -16,9 +16,9 @@
 block discarded – undo
16 16
  * @param string $max_sqft (default: '')
17 17
  * @return void
18 18
  */
19
-function get_trulia_rss_listing_feed( $type = 'for_sale', $city, $state, $min_price = '', $max_price = '', $property_type = '', $min_bath = '', $max_bath = '', $min_sqft = '', $max_sqft = '' ) {
19
+function get_trulia_rss_listing_feed($type = 'for_sale', $city, $state, $min_price = '', $max_price = '', $property_type = '', $min_bath = '', $max_bath = '', $min_sqft = '', $max_sqft = '') {
20 20
 
21
-	$url = esc_url( 'https://www.trulia.com/rss2/'. urlencode($type ).'/'. urlencode( $city ).','. urlencode( $state ).'/'  );
21
+	$url = esc_url('https://www.trulia.com/rss2/' . urlencode($type) . '/' . urlencode($city) . ',' . urlencode($state) . '/');
22 22
 
23 23
 	return $url;
24 24
 
Please login to merge, or discard this patch.
modules/trulia/widgets/class-trulia-widgets.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
 		 *
47 47
 		 * @access public
48 48
 		 * @param string $iframe_id (default: '')
49
-		 * @return void
49
+		 * @return string|null
50 50
 		 */
51 51
 		public function trulia_iframe_id( $iframe_id = '' ) {
52 52
 
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
 		 *
62 62
 		 * @access public
63 63
 		 * @param string $widget_name (default: '')
64
-		 * @return void
64
+		 * @return string
65 65
 		 */
66 66
 		public function trulia_iframe_class( $widget_name = '' ) {
67 67
 
Please login to merge, or discard this patch.
Spacing   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -1,9 +1,9 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 /* Exit if accessed directly. */
4
-if ( ! defined( 'ABSPATH' ) ) { exit; }
4
+if ( ! defined('ABSPATH')) { exit; }
5 5
 
6
-if ( ! class_exists( 'TruliaWidgets' ) ) {
6
+if ( ! class_exists('TruliaWidgets')) {
7 7
 
8 8
 	/**
9 9
 	 * TruliaWidgets class.
@@ -48,10 +48,10 @@  discard block
 block discarded – undo
48 48
 		 * @param string $iframe_id (default: '')
49 49
 		 * @return void
50 50
 		 */
51
-		public function trulia_iframe_id( $iframe_id = '' ) {
51
+		public function trulia_iframe_id($iframe_id = '') {
52 52
 
53
-			if( '' !== $iframe_id  ) {
54
-				return sanitize_html_class( $iframe_id ) . '-iframe';
53
+			if ('' !== $iframe_id) {
54
+				return sanitize_html_class($iframe_id) . '-iframe';
55 55
 			}
56 56
 
57 57
 		}
@@ -63,10 +63,10 @@  discard block
 block discarded – undo
63 63
 		 * @param string $widget_name (default: '')
64 64
 		 * @return void
65 65
 		 */
66
-		public function trulia_iframe_class( $widget_name = '' ) {
66
+		public function trulia_iframe_class($widget_name = '') {
67 67
 
68
-			if( '' !== $widget_name ) {
69
-				return 'trulia trulia-iframe trulia-' . sanitize_html_class( $widget_name ) . '-iframe';
68
+			if ('' !== $widget_name) {
69
+				return 'trulia trulia-iframe trulia-' . sanitize_html_class($widget_name) . '-iframe';
70 70
 			} else {
71 71
 				return 'trulia-iframe';
72 72
 			}
@@ -83,8 +83,8 @@  discard block
 block discarded – undo
83 83
 		 * @param string $email (default: '')
84 84
 		 * @return void
85 85
 		 */
86
-		public function get_community_advice_widget( $iframe_id = '', $display_answers, $title, $email = '' ) {
87
-			echo '<iframe id="'. $this->trulia_iframe_id( $iframe_id ) .'" class="'. $this->trulia_iframe_class( 'community-advice' ) .'" src="https://synd.trulia.com/tools/expert-community-advice/embedded?params%5Bwhose_answer%5D=&params%5Bdisplay_answers%5D=true&params%5Btitle%5D=Expert+Community+Advice&params%5Bcolor%5D=grey&params%5Bemail%5D=&params%5Buser_url%5D=&params%5Bwidth%5D=300&params%5Bheight%5D=350&params%5Bguid%5D=58237a792f772"></iframe>';
86
+		public function get_community_advice_widget($iframe_id = '', $display_answers, $title, $email = '') {
87
+			echo '<iframe id="' . $this->trulia_iframe_id($iframe_id) . '" class="' . $this->trulia_iframe_class('community-advice') . '" src="https://synd.trulia.com/tools/expert-community-advice/embedded?params%5Bwhose_answer%5D=&params%5Bdisplay_answers%5D=true&params%5Btitle%5D=Expert+Community+Advice&params%5Bcolor%5D=grey&params%5Bemail%5D=&params%5Buser_url%5D=&params%5Bwidth%5D=300&params%5Bheight%5D=350&params%5Bguid%5D=58237a792f772"></iframe>';
88 88
 		}
89 89
 
90 90
 		/**
@@ -98,8 +98,8 @@  discard block
 block discarded – undo
98 98
 		 * @param string $email (default: '')
99 99
 		 * @return void
100 100
 		 */
101
-		public function get_rent_buy_calc_widget( $iframe_id = '', $location, $width, $height, $email = '' ) {
102
-			echo '<iframe id="'. $this->trulia_iframe_id( $iframe_id ) .'" class="'. $this->trulia_iframe_class( 'rent-buy-calc' ) .'" src="https://synd.trulia.com/tools/rent-vs-buy-calculator/embedded?params%5Btool_metro_area%5D=31084&params%5Btitle%5D=Rent+vs.+Buy+Calculator&params%5Bcolor%5D=grey&params%5Bemail%5D=&params%5Buser_url%5D=&params%5Bwidth%5D=600&params%5Bheight%5D=300&params%5Bguid%5D=582379f9264e8"></iframe>';
101
+		public function get_rent_buy_calc_widget($iframe_id = '', $location, $width, $height, $email = '') {
102
+			echo '<iframe id="' . $this->trulia_iframe_id($iframe_id) . '" class="' . $this->trulia_iframe_class('rent-buy-calc') . '" src="https://synd.trulia.com/tools/rent-vs-buy-calculator/embedded?params%5Btool_metro_area%5D=31084&params%5Btitle%5D=Rent+vs.+Buy+Calculator&params%5Bcolor%5D=grey&params%5Bemail%5D=&params%5Buser_url%5D=&params%5Bwidth%5D=600&params%5Bheight%5D=300&params%5Bguid%5D=582379f9264e8"></iframe>';
103 103
 		}
104 104
 
105 105
 		/**
@@ -113,9 +113,9 @@  discard block
 block discarded – undo
113 113
 		 * @param string $email (default: '')
114 114
 		 * @return void
115 115
 		 */
116
-		public function get_rental_market_widget( $iframe_id = '', $location, $width, $height, $email = '' ) {
116
+		public function get_rental_market_widget($iframe_id = '', $location, $width, $height, $email = '') {
117 117
 
118
-			echo '<iframe id="'. $this->trulia_iframe_id( $iframe_id ) .'" class="'. $this->trulia_iframe_class( 'rental-market' ) .'" src="https://synd.trulia.com/tools/rental-market-monitor/embedded?params%5Blocation%5D=Los+Angeles%2C+CA&params%5BlocationId%5D=22637&params%5Bcolor%5D=grey&params%5Bemail%5D=&params%5Buser_url%5D=&params%5Btitle%5D=Rental+Market+Monitor&params%5Bwidth%5D=300&params%5Bheight%5D=250&params%5Bguid%5D=582379637cf2e"></iframe>';
118
+			echo '<iframe id="' . $this->trulia_iframe_id($iframe_id) . '" class="' . $this->trulia_iframe_class('rental-market') . '" src="https://synd.trulia.com/tools/rental-market-monitor/embedded?params%5Blocation%5D=Los+Angeles%2C+CA&params%5BlocationId%5D=22637&params%5Bcolor%5D=grey&params%5Bemail%5D=&params%5Buser_url%5D=&params%5Btitle%5D=Rental+Market+Monitor&params%5Bwidth%5D=300&params%5Bheight%5D=250&params%5Bguid%5D=582379637cf2e"></iframe>';
119 119
 
120 120
 		}
121 121
 
@@ -131,8 +131,8 @@  discard block
 block discarded – undo
131 131
 		 * @param string $email (default: '')
132 132
 		 * @return void
133 133
 		 */
134
-		public function get_map_search_widget( $iframe_id = '', $location, $width, $height, $email = '' ) {
135
-			echo '<iframe id="'. $this->trulia_iframe_id( $iframe_id ) .'" class="'. $this->trulia_iframe_class( 'map-search' ) .'" src="https://synd.trulia.com/tools/map-search/embedded?params%5Blocation%5D=West+Hills%2C+CA&params%5BlocationId%5D=39307&params%5Bagent_id%5D=&params%5Bproperty_status%5D=for+sale&params%5Btitle%5D=Map+Search&params%5Bcolor%5D=grey&params%5Bemail%5D=&params%5Buser_url%5D=&params%5Bwidth%5D=600&params%5Bheight%5D=300&params%5Bguid%5D=582378f4c0432"></iframe>';
134
+		public function get_map_search_widget($iframe_id = '', $location, $width, $height, $email = '') {
135
+			echo '<iframe id="' . $this->trulia_iframe_id($iframe_id) . '" class="' . $this->trulia_iframe_class('map-search') . '" src="https://synd.trulia.com/tools/map-search/embedded?params%5Blocation%5D=West+Hills%2C+CA&params%5BlocationId%5D=39307&params%5Bagent_id%5D=&params%5Bproperty_status%5D=for+sale&params%5Btitle%5D=Map+Search&params%5Bcolor%5D=grey&params%5Bemail%5D=&params%5Buser_url%5D=&params%5Bwidth%5D=600&params%5Bheight%5D=300&params%5Bguid%5D=582378f4c0432"></iframe>';
136 136
 		}
137 137
 
138 138
 		/**
@@ -146,8 +146,8 @@  discard block
 block discarded – undo
146 146
 		 * @param string $email (default: '')
147 147
 		 * @return void
148 148
 		 */
149
-		public function get_home_gallery_widget( $iframe_id = '', $location, $width, $height, $email = '' ) {
150
-			echo '<iframe id="'. $this->trulia_iframe_id( $iframe_id ) .'" class="'. $this->trulia_iframe_class( 'home-gallery' ) .'" src="https://synd.trulia.com/tools/home-gallery/embedded?params%5Blocation%5D=Los+Angeles%2C+CA&params%5BlocationId%5D=22637&params%5Bmin_price%5D=&params%5Bmax_price%5D=&params%5Bnum_beds%5D=&params%5Bnum_baths%5D=&params%5Bagent_id%5D=&params%5Bspeed%5D=5000&params%5Btitle%5D=Home+Gallery&params%5Bcolor%5D=green&params%5Bemail%5D=&params%5Buser_url%5D=&params%5Bwidth%5D=300&params%5Bheight%5D=300&params%5Bguid%5D=582371b703b0d&params%5Bslides_per_page%5D=3&city=Los Angeles&state_code=CA"></iframe>';
149
+		public function get_home_gallery_widget($iframe_id = '', $location, $width, $height, $email = '') {
150
+			echo '<iframe id="' . $this->trulia_iframe_id($iframe_id) . '" class="' . $this->trulia_iframe_class('home-gallery') . '" src="https://synd.trulia.com/tools/home-gallery/embedded?params%5Blocation%5D=Los+Angeles%2C+CA&params%5BlocationId%5D=22637&params%5Bmin_price%5D=&params%5Bmax_price%5D=&params%5Bnum_beds%5D=&params%5Bnum_baths%5D=&params%5Bagent_id%5D=&params%5Bspeed%5D=5000&params%5Btitle%5D=Home+Gallery&params%5Bcolor%5D=green&params%5Bemail%5D=&params%5Buser_url%5D=&params%5Bwidth%5D=300&params%5Bheight%5D=300&params%5Bguid%5D=582371b703b0d&params%5Bslides_per_page%5D=3&city=Los Angeles&state_code=CA"></iframe>';
151 151
 		}
152 152
 
153 153
 		/**
@@ -161,8 +161,8 @@  discard block
 block discarded – undo
161 161
 		 * @param string $email (default: '')
162 162
 		 * @return void
163 163
 		 */
164
-		public function get_home_showcase_widget( $iframe_id = '', $location, $width, $height, $email = '' ) {
165
-			echo '<iframe id="'. $this->trulia_iframe_id( $iframe_id ) .'" class="'. $this->trulia_iframe_class( 'home-showcase' ) .'" src="https://synd.trulia.com/tools/home-showcase/embedded?params%5Blocation%5D=Los+Angeles%2C+CA&params%5BlocationId%5D=22637&params%5Bmin_price%5D=&params%5Bmax_price%5D=&params%5Bnum_beds%5D=&params%5Bnum_baths%5D=&params%5Bagent_id%5D=&params%5Bspeed%5D=5000&params%5Btitle%5D=My+Listings&params%5Bcolor%5D=grey&params%5Bemail%5D=&params%5Buser_url%5D=&params%5Bwidth%5D=300&params%5Bheight%5D=350&params%5Bguid%5D=582370ce64073"></iframe>';
164
+		public function get_home_showcase_widget($iframe_id = '', $location, $width, $height, $email = '') {
165
+			echo '<iframe id="' . $this->trulia_iframe_id($iframe_id) . '" class="' . $this->trulia_iframe_class('home-showcase') . '" src="https://synd.trulia.com/tools/home-showcase/embedded?params%5Blocation%5D=Los+Angeles%2C+CA&params%5BlocationId%5D=22637&params%5Bmin_price%5D=&params%5Bmax_price%5D=&params%5Bnum_beds%5D=&params%5Bnum_baths%5D=&params%5Bagent_id%5D=&params%5Bspeed%5D=5000&params%5Btitle%5D=My+Listings&params%5Bcolor%5D=grey&params%5Bemail%5D=&params%5Buser_url%5D=&params%5Bwidth%5D=300&params%5Bheight%5D=350&params%5Bguid%5D=582370ce64073"></iframe>';
166 166
 		}
167 167
 
168 168
 		/**
@@ -176,8 +176,8 @@  discard block
 block discarded – undo
176 176
 		 * @param string $email (default: '')
177 177
 		 * @return void
178 178
 		 */
179
-		public function get_homefinder_widget( $iframe_id = '', $location, $width, $height, $email = '' ) {
180
-			echo '<iframe id="'. $this->trulia_iframe_id( $iframe_id ) .'" class="'. $this->trulia_iframe_class( 'homefinder' ) .'"  src="https://synd.trulia.com/tools/home-finder/embedded?params%5Blocation%5D=&params%5BlocationId%5D=&params%5Bcolor%5D=green&params%5Bemail%5D=&params%5Buser_url%5D=&params%5Btitle%5D=Home+Finder&params%5Bwidth%5D=300&params%5Bheight%5D=350&params%5Bguid%5D=58236f71d7732"></iframe>';
179
+		public function get_homefinder_widget($iframe_id = '', $location, $width, $height, $email = '') {
180
+			echo '<iframe id="' . $this->trulia_iframe_id($iframe_id) . '" class="' . $this->trulia_iframe_class('homefinder') . '"  src="https://synd.trulia.com/tools/home-finder/embedded?params%5Blocation%5D=&params%5BlocationId%5D=&params%5Bcolor%5D=green&params%5Bemail%5D=&params%5Buser_url%5D=&params%5Btitle%5D=Home+Finder&params%5Bwidth%5D=300&params%5Bheight%5D=350&params%5Bguid%5D=58236f71d7732"></iframe>';
181 181
 		}
182 182
 
183 183
 		/**
@@ -191,9 +191,9 @@  discard block
 block discarded – undo
191 191
 		 * @param string $email (default: '')
192 192
 		 * @return void
193 193
 		 */
194
-		public function get_market_monitor_widget( $iframe_id = '', $location, $width, $height, $email = '' ) {
194
+		public function get_market_monitor_widget($iframe_id = '', $location, $width, $height, $email = '') {
195 195
 
196
-			echo '<iframe id="'. $this->trulia_iframe_id( $iframe_id ) .'" class="'. $this->trulia_iframe_class( 'market-monitor' ) .'" src="https://synd.trulia.com/tools/market-monitor/embedded?params%5Blocation%5D=Los+Angeles%2C+CA&params%5BlocationId%5D=22637&params%5Blisting_price_type%5D=average&params%5Bshow_inventory%5D=1&params%5Btitle%5D=Market+Monitor&params%5Bcolor%5D=grey&params%5Bemail%5D=&params%5Buser_url%5D=&params%5Bwidth%5D=300&params%5Bheight%5D=250&params%5Bguid%5D=58236e004595a"></iframe>';
196
+			echo '<iframe id="' . $this->trulia_iframe_id($iframe_id) . '" class="' . $this->trulia_iframe_class('market-monitor') . '" src="https://synd.trulia.com/tools/market-monitor/embedded?params%5Blocation%5D=Los+Angeles%2C+CA&params%5BlocationId%5D=22637&params%5Blisting_price_type%5D=average&params%5Bshow_inventory%5D=1&params%5Btitle%5D=Market+Monitor&params%5Bcolor%5D=grey&params%5Bemail%5D=&params%5Buser_url%5D=&params%5Bwidth%5D=300&params%5Bheight%5D=250&params%5Bguid%5D=58236e004595a"></iframe>';
197 197
 		}
198 198
 
199 199
 		/**
@@ -207,9 +207,9 @@  discard block
 block discarded – undo
207 207
 		 * @param mixed $height
208 208
 		 * @return void
209 209
 		 */
210
-		public function get_affordability_calc_widget( $iframe_id = '', $color, $title, $width, $height, $email = '' ) {
210
+		public function get_affordability_calc_widget($iframe_id = '', $color, $title, $width, $height, $email = '') {
211 211
 
212
-		echo '<iframe id="'. $this->trulia_iframe_id( $iframe_id ) .'" class="'. $this->trulia_iframe_class( 'affordability-calc' ) .'" src="https://synd.trulia.com/tools/affordability-calculator/embedded?params%5Bcolor%5D=grey&params%5Bemail%5D=&params%5Buser_url%5D=&params%5Btitle%5D=Affordability+Calculator&params%5Bwidth%5D=600&params%5Bheight%5D=300&params%5Bguid%5D=58236d0b501ae"></iframe>';
212
+		echo '<iframe id="' . $this->trulia_iframe_id($iframe_id) . '" class="' . $this->trulia_iframe_class('affordability-calc') . '" src="https://synd.trulia.com/tools/affordability-calculator/embedded?params%5Bcolor%5D=grey&params%5Bemail%5D=&params%5Buser_url%5D=&params%5Btitle%5D=Affordability+Calculator&params%5Bwidth%5D=600&params%5Bheight%5D=300&params%5Bguid%5D=58236d0b501ae"></iframe>';
213 213
 
214 214
 		}
215 215
 
Please login to merge, or discard this patch.
modules/walkscore/wp-walkscore-api.php 2 patches
Doc Comments   +1 added lines, -3 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 		 * Fetch the request from the API.
56 56
 		 *
57 57
 		 * @access private
58
-		 * @param mixed $request Request URL.
58
+		 * @param string $request Request URL.
59 59
 		 * @return $body Body.
60 60
 		 */
61 61
 		private function fetch( $request ) {
@@ -71,11 +71,9 @@  discard block
 block discarded – undo
71 71
 		 * Get Walkscore (https://www.walkscore.com/professional/api.php)
72 72
 		 *
73 73
 		 * @access public
74
-		 * @param mixed $wsapikey Your Walk Score API Key. Contact us to get one. Required.
75 74
 		 * @param mixed $latitude The latitude of the requested location. Required.
76 75
 		 * @param mixed $longitude The longitude of the requested location. Required.
77 76
 		 * @param mixed $address The URL encoded address. Required.
78
-		 * @param mixed $format Return results in XML or JSON (defaults to XML).
79 77
 		 * @return void
80 78
 		 */
81 79
 		function get_walkscore( $latitude, $longitude, $address ) {
Please login to merge, or discard this patch.
Spacing   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -15,9 +15,9 @@  discard block
 block discarded – undo
15 15
 * GitHub Branch: master
16 16
 */
17 17
 /* Exit if accessed directly. */
18
-if ( ! defined( 'ABSPATH' ) ) { exit; }
18
+if ( ! defined('ABSPATH')) { exit; }
19 19
 /* Check if class exists. */
20
-if ( ! class_exists( 'WalkscoreAPI' ) ) {
20
+if ( ! class_exists('WalkscoreAPI')) {
21 21
 	/**
22 22
 	 * Walkscore API Class.
23 23
 	 */
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 		 * @param mixed $wsapikey API Key.
48 48
 		 * @return void
49 49
 		 */
50
-		public function __construct( $wsapikey, $output = 'json' ) {
50
+		public function __construct($wsapikey, $output = 'json') {
51 51
 			static::$wsapikey = $wsapikey;
52 52
 			static::$output = $output;
53 53
 		}
@@ -58,14 +58,14 @@  discard block
 block discarded – undo
58 58
 		 * @param mixed $request Request URL.
59 59
 		 * @return $body Body.
60 60
 		 */
61
-		private function fetch( $request ) {
62
-			$response = wp_remote_get( $request );
63
-			$code = wp_remote_retrieve_response_code( $response );
64
-			if ( 200 !== $code ) {
65
-				return new WP_Error( 'response-error', sprintf( __( 'Server response code: %d', 'text-domain' ), $code ) );
61
+		private function fetch($request) {
62
+			$response = wp_remote_get($request);
63
+			$code = wp_remote_retrieve_response_code($response);
64
+			if (200 !== $code) {
65
+				return new WP_Error('response-error', sprintf(__('Server response code: %d', 'text-domain'), $code));
66 66
 			}
67
-			$body = wp_remote_retrieve_body( $response );
68
-			return json_decode( $body );
67
+			$body = wp_remote_retrieve_body($response);
68
+			return json_decode($body);
69 69
 		}
70 70
 		/**
71 71
 		 * Get Walkscore (https://www.walkscore.com/professional/api.php)
@@ -78,12 +78,12 @@  discard block
 block discarded – undo
78 78
 		 * @param mixed $format Return results in XML or JSON (defaults to XML).
79 79
 		 * @return void
80 80
 		 */
81
-		function get_walkscore( $latitude, $longitude, $address ) {
82
-			if ( empty( $latitude ) || empty( $longitude ) || empty( $address ) ) {
83
-				return new WP_Error( 'required-fields', __( 'Required fields are empty.', 'text-domain' ) );
81
+		function get_walkscore($latitude, $longitude, $address) {
82
+			if (empty($latitude) || empty($longitude) || empty($address)) {
83
+				return new WP_Error('required-fields', __('Required fields are empty.', 'text-domain'));
84 84
 			}
85 85
 			$request = $this->base_uri . '/score?format=' . static::$output . '&wsapikey=' . static::$wsapikey . '&lat=' . $latitude . '&lon=' . $longitude . '&address=' . $address;
86
-			return $this->fetch( $request );
86
+			return $this->fetch($request);
87 87
 		}
88 88
 		/**
89 89
 		 * get_transit_score function.
@@ -97,12 +97,12 @@  discard block
 block discarded – undo
97 97
 		 * @param mixed $research
98 98
 		 * @return void
99 99
 		 */
100
-		function get_transit_score( $latitude, $longitude, $city, $state, $country, $research ) {
101
-			if ( empty( $latitude ) || empty( $longitude ) || empty( $city ) || empty( $state ) ) {
102
-				return new WP_Error( 'required-fields', __( 'Required fields are empty.', 'text-domain' ) );
100
+		function get_transit_score($latitude, $longitude, $city, $state, $country, $research) {
101
+			if (empty($latitude) || empty($longitude) || empty($city) || empty($state)) {
102
+				return new WP_Error('required-fields', __('Required fields are empty.', 'text-domain'));
103 103
 			}
104 104
 			$request = $this->base_uri . '/transit/score/?wsapikey=' . static::$wsapikey . '&lat=' . $latitude . '&lon=' . $longitude . '&city=' . $city . '&state=' . $state . '&format=' . $output;
105
-			return $this->fetch( $request );
105
+			return $this->fetch($request);
106 106
 		}
107 107
 		function get_transit_stop_search() {
108 108
 		}
@@ -120,31 +120,31 @@  discard block
 block discarded – undo
120 120
 		 * @param  [String] $code : Response code to get message from.
121 121
 		 * @return [String]       : Message corresponding to response code sent in.
122 122
 		 */
123
-		public function response_code_msg( $code = '' ) {
124
-			switch ( $code ) {
123
+		public function response_code_msg($code = '') {
124
+			switch ($code) {
125 125
 			case 1:
126
-				$msg = __( 'Walk Score successfully returned.', 'text-domain' );
126
+				$msg = __('Walk Score successfully returned.', 'text-domain');
127 127
 				break;
128 128
 			case 2:
129
-				$msg = __( 'Score is being calculated and is not currently available.', 'text-domain' );
129
+				$msg = __('Score is being calculated and is not currently available.', 'text-domain');
130 130
 				break;
131 131
 			case 30:
132
-				$msg = __( 'Invalid latitude/longitude.', 'text-domain' );
132
+				$msg = __('Invalid latitude/longitude.', 'text-domain');
133 133
 				break;
134 134
 			case 31:
135
-				$msg = __( 'Walk Score API internal error.', 'text-domain' );
135
+				$msg = __('Walk Score API internal error.', 'text-domain');
136 136
 				break;
137 137
 			case 40:
138
-				$msg = __( 'Your WSAPIKEY is invalid.', 'text-domain' );
138
+				$msg = __('Your WSAPIKEY is invalid.', 'text-domain');
139 139
 				break;
140 140
 			case 41:
141
-				$msg = __( 'Your daily API quota has been exceeded.', 'text-domain' );
141
+				$msg = __('Your daily API quota has been exceeded.', 'text-domain');
142 142
 				break;
143 143
 			case 42:
144
-				$msg = __( 'Your IP address has been blocked.', 'text-domain' );
144
+				$msg = __('Your IP address has been blocked.', 'text-domain');
145 145
 				break;
146 146
 			default:
147
-				$msg = __( 'Sorry, response code is unknown.', 'text-domain' );
147
+				$msg = __('Sorry, response code is unknown.', 'text-domain');
148 148
 				break;
149 149
 			}
150 150
 			return $msg;
Please login to merge, or discard this patch.
modules/zillow/widgets/class-zillow-widgets.php 2 patches
Doc Comments   +2 added lines, -3 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
 		 *
47 47
 		 * @access public
48 48
 		 * @param string $iframe_id (default: '')
49
-		 * @return void
49
+		 * @return string|null
50 50
 		 */
51 51
 		public function zillow_iframe_id( $iframe_id = '' ) {
52 52
 
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
 		 *
62 62
 		 * @access public
63 63
 		 * @param string $widget_name (default: '')
64
-		 * @return void
64
+		 * @return string
65 65
 		 */
66 66
 		public function zillow_iframe_class( $widget_name = '' ) {
67 67
 
@@ -413,7 +413,6 @@  discard block
 block discarded – undo
413 413
 		 * get_lg_zillow_search_widget function.
414 414
 		 *
415 415
 		 * @access public
416
-		 * @param string $widget_type (default: 'iframe')
417 416
 		 * @param string $iframe_id (default: '')
418 417
 		 * @param mixed $zillow_screenname
419 418
 		 * @param string $type (default: 'iframe')
Please login to merge, or discard this patch.
Spacing   +62 added lines, -62 removed lines patch added patch discarded remove patch
@@ -1,9 +1,9 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 /* Exit if accessed directly. */
4
-if ( ! defined( 'ABSPATH' ) ) { exit; }
4
+if ( ! defined('ABSPATH')) { exit; }
5 5
 
6
-if ( ! class_exists( 'ZillowWidgets' ) ) {
6
+if ( ! class_exists('ZillowWidgets')) {
7 7
 
8 8
 	/**
9 9
 	 * ZillowWidgets class.
@@ -48,10 +48,10 @@  discard block
 block discarded – undo
48 48
 		 * @param string $iframe_id (default: '')
49 49
 		 * @return void
50 50
 		 */
51
-		public function zillow_iframe_id( $iframe_id = '' ) {
51
+		public function zillow_iframe_id($iframe_id = '') {
52 52
 
53
-			if( '' !== $iframe_id  ) {
54
-				return sanitize_html_class( $iframe_id ) . '-iframe';
53
+			if ('' !== $iframe_id) {
54
+				return sanitize_html_class($iframe_id) . '-iframe';
55 55
 			}
56 56
 
57 57
 		}
@@ -63,10 +63,10 @@  discard block
 block discarded – undo
63 63
 		 * @param string $widget_name (default: '')
64 64
 		 * @return void
65 65
 		 */
66
-		public function zillow_iframe_class( $widget_name = '' ) {
66
+		public function zillow_iframe_class($widget_name = '') {
67 67
 
68
-			if( '' !== $widget_name ) {
69
-				return 'zillow zillow-iframe zillow-' . sanitize_html_class( $widget_name ) . '-iframe';
68
+			if ('' !== $widget_name) {
69
+				return 'zillow zillow-iframe zillow-' . sanitize_html_class($widget_name) . '-iframe';
70 70
 			} else {
71 71
 				return 'zillow zillow-iframe';
72 72
 			}
@@ -84,9 +84,9 @@  discard block
 block discarded – undo
84 84
 		 * @param string $format (default: 'normalWidget')
85 85
 		 * @return void
86 86
 		 */
87
-		public function get_listings_widget( $iframe_id = '', $zuid, $format = 'normalWidget' ) {
87
+		public function get_listings_widget($iframe_id = '', $zuid, $format = 'normalWidget') {
88 88
 
89
-			echo '<iframe id="'. $this->zillow_iframe_id( $iframe_id ) .'" class="'. $this->zillow_iframe_class( 'listings' ) .'" scrolling="no" title="'. __( 'My Listings on Zillow', 're-rpo' ) .'" src="https://www.zillow.com/widgets/profile/NewListingsWidget.htm?aid='. $zuid .'&newVersion=true&widgetFormat='. $format .'" width="500" height="300" frameborder="0" style="width:100%;"></iframe>';
89
+			echo '<iframe id="' . $this->zillow_iframe_id($iframe_id) . '" class="' . $this->zillow_iframe_class('listings') . '" scrolling="no" title="' . __('My Listings on Zillow', 're-rpo') . '" src="https://www.zillow.com/widgets/profile/NewListingsWidget.htm?aid=' . $zuid . '&newVersion=true&widgetFormat=' . $format . '" width="500" height="300" frameborder="0" style="width:100%;"></iframe>';
90 90
 
91 91
 		}
92 92
 
@@ -103,9 +103,9 @@  discard block
 block discarded – undo
103 103
 		 * @param mixed $height
104 104
 		 * @return void
105 105
 		 */
106
-		public function get_review_widget( $iframe_id = '', $zuid, $screenname, $size = 'wide', $zmod = 'true', $width = '300', $height = '100' ) {
106
+		public function get_review_widget($iframe_id = '', $zuid, $screenname, $size = 'wide', $zmod = 'true', $width = '300', $height = '100') {
107 107
 
108
-			echo '<iframe id="'. $this->zillow_iframe_id( $iframe_id ) .'" class="'. $this->zillow_iframe_class( 'reviews' ) .'" scrolling="yes" title="'. __( 'My Reviews on Zillow', 're-pro' ) .'" src="https://www.zillow.com/widgets/reputation/Rating.htm?did=rw-widget-container&ezuid=' . $zuid .'&scrnname=' . $screenname . '&size=' .$size . '&type=iframe&zmod='. $zmod .'" width="'. $width . '" height="'. $height .'" frameborder="0"></iframe>';
108
+			echo '<iframe id="' . $this->zillow_iframe_id($iframe_id) . '" class="' . $this->zillow_iframe_class('reviews') . '" scrolling="yes" title="' . __('My Reviews on Zillow', 're-pro') . '" src="https://www.zillow.com/widgets/reputation/Rating.htm?did=rw-widget-container&ezuid=' . $zuid . '&scrnname=' . $screenname . '&size=' . $size . '&type=iframe&zmod=' . $zmod . '" width="' . $width . '" height="' . $height . '" frameborder="0"></iframe>';
109 109
 
110 110
 		}
111 111
 
@@ -118,9 +118,9 @@  discard block
 block discarded – undo
118 118
 		 * @param string $format (default: 'normalWidget')
119 119
 		 * @return void
120 120
 		 */
121
-		public function get_past_listings_widget( $iframe_id = '', $zuid, $format = 'normalWidget' ) {
121
+		public function get_past_listings_widget($iframe_id = '', $zuid, $format = 'normalWidget') {
122 122
 
123
-			echo '<iframe id="'. $this->zillow_iframe_id( $iframe_id ) .'" class="'. $this->zillow_iframe_class( 'past-listings' ) .'" scrolling="no" title="'. __( 'My Sales on Zillow', 're-rpo' ) .'" src="https://www.zillow.com/widgets/profile/PastSalesListingWidget.htm?aid='. $zuid .'&newVersion=true&widgetFormat='. $format .'" width="500" height="250" frameborder="0" style="width:100%;"></iframe>';
123
+			echo '<iframe id="' . $this->zillow_iframe_id($iframe_id) . '" class="' . $this->zillow_iframe_class('past-listings') . '" scrolling="no" title="' . __('My Sales on Zillow', 're-rpo') . '" src="https://www.zillow.com/widgets/profile/PastSalesListingWidget.htm?aid=' . $zuid . '&newVersion=true&widgetFormat=' . $format . '" width="500" height="250" frameborder="0" style="width:100%;"></iframe>';
124 124
 
125 125
 		}
126 126
 
@@ -132,9 +132,9 @@  discard block
 block discarded – undo
132 132
 		 * @param mixed $email
133 133
 		 * @return void
134 134
 		 */
135
-		public function get_contact_widget( $iframe_id = '', $email ) {
135
+		public function get_contact_widget($iframe_id = '', $email) {
136 136
 
137
-			echo '<iframe id="'. $this->zillow_iframe_id( $iframe_id ) .'" class="'. $this->zillow_iframe_class( 'contact' ) .'" scrolling="no" title="'. __( 'Contact me on Zillow', 're-rpo' ) .'" src="https://www.zillow.com/widgets/contact/ContactFormWidget.htm?email='. antispambot( sanitize_email( $email ) ) .'&size=wide" width="350" height="250" frameborder="0" style="width:100%;"></iframe>';
137
+			echo '<iframe id="' . $this->zillow_iframe_id($iframe_id) . '" class="' . $this->zillow_iframe_class('contact') . '" scrolling="no" title="' . __('Contact me on Zillow', 're-rpo') . '" src="https://www.zillow.com/widgets/contact/ContactFormWidget.htm?email=' . antispambot(sanitize_email($email)) . '&size=wide" width="350" height="250" frameborder="0" style="width:100%;"></iframe>';
138 138
 
139 139
 		}
140 140
 
@@ -147,9 +147,9 @@  discard block
 block discarded – undo
147 147
 		 * @param string $iframe_id (default: '')
148 148
 		 * @return void
149 149
 		 */
150
-		public function get_affordability_calc_widget( $iframe_id = '' ) {
150
+		public function get_affordability_calc_widget($iframe_id = '') {
151 151
 
152
-			echo '<iframe id="'. $this->zillow_iframe_id( $iframe_id ) .'" class="'. $this->zillow_iframe_class( 'affordability-calc' ) .'" scrolling="no" title="'. __( 'Zillow Affordability Calculator', 're-rpo' ) .'" src="https://www.zillow.com/mortgage/widgets/AffordabilityCalculatorWidget.htm" width="688" height="700" frameborder="0" style="width:100%;min-height:700px;"></iframe>';
152
+			echo '<iframe id="' . $this->zillow_iframe_id($iframe_id) . '" class="' . $this->zillow_iframe_class('affordability-calc') . '" scrolling="no" title="' . __('Zillow Affordability Calculator', 're-rpo') . '" src="https://www.zillow.com/mortgage/widgets/AffordabilityCalculatorWidget.htm" width="688" height="700" frameborder="0" style="width:100%;min-height:700px;"></iframe>';
153 153
 
154 154
 		}
155 155
 
@@ -160,9 +160,9 @@  discard block
 block discarded – undo
160 160
 		 * @param string $iframe_id (default: '')
161 161
 		 * @return void
162 162
 		 */
163
-		public function get_monthlypay_calc_widget( $iframe_id = '' ) {
163
+		public function get_monthlypay_calc_widget($iframe_id = '') {
164 164
 
165
-			echo '<iframe id="'. $this->zillow_iframe_id( $iframe_id ) .'" class="'. $this->zillow_iframe_class( 'listings' ) .'" scrolling="no" title="'. __( 'Monthly Payment Calculator', 're-rpo' ) .'" src="https://www.zillow.com/mortgage/MortgageCalculatorWidgetLarge.htm" width="688" height="700" frameborder="0" style="width:100%;min-height:700px;"></iframe>';
165
+			echo '<iframe id="' . $this->zillow_iframe_id($iframe_id) . '" class="' . $this->zillow_iframe_class('listings') . '" scrolling="no" title="' . __('Monthly Payment Calculator', 're-rpo') . '" src="https://www.zillow.com/mortgage/MortgageCalculatorWidgetLarge.htm" width="688" height="700" frameborder="0" style="width:100%;min-height:700px;"></iframe>';
166 166
 
167 167
 		}
168 168
 
@@ -174,9 +174,9 @@  discard block
 block discarded – undo
174 174
 		 * @param string $orientation (default: 'verticalWidget')
175 175
 		 * @return void
176 176
 		 */
177
-		public function get_mortgage_calc_widget( $iframe_id = '', $orientation = 'verticalWidget' ) {
177
+		public function get_mortgage_calc_widget($iframe_id = '', $orientation = 'verticalWidget') {
178 178
 
179
-			if ( 'verticalWidget' === $orientation ) {
179
+			if ('verticalWidget' === $orientation) {
180 180
 				$height = '470';
181 181
 				$width = '200';
182 182
 			} else {
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
 				$width = '352';
185 185
 			}
186 186
 
187
-			echo '<iframe id="'. $this->zillow_iframe_id( $iframe_id ) .'" class="'. $this->zillow_iframe_class( 'mortgage-calc' ) .'" scrolling="no" title="'. __( 'Zillow Mortgage Calculator', 're-rpo' ) .'" src="https://www.zillow.com/mortgage/SmallMortgageLoanCalculatorWidget.htm?widgetOrientationType='. $orientation .'" width="'. $width .'" height="'. $height .'" frameborder="0" style="width:100%;"></iframe>';
187
+			echo '<iframe id="' . $this->zillow_iframe_id($iframe_id) . '" class="' . $this->zillow_iframe_class('mortgage-calc') . '" scrolling="no" title="' . __('Zillow Mortgage Calculator', 're-rpo') . '" src="https://www.zillow.com/mortgage/SmallMortgageLoanCalculatorWidget.htm?widgetOrientationType=' . $orientation . '" width="' . $width . '" height="' . $height . '" frameborder="0" style="width:100%;"></iframe>';
188 188
 
189 189
 		}
190 190
 
@@ -198,16 +198,16 @@  discard block
 block discarded – undo
198 198
 		 * @param mixed $region
199 199
 		 * @return void
200 200
 		 */
201
-		public function get_mortgage_rate_table_widget( $iframe_id = '', $textcolor, $screenname, $region ) {
201
+		public function get_mortgage_rate_table_widget($iframe_id = '', $textcolor, $screenname, $region) {
202 202
 
203 203
 		?>
204 204
 		<div id="" class="zillow-mortage-rate-table">
205 205
 		<div class="header-labels">
206 206
 			<span class="current-label" style="color:#<?php echo $textcolor ?>">
207
-				<?php _e( 'Current', 're-pro' ); ?>
207
+				<?php _e('Current', 're-pro'); ?>
208 208
 			</span>
209 209
 			<span class="lastweek-label" style="color:#<?php echo $textcolor ?>">
210
-				<?php _e( 'Last Week', 're-pro' ); ?>
210
+				<?php _e('Last Week', 're-pro'); ?>
211 211
 			</span>
212 212
 		</div>
213 213
 
@@ -215,26 +215,26 @@  discard block
 block discarded – undo
215 215
 			<div class="rate-labels-wrapper">
216 216
 				<div id="30-year-label-row" class="rate-label-row">
217 217
 					<div id="30-year-label" class="rate-label">
218
-						<?php _e( '30 Year Fixed', 're-pro' ); ?>
218
+						<?php _e('30 Year Fixed', 're-pro'); ?>
219 219
 					</div>
220 220
 				</div>
221 221
 
222 222
 				<div id="15-year-label-row" class="rate-label-row">
223 223
 					<div id="15-year-label" class="rate-label">
224
-						<?php _e( '15 Year Fixed', 're-pro' ); ?>
224
+						<?php _e('15 Year Fixed', 're-pro'); ?>
225 225
 					</div>
226 226
 				</div>
227 227
 
228 228
 				<div id="5-1-adjustable-label-row" class="rate-label-row">
229 229
 					<div id="5-1-adjustable-label" class="rate-label">
230
-						<?php _e( '5/1 Adjustable', 're-pro' ); ?>
230
+						<?php _e('5/1 Adjustable', 're-pro'); ?>
231 231
 					</div>
232 232
 				</div>
233 233
 			</div>
234 234
 
235 235
 		<?php
236 236
 
237
-		echo '<iframe id="'. $this->zillow_iframe_id( $iframe_id ) .'" class="'. $this->zillow_iframe_class( 'mortgage-rates-table' ) .'" scrolling="no" title="'. __( 'Zillow Mortgage Rate Table', 're-pro' ) .'" src="https://www.zillow.com/mortgage/MortgageRateTable.htm?wide=1&textcolor='. $textcolor .'&scrnname='. $screenname .'&region='. $region .'&cobrand='. $screenname .'" width="130" height="100" frameborder="0" style="width:50%;"></iframe>';
237
+		echo '<iframe id="' . $this->zillow_iframe_id($iframe_id) . '" class="' . $this->zillow_iframe_class('mortgage-rates-table') . '" scrolling="no" title="' . __('Zillow Mortgage Rate Table', 're-pro') . '" src="https://www.zillow.com/mortgage/MortgageRateTable.htm?wide=1&textcolor=' . $textcolor . '&scrnname=' . $screenname . '&region=' . $region . '&cobrand=' . $screenname . '" width="130" height="100" frameborder="0" style="width:50%;"></iframe>';
238 238
 
239 239
 		}
240 240
 
@@ -245,9 +245,9 @@  discard block
 block discarded – undo
245 245
 		 * @param string $iframe_id (default: '')
246 246
 		 * @return void
247 247
 		 */
248
-		public function get_rate_table_graph_widget( $iframe_id = '' ) {
248
+		public function get_rate_table_graph_widget($iframe_id = '') {
249 249
 
250
-			echo '<iframe  id="'. $this->zillow_iframe_id( $iframe_id ) .'" class="'. $this->zillow_iframe_class( 'mortgage-rates-graph' ) .'" title="'. __( 'Zillow Mortgage Rates Graph', 're-pro' ) .'" src="https://www.zillow.com/webtools/widgets/RateTableAndGraphDistributionWidget.htm" width="306" height="315" frameborder="0" scrolling="no" ></iframe>';
250
+			echo '<iframe  id="' . $this->zillow_iframe_id($iframe_id) . '" class="' . $this->zillow_iframe_class('mortgage-rates-graph') . '" title="' . __('Zillow Mortgage Rates Graph', 're-pro') . '" src="https://www.zillow.com/webtools/widgets/RateTableAndGraphDistributionWidget.htm" width="306" height="315" frameborder="0" scrolling="no" ></iframe>';
251 251
 
252 252
 		}
253 253
 
@@ -257,9 +257,9 @@  discard block
 block discarded – undo
257 257
 		 * @access public
258 258
 		 * @return void
259 259
 		 */
260
-		public function get_mortage_rate_widget( $iframe_id = '' ) {
260
+		public function get_mortage_rate_widget($iframe_id = '') {
261 261
 
262
-			echo '<iframe id="'. $this->zillow_iframe_id( $iframe_id ) .'" class="'. $this->zillow_iframe_class( 'mortgage-rates' ) .'" scrolling="no" title="'. __( 'Zillow Mortgage Rate Table', 're-pro' ) .'" src="https://www.zillow.com/webtools/widgets/RateTableDistributionWidget.htm" width="306" height="215" frameborder="0" style="width:100%;min-height:215px;"></iframe>';
262
+			echo '<iframe id="' . $this->zillow_iframe_id($iframe_id) . '" class="' . $this->zillow_iframe_class('mortgage-rates') . '" scrolling="no" title="' . __('Zillow Mortgage Rate Table', 're-pro') . '" src="https://www.zillow.com/webtools/widgets/RateTableDistributionWidget.htm" width="306" height="215" frameborder="0" style="width:100%;min-height:215px;"></iframe>';
263 263
 
264 264
 		}
265 265
 
@@ -273,9 +273,9 @@  discard block
 block discarded – undo
273 273
 		 * @param string $textcolor (default: '000000')
274 274
 		 * @return void
275 275
 		 */
276
-		public function get_paymentbreakout_calc_widget( $iframe_id = '', $price, $region_id, $textcolor = '000000' ) {
276
+		public function get_paymentbreakout_calc_widget($iframe_id = '', $price, $region_id, $textcolor = '000000') {
277 277
 
278
-			echo '<iframe id="'. $this->zillow_iframe_id( $iframe_id ) .'" class="'. $this->zillow_iframe_class( 'mortgage-payment-breakout' ) .'" scrolling="no" title="'. __( 'Zillow Mortgage Payment Breakout Calculator', 're-pro' ) .'"src="https://www.zillow.com/mortgage/MortgageLoanCalculatorWidget.htm?skin=custom&price='. $price .'&rid='. $region_id .'&textcolor='. $textcolor .'" frameborder="0" title="'. __( 'Zillow Mortgage Calculator', 're-pro' ) .'" width="176" height="298px"></iframe>';
278
+			echo '<iframe id="' . $this->zillow_iframe_id($iframe_id) . '" class="' . $this->zillow_iframe_class('mortgage-payment-breakout') . '" scrolling="no" title="' . __('Zillow Mortgage Payment Breakout Calculator', 're-pro') . '"src="https://www.zillow.com/mortgage/MortgageLoanCalculatorWidget.htm?skin=custom&price=' . $price . '&rid=' . $region_id . '&textcolor=' . $textcolor . '" frameborder="0" title="' . __('Zillow Mortgage Calculator', 're-pro') . '" width="176" height="298px"></iframe>';
279 279
 
280 280
 		}
281 281
 
@@ -295,9 +295,9 @@  discard block
 block discarded – undo
295 295
 		 * @param string $bgcolor (default: 'FFFFFF')
296 296
 		 * @return void
297 297
 		 */
298
-		public function get_home_value_estimate_widget( $iframe_id = '', $type = 'iframe', $address, $searchbox = 'yes', $region, $skinny_widget = 'true', $textcolor = '000000', $bgcolor = 'FFFFFF' ) {
298
+		public function get_home_value_estimate_widget($iframe_id = '', $type = 'iframe', $address, $searchbox = 'yes', $region, $skinny_widget = 'true', $textcolor = '000000', $bgcolor = 'FFFFFF') {
299 299
 
300
-			echo '<iframe id="'. $this->zillow_iframe_id( $iframe_id ) .'" class="'. $this->zillow_iframe_class( 'home-value-estimate' ) .'" scrolling="no" title="'. __( 'Zillow Home Value Estimate', 're-pro' ) .'" src="https://www.zillow.com/widgets/zestimate/ZestimateLargeWidget.htm?did=zillow-shv-large-iframe-widget&type='.$type.'&address='.$address.'&searchbox='. $searchbox .'&region='.$region.'&skinnyWidget='.$skinny_widget.'&tc='. $textcolor .'&bgc='. $bgcolor .'" width="296" frameborder="0" height="360"></iframe>';
300
+			echo '<iframe id="' . $this->zillow_iframe_id($iframe_id) . '" class="' . $this->zillow_iframe_class('home-value-estimate') . '" scrolling="no" title="' . __('Zillow Home Value Estimate', 're-pro') . '" src="https://www.zillow.com/widgets/zestimate/ZestimateLargeWidget.htm?did=zillow-shv-large-iframe-widget&type=' . $type . '&address=' . $address . '&searchbox=' . $searchbox . '&region=' . $region . '&skinnyWidget=' . $skinny_widget . '&tc=' . $textcolor . '&bgc=' . $bgcolor . '" width="296" frameborder="0" height="360"></iframe>';
301 301
 		}
302 302
 
303 303
 		/**
@@ -318,9 +318,9 @@  discard block
 block discarded – undo
318 318
 		 * @param string $bgcolor (default: 'FFFFFF')
319 319
 		 * @return void
320 320
 		 */
321
-		public function get_realestate_stats_widget( $iframe_id = '', $cs, $did = 'rsw-wide', $dys, $mt, $region_id, $sid, $type = 'iframe', $wtype = 'rhv', $skinny_widget = 'true', $textcolor = '000000', $bgcolor = 'FFFFFF' ) {
321
+		public function get_realestate_stats_widget($iframe_id = '', $cs, $did = 'rsw-wide', $dys, $mt, $region_id, $sid, $type = 'iframe', $wtype = 'rhv', $skinny_widget = 'true', $textcolor = '000000', $bgcolor = 'FFFFFF') {
322 322
 
323
-			echo '<iframe id="'. $this->zillow_iframe_id( $iframe_id ) .'" class="'. $this->zillow_iframe_class( 'realestate-stats' ) .'" title="'. __( 'Zillow Real Estate Stats', 're-pro' ) .'" scrolling="no" src="https://www.zillow.com/widgets/geo/RegionalStatsWidget.htm?cs='. $cs .'&did='. $did .'&dys='.$dys.'&mt='.$mt.'&rid='.$region_id.'&sid='.$sid.'&type='.$type.'&wtype='. $type .'&skinnyWidget='.$skinny_widget.'&textcolor='.$textcolor.'&backgroundColor='. $bgcolor .'" width="286" frameborder="0" height="280"></iframe>';
323
+			echo '<iframe id="' . $this->zillow_iframe_id($iframe_id) . '" class="' . $this->zillow_iframe_class('realestate-stats') . '" title="' . __('Zillow Real Estate Stats', 're-pro') . '" scrolling="no" src="https://www.zillow.com/widgets/geo/RegionalStatsWidget.htm?cs=' . $cs . '&did=' . $did . '&dys=' . $dys . '&mt=' . $mt . '&rid=' . $region_id . '&sid=' . $sid . '&type=' . $type . '&wtype=' . $type . '&skinnyWidget=' . $skinny_widget . '&textcolor=' . $textcolor . '&backgroundColor=' . $bgcolor . '" width="286" frameborder="0" height="280"></iframe>';
324 324
 		}
325 325
 
326 326
 		/**
@@ -338,9 +338,9 @@  discard block
 block discarded – undo
338 338
 		 * @param string $bgcolor (default: 'FFFFF')
339 339
 		 * @return void
340 340
 		 */
341
-		public function get_rent_validation_widget($iframe_id = '', $type = 'iframe', $skinny_widget = 'true', $searchbox = 'yes', $for_rent = 'true', $address, $region, $textcolor = '000000', $bgcolor = 'FFFFF' ) {
341
+		public function get_rent_validation_widget($iframe_id = '', $type = 'iframe', $skinny_widget = 'true', $searchbox = 'yes', $for_rent = 'true', $address, $region, $textcolor = '000000', $bgcolor = 'FFFFF') {
342 342
 
343
-			echo '<iframe id="'. $this->zillow_iframe_id( $iframe_id ) .'" class="'. $this->zillow_iframe_class( 'rent-validation' ) .'" title="'. __( 'Zillow Rent Validation', 're-pro' ) .'" scrolling="no" src="https://www.zillow.com/widgets/zestimate/ZestimateLargeWidget.htm?did=zillow-shv-large-iframe-widget&type='.$type.'&forRent='.$for_rent.'&tc='.$textcolor.'&bgc='.$bgcolor.'&address='. $address .'&searchbox='.$searchbox.'&region='.$region.'&skinnyWidget='.$skinny_widget.'" frameborder="0" width="296" height="360"></iframe>';
343
+			echo '<iframe id="' . $this->zillow_iframe_id($iframe_id) . '" class="' . $this->zillow_iframe_class('rent-validation') . '" title="' . __('Zillow Rent Validation', 're-pro') . '" scrolling="no" src="https://www.zillow.com/widgets/zestimate/ZestimateLargeWidget.htm?did=zillow-shv-large-iframe-widget&type=' . $type . '&forRent=' . $for_rent . '&tc=' . $textcolor . '&bgc=' . $bgcolor . '&address=' . $address . '&searchbox=' . $searchbox . '&region=' . $region . '&skinnyWidget=' . $skinny_widget . '" frameborder="0" width="296" height="360"></iframe>';
344 344
 		}
345 345
 
346 346
 		/* LISTINGS. */
@@ -355,7 +355,7 @@  discard block
 block discarded – undo
355 355
 		 * @param string $size (default: ' wide')
356 356
 		 * @return void
357 357
 		 */
358
-		public function get_expensive_homes_widget( $iframe_id = '', $location, $type = 'iframe', $size = ' wide' ) {
358
+		public function get_expensive_homes_widget($iframe_id = '', $location, $type = 'iframe', $size = ' wide') {
359 359
 
360 360
 			// TODO - Check for HTTPS, as this widget does not support it.
361 361
 			// TODO - Support JS Version.
@@ -363,7 +363,7 @@  discard block
 block discarded – undo
363 363
 			echo '<div class="zillow-listings-widget-container zillow-meh-widget-container">';
364 364
 			echo '<h5>Most Expensive Homes in ' . $location . '</h5>';
365 365
 			echo '<div class="zillow-meh-outer">';
366
-			echo '<iframe id="'. $this->zillow_iframe_id( $iframe_id ) .'" class="'. $this->zillow_iframe_class( 'expensive-homes' ) .'" title="'. __( 'Zillow Most Expensive Homes', 're-pro' ) .'" scrolling="no" src="https://www.zillow.com/widgets/fmr/FMRWidget.htm?did=meh-large-iframe-widget-container&type='. $type .'&size='.$size.'&rn='. $location .'&widgettype=meh" width="" height="121" frameborder="0" style="width:100%;"></iframe>';
366
+			echo '<iframe id="' . $this->zillow_iframe_id($iframe_id) . '" class="' . $this->zillow_iframe_class('expensive-homes') . '" title="' . __('Zillow Most Expensive Homes', 're-pro') . '" scrolling="no" src="https://www.zillow.com/widgets/fmr/FMRWidget.htm?did=meh-large-iframe-widget-container&type=' . $type . '&size=' . $size . '&rn=' . $location . '&widgettype=meh" width="" height="121" frameborder="0" style="width:100%;"></iframe>';
367 367
 			echo '</div>';
368 368
 			echo '<img alt="Zillow Real Estate" style="border:0;" src="http://www.zillow.com/widgets/GetVersionedResource.htm?path=%2Fstatic%2Fimages%2Fpowered-by-zillow.gif" />';
369 369
 			echo '</div>';
@@ -379,14 +379,14 @@  discard block
 block discarded – undo
379 379
 		 * @param string $size (default: ' wide')
380 380
 		 * @return void
381 381
 		 */
382
-		public function get_newest_forsale_homes_widget( $iframe_id = '', $location, $type = 'iframe', $size = ' wide' ) {
382
+		public function get_newest_forsale_homes_widget($iframe_id = '', $location, $type = 'iframe', $size = ' wide') {
383 383
 
384 384
 			// TODO - Check for HTTPS, as this widget does not support it.
385 385
 			// TODO - Support JS Version.
386 386
 
387 387
 			echo '<div class="zillow-listings-widget-container zillow-nfs-widget-container">';
388 388
 			echo '<h5>Newest For Sale Homes in ' . $location . '</h5>';
389
-			echo '<iframe id="'. $this->zillow_iframe_id( $iframe_id ) .'" class="'. $this->zillow_iframe_class( 'newest-homes' ) .'" title="'. __( 'Zillow Newest For Sale Homes', 're-pro' ) .'" scrolling="no" src="https://www.zillow.com/widgets/fmr/FMRWidget.htm?did=nfs-large-iframe-widget-container&type='. $type .'&size='.$size.'&rn='. $location .'&widgettype=nfs" width="286" height="123" frameborder="0"></iframe>';
389
+			echo '<iframe id="' . $this->zillow_iframe_id($iframe_id) . '" class="' . $this->zillow_iframe_class('newest-homes') . '" title="' . __('Zillow Newest For Sale Homes', 're-pro') . '" scrolling="no" src="https://www.zillow.com/widgets/fmr/FMRWidget.htm?did=nfs-large-iframe-widget-container&type=' . $type . '&size=' . $size . '&rn=' . $location . '&widgettype=nfs" width="286" height="123" frameborder="0"></iframe>';
390 390
 			echo '<img alt="Zillow Real Estate" style="border:0;" src="http://www.zillow.com/widgets/GetVersionedResource.htm?path=%2Fstatic%2Fimages%2Fpowered-by-zillow.gif" />';
391 391
 			echo '</div>';
392 392
 		}
@@ -403,9 +403,9 @@  discard block
 block discarded – undo
403 403
 		 * @param mixed $region_id
404 404
 		 * @return void
405 405
 		 */
406
-		public function get_zillow_search_widget( $iframe_id = '', $use_user_location = 'false', $is_public = 'true', $bucket = 'map', $zillow_screenname, $region_id ) {
406
+		public function get_zillow_search_widget($iframe_id = '', $use_user_location = 'false', $is_public = 'true', $bucket = 'map', $zillow_screenname, $region_id) {
407 407
 
408
-			echo '<iframe id="'. $this->zillow_iframe_id( $iframe_id ) .'" class="'. $this->zillow_iframe_class( 'search' ) .'" title="'. __( 'Zillow Search', 're-pro' ) .'" src="https://www.zillow.com/widgets/search/PartnerAdWidget.htm?ulbm='.$use_user_location.'&isPublic='.$is_public.'&bucket='.$bucket.'&pn='.$zillow_screenname.'&rid='.$region_id.'&style=default" scrolling="no" frameborder="0" width="298" height="272"></iframe>';
408
+			echo '<iframe id="' . $this->zillow_iframe_id($iframe_id) . '" class="' . $this->zillow_iframe_class('search') . '" title="' . __('Zillow Search', 're-pro') . '" src="https://www.zillow.com/widgets/search/PartnerAdWidget.htm?ulbm=' . $use_user_location . '&isPublic=' . $is_public . '&bucket=' . $bucket . '&pn=' . $zillow_screenname . '&rid=' . $region_id . '&style=default" scrolling="no" frameborder="0" width="298" height="272"></iframe>';
409 409
 
410 410
 		}
411 411
 
@@ -421,14 +421,14 @@  discard block
 block discarded – undo
421 421
 		 * @param string $include_home_val_info (default: 'yes')
422 422
 		 * @return void
423 423
 		 */
424
-		public function get_lg_zillow_search_widget( $iframe_id = '', $zillow_screenname, $type = 'iframe', $region_name, $include_home_val_info = 'yes' ) {
424
+		public function get_lg_zillow_search_widget($iframe_id = '', $zillow_screenname, $type = 'iframe', $region_name, $include_home_val_info = 'yes') {
425 425
 
426 426
 			echo '<div class="zillow-large-search-box-widget-container">';
427 427
 			echo '	<h2>Find Homes</h2>';
428 428
 			echo '	<div style="float:right;">';
429 429
 			echo '		<img alt="Zillow Real Estate Information" style="border:0;" src="http://www.zillow.com/widgets/GetVersionedResource.htm?path=%2Fstatic%2Fimages%2Fpowered-by-zillow.gif" />';
430 430
 			echo '	</div>';
431
-			echo '	<iframe id="'. $this->zillow_iframe_id( $iframe_id ) .'" class="'. $this->zillow_iframe_class( 'lg-search' ) .'" scrolling="no" title="'. __( 'Zillow Search', 're-pro' ) .'" src="https://www.zillow.com/widgets/search/LargeSearchBoxWidget.htm?did=zillow-large-search-box-iframe-widget&scrnname='.$zillow_screenname.'&type='.$type.'&rgname='.$region_name.'&shvi='.$include_home_val_info.'" width="430" frameborder="0" height="400"></iframe>';
431
+			echo '	<iframe id="' . $this->zillow_iframe_id($iframe_id) . '" class="' . $this->zillow_iframe_class('lg-search') . '" scrolling="no" title="' . __('Zillow Search', 're-pro') . '" src="https://www.zillow.com/widgets/search/LargeSearchBoxWidget.htm?did=zillow-large-search-box-iframe-widget&scrnname=' . $zillow_screenname . '&type=' . $type . '&rgname=' . $region_name . '&shvi=' . $include_home_val_info . '" width="430" frameborder="0" height="400"></iframe>';
432 432
 			echo '</div>';
433 433
 		}
434 434
 
@@ -445,9 +445,9 @@  discard block
 block discarded – undo
445 445
 		 * @param mixed $zillow_screenname
446 446
 		 * @return void
447 447
 		 */
448
-		public function get_refinance_quiz_widget( $widget_type = 'iframe', $iframe_id = '', $type = 'iframe', $widgetcode = 'refq', $zillow_screenname ) {
448
+		public function get_refinance_quiz_widget($widget_type = 'iframe', $iframe_id = '', $type = 'iframe', $widgetcode = 'refq', $zillow_screenname) {
449 449
 
450
-			echo '<iframe id="'. $this->zillow_iframe_id( $iframe_id ) .'" class="'. $this->zillow_iframe_class( 'refinance-quiz' ) .'" title="'. __( 'Zillow Refinance Quiz', 're-pro' ) .'" scrolling="no" src="https://www.zillow.com/widgets/quiz/QuizWidget.htm?did=refinance-quiz-iframe-container&type=iframe&widgetcode=refq&scrnname='.$zillow_screenname.'" width="158" frameborder="0" height="317"></iframe>';
450
+			echo '<iframe id="' . $this->zillow_iframe_id($iframe_id) . '" class="' . $this->zillow_iframe_class('refinance-quiz') . '" title="' . __('Zillow Refinance Quiz', 're-pro') . '" scrolling="no" src="https://www.zillow.com/widgets/quiz/QuizWidget.htm?did=refinance-quiz-iframe-container&type=iframe&widgetcode=refq&scrnname=' . $zillow_screenname . '" width="158" frameborder="0" height="317"></iframe>';
451 451
 
452 452
 		}
453 453
 
@@ -462,9 +462,9 @@  discard block
 block discarded – undo
462 462
 		 * @param mixed $zillow_screenname
463 463
 		 * @return void
464 464
 		 */
465
-		public function get_kindofneighbor_quiz_widget( $widget_type = 'iframe', $iframe_id = '', $type = 'iframe', $widgetcode = 'konq', $zillow_screenname ) {
465
+		public function get_kindofneighbor_quiz_widget($widget_type = 'iframe', $iframe_id = '', $type = 'iframe', $widgetcode = 'konq', $zillow_screenname) {
466 466
 
467
-			echo '<iframe id="'. $this->zillow_iframe_id( $iframe_id ) .'" class="'. $this->zillow_iframe_class( 'kindofneighbor-quiz' ) .'" title="'. __( 'Zillow Kind of Neighbor Quiz', 're-pro' ) .'" scrolling="no" src="httsp://www.zillow.com/widgets/quiz/QuizWidget.htm?did=neighbor-quiz-iframe-container&type=iframe&widgetcode=konq&scrnname='.$zillow_screenname.'" width="158" frameborder="0" height="317"></iframe>';
467
+			echo '<iframe id="' . $this->zillow_iframe_id($iframe_id) . '" class="' . $this->zillow_iframe_class('kindofneighbor-quiz') . '" title="' . __('Zillow Kind of Neighbor Quiz', 're-pro') . '" scrolling="no" src="httsp://www.zillow.com/widgets/quiz/QuizWidget.htm?did=neighbor-quiz-iframe-container&type=iframe&widgetcode=konq&scrnname=' . $zillow_screenname . '" width="158" frameborder="0" height="317"></iframe>';
468 468
 
469 469
 		}
470 470
 
@@ -479,9 +479,9 @@  discard block
 block discarded – undo
479 479
 		 * @param mixed $zillow_screenname
480 480
 		 * @return void
481 481
 		 */
482
-		public function get_mortgage_quiz( $widget_type = 'iframe', $iframe_id = '', $type = 'iframe', $widgetcode = 'mq', $zillow_screenname ) {
482
+		public function get_mortgage_quiz($widget_type = 'iframe', $iframe_id = '', $type = 'iframe', $widgetcode = 'mq', $zillow_screenname) {
483 483
 
484
-			echo '<iframe id="'. $this->zillow_iframe_id( $iframe_id ) .'" class="'. $this->zillow_iframe_class( 'mortgage-quiz' ) .'" title="'. __( 'Zillow Mortgage Quiz', 're-pro' ) .'" scrolling="no" src="https://www.zillow.com/widgets/quiz/QuizWidget.htm?did=mortgage-iframe-container&type=iframe&widgetcode=mq&scrnname='.$zillow_screenname.'" width="158" frameborder="0" height="317"></iframe>';
484
+			echo '<iframe id="' . $this->zillow_iframe_id($iframe_id) . '" class="' . $this->zillow_iframe_class('mortgage-quiz') . '" title="' . __('Zillow Mortgage Quiz', 're-pro') . '" scrolling="no" src="https://www.zillow.com/widgets/quiz/QuizWidget.htm?did=mortgage-iframe-container&type=iframe&widgetcode=mq&scrnname=' . $zillow_screenname . '" width="158" frameborder="0" height="317"></iframe>';
485 485
 
486 486
 		}
487 487
 
@@ -496,9 +496,9 @@  discard block
 block discarded – undo
496 496
 		 * @param mixed $zillow_screenname
497 497
 		 * @return void
498 498
 		 */
499
-		public function get_mortgage_harp_quiz( $widget_type = 'iframe', $iframe_id = '', $type = 'iframe', $widgetcode = 'hec', $zillow_screenname ) {
499
+		public function get_mortgage_harp_quiz($widget_type = 'iframe', $iframe_id = '', $type = 'iframe', $widgetcode = 'hec', $zillow_screenname) {
500 500
 
501
-			echo '<iframe id="'. $this->zillow_iframe_id( $iframe_id ) .'" class="'. $this->zillow_iframe_class( 'mortgage-harp-quiz' ) .'" title="'. __( 'Zillow Mortgage HARP Quiz', 're-pro' ) .'" scrolling="no" src="https://www.zillow.com/widgets/quiz/QuizWidget.htm?did=mortgage-iframe-container&type=iframe&widgetcode=hec&scrnname='.$zillow_screenname.'" width="158" frameborder="0" height="317"></iframe>';
501
+			echo '<iframe id="' . $this->zillow_iframe_id($iframe_id) . '" class="' . $this->zillow_iframe_class('mortgage-harp-quiz') . '" title="' . __('Zillow Mortgage HARP Quiz', 're-pro') . '" scrolling="no" src="https://www.zillow.com/widgets/quiz/QuizWidget.htm?did=mortgage-iframe-container&type=iframe&widgetcode=hec&scrnname=' . $zillow_screenname . '" width="158" frameborder="0" height="317"></iframe>';
502 502
 
503 503
 		}
504 504
 
@@ -513,9 +513,9 @@  discard block
 block discarded – undo
513 513
 		 * @param mixed $zillow_screenname
514 514
 		 * @return void
515 515
 		 */
516
-		public function get_buyeriq_quiz( $widget_type = 'iframe', $iframe_id = '', $type = 'iframe', $widgetcode = 'biq', $zillow_screenname ) {
516
+		public function get_buyeriq_quiz($widget_type = 'iframe', $iframe_id = '', $type = 'iframe', $widgetcode = 'biq', $zillow_screenname) {
517 517
 
518
-			echo '<iframe id="'. $this->zillow_iframe_id( $iframe_id ) .'" class="'. $this->zillow_iframe_class( 'buyeriq-quiz' ) .'" title="'. __( 'Zillow Buyer IQ Quiz', 're-pro' ) .'" scrolling="no" src="https://www.zillow.com/widgets/quiz/QuizWidget.htm?did=buyer-iframe-container&type=iframe&widgetcode=biq&scrnname='.$zillow_screenname.'" width="158" frameborder="0" height="317"></iframe>';
518
+			echo '<iframe id="' . $this->zillow_iframe_id($iframe_id) . '" class="' . $this->zillow_iframe_class('buyeriq-quiz') . '" title="' . __('Zillow Buyer IQ Quiz', 're-pro') . '" scrolling="no" src="https://www.zillow.com/widgets/quiz/QuizWidget.htm?did=buyer-iframe-container&type=iframe&widgetcode=biq&scrnname=' . $zillow_screenname . '" width="158" frameborder="0" height="317"></iframe>';
519 519
 
520 520
 		}
521 521
 
@@ -532,9 +532,9 @@  discard block
 block discarded – undo
532 532
 		 * @param mixed $button_link
533 533
 		 * @return void
534 534
 		 */
535
-		public function get_moving_boxes_widget( $widget_type = 'iframe', $iframe_id = '', $zillow_city_id, $button_text, $custom_text, $button_link ) {
535
+		public function get_moving_boxes_widget($widget_type = 'iframe', $iframe_id = '', $zillow_city_id, $button_text, $custom_text, $button_link) {
536 536
 
537
-			echo '<iframe id="'. $this->zillow_iframe_id( $iframe_id ) .'" class="'. $this->zillow_iframe_class( 'moving-boxes' ) .'" title="'. __( 'Zillow Moving Box Calculator', 're-pro' ) .'" scrolling="no" src="https://www.zillow.com/widgets/misc/MovingBoxEstimatorWidget.htm?bc='.$zillow_city_id.'&bt='.$button_text.'&cap='.$custom_text.'&bl='.$button_link.'" width="168" frameborder="0" height="315"></iframe>';
537
+			echo '<iframe id="' . $this->zillow_iframe_id($iframe_id) . '" class="' . $this->zillow_iframe_class('moving-boxes') . '" title="' . __('Zillow Moving Box Calculator', 're-pro') . '" scrolling="no" src="https://www.zillow.com/widgets/misc/MovingBoxEstimatorWidget.htm?bc=' . $zillow_city_id . '&bt=' . $button_text . '&cap=' . $custom_text . '&bl=' . $button_link . '" width="168" frameborder="0" height="315"></iframe>';
538 538
 
539 539
 		}
540 540
 
Please login to merge, or discard this patch.
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.