Test Failed
Push — master ( 56b278...03d6f1 )
by Brandon
10:30 queued 07:01
created
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.
modules/rentbits/widgets/class-average-rental-rates-widget.php 1 patch
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@  discard block
 block discarded – undo
6 6
  */
7 7
 
8 8
 	/* Exit if accessed directly. */
9
-if ( ! defined( 'ABSPATH' ) ) { exit; }
9
+if ( ! defined('ABSPATH')) { exit; }
10 10
 
11 11
 /**
12 12
  * RentbitsAverageRentalRatesWidget class.
@@ -25,9 +25,9 @@  discard block
 block discarded – undo
25 25
 
26 26
 		parent::__construct(
27 27
 			'rentbits_avg_rental_rates',
28
-			__( 'Rentbits Average Rental Rates', 're-pro' ),
28
+			__('Rentbits Average Rental Rates', 're-pro'),
29 29
 			array(
30
-				'description' => __( 'Display the current average rental price for any location.', 're-pro' ),
30
+				'description' => __('Display the current average rental price for any location.', 're-pro'),
31 31
 				'classname'   => 're-pro re-pro-widget rentbits-widget rentbits-avg-rental-rates',
32 32
 				'customize_selective_refresh' => true,
33 33
 			)
@@ -41,18 +41,18 @@  discard block
 block discarded – undo
41 41
 	 * @param mixed $args Arguments.
42 42
 	 * @param mixed $instance Instance.
43 43
 	 */
