Completed
Pull Request — master (#65)
by
unknown
02:55
created
includes.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -6,30 +6,30 @@
 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
 
13 13
 // Google maps.
14
-include_once( 'modules/google-maps/gmaps.php' );
14
+include_once('modules/google-maps/gmaps.php');
15 15
 
16 16
 // Equal Housing.
17
-include_once( 'modules/equal-housing/equal-housing.php' );
17
+include_once('modules/equal-housing/equal-housing.php');
18 18
 
19 19
 // Zillow.
20
-include_once( 'modules/zillow/zillow.php' );
20
+include_once('modules/zillow/zillow.php');
21 21
 
22
-include_once( 'modules/trulia/trulia.php' );
22
+include_once('modules/trulia/trulia.php');
23 23
 
24
-include_once( 'modules/inman/inman.php' );
24
+include_once('modules/inman/inman.php');
25 25
 
26
-include_once( 'modules/homes-com/homes-com.php' );
26
+include_once('modules/homes-com/homes-com.php');
27 27
 
28 28
 
29
-include_once( 'modules/streetadvisor/streetadvisor.php' );
29
+include_once('modules/streetadvisor/streetadvisor.php');
30 30
 
31
-include_once( 'modules/greatschools/greatschools.php' );
31
+include_once('modules/greatschools/greatschools.php');
32 32
 
33
-include_once( 'modules/homefinder/homefinder.php' );
33
+include_once('modules/homefinder/homefinder.php');
34 34
 
35
-include_once( 'modules/rentbits/rentbits.php' );
35
+include_once('modules/rentbits/rentbits.php');
Please login to merge, or discard this patch.
modules/homefinder/homefinder.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -6,21 +6,21 @@
 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-homefinder-widgets.php' );
11
+include('widgets/class-homefinder-widgets.php');
12 12
 
13 13
 // Homes for Sale Widget.
14
-include( 'widgets/class-homes-for-sale-widget.php' );
14
+include('widgets/class-homes-for-sale-widget.php');
15 15
 
16 16
 // Open House Widget.
17
-include( 'widgets/class-open-house-widget.php' );
17
+include('widgets/class-open-house-widget.php');
18 18
 
19 19
 // Foreclosure Homes Widget.
20
-include( 'widgets/class-foreclosure-homes-widget.php' );
20
+include('widgets/class-foreclosure-homes-widget.php');
21 21
 
22 22
 // Affiliate Search Widget.
23
-include( 'widgets/class-affiliate-search-widget.php' );
23
+include('widgets/class-affiliate-search-widget.php');
24 24
 
25 25
 // Advertiser Directory Widget.
26
-include( 'widgets/class-advertiser-directory-widget.php' );
26
+include('widgets/class-advertiser-directory-widget.php');
Please login to merge, or discard this patch.
modules/homefinder/widgets/class-foreclosure-homes-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
  * HomeFinderForeclosureHomes class.
@@ -25,9 +25,9 @@  discard block
 block discarded – undo
25 25
 
26 26
 		parent::__construct(
27 27
 			'homefinder_forclosure_homes',
28
-			__( 'HomeFinder Foreclosure Homes', 're-pro' ),
28
+			__('HomeFinder Foreclosure Homes', 're-pro'),
29 29
 			array(
30
-				'description' => __( 'Display a forclosures search box from HomeFinder.com', 're-pro' ),
30
+				'description' => __('Display a forclosures search box from HomeFinder.com', 're-pro'),
31 31
 				'classname'   => 're-pro re-pro-widget homefinder-widget homefinder-foreclosure-homes',
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_forclosure_homes() {
110
-	if ( ! is_ssl() ) {
111
-		register_widget( 'HomeFinderForeclosureHomes' );
110
+	if ( ! is_ssl()) {
111
+		register_widget('HomeFinderForeclosureHomes');
112 112
 	}
113 113
 }
114
-add_action( 'widgets_init', 'repro_homefinder_forclosure_homes' );
114
+add_action('widgets_init', 'repro_homefinder_forclosure_homes');
Please login to merge, or discard this patch.
modules/homefinder/widgets/class-homes-for-sale-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
  * HomeFinderHomesForSale class.
@@ -25,9 +25,9 @@  discard block
 block discarded – undo
25 25
 
26 26
 		parent::__construct(
27 27
 			'homefinder_homes_for_sale',
28
-			__( 'HomeFinder Homes for Sale', 're-pro' ),
28
+			__('HomeFinder Homes for Sale', 're-pro'),
29 29
 			array(
30
-				'description' => __( 'Display a search box from HomeFinder.com', 're-pro' ),
30
+				'description' => __('Display a search box from HomeFinder.com', 're-pro'),
31 31
 				'classname'   => 're-pro re-pro-widget homefinder-widget homefinder-homes-for-sale',
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_homes_for_sale() {
110
-	if ( ! is_ssl() ) {
111
-		register_widget( 'HomeFinderHomesForSale' );
110
+	if ( ! is_ssl()) {
111
+		register_widget('HomeFinderHomesForSale');
112 112
 	}
113 113
 }
114
-add_action( 'widgets_init', 'repro_homefinder_homes_for_sale' );
114
+add_action('widgets_init', 'repro_homefinder_homes_for_sale');
Please login to merge, or discard this patch.
modules/homefinder/widgets/class-advertiser-directory-widget.php 1 patch
Spacing   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@  discard block
 block discarded – undo
6 6
  */
7 7
 
8 8
 	/* Exit if accessed directly. */
9
-if ( ! defined( 'ABSPATH' ) ) { exit; }
9
+if ( ! defined('ABSPATH')) { exit; }
10 10
 
11 11
 /**
12 12
  * HomeFinderAdvertiserDirectory class.
@@ -25,9 +25,9 @@  discard block
 block discarded – undo
25 25
 
26 26
 		parent::__construct(
27 27
 			'homefinder_advertiser_directory',
28
-			__( 'HomeFinder Advertiser Directory', 're-pro' ),
28
+			__('HomeFinder Advertiser Directory', 're-pro'),
29 29
 			array(
30
-				'description' => __( "Display your advertiser's contact information from HomeFinder.com", 're-pro' ),
30
+				'description' => __("Display your advertiser's contact information from HomeFinder.com", 're-pro'),
31 31
 				'classname'   => 're-pro re-pro-widget homefinder-widget homefinder-advertiser-directory',
32 32
 				'customize_selective_refresh' => true,
33 33
 			)
@@ -41,19 +41,19 @@  discard block
 block discarded – undo
41 41
 	 * @param mixed $args Arguments.
42 42
 	 * @param mixed $instance Instance.
43 43
 	 */
44
-	public function widget( $args, $instance ) {
44
+	public function widget($args, $instance) {
45 45
 
46
-		$title = ! empty( $instance['title'] ) ? $instance['title'] : '';
47
-		$affiliate = ! empty( $instance['affiliate'] ) ? $instance['affiliate'] : '';
48
-		$count = ! empty( $instance['count'] ) ? $instance['count'] : '';
46
+		$title = ! empty($instance['title']) ? $instance['title'] : '';
47
+		$affiliate = ! empty($instance['affiliate']) ? $instance['affiliate'] : '';
48
+		$count = ! empty($instance['count']) ? $instance['count'] : '';
49 49
 
50 50
 		echo $args['before_widget'];
51 51
 
52
-		echo $args['before_title'] . esc_attr( $title ) . $args['after_title'];
52
+		echo $args['before_title'] . esc_attr($title) . $args['after_title'];
53 53
 
54 54
 		$homefinder_widgets = new HomeFinderWidgets();
55 55
 
56
-		$homefinder_widgets->get_affiliates_widget( 'directory', $instance );
56
+		$homefinder_widgets->get_affiliates_widget('directory', $instance);
57 57
 
58 58
 		echo $args['after_widget'];
59 59
 	}
@@ -65,37 +65,37 @@  discard block
 block discarded – undo
65 65
 	 * @param mixed $instance Instance.
66 66
 	 * @return void
67 67
 	 */
68
-	public function form( $instance ) {
68
+	public function form($instance) {
69 69
 
70 70
 		// Set default values.
71
-		$instance = wp_parse_args( (array) $instance, array(
71
+		$instance = wp_parse_args((array) $instance, array(
72 72
 			'title' => '',
73 73
 			'affiliate' => '',
74 74
 			'count' => '6',
75
-		) );
75
+		));
76 76
 
77 77
 		// Retrieve an existing value from the database.
78
-		$title = ! empty( $instance['title'] ) ? $instance['title'] : '';
79
-		$affiliate = ! empty( $instance['affiliate'] ) ? $instance['affiliate'] : '';
80
-		$count = ! empty( $instance['count'] ) ? $instance['count'] : '';
78
+		$title = ! empty($instance['title']) ? $instance['title'] : '';
79
+		$affiliate = ! empty($instance['affiliate']) ? $instance['affiliate'] : '';
80
+		$count = ! empty($instance['count']) ? $instance['count'] : '';
81 81
 
82 82
 		// Title.
83 83
 		echo '<p>';
84
-		echo '	<label for="' . $this->get_field_id( 'title' ) . '" class="title-label">' . __( 'Tile:', 're-pro' ) . '</label>';
85
-		echo '	<input id="' . $this->get_field_id( 'title' ) . '" name="' . $this->get_field_name( 'title' ) . '" value="' . $title  . '" class="widefat">';
84
+		echo '	<label for="' . $this->get_field_id('title') . '" class="title-label">' . __('Tile:', 're-pro') . '</label>';
85
+		echo '	<input id="' . $this->get_field_id('title') . '" name="' . $this->get_field_name('title') . '" value="' . $title . '" class="widefat">';
86 86
 		echo '</p>';
87 87
 
88 88
 		// Affiliate Profile Name.
89 89
 		echo '<p>';
90
-		echo '	<label for="' . $this->get_field_id( 'affiliate' ) . '" class="title-label">' . __( 'Affiliate Profile Name:', 're-pro' ) . '</label>';
91
-		echo '	<input id="' . $this->get_field_id( 'affiliate' ) . '" name="' . $this->get_field_name( 'affiliate' ) . '" value="' . $affiliate . '" class="widefat">';
90
+		echo '	<label for="' . $this->get_field_id('affiliate') . '" class="title-label">' . __('Affiliate Profile Name:', 're-pro') . '</label>';
91
+		echo '	<input id="' . $this->get_field_id('affiliate') . '" name="' . $this->get_field_name('affiliate') . '" value="' . $affiliate . '" class="widefat">';
92 92
 		echo '</p>';
93 93
 
94 94
 		// Max Count.
95 95
 		echo '<p>';
96
-		echo '	<label for="' . $this->get_field_id( 'count' ) . '" class="title-label">' . __( 'Display Count:', 're-pro' ) . '</label>';
97
-		echo '	<input type="number" id="' . $this->get_field_id( 'count' ) . '" name="' . $this->get_field_name( 'count' ) . '" min="1" max="50" value="' . $count . '">';
98
-		echo '	<span class="description">' . __( 'Max Count: 50', 're-pro' ) . '</span>';
96
+		echo '	<label for="' . $this->get_field_id('count') . '" class="title-label">' . __('Display Count:', 're-pro') . '</label>';
97
+		echo '	<input type="number" id="' . $this->get_field_id('count') . '" name="' . $this->get_field_name('count') . '" min="1" max="50" value="' . $count . '">';
98
+		echo '	<span class="description">' . __('Max Count: 50', 're-pro') . '</span>';
99 99
 		echo '</p>';
100 100
 
101 101
 	}
@@ -108,13 +108,13 @@  discard block
 block discarded – undo
108 108
 	 * @param mixed $old_instance Old Instance.
109 109
 	 * @return $instance
110 110
 	 */
111
-	public function update( $new_instance, $old_instance ) {
111
+	public function update($new_instance, $old_instance) {
112 112
 
113 113
 		$instance = $old_instance;
114 114
 
115
-		$instance['title'] = ! empty( $new_instance['title'] ) ? strip_tags( $new_instance['title'] ) : '';
116
-		$instance['affiliate'] = ! empty( $new_instance['affiliate'] ) ? strip_tags( $new_instance['affiliate'] ) : '';
117
-		$instance['count'] = ! empty( $new_instance['count'] ) ? strip_tags( $new_instance['count'] ) : '';
115
+		$instance['title'] = ! empty($new_instance['title']) ? strip_tags($new_instance['title']) : '';
116
+		$instance['affiliate'] = ! empty($new_instance['affiliate']) ? strip_tags($new_instance['affiliate']) : '';
117
+		$instance['count'] = ! empty($new_instance['count']) ? strip_tags($new_instance['count']) : '';
118 118
 
119 119
 		return $instance;
120 120
 	}
@@ -127,8 +127,8 @@  discard block
 block discarded – undo
127 127
  * @return void
128 128
  */
129 129
 function repro_homefinder_advertiser_directory() {
130
-	if ( ! is_ssl() ) {
131
-		register_widget( 'HomeFinderAdvertiserDirectory' );
130
+	if ( ! is_ssl()) {
131
+		register_widget('HomeFinderAdvertiserDirectory');
132 132
 	}
133 133
 }
134
-add_action( 'widgets_init', 'repro_homefinder_advertiser_directory' );
134
+add_action('widgets_init', 'repro_homefinder_advertiser_directory');
Please login to merge, or discard this patch.
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.