@@ -6,44 +6,44 @@ discard block |
||
6 | 6 | |
7 | 7 | parent::__construct( |
8 | 8 | 'getschools', |
9 | - __( 'GreatSchools - Get List of Schools', 're-pro' ), |
|
9 | + __('GreatSchools - Get List of Schools', 're-pro'), |
|
10 | 10 | array( |
11 | - 'description' => __( 'Get Schools', 're-pro' ), |
|
11 | + 'description' => __('Get Schools', 're-pro'), |
|
12 | 12 | ) |
13 | 13 | ); |
14 | 14 | |
15 | 15 | } |
16 | 16 | |
17 | - public function widget( $args, $instance ) { |
|
17 | + public function widget($args, $instance) { |
|
18 | 18 | |
19 | - $greatschools_title = !empty( $instance['greatschools_title'] ) ? $instance['greatschools_title'] : ''; |
|
20 | - $greatschools_state = !empty( $instance['greatschools_state'] ) ? $instance['greatschools_state'] : ''; |
|
21 | - $greatschools_city = !empty( $instance['greatschools_city'] ) ? $instance['greatschools_city'] : ''; |
|
19 | + $greatschools_title = ! empty($instance['greatschools_title']) ? $instance['greatschools_title'] : ''; |
|
20 | + $greatschools_state = ! empty($instance['greatschools_state']) ? $instance['greatschools_state'] : ''; |
|
21 | + $greatschools_city = ! empty($instance['greatschools_city']) ? $instance['greatschools_city'] : ''; |
|
22 | 22 | |
23 | 23 | // Call our API. |
24 | - $greatschools = new GreatSchoolsAPI( '' ); |
|
25 | - $schools = $greatschools->get_schools($greatschools_state,$greatschools_city); |
|
24 | + $greatschools = new GreatSchoolsAPI(''); |
|
25 | + $schools = $greatschools->get_schools($greatschools_state, $greatschools_city); |
|
26 | 26 | |
27 | 27 | |
28 | 28 | |
29 | 29 | echo $args['before_widget']; |
30 | 30 | |
31 | - echo $args['before_title'] . esc_attr( $greatschools_title ) . $args['after_title']; |
|
31 | + echo $args['before_title'] . esc_attr($greatschools_title) . $args['after_title']; |
|
32 | 32 | |
33 | 33 | // var_dump($schools); |
34 | 34 | |
35 | - foreach($schools as $school) { |
|
35 | + foreach ($schools as $school) { |
|
36 | 36 | |
37 | - foreach($school as $school_item) { |
|
37 | + foreach ($school as $school_item) { |
|
38 | 38 | |
39 | 39 | $name = $school_item['name']; |
40 | - $type =$school_item['type']; |
|
40 | + $type = $school_item['type']; |
|
41 | 41 | $grade_range = $school_item['gradeRange']; |
42 | 42 | $state = $school_item['state']; |
43 | 43 | $city = $school_item['city']; |
44 | 44 | $overview_link = $school_item['overviewLink']; |
45 | 45 | |
46 | - echo '<li><a href="'.$overview_link.'" rel="nofollow">' . $name . '</a></li>'; |
|
46 | + echo '<li><a href="' . $overview_link . '" rel="nofollow">' . $name . '</a></li>'; |
|
47 | 47 | } |
48 | 48 | |
49 | 49 | |
@@ -53,48 +53,48 @@ discard block |
||
53 | 53 | |
54 | 54 | } |
55 | 55 | |
56 | - public function form( $instance ) { |
|
56 | + public function form($instance) { |
|
57 | 57 | |
58 | 58 | // Set default values |
59 | - $instance = wp_parse_args( (array) $instance, array( |
|
59 | + $instance = wp_parse_args((array) $instance, array( |
|
60 | 60 | 'greatschools_title' => '', |
61 | 61 | 'greatschools_state' => '', |
62 | 62 | 'greatschools_city' => '', |
63 | - ) ); |
|
63 | + )); |
|
64 | 64 | |
65 | 65 | // Retrieve an existing value from the database |
66 | - $greatschools_title = !empty( $instance['greatschools_title'] ) ? $instance['greatschools_title'] : ''; |
|
67 | - $greatschools_state = !empty( $instance['greatschools_state'] ) ? $instance['greatschools_state'] : ''; |
|
68 | - $greatschools_city = !empty( $instance['greatschools_city'] ) ? $instance['greatschools_city'] : ''; |
|
66 | + $greatschools_title = ! empty($instance['greatschools_title']) ? $instance['greatschools_title'] : ''; |
|
67 | + $greatschools_state = ! empty($instance['greatschools_state']) ? $instance['greatschools_state'] : ''; |
|
68 | + $greatschools_city = ! empty($instance['greatschools_city']) ? $instance['greatschools_city'] : ''; |
|
69 | 69 | |
70 | 70 | // Form fields |
71 | 71 | echo '<p>'; |
72 | - echo ' <label for="' . $this->get_field_id( 'greatschools_title' ) . '" class="greatschools_title_label">' . __( 'Title', 're-pro' ) . '</label>'; |
|
73 | - echo ' <input type="text" id="' . $this->get_field_id( 'greatschools_title' ) . '" name="' . $this->get_field_name( 'greatschools_title' ) . '" class="widefat" placeholder="' . esc_attr__( '', 're-pro' ) . '" value="' . esc_attr( $greatschools_title ) . '">'; |
|
74 | - echo ' <span class="description">' . __( 'Title', 're-pro' ) . '</span>'; |
|
72 | + echo ' <label for="' . $this->get_field_id('greatschools_title') . '" class="greatschools_title_label">' . __('Title', 're-pro') . '</label>'; |
|
73 | + echo ' <input type="text" id="' . $this->get_field_id('greatschools_title') . '" name="' . $this->get_field_name('greatschools_title') . '" class="widefat" placeholder="' . esc_attr__('', 're-pro') . '" value="' . esc_attr($greatschools_title) . '">'; |
|
74 | + echo ' <span class="description">' . __('Title', 're-pro') . '</span>'; |
|
75 | 75 | echo '</p>'; |
76 | 76 | |
77 | 77 | echo '<p>'; |
78 | - echo ' <label for="' . $this->get_field_id( 'greatschools_state' ) . '" class="greatschools_state_label">' . __( 'State', 're-pro' ) . '</label>'; |
|
79 | - echo ' <input type="text" id="' . $this->get_field_id( 'greatschools_state' ) . '" name="' . $this->get_field_name( 'greatschools_state' ) . '" class="widefat" placeholder="' . esc_attr__( '', 're-pro' ) . '" value="' . esc_attr( $greatschools_state ) . '">'; |
|
80 | - echo ' <span class="description">' . __( 'State', 're-pro' ) . '</span>'; |
|
78 | + echo ' <label for="' . $this->get_field_id('greatschools_state') . '" class="greatschools_state_label">' . __('State', 're-pro') . '</label>'; |
|
79 | + echo ' <input type="text" id="' . $this->get_field_id('greatschools_state') . '" name="' . $this->get_field_name('greatschools_state') . '" class="widefat" placeholder="' . esc_attr__('', 're-pro') . '" value="' . esc_attr($greatschools_state) . '">'; |
|
80 | + echo ' <span class="description">' . __('State', 're-pro') . '</span>'; |
|
81 | 81 | echo '</p>'; |
82 | 82 | |
83 | 83 | echo '<p>'; |
84 | - echo ' <label for="' . $this->get_field_id( 'greatschools_city' ) . '" class="greatschools_city_label">' . __( 'City', 're-pro' ) . '</label>'; |
|
85 | - echo ' <input type="text" id="' . $this->get_field_id( 'greatschools_city' ) . '" name="' . $this->get_field_name( 'greatschools_city' ) . '" class="widefat" placeholder="' . esc_attr__( '', 're-pro' ) . '" value="' . esc_attr( $greatschools_city ) . '">'; |
|
86 | - echo ' <span class="description">' . __( 'City', 're-pro' ) . '</span>'; |
|
84 | + echo ' <label for="' . $this->get_field_id('greatschools_city') . '" class="greatschools_city_label">' . __('City', 're-pro') . '</label>'; |
|
85 | + echo ' <input type="text" id="' . $this->get_field_id('greatschools_city') . '" name="' . $this->get_field_name('greatschools_city') . '" class="widefat" placeholder="' . esc_attr__('', 're-pro') . '" value="' . esc_attr($greatschools_city) . '">'; |
|
86 | + echo ' <span class="description">' . __('City', 're-pro') . '</span>'; |
|
87 | 87 | echo '</p>'; |
88 | 88 | |
89 | 89 | } |
90 | 90 | |
91 | - public function update( $new_instance, $old_instance ) { |
|
91 | + public function update($new_instance, $old_instance) { |
|
92 | 92 | |
93 | 93 | $instance = $old_instance; |
94 | 94 | |
95 | - $instance['greatschools_title'] = !empty( $new_instance['greatschools_title'] ) ? strip_tags( $new_instance['greatschools_title'] ) : ''; |
|
96 | - $instance['greatschools_state'] = !empty( $new_instance['greatschools_state'] ) ? strip_tags( $new_instance['greatschools_state'] ) : ''; |
|
97 | - $instance['greatschools_city'] = !empty( $new_instance['greatschools_city'] ) ? strip_tags( $new_instance['greatschools_city'] ) : ''; |
|
95 | + $instance['greatschools_title'] = ! empty($new_instance['greatschools_title']) ? strip_tags($new_instance['greatschools_title']) : ''; |
|
96 | + $instance['greatschools_state'] = ! empty($new_instance['greatschools_state']) ? strip_tags($new_instance['greatschools_state']) : ''; |
|
97 | + $instance['greatschools_city'] = ! empty($new_instance['greatschools_city']) ? strip_tags($new_instance['greatschools_city']) : ''; |
|
98 | 98 | |
99 | 99 | return $instance; |
100 | 100 | |
@@ -103,6 +103,6 @@ discard block |
||
103 | 103 | } |
104 | 104 | |
105 | 105 | function greatschools_register_widgets() { |
106 | - register_widget( 'greatschools_getschools' ); |
|
106 | + register_widget('greatschools_getschools'); |
|
107 | 107 | } |
108 | -add_action( 'widgets_init', 'greatschools_register_widgets' ); |
|
108 | +add_action('widgets_init', 'greatschools_register_widgets'); |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -require_once( 'wp-greatschools-api.php' ); |
|
3 | +require_once('wp-greatschools-api.php'); |
|
4 | 4 | |
5 | 5 | // require_once( 'widgets/widget-getschools.php' ); |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -if ( ! class_exists( 'RealEstateTools' ) ) { |
|
3 | +if ( ! class_exists('RealEstateTools')) { |
|
4 | 4 | |
5 | 5 | /** |
6 | 6 | * RealEstateTools class. |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | * @param mixed $address |
25 | 25 | * @return void |
26 | 26 | */ |
27 | - public function extract_zipcode( $address ) { |
|
27 | + public function extract_zipcode($address) { |
|
28 | 28 | $zipcode = preg_match("/\b[A-Z]{2}\s+\d{5}(-\d{4})?\b/", $address, $matches); |
29 | 29 | return $matches[0]; |
30 | 30 | } |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | * @param mixed $text |
37 | 37 | * @return void |
38 | 38 | */ |
39 | - public function extract_bed_count( $text ) { |
|
39 | + public function extract_bed_count($text) { |
|
40 | 40 | $beds = preg_match("/\d (beds|Beds|Bedrooms)/", $text, $matches); |
41 | 41 | $beds_text = $matches[0]; |
42 | 42 | return $int = filter_var($beds_text, FILTER_SANITIZE_NUMBER_INT); |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | * @param mixed $text |
50 | 50 | * @return void |
51 | 51 | */ |
52 | - public function extract_bath_count( $text ) { |
|
52 | + public function extract_bath_count($text) { |
|
53 | 53 | $baths = preg_match("/\d (bath|Baths|Bathrooms)/", $text, $matches); |
54 | 54 | $baths_text = $matches[0]; |
55 | 55 | return $int = filter_var($beds_text, FILTER_SANITIZE_NUMBER_INT); |
@@ -62,8 +62,8 @@ discard block |
||
62 | 62 | * @param mixed $zip_code |
63 | 63 | * @return void |
64 | 64 | */ |
65 | - public function validate_usa_zipcode( $zip_code ) { |
|
66 | - if ( preg_match("/^([0-9]{5})(-[0-9]{4})?$/i", $zip_code) ) |
|
65 | + public function validate_usa_zipcode($zip_code) { |
|
66 | + if (preg_match("/^([0-9]{5})(-[0-9]{4})?$/i", $zip_code)) |
|
67 | 67 | return true; |
68 | 68 | else |
69 | 69 | return false; |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | * @return void |
79 | 79 | */ |
80 | 80 | public function is_valid_latitude($latitude) { |
81 | - if ( preg_match("/^-?([1-8]?[1-9]|[1-9]0)\.{1}\d{1,6}$/", $latitude) ) { |
|
81 | + if (preg_match("/^-?([1-8]?[1-9]|[1-9]0)\.{1}\d{1,6}$/", $latitude)) { |
|
82 | 82 | return true; |
83 | 83 | } else { |
84 | 84 | return false; |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | 3 | /* Exit if accessed directly. */ |
4 | -if ( ! defined( 'ABSPATH' ) ) { exit; } |
|
4 | +if ( ! defined('ABSPATH')) { exit; } |
|
5 | 5 | |
6 | 6 | require_once('widgets/inman-news-widget.php'); |
@@ -1,7 +1,7 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | 3 | /* Exit if accessed directly. */ |
4 | -if ( ! defined( 'ABSPATH' ) ) { exit; } |
|
4 | +if ( ! defined('ABSPATH')) { exit; } |
|
5 | 5 | |
6 | 6 | /** |
7 | 7 | * Inman Feed Widget |
@@ -27,9 +27,9 @@ discard block |
||
27 | 27 | |
28 | 28 | parent::__construct( |
29 | 29 | 'inman_news_widget', |
30 | - __( 'Inman News', 're-pro' ), |
|
30 | + __('Inman News', 're-pro'), |
|
31 | 31 | array( |
32 | - 'description' => __( 'Display the lastest news from Inman.', 're-pro' ), |
|
32 | + 'description' => __('Display the lastest news from Inman.', 're-pro'), |
|
33 | 33 | 'classname' => 're-pro re-pro-widget inman-widget inman-news-widget', |
34 | 34 | 'customize_selective_refresh' => true, |
35 | 35 | ) |
@@ -44,34 +44,34 @@ discard block |
||
44 | 44 | * @param mixed $instance Instance. |
45 | 45 | * @return void |
46 | 46 | */ |
47 | - public function widget( $args, $instance ) { |
|
47 | + public function widget($args, $instance) { |
|
48 | 48 | |
49 | 49 | |
50 | - $title = ! empty( $instance['title'] ) ? $instance['title'] : ''; |
|
51 | - $display_total = ! empty( $instance['display_total'] ) ? $instance['display_total'] : '3'; |
|
50 | + $title = ! empty($instance['title']) ? $instance['title'] : ''; |
|
51 | + $display_total = ! empty($instance['display_total']) ? $instance['display_total'] : '3'; |
|
52 | 52 | |
53 | 53 | |
54 | 54 | echo $args['before_widget']; |
55 | 55 | |
56 | - echo $args['before_title'] . esc_attr( $title ) . $args['after_title']; |
|
56 | + echo $args['before_title'] . esc_attr($title) . $args['after_title']; |
|
57 | 57 | |
58 | 58 | |
59 | - $rss = fetch_feed( 'https://feeds.feedburner.com/inmannews' ); |
|
59 | + $rss = fetch_feed('https://feeds.feedburner.com/inmannews'); |
|
60 | 60 | |
61 | 61 | |
62 | 62 | |
63 | - if( ! is_wp_error( $rss ) ) { |
|
63 | + if ( ! is_wp_error($rss)) { |
|
64 | 64 | |
65 | - $max_items = $rss->get_item_quantity( $display_total ); |
|
66 | - $rss_items = $rss->get_items( 0, $display_total ); |
|
65 | + $max_items = $rss->get_item_quantity($display_total); |
|
66 | + $rss_items = $rss->get_items(0, $display_total); |
|
67 | 67 | |
68 | 68 | // echo $rss->get_title(); |
69 | 69 | // echo '<small>'. $rss->get_description() . '.</small>'; |
70 | 70 | |
71 | - foreach( $rss_items as $item ) { |
|
71 | + foreach ($rss_items as $item) { |
|
72 | 72 | |
73 | 73 | echo '<div style="margin:20px 0;">'; |
74 | - echo '<h4><a href="'. $item->get_link() .'" rel="nofollow" target="_blank">' . $item->get_title() . '</a></h4>'; |
|
74 | + echo '<h4><a href="' . $item->get_link() . '" rel="nofollow" target="_blank">' . $item->get_title() . '</a></h4>'; |
|
75 | 75 | echo '</div>'; |
76 | 76 | |
77 | 77 | echo $item->get_content(); |
@@ -92,22 +92,22 @@ discard block |
||
92 | 92 | * @param mixed $instance Instance. |
93 | 93 | * @return void |
94 | 94 | */ |
95 | - public function form( $instance ) { |
|
95 | + public function form($instance) { |
|
96 | 96 | |
97 | 97 | // Set default values. |
98 | - $instance = wp_parse_args( (array) $instance, array( |
|
98 | + $instance = wp_parse_args((array) $instance, array( |
|
99 | 99 | 'title' => '', |
100 | 100 | |
101 | 101 | )); |
102 | 102 | |
103 | 103 | // Retrieve an existing value from the database. |
104 | - $title = ! empty( $instance['title'] ) ? $instance['title'] : ''; |
|
105 | - $display_total = ! empty( $instance['display_total'] ) ? $instance['display_total'] : ''; |
|
104 | + $title = ! empty($instance['title']) ? $instance['title'] : ''; |
|
105 | + $display_total = ! empty($instance['display_total']) ? $instance['display_total'] : ''; |
|
106 | 106 | |
107 | 107 | // Title. |
108 | 108 | echo '<p>'; |
109 | - echo ' <label for="' . $this->get_field_id( 'title' ) . '" class="title-label">' . __( 'Tile:', 're-pro' ) . '</label>'; |
|
110 | - echo ' <input id="' . $this->get_field_id( 'title' ) . '" name="' . $this->get_field_name( 'title' ) . '" value="' . $title . '" class="widefat">'; |
|
109 | + echo ' <label for="' . $this->get_field_id('title') . '" class="title-label">' . __('Tile:', 're-pro') . '</label>'; |
|
110 | + echo ' <input id="' . $this->get_field_id('title') . '" name="' . $this->get_field_name('title') . '" value="' . $title . '" class="widefat">'; |
|
111 | 111 | echo '</p>'; |
112 | 112 | |
113 | 113 | // TODO: Add field to select display total count, 1 - 20. |
@@ -122,12 +122,12 @@ discard block |
||
122 | 122 | * @param mixed $old_instance Old Instance. |
123 | 123 | * @return $instance |
124 | 124 | */ |
125 | - public function update( $new_instance, $old_instance ) { |
|
125 | + public function update($new_instance, $old_instance) { |
|
126 | 126 | |
127 | 127 | $instance = $old_instance; |
128 | 128 | |
129 | - $instance['title'] = ! empty( $new_instance['title'] ) ? strip_tags( $new_instance['title'] ) : ''; |
|
130 | - $instance['display_total'] = ! empty( $new_instance['display_total'] ) ? strip_tags( $new_instance['display_total'] ) : ''; |
|
129 | + $instance['title'] = ! empty($new_instance['title']) ? strip_tags($new_instance['title']) : ''; |
|
130 | + $instance['display_total'] = ! empty($new_instance['display_total']) ? strip_tags($new_instance['display_total']) : ''; |
|
131 | 131 | |
132 | 132 | return $instance; |
133 | 133 | } |
@@ -141,6 +141,6 @@ discard block |
||
141 | 141 | */ |
142 | 142 | function repro_inman_news_widget() { |
143 | 143 | |
144 | - register_widget( 'InmanNewsWidget' ); |
|
144 | + register_widget('InmanNewsWidget'); |
|
145 | 145 | } |
146 | -add_action( 'widgets_init', 'repro_inman_news_widget' ); |
|
146 | +add_action('widgets_init', 'repro_inman_news_widget'); |
@@ -1,7 +1,7 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | 3 | /* Exit if accessed directly. */ |
4 | -if ( ! defined( 'ABSPATH' ) ) { exit; } |
|
4 | +if ( ! defined('ABSPATH')) { exit; } |
|
5 | 5 | |
6 | 6 | /** |
7 | 7 | * Trulia Feed Widget |
@@ -27,9 +27,9 @@ discard block |
||
27 | 27 | |
28 | 28 | parent::__construct( |
29 | 29 | 'trulia_rss_listing_widget', |
30 | - __( 'Trulia Listings RSS', 're-pro' ), |
|
30 | + __('Trulia Listings RSS', 're-pro'), |
|
31 | 31 | array( |
32 | - 'description' => __( 'Display listings from Trulia via a RSS Feed.', 're-pro' ), |
|
32 | + 'description' => __('Display listings from Trulia via a RSS Feed.', 're-pro'), |
|
33 | 33 | 'classname' => 're-pro re-pro-widget trulia-widget trulia-rss-listings-widget', |
34 | 34 | 'customize_selective_refresh' => true, |
35 | 35 | ) |
@@ -44,21 +44,21 @@ discard block |
||
44 | 44 | * @param mixed $instance Instance. |
45 | 45 | * @return void |
46 | 46 | */ |
47 | - public function widget( $args, $instance ) { |
|
47 | + public function widget($args, $instance) { |
|
48 | 48 | |
49 | - $iframe_id = ! empty( $args['widget_id'] ) ? $args['widget_id'] : ''; |
|
50 | - $title = ! empty( $instance['title'] ) ? $instance['title'] : ''; |
|
49 | + $iframe_id = ! empty($args['widget_id']) ? $args['widget_id'] : ''; |
|
50 | + $title = ! empty($instance['title']) ? $instance['title'] : ''; |
|
51 | 51 | |
52 | 52 | |
53 | 53 | echo $args['before_widget']; |
54 | 54 | |
55 | - echo $args['before_title'] . esc_attr( $title ) . $args['after_title']; |
|
55 | + echo $args['before_title'] . esc_attr($title) . $args['after_title']; |
|
56 | 56 | |
57 | 57 | |
58 | - $rss = fetch_feed( get_trulia_rss_listing_feed( 'for_sale', 'Sacramento', 'CA' ) ); |
|
58 | + $rss = fetch_feed(get_trulia_rss_listing_feed('for_sale', 'Sacramento', 'CA')); |
|
59 | 59 | |
60 | 60 | /* Sometimes the feed has errors so we must use SimplePie ForceFeed. */ |
61 | - add_action('wp_feed_options', 'trulia_force_feed' , 10, 1); |
|
61 | + add_action('wp_feed_options', 'trulia_force_feed', 10, 1); |
|
62 | 62 | function trulia_force_feed($rss) { |
63 | 63 | |
64 | 64 | $rss->force_feed(true); |
@@ -66,24 +66,24 @@ discard block |
||
66 | 66 | } |
67 | 67 | |
68 | 68 | // echo get_trulia_rss_listing_feed( 'for_sale', 'Sacramento', 'CA'); |
69 | - if( ! is_wp_error( $rss ) ) { |
|
69 | + if ( ! is_wp_error($rss)) { |
|
70 | 70 | |
71 | 71 | $max_items = $rss->get_item_quantity(3); |
72 | - $rss_items = $rss->get_items(0,3); |
|
72 | + $rss_items = $rss->get_items(0, 3); |
|
73 | 73 | |
74 | 74 | // echo $rss->get_title(); |
75 | 75 | // echo $rss->get_description(); |
76 | 76 | |
77 | - foreach( $rss_items as $item ) { |
|
77 | + foreach ($rss_items as $item) { |
|
78 | 78 | |
79 | 79 | echo '<div style="margin:20px 0;">'; |
80 | - echo '<h4><a href="'. $item->get_link() .'" rel="nofollow" target="_blank">' . $item->get_title() . '</a></h4>'; |
|
80 | + echo '<h4><a href="' . $item->get_link() . '" rel="nofollow" target="_blank">' . $item->get_title() . '</a></h4>'; |
|
81 | 81 | echo '</div>'; |
82 | 82 | |
83 | 83 | echo $item->get_content(); |
84 | 84 | |
85 | 85 | echo '<div style="margin:20px 0;text-align:right;">'; |
86 | - echo '<small> Updated on '.$item->get_date('F j, Y') . '.</small>'; |
|
86 | + echo '<small> Updated on ' . $item->get_date('F j, Y') . '.</small>'; |
|
87 | 87 | echo '</div>'; |
88 | 88 | } |
89 | 89 | |
@@ -101,22 +101,22 @@ discard block |
||
101 | 101 | * @param mixed $instance Instance. |
102 | 102 | * @return void |
103 | 103 | */ |
104 | - public function form( $instance ) { |
|
104 | + public function form($instance) { |
|
105 | 105 | |
106 | 106 | // Set default values. |
107 | - $instance = wp_parse_args( (array) $instance, array( |
|
107 | + $instance = wp_parse_args((array) $instance, array( |
|
108 | 108 | 'title' => '', |
109 | 109 | |
110 | 110 | )); |
111 | 111 | |
112 | 112 | // Retrieve an existing value from the database. |
113 | - $title = ! empty( $instance['title'] ) ? $instance['title'] : ''; |
|
113 | + $title = ! empty($instance['title']) ? $instance['title'] : ''; |
|
114 | 114 | |
115 | 115 | |
116 | 116 | // Title. |
117 | 117 | echo '<p>'; |
118 | - echo ' <label for="' . $this->get_field_id( 'title' ) . '" class="title-label">' . __( 'Tile:', 're-pro' ) . '</label>'; |
|
119 | - echo ' <input id="' . $this->get_field_id( 'title' ) . '" name="' . $this->get_field_name( 'title' ) . '" value="' . $title . '" class="widefat">'; |
|
118 | + echo ' <label for="' . $this->get_field_id('title') . '" class="title-label">' . __('Tile:', 're-pro') . '</label>'; |
|
119 | + echo ' <input id="' . $this->get_field_id('title') . '" name="' . $this->get_field_name('title') . '" value="' . $title . '" class="widefat">'; |
|
120 | 120 | echo '</p>'; |
121 | 121 | |
122 | 122 | |
@@ -130,11 +130,11 @@ discard block |
||
130 | 130 | * @param mixed $old_instance Old Instance. |
131 | 131 | * @return $instance |
132 | 132 | */ |
133 | - public function update( $new_instance, $old_instance ) { |
|
133 | + public function update($new_instance, $old_instance) { |
|
134 | 134 | |
135 | 135 | $instance = $old_instance; |
136 | 136 | |
137 | - $instance['title'] = ! empty( $new_instance['title'] ) ? strip_tags( $new_instance['title'] ) : ''; |
|
137 | + $instance['title'] = ! empty($new_instance['title']) ? strip_tags($new_instance['title']) : ''; |
|
138 | 138 | |
139 | 139 | return $instance; |
140 | 140 | } |
@@ -148,6 +148,6 @@ discard block |
||
148 | 148 | */ |
149 | 149 | function repro_trulia_rsslisting_widget() { |
150 | 150 | |
151 | - register_widget( 'TruliaRssListingWidget' ); |
|
151 | + register_widget('TruliaRssListingWidget'); |
|
152 | 152 | } |
153 | -add_action( 'widgets_init', 'repro_trulia_rsslisting_widget' ); |
|
153 | +add_action('widgets_init', 'repro_trulia_rsslisting_widget'); |
@@ -1,9 +1,9 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | 3 | /* Exit if accessed directly. */ |
4 | -if ( ! defined( 'ABSPATH' ) ) { exit; } |
|
4 | +if ( ! defined('ABSPATH')) { exit; } |
|
5 | 5 | |
6 | -if ( ! class_exists( 'TruliaWidgets' ) ) { |
|
6 | +if ( ! class_exists('TruliaWidgets')) { |
|
7 | 7 | |
8 | 8 | /** |
9 | 9 | * TruliaWidgets class. |
@@ -48,10 +48,10 @@ discard block |
||
48 | 48 | * @param string $iframe_id (default: '') |
49 | 49 | * @return void |
50 | 50 | */ |
51 | - public function trulia_iframe_id( $iframe_id = '' ) { |
|
51 | + public function trulia_iframe_id($iframe_id = '') { |
|
52 | 52 | |
53 | - if( '' !== $iframe_id ) { |
|
54 | - return sanitize_html_class( $iframe_id ) . '-iframe'; |
|
53 | + if ('' !== $iframe_id) { |
|
54 | + return sanitize_html_class($iframe_id) . '-iframe'; |
|
55 | 55 | } |
56 | 56 | |
57 | 57 | } |
@@ -63,10 +63,10 @@ discard block |
||
63 | 63 | * @param string $widget_name (default: '') |
64 | 64 | * @return void |
65 | 65 | */ |
66 | - public function trulia_iframe_class( $widget_name = '' ) { |
|
66 | + public function trulia_iframe_class($widget_name = '') { |
|
67 | 67 | |
68 | - if( '' !== $widget_name ) { |
|
69 | - return 'trulia trulia-iframe trulia-' . sanitize_html_class( $widget_name ) . '-iframe'; |
|
68 | + if ('' !== $widget_name) { |
|
69 | + return 'trulia trulia-iframe trulia-' . sanitize_html_class($widget_name) . '-iframe'; |
|
70 | 70 | } else { |
71 | 71 | return 'trulia-iframe'; |
72 | 72 | } |
@@ -83,8 +83,8 @@ discard block |
||
83 | 83 | * @param string $email (default: '') |
84 | 84 | * @return void |
85 | 85 | */ |
86 | - public function get_community_advice_widget( $iframe_id = '', $display_answers, $title, $email = '' ) { |
|
87 | - echo '<iframe id="'. $this->trulia_iframe_id( $iframe_id ) .'" class="'. $this->trulia_iframe_class( 'community-advice' ) .'" src="https://synd.trulia.com/tools/expert-community-advice/embedded?params%5Bwhose_answer%5D=¶ms%5Bdisplay_answers%5D=true¶ms%5Btitle%5D=Expert+Community+Advice¶ms%5Bcolor%5D=grey¶ms%5Bemail%5D=¶ms%5Buser_url%5D=¶ms%5Bwidth%5D=300¶ms%5Bheight%5D=350¶ms%5Bguid%5D=58237a792f772"></iframe>'; |
|
86 | + public function get_community_advice_widget($iframe_id = '', $display_answers, $title, $email = '') { |
|
87 | + echo '<iframe id="' . $this->trulia_iframe_id($iframe_id) . '" class="' . $this->trulia_iframe_class('community-advice') . '" src="https://synd.trulia.com/tools/expert-community-advice/embedded?params%5Bwhose_answer%5D=¶ms%5Bdisplay_answers%5D=true¶ms%5Btitle%5D=Expert+Community+Advice¶ms%5Bcolor%5D=grey¶ms%5Bemail%5D=¶ms%5Buser_url%5D=¶ms%5Bwidth%5D=300¶ms%5Bheight%5D=350¶ms%5Bguid%5D=58237a792f772"></iframe>'; |
|
88 | 88 | } |
89 | 89 | |
90 | 90 | /** |
@@ -98,8 +98,8 @@ discard block |
||
98 | 98 | * @param string $email (default: '') |
99 | 99 | * @return void |
100 | 100 | */ |
101 | - public function get_rent_buy_calc_widget( $iframe_id = '', $location, $width, $height, $email = '' ) { |
|
102 | - echo '<iframe id="'. $this->trulia_iframe_id( $iframe_id ) .'" class="'. $this->trulia_iframe_class( 'rent-buy-calc' ) .'" src="https://synd.trulia.com/tools/rent-vs-buy-calculator/embedded?params%5Btool_metro_area%5D=31084¶ms%5Btitle%5D=Rent+vs.+Buy+Calculator¶ms%5Bcolor%5D=grey¶ms%5Bemail%5D=¶ms%5Buser_url%5D=¶ms%5Bwidth%5D=600¶ms%5Bheight%5D=300¶ms%5Bguid%5D=582379f9264e8"></iframe>'; |
|
101 | + public function get_rent_buy_calc_widget($iframe_id = '', $location, $width, $height, $email = '') { |
|
102 | + echo '<iframe id="' . $this->trulia_iframe_id($iframe_id) . '" class="' . $this->trulia_iframe_class('rent-buy-calc') . '" src="https://synd.trulia.com/tools/rent-vs-buy-calculator/embedded?params%5Btool_metro_area%5D=31084¶ms%5Btitle%5D=Rent+vs.+Buy+Calculator¶ms%5Bcolor%5D=grey¶ms%5Bemail%5D=¶ms%5Buser_url%5D=¶ms%5Bwidth%5D=600¶ms%5Bheight%5D=300¶ms%5Bguid%5D=582379f9264e8"></iframe>'; |
|
103 | 103 | } |
104 | 104 | |
105 | 105 | /** |
@@ -113,9 +113,9 @@ discard block |
||
113 | 113 | * @param string $email (default: '') |
114 | 114 | * @return void |
115 | 115 | */ |
116 | - public function get_rental_market_widget( $iframe_id = '', $location, $width, $height, $email = '' ) { |
|
116 | + public function get_rental_market_widget($iframe_id = '', $location, $width, $height, $email = '') { |
|
117 | 117 | |
118 | - echo '<iframe id="'. $this->trulia_iframe_id( $iframe_id ) .'" class="'. $this->trulia_iframe_class( 'rental-market' ) .'" src="https://synd.trulia.com/tools/rental-market-monitor/embedded?params%5Blocation%5D=Los+Angeles%2C+CA¶ms%5BlocationId%5D=22637¶ms%5Bcolor%5D=grey¶ms%5Bemail%5D=¶ms%5Buser_url%5D=¶ms%5Btitle%5D=Rental+Market+Monitor¶ms%5Bwidth%5D=300¶ms%5Bheight%5D=250¶ms%5Bguid%5D=582379637cf2e"></iframe>'; |
|
118 | + echo '<iframe id="' . $this->trulia_iframe_id($iframe_id) . '" class="' . $this->trulia_iframe_class('rental-market') . '" src="https://synd.trulia.com/tools/rental-market-monitor/embedded?params%5Blocation%5D=Los+Angeles%2C+CA¶ms%5BlocationId%5D=22637¶ms%5Bcolor%5D=grey¶ms%5Bemail%5D=¶ms%5Buser_url%5D=¶ms%5Btitle%5D=Rental+Market+Monitor¶ms%5Bwidth%5D=300¶ms%5Bheight%5D=250¶ms%5Bguid%5D=582379637cf2e"></iframe>'; |
|
119 | 119 | |
120 | 120 | } |
121 | 121 | |
@@ -131,8 +131,8 @@ discard block |
||
131 | 131 | * @param string $email (default: '') |
132 | 132 | * @return void |
133 | 133 | */ |
134 | - public function get_map_search_widget( $iframe_id = '', $location, $width, $height, $email = '' ) { |
|
135 | - echo '<iframe id="'. $this->trulia_iframe_id( $iframe_id ) .'" class="'. $this->trulia_iframe_class( 'map-search' ) .'" src="https://synd.trulia.com/tools/map-search/embedded?params%5Blocation%5D=West+Hills%2C+CA¶ms%5BlocationId%5D=39307¶ms%5Bagent_id%5D=¶ms%5Bproperty_status%5D=for+sale¶ms%5Btitle%5D=Map+Search¶ms%5Bcolor%5D=grey¶ms%5Bemail%5D=¶ms%5Buser_url%5D=¶ms%5Bwidth%5D=600¶ms%5Bheight%5D=300¶ms%5Bguid%5D=582378f4c0432"></iframe>'; |
|
134 | + public function get_map_search_widget($iframe_id = '', $location, $width, $height, $email = '') { |
|
135 | + echo '<iframe id="' . $this->trulia_iframe_id($iframe_id) . '" class="' . $this->trulia_iframe_class('map-search') . '" src="https://synd.trulia.com/tools/map-search/embedded?params%5Blocation%5D=West+Hills%2C+CA¶ms%5BlocationId%5D=39307¶ms%5Bagent_id%5D=¶ms%5Bproperty_status%5D=for+sale¶ms%5Btitle%5D=Map+Search¶ms%5Bcolor%5D=grey¶ms%5Bemail%5D=¶ms%5Buser_url%5D=¶ms%5Bwidth%5D=600¶ms%5Bheight%5D=300¶ms%5Bguid%5D=582378f4c0432"></iframe>'; |
|
136 | 136 | } |
137 | 137 | |
138 | 138 | /** |
@@ -146,8 +146,8 @@ discard block |
||
146 | 146 | * @param string $email (default: '') |
147 | 147 | * @return void |
148 | 148 | */ |
149 | - public function get_home_gallery_widget( $iframe_id = '', $location, $width, $height, $email = '' ) { |
|
150 | - echo '<iframe id="'. $this->trulia_iframe_id( $iframe_id ) .'" class="'. $this->trulia_iframe_class( 'home-gallery' ) .'" src="https://synd.trulia.com/tools/home-gallery/embedded?params%5Blocation%5D=Los+Angeles%2C+CA¶ms%5BlocationId%5D=22637¶ms%5Bmin_price%5D=¶ms%5Bmax_price%5D=¶ms%5Bnum_beds%5D=¶ms%5Bnum_baths%5D=¶ms%5Bagent_id%5D=¶ms%5Bspeed%5D=5000¶ms%5Btitle%5D=Home+Gallery¶ms%5Bcolor%5D=green¶ms%5Bemail%5D=¶ms%5Buser_url%5D=¶ms%5Bwidth%5D=300¶ms%5Bheight%5D=300¶ms%5Bguid%5D=582371b703b0d¶ms%5Bslides_per_page%5D=3&city=Los Angeles&state_code=CA"></iframe>'; |
|
149 | + public function get_home_gallery_widget($iframe_id = '', $location, $width, $height, $email = '') { |
|
150 | + echo '<iframe id="' . $this->trulia_iframe_id($iframe_id) . '" class="' . $this->trulia_iframe_class('home-gallery') . '" src="https://synd.trulia.com/tools/home-gallery/embedded?params%5Blocation%5D=Los+Angeles%2C+CA¶ms%5BlocationId%5D=22637¶ms%5Bmin_price%5D=¶ms%5Bmax_price%5D=¶ms%5Bnum_beds%5D=¶ms%5Bnum_baths%5D=¶ms%5Bagent_id%5D=¶ms%5Bspeed%5D=5000¶ms%5Btitle%5D=Home+Gallery¶ms%5Bcolor%5D=green¶ms%5Bemail%5D=¶ms%5Buser_url%5D=¶ms%5Bwidth%5D=300¶ms%5Bheight%5D=300¶ms%5Bguid%5D=582371b703b0d¶ms%5Bslides_per_page%5D=3&city=Los Angeles&state_code=CA"></iframe>'; |
|
151 | 151 | } |
152 | 152 | |
153 | 153 | /** |
@@ -161,8 +161,8 @@ discard block |
||
161 | 161 | * @param string $email (default: '') |
162 | 162 | * @return void |
163 | 163 | */ |
164 | - public function get_home_showcase_widget( $iframe_id = '', $location, $width, $height, $email = '' ) { |
|
165 | - echo '<iframe id="'. $this->trulia_iframe_id( $iframe_id ) .'" class="'. $this->trulia_iframe_class( 'home-showcase' ) .'" src="https://synd.trulia.com/tools/home-showcase/embedded?params%5Blocation%5D=Los+Angeles%2C+CA¶ms%5BlocationId%5D=22637¶ms%5Bmin_price%5D=¶ms%5Bmax_price%5D=¶ms%5Bnum_beds%5D=¶ms%5Bnum_baths%5D=¶ms%5Bagent_id%5D=¶ms%5Bspeed%5D=5000¶ms%5Btitle%5D=My+Listings¶ms%5Bcolor%5D=grey¶ms%5Bemail%5D=¶ms%5Buser_url%5D=¶ms%5Bwidth%5D=300¶ms%5Bheight%5D=350¶ms%5Bguid%5D=582370ce64073"></iframe>'; |
|
164 | + public function get_home_showcase_widget($iframe_id = '', $location, $width, $height, $email = '') { |
|
165 | + echo '<iframe id="' . $this->trulia_iframe_id($iframe_id) . '" class="' . $this->trulia_iframe_class('home-showcase') . '" src="https://synd.trulia.com/tools/home-showcase/embedded?params%5Blocation%5D=Los+Angeles%2C+CA¶ms%5BlocationId%5D=22637¶ms%5Bmin_price%5D=¶ms%5Bmax_price%5D=¶ms%5Bnum_beds%5D=¶ms%5Bnum_baths%5D=¶ms%5Bagent_id%5D=¶ms%5Bspeed%5D=5000¶ms%5Btitle%5D=My+Listings¶ms%5Bcolor%5D=grey¶ms%5Bemail%5D=¶ms%5Buser_url%5D=¶ms%5Bwidth%5D=300¶ms%5Bheight%5D=350¶ms%5Bguid%5D=582370ce64073"></iframe>'; |
|
166 | 166 | } |
167 | 167 | |
168 | 168 | /** |
@@ -176,8 +176,8 @@ discard block |
||
176 | 176 | * @param string $email (default: '') |
177 | 177 | * @return void |
178 | 178 | */ |
179 | - public function get_homefinder_widget( $iframe_id = '', $location, $width, $height, $email = '' ) { |
|
180 | - echo '<iframe id="'. $this->trulia_iframe_id( $iframe_id ) .'" class="'. $this->trulia_iframe_class( 'homefinder' ) .'" src="https://synd.trulia.com/tools/home-finder/embedded?params%5Blocation%5D=¶ms%5BlocationId%5D=¶ms%5Bcolor%5D=green¶ms%5Bemail%5D=¶ms%5Buser_url%5D=¶ms%5Btitle%5D=Home+Finder¶ms%5Bwidth%5D=300¶ms%5Bheight%5D=350¶ms%5Bguid%5D=58236f71d7732"></iframe>'; |
|
179 | + public function get_homefinder_widget($iframe_id = '', $location, $width, $height, $email = '') { |
|
180 | + echo '<iframe id="' . $this->trulia_iframe_id($iframe_id) . '" class="' . $this->trulia_iframe_class('homefinder') . '" src="https://synd.trulia.com/tools/home-finder/embedded?params%5Blocation%5D=¶ms%5BlocationId%5D=¶ms%5Bcolor%5D=green¶ms%5Bemail%5D=¶ms%5Buser_url%5D=¶ms%5Btitle%5D=Home+Finder¶ms%5Bwidth%5D=300¶ms%5Bheight%5D=350¶ms%5Bguid%5D=58236f71d7732"></iframe>'; |
|
181 | 181 | } |
182 | 182 | |
183 | 183 | /** |
@@ -191,9 +191,9 @@ discard block |
||
191 | 191 | * @param string $email (default: '') |
192 | 192 | * @return void |
193 | 193 | */ |
194 | - public function get_market_monitor_widget( $iframe_id = '', $location, $width, $height, $email = '' ) { |
|
194 | + public function get_market_monitor_widget($iframe_id = '', $location, $width, $height, $email = '') { |
|
195 | 195 | |
196 | - echo '<iframe id="'. $this->trulia_iframe_id( $iframe_id ) .'" class="'. $this->trulia_iframe_class( 'market-monitor' ) .'" src="https://synd.trulia.com/tools/market-monitor/embedded?params%5Blocation%5D=Los+Angeles%2C+CA¶ms%5BlocationId%5D=22637¶ms%5Blisting_price_type%5D=average¶ms%5Bshow_inventory%5D=1¶ms%5Btitle%5D=Market+Monitor¶ms%5Bcolor%5D=grey¶ms%5Bemail%5D=¶ms%5Buser_url%5D=¶ms%5Bwidth%5D=300¶ms%5Bheight%5D=250¶ms%5Bguid%5D=58236e004595a"></iframe>'; |
|
196 | + echo '<iframe id="' . $this->trulia_iframe_id($iframe_id) . '" class="' . $this->trulia_iframe_class('market-monitor') . '" src="https://synd.trulia.com/tools/market-monitor/embedded?params%5Blocation%5D=Los+Angeles%2C+CA¶ms%5BlocationId%5D=22637¶ms%5Blisting_price_type%5D=average¶ms%5Bshow_inventory%5D=1¶ms%5Btitle%5D=Market+Monitor¶ms%5Bcolor%5D=grey¶ms%5Bemail%5D=¶ms%5Buser_url%5D=¶ms%5Bwidth%5D=300¶ms%5Bheight%5D=250¶ms%5Bguid%5D=58236e004595a"></iframe>'; |
|
197 | 197 | } |
198 | 198 | |
199 | 199 | /** |
@@ -207,9 +207,9 @@ discard block |
||
207 | 207 | * @param mixed $height |
208 | 208 | * @return void |
209 | 209 | */ |
210 | - public function get_affordability_calc_widget( $iframe_id = '', $color, $title, $width, $height, $email = '' ) { |
|
210 | + public function get_affordability_calc_widget($iframe_id = '', $color, $title, $width, $height, $email = '') { |
|
211 | 211 | |
212 | - echo '<iframe id="'. $this->trulia_iframe_id( $iframe_id ) .'" class="'. $this->trulia_iframe_class( 'affordability-calc' ) .'" src="https://synd.trulia.com/tools/affordability-calculator/embedded?params%5Bcolor%5D=grey¶ms%5Bemail%5D=¶ms%5Buser_url%5D=¶ms%5Btitle%5D=Affordability+Calculator¶ms%5Bwidth%5D=600¶ms%5Bheight%5D=300¶ms%5Bguid%5D=58236d0b501ae"></iframe>'; |
|
212 | + echo '<iframe id="' . $this->trulia_iframe_id($iframe_id) . '" class="' . $this->trulia_iframe_class('affordability-calc') . '" src="https://synd.trulia.com/tools/affordability-calculator/embedded?params%5Bcolor%5D=grey¶ms%5Bemail%5D=¶ms%5Buser_url%5D=¶ms%5Btitle%5D=Affordability+Calculator¶ms%5Bwidth%5D=600¶ms%5Bheight%5D=300¶ms%5Bguid%5D=58236d0b501ae"></iframe>'; |
|
213 | 213 | |
214 | 214 | } |
215 | 215 |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | */ |
10 | 10 | |
11 | 11 | /* // Exit if accessed directly */ |
12 | -if ( ! defined( 'ABSPATH' ) ) { exit; } |
|
12 | +if ( ! defined('ABSPATH')) { exit; } |
|
13 | 13 | |
14 | 14 | /** |
15 | 15 | * The trulia_badges function. |
@@ -23,9 +23,9 @@ discard block |
||
23 | 23 | /* Style 1 */ |
24 | 24 | array( |
25 | 25 | 'id' => 'truila-btn-1-green', |
26 | - 'name' => __( 'Trulia Button - Green (96x40)', 're-pro' ), |
|
27 | - 'alt' => __( 'Trulia', 're-pro' ), |
|
28 | - 'title' => __( 'Trulia', 're-pro' ), |
|
26 | + 'name' => __('Trulia Button - Green (96x40)', 're-pro'), |
|
27 | + 'alt' => __('Trulia', 're-pro'), |
|
28 | + 'title' => __('Trulia', 're-pro'), |
|
29 | 29 | 'class' => 'trulia-badge', |
30 | 30 | 'url' => 'https://static.trulia-cdn.com/images/buttons/trulia_button_v01_green.gif', |
31 | 31 | 'width' => 96, |
@@ -33,9 +33,9 @@ discard block |
||
33 | 33 | ), |
34 | 34 | array( |
35 | 35 | 'id' => 'truila-btn-1-white', |
36 | - 'name' => __( 'Trulia Button - White (96x40)', 're-pro' ), |
|
37 | - 'alt' => __( 'Trulia', 're-pro' ), |
|
38 | - 'title' => __( 'Trulia', 're-pro' ), |
|
36 | + 'name' => __('Trulia Button - White (96x40)', 're-pro'), |
|
37 | + 'alt' => __('Trulia', 're-pro'), |
|
38 | + 'title' => __('Trulia', 're-pro'), |
|
39 | 39 | 'class' => 'trulia-badge', |
40 | 40 | 'url' => 'https://static.trulia-cdn.com/images/buttons/trulia_button_v01_white.gif', |
41 | 41 | 'width' => 96, |
@@ -43,9 +43,9 @@ discard block |
||
43 | 43 | ), |
44 | 44 | array( |
45 | 45 | 'id' => 'truila-btn-1-white-green', |
46 | - 'name' => __( 'Trulia Button - White/Green (96x40)', 're-pro' ), |
|
47 | - 'alt' => __( 'Trulia', 're-pro' ), |
|
48 | - 'title' => __( 'Trulia', 're-pro' ), |
|
46 | + 'name' => __('Trulia Button - White/Green (96x40)', 're-pro'), |
|
47 | + 'alt' => __('Trulia', 're-pro'), |
|
48 | + 'title' => __('Trulia', 're-pro'), |
|
49 | 49 | 'class' => 'trulia-badge', |
50 | 50 | 'url' => 'https://static.trulia-cdn.com/images/buttons/trulia_button_v01_white_green.gif', |
51 | 51 | 'width' => 96, |
@@ -54,9 +54,9 @@ discard block |
||
54 | 54 | /* Style 2 */ |
55 | 55 | array( |
56 | 56 | 'id' => 'truila-btn-2-green', |
57 | - 'name' => __( 'Trulia Button 2 - Green (87x33)', 're-pro' ), |
|
58 | - 'alt' => __( 'Trulia', 're-pro' ), |
|
59 | - 'title' => __( 'Trulia', 're-pro' ), |
|
57 | + 'name' => __('Trulia Button 2 - Green (87x33)', 're-pro'), |
|
58 | + 'alt' => __('Trulia', 're-pro'), |
|
59 | + 'title' => __('Trulia', 're-pro'), |
|
60 | 60 | 'class' => 'trulia-badge', |
61 | 61 | 'url' => 'https://static.trulia-cdn.com/images/buttons/trulia_button_v02_green.gif', |
62 | 62 | 'width' => 87, |
@@ -64,9 +64,9 @@ discard block |
||
64 | 64 | ), |
65 | 65 | array( |
66 | 66 | 'id' => 'truila-btn-2-white', |
67 | - 'name' => __( 'Trulia Button 2 - White (87x33)', 're-pro' ), |
|
68 | - 'alt' => __( 'Trulia', 're-pro' ), |
|
69 | - 'title' => __( 'Trulia', 're-pro' ), |
|
67 | + 'name' => __('Trulia Button 2 - White (87x33)', 're-pro'), |
|
68 | + 'alt' => __('Trulia', 're-pro'), |
|
69 | + 'title' => __('Trulia', 're-pro'), |
|
70 | 70 | 'class' => 'trulia-badge', |
71 | 71 | 'url' => 'https://static.trulia-cdn.com/images/buttons/trulia_button_v02_white.gif', |
72 | 72 | 'width' => 87, |
@@ -74,9 +74,9 @@ discard block |
||
74 | 74 | ), |
75 | 75 | array( |
76 | 76 | 'id' => 'truila-btn-2-white-green', |
77 | - 'name' => __( 'Trulia Button 2 - White/Green (87x33)', 're-pro' ), |
|
78 | - 'alt' => __( 'Trulia', 're-pro' ), |
|
79 | - 'title' => __( 'Trulia', 're-pro' ), |
|
77 | + 'name' => __('Trulia Button 2 - White/Green (87x33)', 're-pro'), |
|
78 | + 'alt' => __('Trulia', 're-pro'), |
|
79 | + 'title' => __('Trulia', 're-pro'), |
|
80 | 80 | 'class' => 'trulia-badge', |
81 | 81 | 'url' => 'https://static.trulia-cdn.com/images/buttons/trulia_button_v02_white_green.gif', |
82 | 82 | 'width' => 87, |
@@ -85,9 +85,9 @@ discard block |
||
85 | 85 | /* Style 3 */ |
86 | 86 | array( |
87 | 87 | 'id' => 'truila-btn-3-green', |
88 | - 'name' => __( 'Trulia Button 3 - Green (120x54)', 're-pro' ), |
|
89 | - 'alt' => __( 'Trulia', 're-pro' ), |
|
90 | - 'title' => __( 'Trulia', 're-pro' ), |
|
88 | + 'name' => __('Trulia Button 3 - Green (120x54)', 're-pro'), |
|
89 | + 'alt' => __('Trulia', 're-pro'), |
|
90 | + 'title' => __('Trulia', 're-pro'), |
|
91 | 91 | 'class' => 'trulia-badge', |
92 | 92 | 'url' => 'https://static.trulia-cdn.com/images/buttons/trulia_button_v03_green.gif', |
93 | 93 | 'width' => 120, |
@@ -95,9 +95,9 @@ discard block |
||
95 | 95 | ), |
96 | 96 | array( |
97 | 97 | 'id' => 'truila-btn-3-white', |
98 | - 'name' => __( 'Trulia Button 3 - White (120x54)', 're-pro' ), |
|
99 | - 'alt' => __( 'Trulia', 're-pro' ), |
|
100 | - 'title' => __( 'Trulia', 're-pro' ), |
|
98 | + 'name' => __('Trulia Button 3 - White (120x54)', 're-pro'), |
|
99 | + 'alt' => __('Trulia', 're-pro'), |
|
100 | + 'title' => __('Trulia', 're-pro'), |
|
101 | 101 | 'class' => 'trulia-badge', |
102 | 102 | 'url' => 'https://static.trulia-cdn.com/images/buttons/trulia_button_v03_white.gif', |
103 | 103 | 'width' => 120, |
@@ -105,9 +105,9 @@ discard block |
||
105 | 105 | ), |
106 | 106 | array( |
107 | 107 | 'id' => 'truila-btn-3-white-green', |
108 | - 'name' => __( 'Trulia Button 3 - White/Green (120x54)', 're-pro' ), |
|
109 | - 'alt' => __( 'Trulia', 're-pro' ), |
|
110 | - 'title' => __( 'Trulia', 're-pro' ), |
|
108 | + 'name' => __('Trulia Button 3 - White/Green (120x54)', 're-pro'), |
|
109 | + 'alt' => __('Trulia', 're-pro'), |
|
110 | + 'title' => __('Trulia', 're-pro'), |
|
111 | 111 | 'class' => 'trulia-badge', |
112 | 112 | 'url' => 'https://static.trulia-cdn.com/images/buttons/trulia_button_v03_white_green.gif', |
113 | 113 | 'width' => 120, |
@@ -16,9 +16,9 @@ |
||
16 | 16 | * @param string $max_sqft (default: '') |
17 | 17 | * @return void |
18 | 18 | */ |
19 | -function get_trulia_rss_listing_feed( $type = 'for_sale', $city, $state, $min_price = '', $max_price = '', $property_type = '', $min_bath = '', $max_bath = '', $min_sqft = '', $max_sqft = '' ) { |
|
19 | +function get_trulia_rss_listing_feed($type = 'for_sale', $city, $state, $min_price = '', $max_price = '', $property_type = '', $min_bath = '', $max_bath = '', $min_sqft = '', $max_sqft = '') { |
|
20 | 20 | |
21 | - $url = esc_url( 'https://www.trulia.com/rss2/'. urlencode($type ).'/'. urlencode( $city ).','. urlencode( $state ).'/' ); |
|
21 | + $url = esc_url('https://www.trulia.com/rss2/' . urlencode($type) . '/' . urlencode($city) . ',' . urlencode($state) . '/'); |
|
22 | 22 | |
23 | 23 | return $url; |
24 | 24 |