44
-	public function widget( $args, $instance ) {
44
+	public function widget($args, $instance) {
45 45
 
46
-		$title = ! empty( $instance['title'] ) ? $instance['title'] : '';
47
-		$location = ! empty( $instance['location'] ) ? $instance['location'] : '';
46
+		$title = ! empty($instance['title']) ? $instance['title'] : '';
47
+		$location = ! empty($instance['location']) ? $instance['location'] : '';
48 48
 
49 49
 		echo $args['before_widget'];
50 50
 
51
-		echo $args['before_title'] . esc_attr( $title ) . $args['after_title'];
51
+		echo $args['before_title'] . esc_attr($title) . $args['after_title'];
52 52
 
53 53
 		$rentbits_widgets = new RentbitsWidgets();
54 54
 
55
-		$rentbits_widgets->get_average_rental_rates_widget( $location );
55
+		$rentbits_widgets->get_average_rental_rates_widget($location);
56 56
 
57 57
 		echo $args['after_widget'];
58 58
 	}
@@ -64,28 +64,28 @@  discard block
 block discarded – undo
64 64
 	 * @param mixed $instance Instance.
65 65
 	 * @return void
66 66
 	 */
67
-	public function form( $instance ) {
67
+	public function form($instance) {
68 68
 
69 69
 		// Set default values.
70
-		$instance = wp_parse_args( (array) $instance, array(
70
+		$instance = wp_parse_args((array) $instance, array(
71 71
 			'title' => '',
72 72
 			'location' => '',
73
-		) );
73
+		));
74 74
 
75 75
 		// Retrieve an existing value from the database.
76
-		$title = ! empty( $instance['title'] ) ? $instance['title'] : '';
77
-		$location = ! empty( $instance['location'] ) ? $instance['location'] : '';
76
+		$title = ! empty($instance['title']) ? $instance['title'] : '';
77
+		$location = ! empty($instance['location']) ? $instance['location'] : '';
78 78
 
79 79
 		// Title.
80 80
 		echo '<p>';
81
-		echo '	<label for="' . $this->get_field_id( 'title' ) . '" class="title-label">' . __( 'Tile:', 're-pro' ) . '</label>';
82
-		echo '	<input id="' . $this->get_field_id( 'title' ) . '" name="' . $this->get_field_name( 'title' ) . '" value="' . $title  . '" class="widefat">';
81
+		echo '	<label for="' . $this->get_field_id('title') . '" class="title-label">' . __('Tile:', 're-pro') . '</label>';
82
+		echo '	<input id="' . $this->get_field_id('title') . '" name="' . $this->get_field_name('title') . '" value="' . $title . '" class="widefat">';
83 83
 		echo '</p>';
84 84
 
85 85
 		// Location.
86 86
 		echo '<p>';
87
-		echo '	<label for="' . $this->get_field_id( 'location' ) . '" class="title-label">' . __( 'Location:', 're-pro' ) . '</label>';
88
-		echo '	<input id="' . $this->get_field_id( 'location' ) . '" name="' . $this->get_field_name( 'location' ) . '" value="' . $location . '" class="widefat">';
87
+		echo '	<label for="' . $this->get_field_id('location') . '" class="title-label">' . __('Location:', 're-pro') . '</label>';
88
+		echo '	<input id="' . $this->get_field_id('location') . '" name="' . $this->get_field_name('location') . '" value="' . $location . '" class="widefat">';
89 89
 		echo '</p>';
90 90
 
91 91
 	}
@@ -98,12 +98,12 @@  discard block
 block discarded – undo
98 98
 	 * @param mixed $old_instance Old Instance.
99 99
 	 * @return $instance
100 100
 	 */
101
-	public function update( $new_instance, $old_instance ) {
101
+	public function update($new_instance, $old_instance) {
102 102
 
103 103
 		$instance = $old_instance;
104 104
 
105
-		$instance['title'] = ! empty( $new_instance['title'] ) ? strip_tags( $new_instance['title'] ) : '';
106
-		$instance['location'] = ! empty( $new_instance['location'] ) ? strip_tags( $new_instance['location'] ) : '';
105
+		$instance['title'] = ! empty($new_instance['title']) ? strip_tags($new_instance['title']) : '';
106
+		$instance['location'] = ! empty($new_instance['location']) ? strip_tags($new_instance['location']) : '';
107 107
 
108 108
 		return $instance;
109 109
 	}
@@ -116,8 +116,8 @@  discard block
 block discarded – undo
116 116
  * @return void
117 117
  */
118 118
 function repro_rentbits_avg_rental_rates() {
119
-	if ( ! is_ssl() ) {
120
-		register_widget( 'RentbitsAverageRentalRatesWidget' );
119
+	if ( ! is_ssl()) {
120
+		register_widget('RentbitsAverageRentalRatesWidget');
121 121
 	}
122 122
 }
123
-add_action( 'widgets_init', 'repro_rentbits_avg_rental_rates' );
123
+add_action('widgets_init', 'repro_rentbits_avg_rental_rates');
Please login to merge, or discard this patch.
modules/rentbits/widgets/class-rentbits-widgets.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@
 block discarded – undo
48 48
 		 * @access public
49 49
 		 * @param mixed $loc1 First Location.
50 50
 		 * @param mixed $loc2 Second Location.
51
-	 	 * @param mixed $loc3 Third Location.
51
+		 * @param mixed $loc3 Third Location.
52 52
 		 * @param mixed $loc4 Fourth Location.
53 53
 		 * @return void
54 54
 		 */
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -6,9 +6,9 @@  discard block
 block discarded – undo
6 6
  */
7 7
 
8 8
 // Exit if accessed directly.
9
-if ( ! defined( 'ABSPATH' ) ) { exit; }
9
+if ( ! defined('ABSPATH')) { exit; }
10 10
 
11
-if ( ! class_exists( 'RentbitsWidgets' ) ) {
11
+if ( ! class_exists('RentbitsWidgets')) {
12 12
 	/**
13 13
 	 * HomeFinderWidgets class.
14 14
 	 */
@@ -28,15 +28,15 @@  discard block
 block discarded – undo
28 28
 		 * @return void
29 29
 		 */
30 30
 		public function __construct() {
31
-			add_action( 'wp_footer', array( $this, 'rb_enqueue' ) );
31
+			add_action('wp_footer', array($this, 'rb_enqueue'));
32 32
 		}
33 33
 
34 34
 		/**
35 35
 		 * Handle multiple rb widgets js enqueues.
36 36
 		 */
37 37
 		public function rb_enqueue() {
38
-			wp_enqueue_script( 'rb-widgets-js', plugins_url( 'rb-widgets.js', __FILE__ ), array( 'jquery' ), null, true );
39
-			wp_localize_script( 'rb-widgets-js', 'rb_data', static::$rb_data );
38
+			wp_enqueue_script('rb-widgets-js', plugins_url('rb-widgets.js', __FILE__), array('jquery'), null, true);
39
+			wp_localize_script('rb-widgets-js', 'rb_data', static::$rb_data);
40 40
 
41 41
 		}
42 42
 
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
 		 * @param mixed $loc4 Fourth Location.
53 53
 		 * @return void
54 54
 		 */
55
-		public function get_rental_comparison_widget( $loc1, $loc2, $loc3, $loc4 ) {
55
+		public function get_rental_comparison_widget($loc1, $loc2, $loc3, $loc4) {
56 56
 
57 57
 			$url = 'http://rentbits.com/rb/pageinc.do?p=widget-cmp-price&loc1=' . $loc1 . '&loc2=' . $loc2 . '&loc3=' . $loc3 . '&loc4=' . $loc4;
58 58
 
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
 			);
64 64
 			static::$rb_data[] = $rb_data;
65 65
 
66
-			$index = count( static::$rb_data ) - 1;
66
+			$index = count(static::$rb_data) - 1;
67 67
 			echo '<div id="rb-widget-' . $index . '"></div>';
68 68
 
69 69
 		}
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
 		 * @param mixed $loc Location.
76 76
 		 * @return void
77 77
 		 */
78
-		public function get_average_rental_rates_widget( $loc ) {
78
+		public function get_average_rental_rates_widget($loc) {
79 79
 
80 80
 			$url = 'http://rentbits.com/rb/pageinc.do?p=widget-avg-price&loc=' . $loc;
81 81
 
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
 			);
87 87
 			static::$rb_data[] = $rb_data;
88 88
 
89
-			$index = count( static::$rb_data ) - 1;
89
+			$index = count(static::$rb_data) - 1;
90 90
 			echo '<div id="rb-widget-' . $index . '"></div>';
91 91
 
92 92
 		}
Please login to merge, or discard this patch.
modules/rentbits/widgets/class-rental-comparison-widget.php 1 patch
Spacing   +38 added lines, -38 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@  discard block
 block discarded – undo
6 6
  */
7 7
 
8 8
 	/* Exit if accessed directly. */
9
-if ( ! defined( 'ABSPATH' ) ) { exit; }
9
+if ( ! defined('ABSPATH')) { exit; }
10 10
 
11 11
 /**
12 12
  * RentbitsRentalComparisonWidget class.
@@ -25,9 +25,9 @@  discard block
 block discarded – undo
25 25
 
26 26
 		parent::__construct(
27 27
 			'rentbits_rental_comparison',
28
-			__( 'Rentbits Rental Comparison', 're-pro' ),
28
+			__('Rentbits Rental Comparison', 're-pro'),
29 29
 			array(
30
-				'description' => __( 'Display the current average rental price for up to any four locations.', 're-pro' ),
30
+				'description' => __('Display the current average rental price for up to any four locations.', 're-pro'),
31 31
 				'classname'   => 're-pro re-pro-widget rentbits-widget rentbits-rental-comparison',
32 32
 				'customize_selective_refresh' => true,
33 33
 			)
@@ -41,21 +41,21 @@  discard block
 block discarded – undo
41 41
 	 * @param mixed $args Arguments.
42 42
 	 * @param mixed $instance Instance.
43 43
 	 */
44
-	public function widget( $args, $instance ) {
44
+	public function widget($args, $instance) {
45 45
 
46
-		$title = ! empty( $instance['title'] ) ? $instance['title'] : '';
47
-		$location1 = ! empty( $instance['location1'] ) ? $instance['location1'] : '';
48
-		$location2 = ! empty( $instance['location2'] ) ? $instance['location2'] : '';
49
-		$location3 = ! empty( $instance['location3'] ) ? $instance['location3'] : '';
50
-		$location4 = ! empty( $instance['location4'] ) ? $instance['location4'] : '';
46
+		$title = ! empty($instance['title']) ? $instance['title'] : '';
47
+		$location1 = ! empty($instance['location1']) ? $instance['location1'] : '';
48
+		$location2 = ! empty($instance['location2']) ? $instance['location2'] : '';
49
+		$location3 = ! empty($instance['location3']) ? $instance['location3'] : '';
50
+		$location4 = ! empty($instance['location4']) ? $instance['location4'] : '';
51 51
 
52 52
 		echo $args['before_widget'];
53 53
 
54
-		echo $args['before_title'] . esc_attr( $title ) . $args['after_title'];
54
+		echo $args['before_title'] . esc_attr($title) . $args['after_title'];
55 55
 
56 56
 		$rentbits_widgets = new RentbitsWidgets();
57 57
 
58
-		$rentbits_widgets->get_rental_comparison_widget( $location1, $location2, $location3, $location4 );
58
+		$rentbits_widgets->get_rental_comparison_widget($location1, $location2, $location3, $location4);
59 59
 
60 60
 		echo $args['after_widget'];
61 61
 	}
@@ -67,52 +67,52 @@  discard block
 block discarded – undo
67 67
 	 * @param mixed $instance Instance.
68 68
 	 * @return void
69 69
 	 */
70
-	public function form( $instance ) {
70
+	public function form($instance) {
71 71
 
72 72
 		// Set default values.
73
-		$instance = wp_parse_args( (array) $instance, array(
73
+		$instance = wp_parse_args((array) $instance, array(
74 74
 			'title' => '',
75 75
 			'location1' => '',
76 76
 			'location2' => '',
77 77
 			'location3' => '',
78 78
 			'location4' => '',
79
-		) );
79
+		));
80 80
 
81 81
 		// Retrieve an existing value from the database.
82
-		$title = ! empty( $instance['title'] ) ? $instance['title'] : '';
83
-		$location1 = ! empty( $instance['location1'] ) ? $instance['location1'] : '';
84
-		$location2 = ! empty( $instance['location2'] ) ? $instance['location2'] : '';
85
-		$location3 = ! empty( $instance['location3'] ) ? $instance['location3'] : '';
86
-		$location4 = ! empty( $instance['location4'] ) ? $instance['location4'] : '';
82
+		$title = ! empty($instance['title']) ? $instance['title'] : '';
83
+		$location1 = ! empty($instance['location1']) ? $instance['location1'] : '';
84
+		$location2 = ! empty($instance['location2']) ? $instance['location2'] : '';
85
+		$location3 = ! empty($instance['location3']) ? $instance['location3'] : '';
86
+		$location4 = ! empty($instance['location4']) ? $instance['location4'] : '';
87 87
 
88 88
 		// Title.
89 89
 		echo '<p>';
90
-		echo '	<label for="' . $this->get_field_id( 'title' ) . '" class="title-label">' . __( 'Tile:', 're-pro' ) . '</label>';
91
-		echo '	<input id="' . $this->get_field_id( 'title' ) . '" name="' . $this->get_field_name( 'title' ) . '" value="' . $title  . '" class="widefat">';
90
+		echo '	<label for="' . $this->get_field_id('title') . '" class="title-label">' . __('Tile:', 're-pro') . '</label>';
91
+		echo '	<input id="' . $this->get_field_id('title') . '" name="' . $this->get_field_name('title') . '" value="' . $title . '" class="widefat">';
92 92
 		echo '</p>';
93 93
 
94 94
 		// Location 1.
95 95
 		echo '<p>';
96
-		echo '	<label for="' . $this->get_field_id( 'location1' ) . '" class="title-label">' . __( 'Location:', 're-pro' ) . '</label>';
97
-		echo '	<input id="' . $this->get_field_id( 'location1' ) . '" name="' . $this->get_field_name( 'location1' ) . '" value="' . $location1 . '" class="widefat">';
96
+		echo '	<label for="' . $this->get_field_id('location1') . '" class="title-label">' . __('Location:', 're-pro') . '</label>';
97
+		echo '	<input id="' . $this->get_field_id('location1') . '" name="' . $this->get_field_name('location1') . '" value="' . $location1 . '" class="widefat">';
98 98
 		echo '</p>';
99 99
 
100 100
 		// Location 2.
101 101
 		echo '<p>';
102
-		echo '	<label for="' . $this->get_field_id( 'location2' ) . '" class="title-label">' . __( 'Location:', 're-pro' ) . '</label>';
103
-		echo '	<input id="' . $this->get_field_id( 'location2' ) . '" name="' . $this->get_field_name( 'location2' ) . '" value="' . $location2 . '" class="widefat">';
102
+		echo '	<label for="' . $this->get_field_id('location2') . '" class="title-label">' . __('Location:', 're-pro') . '</label>';
103
+		echo '	<input id="' . $this->get_field_id('location2') . '" name="' . $this->get_field_name('location2') . '" value="' . $location2 . '" class="widefat">';
104 104
 		echo '</p>';
105 105
 
106 106
 		// Location 3.
107 107
 		echo '<p>';
108
-		echo '	<label for="' . $this->get_field_id( 'location3' ) . '" class="title-label">' . __( 'Location:', 're-pro' ) . '</label>';
109
-		echo '	<input id="' . $this->get_field_id( 'location3' ) . '" name="' . $this->get_field_name( 'location3' ) . '" value="' . $location3 . '" class="widefat">';
108
+		echo '	<label for="' . $this->get_field_id('location3') . '" class="title-label">' . __('Location:', 're-pro') . '</label>';
109
+		echo '	<input id="' . $this->get_field_id('location3') . '" name="' . $this->get_field_name('location3') . '" value="' . $location3 . '" class="widefat">';
110 110
 		echo '</p>';
111 111
 
112 112
 		// Location 4.
113 113
 		echo '<p>';
114
-		echo '	<label for="' . $this->get_field_id( 'location4' ) . '" class="title-label">' . __( 'Location:', 're-pro' ) . '</label>';
115
-		echo '	<input id="' . $this->get_field_id( 'location4' ) . '" name="' . $this->get_field_name( 'location4' ) . '" value="' . $location4 . '" class="widefat">';
114
+		echo '	<label for="' . $this->get_field_id('location4') . '" class="title-label">' . __('Location:', 're-pro') . '</label>';
115
+		echo '	<input id="' . $this->get_field_id('location4') . '" name="' . $this->get_field_name('location4') . '" value="' . $location4 . '" class="widefat">';
116 116
 		echo '</p>';
117 117
 
118 118
 	}
@@ -125,15 +125,15 @@  discard block
 block discarded – undo
125 125
 	 * @param mixed $old_instance Old Instance.
126 126
 	 * @return $instance
127 127
 	 */
128
-	public function update( $new_instance, $old_instance ) {
128
+	public function update($new_instance, $old_instance) {
129 129
 
130 130
 		$instance = $old_instance;
131 131
 
132
-		$instance['title'] = ! empty( $new_instance['title'] ) ? strip_tags( $new_instance['title'] ) : '';
133
-		$instance['location1'] = ! empty( $new_instance['location1'] ) ? strip_tags( $new_instance['location1'] ) : '';
134
-		$instance['location2'] = ! empty( $new_instance['location2'] ) ? strip_tags( $new_instance['location2'] ) : '';
135
-		$instance['location3'] = ! empty( $new_instance['location3'] ) ? strip_tags( $new_instance['location3'] ) : '';
136
-		$instance['location4'] = ! empty( $new_instance['location4'] ) ? strip_tags( $new_instance['location4'] ) : '';
132
+		$instance['title'] = ! empty($new_instance['title']) ? strip_tags($new_instance['title']) : '';
133
+		$instance['location1'] = ! empty($new_instance['location1']) ? strip_tags($new_instance['location1']) : '';
134
+		$instance['location2'] = ! empty($new_instance['location2']) ? strip_tags($new_instance['location2']) : '';
135
+		$instance['location3'] = ! empty($new_instance['location3']) ? strip_tags($new_instance['location3']) : '';
136
+		$instance['location4'] = ! empty($new_instance['location4']) ? strip_tags($new_instance['location4']) : '';
137 137
 
138 138
 		return $instance;
139 139
 	}
@@ -146,8 +146,8 @@  discard block
 block discarded – undo
146 146
  * @return void
147 147
  */
148 148
 function repro_rentbits_rental_comparison() {
149
-	if ( ! is_ssl() ) {
150
-		register_widget( 'RentbitsRentalComparisonWidget' );
149
+	if ( ! is_ssl()) {
150
+		register_widget('RentbitsRentalComparisonWidget');
151 151
 	}
152 152
 }
153
-add_action( 'widgets_init', 'repro_rentbits_rental_comparison' );
153
+add_action('widgets_init', 'repro_rentbits_rental_comparison');
Please login to merge, or discard this patch.