@@ -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 | * Zillow Listings Widget (https://www.zillow.com/webtools/widgets/MyListingsWidget.htm) |
@@ -27,9 +27,9 @@ discard block |
||
| 27 | 27 | |
| 28 | 28 | parent::__construct( |
| 29 | 29 | 'zillow_listings_widget', |
| 30 | - __( 'Zillow Listings', 're-pro' ), |
|
| 30 | + __('Zillow Listings', 're-pro'), |
|
| 31 | 31 | array( |
| 32 | - 'description' => __( 'Display your active listings from Zillow.', 're-pro' ), |
|
| 32 | + 'description' => __('Display your active listings from Zillow.', 're-pro'), |
|
| 33 | 33 | 'classname' => 're-pro re-pro-widget zillow-widget zillow-widget-my-listings', |
| 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'] : ''; |
|
| 51 | - $screenname = ! empty( $instance['screenname'] ) ? $instance['screenname'] : ''; |
|
| 52 | - $zuid = ! empty( $instance['zuid'] ) ? $instance['zuid'] : ''; |
|
| 53 | - $format = ! empty( $instance['format'] ) ? $instance['format'] : ''; |
|
| 49 | + $iframe_id = ! empty($args['widget_id']) ? $args['widget_id'] : ''; |
|
| 50 | + $title = ! empty($instance['title']) ? $instance['title'] : ''; |
|
| 51 | + $screenname = ! empty($instance['screenname']) ? $instance['screenname'] : ''; |
|
| 52 | + $zuid = ! empty($instance['zuid']) ? $instance['zuid'] : ''; |
|
| 53 | + $format = ! empty($instance['format']) ? $instance['format'] : ''; |
|
| 54 | 54 | |
| 55 | 55 | echo $args['before_widget']; |
| 56 | 56 | |
| 57 | - echo $args['before_title'] . esc_attr( $title ) . $args['after_title']; |
|
| 57 | + echo $args['before_title'] . esc_attr($title) . $args['after_title']; |
|
| 58 | 58 | |
| 59 | 59 | $zillow_widgets = new ZillowWidgets(); |
| 60 | 60 | |
| 61 | - return $zillow_widgets->get_listings_widget( $iframe_id, $zuid ); |
|
| 61 | + return $zillow_widgets->get_listings_widget($iframe_id, $zuid); |
|
| 62 | 62 | |
| 63 | 63 | echo $args['after_widget']; |
| 64 | 64 | } |
@@ -70,10 +70,10 @@ discard block |
||
| 70 | 70 | * @param mixed $instance Instance. |
| 71 | 71 | * @return void |
| 72 | 72 | */ |
| 73 | - public function form( $instance ) { |
|
| 73 | + public function form($instance) { |
|
| 74 | 74 | |
| 75 | 75 | // Set default values. |
| 76 | - $instance = wp_parse_args( (array) $instance, array( |
|
| 76 | + $instance = wp_parse_args((array) $instance, array( |
|
| 77 | 77 | 'title' => '', |
| 78 | 78 | 'screenname' => '', |
| 79 | 79 | 'zuid' => '', |
@@ -81,27 +81,27 @@ discard block |
||
| 81 | 81 | )); |
| 82 | 82 | |
| 83 | 83 | // Retrieve an existing value from the database. |
| 84 | - $title = ! empty( $instance['title'] ) ? $instance['title'] : ''; |
|
| 85 | - $screenname = ! empty( $instance['screenname'] ) ? $instance['screenname'] : ''; |
|
| 86 | - $zuid = ! empty( $instance['zuid'] ) ? $instance['zuid'] : ''; |
|
| 87 | - $format = ! empty( $instance['format'] ) ? $instance['format'] : 'format'; |
|
| 84 | + $title = ! empty($instance['title']) ? $instance['title'] : ''; |
|
| 85 | + $screenname = ! empty($instance['screenname']) ? $instance['screenname'] : ''; |
|
| 86 | + $zuid = ! empty($instance['zuid']) ? $instance['zuid'] : ''; |
|
| 87 | + $format = ! empty($instance['format']) ? $instance['format'] : 'format'; |
|
| 88 | 88 | |
| 89 | 89 | // Title. |
| 90 | 90 | echo '<p>'; |
| 91 | - echo ' <label for="' . $this->get_field_id( 'title' ) . '" class="title-label">' . __( 'Tile:', 're-pro' ) . '</label>'; |
|
| 92 | - echo ' <input id="' . $this->get_field_id( 'title' ) . '" name="' . $this->get_field_name( 'title' ) . '" value="' . $title . '" class="widefat">'; |
|
| 91 | + echo ' <label for="' . $this->get_field_id('title') . '" class="title-label">' . __('Tile:', 're-pro') . '</label>'; |
|
| 92 | + echo ' <input id="' . $this->get_field_id('title') . '" name="' . $this->get_field_name('title') . '" value="' . $title . '" class="widefat">'; |
|
| 93 | 93 | echo '</p>'; |
| 94 | 94 | |
| 95 | 95 | // Zillow Screenname. |
| 96 | 96 | echo '<p>'; |
| 97 | - echo ' <label for="' . $this->get_field_id( 'screenname' ) . '" class="title-label">' . __( 'Zillow Screenname:', 're-pro' ) . '</label>'; |
|
| 98 | - echo ' <input id="' . $this->get_field_id( 'screenname' ) . '" name="' . $this->get_field_name( 'screenname' ) . '" value="' . $screenname . '" class="widefat">'; |
|
| 97 | + echo ' <label for="' . $this->get_field_id('screenname') . '" class="title-label">' . __('Zillow Screenname:', 're-pro') . '</label>'; |
|
| 98 | + echo ' <input id="' . $this->get_field_id('screenname') . '" name="' . $this->get_field_name('screenname') . '" value="' . $screenname . '" class="widefat">'; |
|
| 99 | 99 | echo '</p>'; |
| 100 | 100 | |
| 101 | 101 | // Zillow User ID. |
| 102 | 102 | echo '<p>'; |
| 103 | - echo ' <label for="' . $this->get_field_id( 'zuid' ) . '" class="title-label">' . __( 'Zillow User ID:', 're-pro' ) . '</label>'; |
|
| 104 | - echo ' <input id="' . $this->get_field_id( 'zuid' ) . '" name="' . $this->get_field_name( 'zuid' ) . '" value="' . $zuid . '" class="widefat">'; |
|
| 103 | + echo ' <label for="' . $this->get_field_id('zuid') . '" class="title-label">' . __('Zillow User ID:', 're-pro') . '</label>'; |
|
| 104 | + echo ' <input id="' . $this->get_field_id('zuid') . '" name="' . $this->get_field_name('zuid') . '" value="' . $zuid . '" class="widefat">'; |
|
| 105 | 105 | echo '</p>'; |
| 106 | 106 | |
| 107 | 107 | } |
@@ -114,15 +114,15 @@ discard block |
||
| 114 | 114 | * @param mixed $old_instance Old Instance. |
| 115 | 115 | * @return $instance |
| 116 | 116 | */ |
| 117 | - public function update( $new_instance, $old_instance ) { |
|
| 117 | + public function update($new_instance, $old_instance) { |
|
| 118 | 118 | |
| 119 | 119 | $instance = $old_instance; |
| 120 | 120 | |
| 121 | - $instance['title'] = ! empty( $new_instance['title'] ) ? strip_tags( $new_instance['title'] ) : ''; |
|
| 122 | - $instance['screenname'] = ! empty( $new_instance['screenname'] ) ? strip_tags( $new_instance['screenname'] ) : ''; |
|
| 123 | - $instance['zuid'] = ! empty( $new_instance['zuid'] ) ? strip_tags( $new_instance['zuid'] ) : ''; |
|
| 124 | - $instance['format'] = ! empty( $new_instance['format'] ) ? strip_tags( $new_instance['format'] ) : ''; |
|
| 125 | - $instance['zmod'] = ! empty( $new_instance['zmod'] ) ? strip_tags( $new_instance['zmod'] ) : ''; |
|
| 121 | + $instance['title'] = ! empty($new_instance['title']) ? strip_tags($new_instance['title']) : ''; |
|
| 122 | + $instance['screenname'] = ! empty($new_instance['screenname']) ? strip_tags($new_instance['screenname']) : ''; |
|
| 123 | + $instance['zuid'] = ! empty($new_instance['zuid']) ? strip_tags($new_instance['zuid']) : ''; |
|
| 124 | + $instance['format'] = ! empty($new_instance['format']) ? strip_tags($new_instance['format']) : ''; |
|
| 125 | + $instance['zmod'] = ! empty($new_instance['zmod']) ? strip_tags($new_instance['zmod']) : ''; |
|
| 126 | 126 | |
| 127 | 127 | return $instance; |
| 128 | 128 | } |
@@ -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 | * Zillow Mortgage Rate Widget (https://www.zillow.com/webtools/widgets/MortgageRateWidget.htm) |
@@ -27,9 +27,9 @@ discard block |
||
| 27 | 27 | |
| 28 | 28 | parent::__construct( |
| 29 | 29 | 'zillow_mortgage_rate_widget', |
| 30 | - __( 'Zillow Mortgage Rate Table', 're-pro' ), |
|
| 30 | + __('Zillow Mortgage Rate Table', 're-pro'), |
|
| 31 | 31 | array( |
| 32 | - 'description' => __( 'Display a Mortgage Rate Table from Zillow.', 're-pro' ), |
|
| 32 | + 'description' => __('Display a Mortgage Rate Table from Zillow.', 're-pro'), |
|
| 33 | 33 | 'classname' => 're-pro re-pro-widget zillow-widget zillow-widget-mortgage-rate-table', |
| 34 | 34 | 'customize_selective_refresh' => true, |
| 35 | 35 | ) |
@@ -44,23 +44,23 @@ 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'] : ''; |
|
| 51 | - $screenname = ! empty( $instance['screenname'] ) ? $instance['screenname'] : ''; |
|
| 52 | - $region = ! empty( $instance['region'] ) ? $instance['region'] : ''; |
|
| 53 | - $textcolor = ! empty( $instance['textcolor'] ) ? $instance['textcolor'] : ''; |
|
| 49 | + $iframe_id = ! empty($args['widget_id']) ? $args['widget_id'] : ''; |
|
| 50 | + $title = ! empty($instance['title']) ? $instance['title'] : ''; |
|
| 51 | + $screenname = ! empty($instance['screenname']) ? $instance['screenname'] : ''; |
|
| 52 | + $region = ! empty($instance['region']) ? $instance['region'] : ''; |
|
| 53 | + $textcolor = ! empty($instance['textcolor']) ? $instance['textcolor'] : ''; |
|
| 54 | 54 | |
| 55 | 55 | echo $args['before_widget']; |
| 56 | 56 | |
| 57 | - echo $args['before_title'] . esc_attr( $title ) . $args['after_title']; |
|
| 57 | + echo $args['before_title'] . esc_attr($title) . $args['after_title']; |
|
| 58 | 58 | |
| 59 | 59 | |
| 60 | 60 | |
| 61 | 61 | $zillow_widgets = new ZillowWidgets(); |
| 62 | 62 | |
| 63 | - return $zillow_widgets->get_mortgage_rate_table_widget( $iframe_id, $textcolor, $screenname, $region ); |
|
| 63 | + return $zillow_widgets->get_mortgage_rate_table_widget($iframe_id, $textcolor, $screenname, $region); |
|
| 64 | 64 | |
| 65 | 65 | echo $args['after_widget']; |
| 66 | 66 | } |
@@ -72,10 +72,10 @@ discard block |
||
| 72 | 72 | * @param mixed $instance Instance. |
| 73 | 73 | * @return void |
| 74 | 74 | */ |
| 75 | - public function form( $instance ) { |
|
| 75 | + public function form($instance) { |
|
| 76 | 76 | |
| 77 | 77 | // Set default values. |
| 78 | - $instance = wp_parse_args( (array) $instance, array( |
|
| 78 | + $instance = wp_parse_args((array) $instance, array( |
|
| 79 | 79 | 'title' => '', |
| 80 | 80 | 'screenname' => '', |
| 81 | 81 | 'region' => '', |
@@ -84,89 +84,89 @@ discard block |
||
| 84 | 84 | )); |
| 85 | 85 | |
| 86 | 86 | // Retrieve an existing value from the database. |
| 87 | - $title = ! empty( $instance['title'] ) ? $instance['title'] : ''; |
|
| 88 | - $screenname = ! empty( $instance['screenname'] ) ? $instance['screenname'] : ''; |
|
| 89 | - $textcolor = ! empty( $instance['textcolor'] ) ? $instance['textcolor'] : ''; |
|
| 90 | - $region = ! empty( $instance['region'] ) ? $instance['region'] : ''; |
|
| 91 | - $zuid = ! empty( $instance['zuid'] ) ? $instance['zuid'] : ''; |
|
| 87 | + $title = ! empty($instance['title']) ? $instance['title'] : ''; |
|
| 88 | + $screenname = ! empty($instance['screenname']) ? $instance['screenname'] : ''; |
|
| 89 | + $textcolor = ! empty($instance['textcolor']) ? $instance['textcolor'] : ''; |
|
| 90 | + $region = ! empty($instance['region']) ? $instance['region'] : ''; |
|
| 91 | + $zuid = ! empty($instance['zuid']) ? $instance['zuid'] : ''; |
|
| 92 | 92 | |
| 93 | 93 | // Title. |
| 94 | 94 | echo '<p>'; |
| 95 | - echo ' <label for="' . $this->get_field_id( 'title' ) . '" class="title-label">' . __( 'Tile:', 're-pro' ) . '</label>'; |
|
| 96 | - echo ' <input id="' . $this->get_field_id( 'title' ) . '" name="' . $this->get_field_name( 'title' ) . '" value="' . $title . '" class="widefat">'; |
|
| 95 | + echo ' <label for="' . $this->get_field_id('title') . '" class="title-label">' . __('Tile:', 're-pro') . '</label>'; |
|
| 96 | + echo ' <input id="' . $this->get_field_id('title') . '" name="' . $this->get_field_name('title') . '" value="' . $title . '" class="widefat">'; |
|
| 97 | 97 | echo '</p>'; |
| 98 | 98 | |
| 99 | 99 | // Zillow Screenname. |
| 100 | 100 | echo '<p>'; |
| 101 | - echo ' <label for="' . $this->get_field_id( 'screenname' ) . '" class="title-label">' . __( 'Zillow Screenname:', 're-pro' ) . '</label>'; |
|
| 102 | - echo ' <input id="' . $this->get_field_id( 'screenname' ) . '" name="' . $this->get_field_name( 'screenname' ) . '" value="' . $screenname . '" class="widefat">'; |
|
| 101 | + echo ' <label for="' . $this->get_field_id('screenname') . '" class="title-label">' . __('Zillow Screenname:', 're-pro') . '</label>'; |
|
| 102 | + echo ' <input id="' . $this->get_field_id('screenname') . '" name="' . $this->get_field_name('screenname') . '" value="' . $screenname . '" class="widefat">'; |
|
| 103 | 103 | echo '</p>'; |
| 104 | 104 | |
| 105 | 105 | // Select a State. |
| 106 | 106 | echo '<p>'; |
| 107 | - echo ' <label for="' . $this->get_field_id( 'region' ) . '" class="title-label">' . __( 'Region:', 're-pro' ) . '</label>'; |
|
| 108 | - echo '<select id="' . $this->get_field_id( 'region' ) . '" name="' . $this->get_field_name( 'region' ) . '" class="widefat">'; |
|
| 109 | - echo '<option value="102001"'. selected( $region, 102001 ) .'>'. __( 'United States', 're-pro' ) .'</option>'; |
|
| 110 | - echo '<option value="3"'. selected( $region, 3 ) .'>Alaska</option>'; |
|
| 111 | - echo '<option value="4"'. selected( $region, 4 ) .'>Alabama</option>'; |
|
| 112 | - echo '<option value="6"'. selected( $region, 6 ) .'>Arkansas</option>'; |
|
| 113 | - echo '<option value="8"'. selected( $region, 8 ) .'>Arizona</option>'; |
|
| 114 | - echo '<option value="9"'. selected( $region, 9 ) .'>California</option>'; |
|
| 115 | - echo '<option value="10"'. selected( $region, 10 ) .'>Colorado</option>'; |
|
| 116 | - echo '<option value="11"'. selected( $region, 11 ) .'>Connecticut</option>'; |
|
| 117 | - echo '<option value="13"'. selected( $region, 13 ) .'>Delaware</option>'; |
|
| 118 | - echo '<option value="14"'. selected( $region, 14 ) .'>Florida</option>'; |
|
| 119 | - echo '<option value="16"'. selected( $region, 16 ) .'>Georgia</option>'; |
|
| 120 | - echo '<option value="18"'. selected( $region, 18 ) .'>Hawaii</option>'; |
|
| 121 | - echo '<option value="19"'. selected( $region, 19 ) .'>Iowa</option>'; |
|
| 122 | - echo '<option value="20"'. selected( $region, 20 ) .'>Idaho</option>'; |
|
| 123 | - echo '<option value="21"'. selected( $region, 21 ) .'>Illinois</option>'; |
|
| 124 | - echo '<option value="22"'. selected( $region, 22 ) .'>Indiana</option>'; |
|
| 125 | - echo '<option value="23"'. selected( $region, 23 ) .'>Kansas</option>'; |
|
| 126 | - echo '<option value="24"'. selected( $region, 24 ) .'>Kentucky</option>'; |
|
| 127 | - echo '<option value="25"'. selected( $region, 25 ) .'>Louisiana</option>'; |
|
| 128 | - echo '<option value="26"'. selected( $region, 26 ) .'>Massachusetts</option>'; |
|
| 129 | - echo '<option value="27"'. selected( $region, 27 ) .'>Maryland</option>'; |
|
| 130 | - echo '<option value="28"'. selected( $region, 28 ) .'>Maine</option>'; |
|
| 131 | - echo '<option value="30"'. selected( $region, 30 ) .'>Michigan</option>'; |
|
| 132 | - echo '<option value="31"'. selected( $region, 31 ) .'>Minnesota</option>'; |
|
| 133 | - echo '<option value="32"'. selected( $region, 32 ) .'>Missouri</option>'; |
|
| 134 | - echo '<option value="34"'. selected( $region, 34 ) .'>Mississippi</option>'; |
|
| 135 | - echo '<option value="35"'. selected( $region, 35 ) .'>Montana</option>'; |
|
| 136 | - echo '<option value="36"'. selected( $region, 36 ) .'>North Carolina</option>'; |
|
| 137 | - echo '<option value="37"'. selected( $region, 37 ) .'>North Dakota</option>'; |
|
| 138 | - echo '<option value="38"'. selected( $region, 38 ) .'>Nebraska</option>'; |
|
| 139 | - echo '<option value="39"'. selected( $region, 39 ) .'>New Hampshire</option>'; |
|
| 140 | - echo '<option value="40"'. selected( $region, 40 ) .'>New Jersey</option>'; |
|
| 141 | - echo '<option value="41"'. selected( $region, 41 ) .'>New Mexico</option>'; |
|
| 142 | - echo '<option value="42"'. selected( $region, 42 ) .'>Nevada</option>'; |
|
| 143 | - echo '<option value="43"'. selected( $region, 43 ) .'>New York</option>'; |
|
| 144 | - echo '<option value="44"'. selected( $region, 44 ) .'>Ohio</option>'; |
|
| 145 | - echo '<option value="45"'. selected( $region, 45 ) .'>Oklahoma</option>'; |
|
| 146 | - echo '<option value="46"'. selected( $region, 46 ) .'>Oregon</option>'; |
|
| 147 | - echo '<option value="47"'. selected( $region, 47 ) .'>Pennsylvania</option>'; |
|
| 148 | - echo '<option value="48"'. selected( $region, 48 ) .'>Puerto Rico</option>'; |
|
| 149 | - echo '<option value="50"'. selected( $region, 50 ) .'>Rhode Island</option>'; |
|
| 150 | - echo '<option value="51"'. selected( $region, 51 ) .'>South Carolina</option>'; |
|
| 151 | - echo '<option value="52"'. selected( $region, 52 ) .'>South Dakota</option>'; |
|
| 152 | - echo '<option value="53"'. selected( $region, 53 ) .'>Tennessee</option>'; |
|
| 153 | - echo '<option value="54"'. selected( $region, 54 ) .'>Texas</option>'; |
|
| 154 | - echo '<option value="55"'. selected( $region, 55 ) .'>Utah</option>'; |
|
| 155 | - echo '<option value="56"'. selected( $region, 56 ) .'>Virginia</option>'; |
|
| 156 | - echo '<option value="57"'. selected( $region, 57 ) .'>Virgin Islands</option>'; |
|
| 157 | - echo '<option value="58"'. selected( $region, 58 ) .'>Vermont</option>'; |
|
| 158 | - echo '<option value="59"'. selected( $region, 59 ) .'>Washington</option>'; |
|
| 159 | - echo '<option value="12"'. selected( $region, 12 ) .'>Washington, DC</option>'; |
|
| 160 | - echo '<option value="60"'. selected( $region, 60 ) .'>Wisconsin</option>'; |
|
| 161 | - echo '<option value="61"'. selected( $region, 61 ) .'>West Virginia</option>'; |
|
| 162 | - echo '<option value="62"'. selected( $region, 62 ) .'>Wyoming</option>'; |
|
| 107 | + echo ' <label for="' . $this->get_field_id('region') . '" class="title-label">' . __('Region:', 're-pro') . '</label>'; |
|
| 108 | + echo '<select id="' . $this->get_field_id('region') . '" name="' . $this->get_field_name('region') . '" class="widefat">'; |
|
| 109 | + echo '<option value="102001"' . selected($region, 102001) . '>' . __('United States', 're-pro') . '</option>'; |
|
| 110 | + echo '<option value="3"' . selected($region, 3) . '>Alaska</option>'; |
|
| 111 | + echo '<option value="4"' . selected($region, 4) . '>Alabama</option>'; |
|
| 112 | + echo '<option value="6"' . selected($region, 6) . '>Arkansas</option>'; |
|
| 113 | + echo '<option value="8"' . selected($region, 8) . '>Arizona</option>'; |
|
| 114 | + echo '<option value="9"' . selected($region, 9) . '>California</option>'; |
|
| 115 | + echo '<option value="10"' . selected($region, 10) . '>Colorado</option>'; |
|
| 116 | + echo '<option value="11"' . selected($region, 11) . '>Connecticut</option>'; |
|
| 117 | + echo '<option value="13"' . selected($region, 13) . '>Delaware</option>'; |
|
| 118 | + echo '<option value="14"' . selected($region, 14) . '>Florida</option>'; |
|
| 119 | + echo '<option value="16"' . selected($region, 16) . '>Georgia</option>'; |
|
| 120 | + echo '<option value="18"' . selected($region, 18) . '>Hawaii</option>'; |
|
| 121 | + echo '<option value="19"' . selected($region, 19) . '>Iowa</option>'; |
|
| 122 | + echo '<option value="20"' . selected($region, 20) . '>Idaho</option>'; |
|
| 123 | + echo '<option value="21"' . selected($region, 21) . '>Illinois</option>'; |
|
| 124 | + echo '<option value="22"' . selected($region, 22) . '>Indiana</option>'; |
|
| 125 | + echo '<option value="23"' . selected($region, 23) . '>Kansas</option>'; |
|
| 126 | + echo '<option value="24"' . selected($region, 24) . '>Kentucky</option>'; |
|
| 127 | + echo '<option value="25"' . selected($region, 25) . '>Louisiana</option>'; |
|
| 128 | + echo '<option value="26"' . selected($region, 26) . '>Massachusetts</option>'; |
|
| 129 | + echo '<option value="27"' . selected($region, 27) . '>Maryland</option>'; |
|
| 130 | + echo '<option value="28"' . selected($region, 28) . '>Maine</option>'; |
|
| 131 | + echo '<option value="30"' . selected($region, 30) . '>Michigan</option>'; |
|
| 132 | + echo '<option value="31"' . selected($region, 31) . '>Minnesota</option>'; |
|
| 133 | + echo '<option value="32"' . selected($region, 32) . '>Missouri</option>'; |
|
| 134 | + echo '<option value="34"' . selected($region, 34) . '>Mississippi</option>'; |
|
| 135 | + echo '<option value="35"' . selected($region, 35) . '>Montana</option>'; |
|
| 136 | + echo '<option value="36"' . selected($region, 36) . '>North Carolina</option>'; |
|
| 137 | + echo '<option value="37"' . selected($region, 37) . '>North Dakota</option>'; |
|
| 138 | + echo '<option value="38"' . selected($region, 38) . '>Nebraska</option>'; |
|
| 139 | + echo '<option value="39"' . selected($region, 39) . '>New Hampshire</option>'; |
|
| 140 | + echo '<option value="40"' . selected($region, 40) . '>New Jersey</option>'; |
|
| 141 | + echo '<option value="41"' . selected($region, 41) . '>New Mexico</option>'; |
|
| 142 | + echo '<option value="42"' . selected($region, 42) . '>Nevada</option>'; |
|
| 143 | + echo '<option value="43"' . selected($region, 43) . '>New York</option>'; |
|
| 144 | + echo '<option value="44"' . selected($region, 44) . '>Ohio</option>'; |
|
| 145 | + echo '<option value="45"' . selected($region, 45) . '>Oklahoma</option>'; |
|
| 146 | + echo '<option value="46"' . selected($region, 46) . '>Oregon</option>'; |
|
| 147 | + echo '<option value="47"' . selected($region, 47) . '>Pennsylvania</option>'; |
|
| 148 | + echo '<option value="48"' . selected($region, 48) . '>Puerto Rico</option>'; |
|
| 149 | + echo '<option value="50"' . selected($region, 50) . '>Rhode Island</option>'; |
|
| 150 | + echo '<option value="51"' . selected($region, 51) . '>South Carolina</option>'; |
|
| 151 | + echo '<option value="52"' . selected($region, 52) . '>South Dakota</option>'; |
|
| 152 | + echo '<option value="53"' . selected($region, 53) . '>Tennessee</option>'; |
|
| 153 | + echo '<option value="54"' . selected($region, 54) . '>Texas</option>'; |
|
| 154 | + echo '<option value="55"' . selected($region, 55) . '>Utah</option>'; |
|
| 155 | + echo '<option value="56"' . selected($region, 56) . '>Virginia</option>'; |
|
| 156 | + echo '<option value="57"' . selected($region, 57) . '>Virgin Islands</option>'; |
|
| 157 | + echo '<option value="58"' . selected($region, 58) . '>Vermont</option>'; |
|
| 158 | + echo '<option value="59"' . selected($region, 59) . '>Washington</option>'; |
|
| 159 | + echo '<option value="12"' . selected($region, 12) . '>Washington, DC</option>'; |
|
| 160 | + echo '<option value="60"' . selected($region, 60) . '>Wisconsin</option>'; |
|
| 161 | + echo '<option value="61"' . selected($region, 61) . '>West Virginia</option>'; |
|
| 162 | + echo '<option value="62"' . selected($region, 62) . '>Wyoming</option>'; |
|
| 163 | 163 | echo '</select>'; |
| 164 | 164 | echo '</p>'; |
| 165 | 165 | |
| 166 | 166 | // Text Color |
| 167 | 167 | echo '<p>'; |
| 168 | - echo ' <label for="' . $this->get_field_id( 'textcolor' ) . '" class="title-label">' . __( 'Text Color:', 're-pro' ) . '</label>'; |
|
| 169 | - echo ' <input id="' . $this->get_field_id( 'textcolor' ) . '" name="' . $this->get_field_name( 'textcolor' ) . '" value="' . $textcolor . '" class="widefat">'; |
|
| 168 | + echo ' <label for="' . $this->get_field_id('textcolor') . '" class="title-label">' . __('Text Color:', 're-pro') . '</label>'; |
|
| 169 | + echo ' <input id="' . $this->get_field_id('textcolor') . '" name="' . $this->get_field_name('textcolor') . '" value="' . $textcolor . '" class="widefat">'; |
|
| 170 | 170 | echo '</p>'; |
| 171 | 171 | |
| 172 | 172 | } |
@@ -179,14 +179,14 @@ discard block |
||
| 179 | 179 | * @param mixed $old_instance Old Instance. |
| 180 | 180 | * @return $instance |
| 181 | 181 | */ |
| 182 | - public function update( $new_instance, $old_instance ) { |
|
| 182 | + public function update($new_instance, $old_instance) { |
|
| 183 | 183 | |
| 184 | 184 | $instance = $old_instance; |
| 185 | 185 | |
| 186 | - $instance['title'] = ! empty( $new_instance['title'] ) ? strip_tags( $new_instance['title'] ) : ''; |
|
| 187 | - $instance['screenname'] = ! empty( $new_instance['screenname'] ) ? strip_tags( $new_instance['screenname'] ) : ''; |
|
| 188 | - $instance['region'] = ! empty( $new_instance['region'] ) ? strip_tags( $new_instance['region'] ) : ''; |
|
| 189 | - $instance['textcolor'] = ! empty( $new_instance['textcolor'] ) ? strip_tags( $new_instance['textcolor'] ) : ''; |
|
| 186 | + $instance['title'] = ! empty($new_instance['title']) ? strip_tags($new_instance['title']) : ''; |
|
| 187 | + $instance['screenname'] = ! empty($new_instance['screenname']) ? strip_tags($new_instance['screenname']) : ''; |
|
| 188 | + $instance['region'] = ! empty($new_instance['region']) ? strip_tags($new_instance['region']) : ''; |
|
| 189 | + $instance['textcolor'] = ! empty($new_instance['textcolor']) ? strip_tags($new_instance['textcolor']) : ''; |
|
| 190 | 190 | |
| 191 | 191 | return $instance; |
| 192 | 192 | } |
@@ -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 | * Zillow Expensive Homes Widget (https://www.zillow.com/webtools/widgets/MostExpensiveHomes.htm) |
@@ -27,9 +27,9 @@ discard block |
||
| 27 | 27 | |
| 28 | 28 | parent::__construct( |
| 29 | 29 | 'zillow_expensive_homes_widget', |
| 30 | - __( 'Zillow Most Expensive Homes', 're-pro' ), |
|
| 30 | + __('Zillow Most Expensive Homes', 're-pro'), |
|
| 31 | 31 | array( |
| 32 | - 'description' => __( 'Display the most expensive homes from Zillow.', 're-pro' ), |
|
| 32 | + 'description' => __('Display the most expensive homes from Zillow.', 're-pro'), |
|
| 33 | 33 | 'classname' => 're-pro re-pro-widget zillow-widget zillow-widget-expensive-homes', |
| 34 | 34 | 'customize_selective_refresh' => true, |
| 35 | 35 | ) |
@@ -44,22 +44,22 @@ 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'] : ''; |
|
| 51 | - $type = ! empty( $instance['type'] ) ? $instance['type'] : ''; |
|
| 52 | - $size = ! empty( $instance['size'] ) ? $instance['size'] : ''; |
|
| 53 | - $location = ! empty( $instance['location'] ) ? $instance['location'] : ''; |
|
| 49 | + $iframe_id = ! empty($args['widget_id']) ? $args['widget_id'] : ''; |
|
| 50 | + $title = ! empty($instance['title']) ? $instance['title'] : ''; |
|
| 51 | + $type = ! empty($instance['type']) ? $instance['type'] : ''; |
|
| 52 | + $size = ! empty($instance['size']) ? $instance['size'] : ''; |
|
| 53 | + $location = ! empty($instance['location']) ? $instance['location'] : ''; |
|
| 54 | 54 | |
| 55 | 55 | echo $args['before_widget']; |
| 56 | 56 | |
| 57 | - echo $args['before_title'] . esc_attr( $title ) . $args['after_title']; |
|
| 57 | + echo $args['before_title'] . esc_attr($title) . $args['after_title']; |
|
| 58 | 58 | |
| 59 | 59 | |
| 60 | 60 | $zillow_widgets = new ZillowWidgets(); |
| 61 | 61 | |
| 62 | - $zillow_widgets->get_expensive_homes_widget( $iframe_id, $location, 'iframe', 'wide' ); |
|
| 62 | + $zillow_widgets->get_expensive_homes_widget($iframe_id, $location, 'iframe', 'wide'); |
|
| 63 | 63 | |
| 64 | 64 | echo $args['after_widget']; |
| 65 | 65 | } |
@@ -71,10 +71,10 @@ discard block |
||
| 71 | 71 | * @param mixed $instance Instance. |
| 72 | 72 | * @return void |
| 73 | 73 | */ |
| 74 | - public function form( $instance ) { |
|
| 74 | + public function form($instance) { |
|
| 75 | 75 | |
| 76 | 76 | // Set default values. |
| 77 | - $instance = wp_parse_args( (array) $instance, array( |
|
| 77 | + $instance = wp_parse_args((array) $instance, array( |
|
| 78 | 78 | 'title' => '', |
| 79 | 79 | 'type' => 'iframe', |
| 80 | 80 | 'size' => 'wide', |
@@ -82,19 +82,19 @@ discard block |
||
| 82 | 82 | )); |
| 83 | 83 | |
| 84 | 84 | // Retrieve an existing value from the database. |
| 85 | - $title = ! empty( $instance['title'] ) ? $instance['title'] : ''; |
|
| 86 | - $location = ! empty( $instance['location'] ) ? $instance['location'] : ''; |
|
| 85 | + $title = ! empty($instance['title']) ? $instance['title'] : ''; |
|
| 86 | + $location = ! empty($instance['location']) ? $instance['location'] : ''; |
|
| 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. |
| 95 | 95 | echo '<p>'; |
| 96 | - echo ' <label for="' . $this->get_field_id( 'location' ) . '" class="title-label">' . __( 'Location:', 're-pro' ) . '</label>'; |
|
| 97 | - echo ' <input id="' . $this->get_field_id( 'location' ) . '" placeholder="El Segundo, CA" name="' . $this->get_field_name( 'location' ) . '" value="' . $location . '" class="widefat">'; |
|
| 96 | + echo ' <label for="' . $this->get_field_id('location') . '" class="title-label">' . __('Location:', 're-pro') . '</label>'; |
|
| 97 | + echo ' <input id="' . $this->get_field_id('location') . '" placeholder="El Segundo, CA" name="' . $this->get_field_name('location') . '" value="' . $location . '" class="widefat">'; |
|
| 98 | 98 | echo '</p>'; |
| 99 | 99 | |
| 100 | 100 | } |
@@ -107,14 +107,14 @@ discard block |
||
| 107 | 107 | * @param mixed $old_instance Old Instance. |
| 108 | 108 | * @return $instance |
| 109 | 109 | */ |
| 110 | - public function update( $new_instance, $old_instance ) { |
|
| 110 | + public function update($new_instance, $old_instance) { |
|
| 111 | 111 | |
| 112 | 112 | $instance = $old_instance; |
| 113 | 113 | |
| 114 | - $instance['title'] = ! empty( $new_instance['title'] ) ? strip_tags( $new_instance['title'] ) : ''; |
|
| 115 | - $instance['type'] = ! empty( $new_instance['type'] ) ? strip_tags( $new_instance['type'] ) : ''; |
|
| 116 | - $instance['size'] = ! empty( $new_instance['size'] ) ? strip_tags( $new_instance['size'] ) : ''; |
|
| 117 | - $instance['location'] = ! empty( $new_instance['location'] ) ? strip_tags( $new_instance['location'] ) : ''; |
|
| 114 | + $instance['title'] = ! empty($new_instance['title']) ? strip_tags($new_instance['title']) : ''; |
|
| 115 | + $instance['type'] = ! empty($new_instance['type']) ? strip_tags($new_instance['type']) : ''; |
|
| 116 | + $instance['size'] = ! empty($new_instance['size']) ? strip_tags($new_instance['size']) : ''; |
|
| 117 | + $instance['location'] = ! empty($new_instance['location']) ? strip_tags($new_instance['location']) : ''; |
|
| 118 | 118 | |
| 119 | 119 | return $instance; |
| 120 | 120 | } |
@@ -128,6 +128,6 @@ discard block |
||
| 128 | 128 | */ |
| 129 | 129 | function repro_zillow_expensive_homes_widget() { |
| 130 | 130 | |
| 131 | - register_widget( 'ZillowExpensiveHomesWidget' ); |
|
| 131 | + register_widget('ZillowExpensiveHomesWidget'); |
|
| 132 | 132 | } |
| 133 | -add_action( 'widgets_init', 'repro_zillow_expensive_homes_widget' ); |
|
| 133 | +add_action('widgets_init', 'repro_zillow_expensive_homes_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( 'ZillowWidgets' ) ) { |
|
| 6 | +if ( ! class_exists('ZillowWidgets')) { |
|
| 7 | 7 | |
| 8 | 8 | /** |
| 9 | 9 | * ZillowWidgets class. |
@@ -48,10 +48,10 @@ discard block |
||
| 48 | 48 | * @param string $iframe_id (default: '') |
| 49 | 49 | * @return void |
| 50 | 50 | */ |
| 51 | - public function zillow_iframe_id( $iframe_id = '' ) { |
|
| 51 | + public function zillow_iframe_id($iframe_id = '') { |
|
| 52 | 52 | |
| 53 | - if( '' !== $iframe_id ) { |
|
| 54 | - return sanitize_html_class( $iframe_id ) . '-iframe'; |
|
| 53 | + if ('' !== $iframe_id) { |
|
| 54 | + return sanitize_html_class($iframe_id) . '-iframe'; |
|
| 55 | 55 | } |
| 56 | 56 | |
| 57 | 57 | } |
@@ -63,10 +63,10 @@ discard block |
||
| 63 | 63 | * @param string $widget_name (default: '') |
| 64 | 64 | * @return void |
| 65 | 65 | */ |
| 66 | - public function zillow_iframe_class( $widget_name = '' ) { |
|
| 66 | + public function zillow_iframe_class($widget_name = '') { |
|
| 67 | 67 | |
| 68 | - if( '' !== $widget_name ) { |
|
| 69 | - return 'zillow zillow-iframe zillow-' . sanitize_html_class( $widget_name ) . '-iframe'; |
|
| 68 | + if ('' !== $widget_name) { |
|
| 69 | + return 'zillow zillow-iframe zillow-' . sanitize_html_class($widget_name) . '-iframe'; |
|
| 70 | 70 | } else { |
| 71 | 71 | return 'zillow zillow-iframe'; |
| 72 | 72 | } |
@@ -84,9 +84,9 @@ discard block |
||
| 84 | 84 | * @param string $format (default: 'normalWidget') |
| 85 | 85 | * @return void |
| 86 | 86 | */ |
| 87 | - public function get_listings_widget( $iframe_id = '', $zuid, $format = 'normalWidget' ) { |
|
| 87 | + public function get_listings_widget($iframe_id = '', $zuid, $format = 'normalWidget') { |
|
| 88 | 88 | |
| 89 | - echo '<iframe id="'. $this->zillow_iframe_id( $iframe_id ) .'" class="'. $this->zillow_iframe_class( 'listings' ) .'" scrolling="no" title="'. __( 'My Listings on Zillow', 're-rpo' ) .'" src="https://www.zillow.com/widgets/profile/NewListingsWidget.htm?aid='. $zuid .'&newVersion=true&widgetFormat='. $format .'" width="500" height="300" frameborder="0" style="width:100%;"></iframe>'; |
|
| 89 | + echo '<iframe id="' . $this->zillow_iframe_id($iframe_id) . '" class="' . $this->zillow_iframe_class('listings') . '" scrolling="no" title="' . __('My Listings on Zillow', 're-rpo') . '" src="https://www.zillow.com/widgets/profile/NewListingsWidget.htm?aid=' . $zuid . '&newVersion=true&widgetFormat=' . $format . '" width="500" height="300" frameborder="0" style="width:100%;"></iframe>'; |
|
| 90 | 90 | |
| 91 | 91 | } |
| 92 | 92 | |
@@ -103,9 +103,9 @@ discard block |
||
| 103 | 103 | * @param mixed $height |
| 104 | 104 | * @return void |
| 105 | 105 | */ |
| 106 | - public function get_review_widget( $iframe_id = '', $zuid, $screenname, $size = 'wide', $zmod = 'true', $width = '300', $height = '100' ) { |
|
| 106 | + public function get_review_widget($iframe_id = '', $zuid, $screenname, $size = 'wide', $zmod = 'true', $width = '300', $height = '100') { |
|
| 107 | 107 | |
| 108 | - echo '<iframe id="'. $this->zillow_iframe_id( $iframe_id ) .'" class="'. $this->zillow_iframe_class( 'reviews' ) .'" scrolling="yes" title="'. __( 'My Reviews on Zillow', 're-pro' ) .'" src="https://www.zillow.com/widgets/reputation/Rating.htm?did=rw-widget-container&ezuid=' . $zuid .'&scrnname=' . $screenname . '&size=' .$size . '&type=iframe&zmod='. $zmod .'" width="'. $width . '" height="'. $height .'" frameborder="0"></iframe>'; |
|
| 108 | + echo '<iframe id="' . $this->zillow_iframe_id($iframe_id) . '" class="' . $this->zillow_iframe_class('reviews') . '" scrolling="yes" title="' . __('My Reviews on Zillow', 're-pro') . '" src="https://www.zillow.com/widgets/reputation/Rating.htm?did=rw-widget-container&ezuid=' . $zuid . '&scrnname=' . $screenname . '&size=' . $size . '&type=iframe&zmod=' . $zmod . '" width="' . $width . '" height="' . $height . '" frameborder="0"></iframe>'; |
|
| 109 | 109 | |
| 110 | 110 | } |
| 111 | 111 | |
@@ -118,9 +118,9 @@ discard block |
||
| 118 | 118 | * @param string $format (default: 'normalWidget') |
| 119 | 119 | * @return void |
| 120 | 120 | */ |
| 121 | - public function get_past_listings_widget( $iframe_id = '', $zuid, $format = 'normalWidget' ) { |
|
| 121 | + public function get_past_listings_widget($iframe_id = '', $zuid, $format = 'normalWidget') { |
|
| 122 | 122 | |
| 123 | - echo '<iframe id="'. $this->zillow_iframe_id( $iframe_id ) .'" class="'. $this->zillow_iframe_class( 'past-listings' ) .'" scrolling="no" title="'. __( 'My Sales on Zillow', 're-rpo' ) .'" src="https://www.zillow.com/widgets/profile/PastSalesListingWidget.htm?aid='. $zuid .'&newVersion=true&widgetFormat='. $format .'" width="500" height="250" frameborder="0" style="width:100%;"></iframe>'; |
|
| 123 | + echo '<iframe id="' . $this->zillow_iframe_id($iframe_id) . '" class="' . $this->zillow_iframe_class('past-listings') . '" scrolling="no" title="' . __('My Sales on Zillow', 're-rpo') . '" src="https://www.zillow.com/widgets/profile/PastSalesListingWidget.htm?aid=' . $zuid . '&newVersion=true&widgetFormat=' . $format . '" width="500" height="250" frameborder="0" style="width:100%;"></iframe>'; |
|
| 124 | 124 | |
| 125 | 125 | } |
| 126 | 126 | |
@@ -132,9 +132,9 @@ discard block |
||
| 132 | 132 | * @param mixed $email |
| 133 | 133 | * @return void |
| 134 | 134 | */ |
| 135 | - public function get_contact_widget( $iframe_id = '', $email ) { |
|
| 135 | + public function get_contact_widget($iframe_id = '', $email) { |
|
| 136 | 136 | |
| 137 | - echo '<iframe id="'. $this->zillow_iframe_id( $iframe_id ) .'" class="'. $this->zillow_iframe_class( 'contact' ) .'" scrolling="no" title="'. __( 'Contact me on Zillow', 're-rpo' ) .'" src="https://www.zillow.com/widgets/contact/ContactFormWidget.htm?email='. antispambot( sanitize_email( $email ) ) .'&size=wide" width="350" height="250" frameborder="0" style="width:100%;"></iframe>'; |
|
| 137 | + echo '<iframe id="' . $this->zillow_iframe_id($iframe_id) . '" class="' . $this->zillow_iframe_class('contact') . '" scrolling="no" title="' . __('Contact me on Zillow', 're-rpo') . '" src="https://www.zillow.com/widgets/contact/ContactFormWidget.htm?email=' . antispambot(sanitize_email($email)) . '&size=wide" width="350" height="250" frameborder="0" style="width:100%;"></iframe>'; |
|
| 138 | 138 | |
| 139 | 139 | } |
| 140 | 140 | |
@@ -147,9 +147,9 @@ discard block |
||
| 147 | 147 | * @param string $iframe_id (default: '') |
| 148 | 148 | * @return void |
| 149 | 149 | */ |
| 150 | - public function get_affordability_calc_widget( $iframe_id = '' ) { |
|
| 150 | + public function get_affordability_calc_widget($iframe_id = '') { |
|
| 151 | 151 | |
| 152 | - echo '<iframe id="'. $this->zillow_iframe_id( $iframe_id ) .'" class="'. $this->zillow_iframe_class( 'affordability-calc' ) .'" scrolling="no" title="'. __( 'Zillow Affordability Calculator', 're-rpo' ) .'" src="https://www.zillow.com/mortgage/widgets/AffordabilityCalculatorWidget.htm" width="688" height="700" frameborder="0" style="width:100%;min-height:700px;"></iframe>'; |
|
| 152 | + echo '<iframe id="' . $this->zillow_iframe_id($iframe_id) . '" class="' . $this->zillow_iframe_class('affordability-calc') . '" scrolling="no" title="' . __('Zillow Affordability Calculator', 're-rpo') . '" src="https://www.zillow.com/mortgage/widgets/AffordabilityCalculatorWidget.htm" width="688" height="700" frameborder="0" style="width:100%;min-height:700px;"></iframe>'; |
|
| 153 | 153 | |
| 154 | 154 | } |
| 155 | 155 | |
@@ -160,9 +160,9 @@ discard block |
||
| 160 | 160 | * @param string $iframe_id (default: '') |
| 161 | 161 | * @return void |
| 162 | 162 | */ |
| 163 | - public function get_monthlypay_calc_widget( $iframe_id = '' ) { |
|
| 163 | + public function get_monthlypay_calc_widget($iframe_id = '') { |
|
| 164 | 164 | |
| 165 | - echo '<iframe id="'. $this->zillow_iframe_id( $iframe_id ) .'" class="'. $this->zillow_iframe_class( 'listings' ) .'" scrolling="no" title="'. __( 'Monthly Payment Calculator', 're-rpo' ) .'" src="https://www.zillow.com/mortgage/MortgageCalculatorWidgetLarge.htm" width="688" height="700" frameborder="0" style="width:100%;min-height:700px;"></iframe>'; |
|
| 165 | + echo '<iframe id="' . $this->zillow_iframe_id($iframe_id) . '" class="' . $this->zillow_iframe_class('listings') . '" scrolling="no" title="' . __('Monthly Payment Calculator', 're-rpo') . '" src="https://www.zillow.com/mortgage/MortgageCalculatorWidgetLarge.htm" width="688" height="700" frameborder="0" style="width:100%;min-height:700px;"></iframe>'; |
|
| 166 | 166 | |
| 167 | 167 | } |
| 168 | 168 | |
@@ -174,9 +174,9 @@ discard block |
||
| 174 | 174 | * @param string $orientation (default: 'verticalWidget') |
| 175 | 175 | * @return void |
| 176 | 176 | */ |
| 177 | - public function get_mortgage_calc_widget( $iframe_id = '', $orientation = 'verticalWidget' ) { |
|
| 177 | + public function get_mortgage_calc_widget($iframe_id = '', $orientation = 'verticalWidget') { |
|
| 178 | 178 | |
| 179 | - if ( 'verticalWidget' === $orientation ) { |
|
| 179 | + if ('verticalWidget' === $orientation) { |
|
| 180 | 180 | $height = '470'; |
| 181 | 181 | $width = '200'; |
| 182 | 182 | } else { |
@@ -184,7 +184,7 @@ discard block |
||
| 184 | 184 | $width = '352'; |
| 185 | 185 | } |
| 186 | 186 | |
| 187 | - echo '<iframe id="'. $this->zillow_iframe_id( $iframe_id ) .'" class="'. $this->zillow_iframe_class( 'mortgage-calc' ) .'" scrolling="no" title="'. __( 'Zillow Mortgage Calculator', 're-rpo' ) .'" src="https://www.zillow.com/mortgage/SmallMortgageLoanCalculatorWidget.htm?widgetOrientationType='. $orientation .'" width="'. $width .'" height="'. $height .'" frameborder="0" style="width:100%;"></iframe>'; |
|
| 187 | + echo '<iframe id="' . $this->zillow_iframe_id($iframe_id) . '" class="' . $this->zillow_iframe_class('mortgage-calc') . '" scrolling="no" title="' . __('Zillow Mortgage Calculator', 're-rpo') . '" src="https://www.zillow.com/mortgage/SmallMortgageLoanCalculatorWidget.htm?widgetOrientationType=' . $orientation . '" width="' . $width . '" height="' . $height . '" frameborder="0" style="width:100%;"></iframe>'; |
|
| 188 | 188 | |
| 189 | 189 | } |
| 190 | 190 | |
@@ -198,16 +198,16 @@ discard block |
||
| 198 | 198 | * @param mixed $region |
| 199 | 199 | * @return void |
| 200 | 200 | */ |
| 201 | - public function get_mortgage_rate_table_widget( $iframe_id = '', $textcolor, $screenname, $region ) { |
|
| 201 | + public function get_mortgage_rate_table_widget($iframe_id = '', $textcolor, $screenname, $region) { |
|
| 202 | 202 | |
| 203 | 203 | ?> |
| 204 | 204 | <div id="" class="zillow-mortage-rate-table"> |
| 205 | 205 | <div class="header-labels"> |
| 206 | 206 | <span class="current-label" style="color:#<?php echo $textcolor ?>"> |
| 207 | - <?php _e( 'Current', 're-pro' ); ?> |
|
| 207 | + <?php _e('Current', 're-pro'); ?> |
|
| 208 | 208 | </span> |
| 209 | 209 | <span class="lastweek-label" style="color:#<?php echo $textcolor ?>"> |
| 210 | - <?php _e( 'Last Week', 're-pro' ); ?> |
|
| 210 | + <?php _e('Last Week', 're-pro'); ?> |
|
| 211 | 211 | </span> |
| 212 | 212 | </div> |
| 213 | 213 | |
@@ -215,26 +215,26 @@ discard block |
||
| 215 | 215 | <div class="rate-labels-wrapper"> |
| 216 | 216 | <div id="30-year-label-row" class="rate-label-row"> |
| 217 | 217 | <div id="30-year-label" class="rate-label"> |
| 218 | - <?php _e( '30 Year Fixed', 're-pro' ); ?> |
|
| 218 | + <?php _e('30 Year Fixed', 're-pro'); ?> |
|
| 219 | 219 | </div> |
| 220 | 220 | </div> |
| 221 | 221 | |
| 222 | 222 | <div id="15-year-label-row" class="rate-label-row"> |
| 223 | 223 | <div id="15-year-label" class="rate-label"> |
| 224 | - <?php _e( '15 Year Fixed', 're-pro' ); ?> |
|
| 224 | + <?php _e('15 Year Fixed', 're-pro'); ?> |
|
| 225 | 225 | </div> |
| 226 | 226 | </div> |
| 227 | 227 | |
| 228 | 228 | <div id="5-1-adjustable-label-row" class="rate-label-row"> |
| 229 | 229 | <div id="5-1-adjustable-label" class="rate-label"> |
| 230 | - <?php _e( '5/1 Adjustable', 're-pro' ); ?> |
|
| 230 | + <?php _e('5/1 Adjustable', 're-pro'); ?> |
|
| 231 | 231 | </div> |
| 232 | 232 | </div> |
| 233 | 233 | </div> |
| 234 | 234 | |
| 235 | 235 | <?php |
| 236 | 236 | |
| 237 | - echo '<iframe id="'. $this->zillow_iframe_id( $iframe_id ) .'" class="'. $this->zillow_iframe_class( 'mortgage-rates-table' ) .'" scrolling="no" title="'. __( 'Zillow Mortgage Rate Table', 're-pro' ) .'" src="https://www.zillow.com/mortgage/MortgageRateTable.htm?wide=1&textcolor='. $textcolor .'&scrnname='. $screenname .'®ion='. $region .'&cobrand='. $screenname .'" width="130" height="100" frameborder="0" style="width:50%;"></iframe>'; |
|
| 237 | + echo '<iframe id="' . $this->zillow_iframe_id($iframe_id) . '" class="' . $this->zillow_iframe_class('mortgage-rates-table') . '" scrolling="no" title="' . __('Zillow Mortgage Rate Table', 're-pro') . '" src="https://www.zillow.com/mortgage/MortgageRateTable.htm?wide=1&textcolor=' . $textcolor . '&scrnname=' . $screenname . '®ion=' . $region . '&cobrand=' . $screenname . '" width="130" height="100" frameborder="0" style="width:50%;"></iframe>'; |
|
| 238 | 238 | |
| 239 | 239 | } |
| 240 | 240 | |
@@ -245,9 +245,9 @@ discard block |
||
| 245 | 245 | * @param string $iframe_id (default: '') |
| 246 | 246 | * @return void |
| 247 | 247 | */ |
| 248 | - public function get_rate_table_graph_widget( $iframe_id = '' ) { |
|
| 248 | + public function get_rate_table_graph_widget($iframe_id = '') { |
|
| 249 | 249 | |
| 250 | - echo '<iframe id="'. $this->zillow_iframe_id( $iframe_id ) .'" class="'. $this->zillow_iframe_class( 'mortgage-rates-graph' ) .'" title="'. __( 'Zillow Mortgage Rates Graph', 're-pro' ) .'" src="https://www.zillow.com/webtools/widgets/RateTableAndGraphDistributionWidget.htm" width="306" height="315" frameborder="0" scrolling="no" ></iframe>'; |
|
| 250 | + echo '<iframe id="' . $this->zillow_iframe_id($iframe_id) . '" class="' . $this->zillow_iframe_class('mortgage-rates-graph') . '" title="' . __('Zillow Mortgage Rates Graph', 're-pro') . '" src="https://www.zillow.com/webtools/widgets/RateTableAndGraphDistributionWidget.htm" width="306" height="315" frameborder="0" scrolling="no" ></iframe>'; |
|
| 251 | 251 | |
| 252 | 252 | } |
| 253 | 253 | |
@@ -257,9 +257,9 @@ discard block |
||
| 257 | 257 | * @access public |
| 258 | 258 | * @return void |
| 259 | 259 | */ |
| 260 | - public function get_mortage_rate_widget( $iframe_id = '' ) { |
|
| 260 | + public function get_mortage_rate_widget($iframe_id = '') { |
|
| 261 | 261 | |
| 262 | - echo '<iframe id="'. $this->zillow_iframe_id( $iframe_id ) .'" class="'. $this->zillow_iframe_class( 'mortgage-rates' ) .'" scrolling="no" title="'. __( 'Zillow Mortgage Rate Table', 're-pro' ) .'" src="https://www.zillow.com/webtools/widgets/RateTableDistributionWidget.htm" width="306" height="215" frameborder="0" style="width:100%;min-height:215px;"></iframe>'; |
|
| 262 | + echo '<iframe id="' . $this->zillow_iframe_id($iframe_id) . '" class="' . $this->zillow_iframe_class('mortgage-rates') . '" scrolling="no" title="' . __('Zillow Mortgage Rate Table', 're-pro') . '" src="https://www.zillow.com/webtools/widgets/RateTableDistributionWidget.htm" width="306" height="215" frameborder="0" style="width:100%;min-height:215px;"></iframe>'; |
|
| 263 | 263 | |
| 264 | 264 | } |
| 265 | 265 | |
@@ -273,9 +273,9 @@ discard block |
||
| 273 | 273 | * @param string $textcolor (default: '000000') |
| 274 | 274 | * @return void |
| 275 | 275 | */ |
| 276 | - public function get_paymentbreakout_calc_widget( $iframe_id = '', $price, $region_id, $textcolor = '000000' ) { |
|
| 276 | + public function get_paymentbreakout_calc_widget($iframe_id = '', $price, $region_id, $textcolor = '000000') { |
|
| 277 | 277 | |
| 278 | - echo '<iframe id="'. $this->zillow_iframe_id( $iframe_id ) .'" class="'. $this->zillow_iframe_class( 'mortgage-payment-breakout' ) .'" scrolling="no" title="'. __( 'Zillow Mortgage Payment Breakout Calculator', 're-pro' ) .'"src="https://www.zillow.com/mortgage/MortgageLoanCalculatorWidget.htm?skin=custom&price='. $price .'&rid='. $region_id .'&textcolor='. $textcolor .'" frameborder="0" title="'. __( 'Zillow Mortgage Calculator', 're-pro' ) .'" width="176" height="298px"></iframe>'; |
|
| 278 | + echo '<iframe id="' . $this->zillow_iframe_id($iframe_id) . '" class="' . $this->zillow_iframe_class('mortgage-payment-breakout') . '" scrolling="no" title="' . __('Zillow Mortgage Payment Breakout Calculator', 're-pro') . '"src="https://www.zillow.com/mortgage/MortgageLoanCalculatorWidget.htm?skin=custom&price=' . $price . '&rid=' . $region_id . '&textcolor=' . $textcolor . '" frameborder="0" title="' . __('Zillow Mortgage Calculator', 're-pro') . '" width="176" height="298px"></iframe>'; |
|
| 279 | 279 | |
| 280 | 280 | } |
| 281 | 281 | |
@@ -295,9 +295,9 @@ discard block |
||
| 295 | 295 | * @param string $bgcolor (default: 'FFFFFF') |
| 296 | 296 | * @return void |
| 297 | 297 | */ |
| 298 | - public function get_home_value_estimate_widget( $iframe_id = '', $type = 'iframe', $address, $searchbox = 'yes', $region, $skinny_widget = 'true', $textcolor = '000000', $bgcolor = 'FFFFFF' ) { |
|
| 298 | + public function get_home_value_estimate_widget($iframe_id = '', $type = 'iframe', $address, $searchbox = 'yes', $region, $skinny_widget = 'true', $textcolor = '000000', $bgcolor = 'FFFFFF') { |
|
| 299 | 299 | |
| 300 | - echo '<iframe id="'. $this->zillow_iframe_id( $iframe_id ) .'" class="'. $this->zillow_iframe_class( 'home-value-estimate' ) .'" scrolling="no" title="'. __( 'Zillow Home Value Estimate', 're-pro' ) .'" src="https://www.zillow.com/widgets/zestimate/ZestimateLargeWidget.htm?did=zillow-shv-large-iframe-widget&type='.$type.'&address='.$address.'&searchbox='. $searchbox .'®ion='.$region.'&skinnyWidget='.$skinny_widget.'&tc='. $textcolor .'&bgc='. $bgcolor .'" width="296" frameborder="0" height="360"></iframe>'; |
|
| 300 | + echo '<iframe id="' . $this->zillow_iframe_id($iframe_id) . '" class="' . $this->zillow_iframe_class('home-value-estimate') . '" scrolling="no" title="' . __('Zillow Home Value Estimate', 're-pro') . '" src="https://www.zillow.com/widgets/zestimate/ZestimateLargeWidget.htm?did=zillow-shv-large-iframe-widget&type=' . $type . '&address=' . $address . '&searchbox=' . $searchbox . '®ion=' . $region . '&skinnyWidget=' . $skinny_widget . '&tc=' . $textcolor . '&bgc=' . $bgcolor . '" width="296" frameborder="0" height="360"></iframe>'; |
|
| 301 | 301 | } |
| 302 | 302 | |
| 303 | 303 | /** |
@@ -318,9 +318,9 @@ discard block |
||
| 318 | 318 | * @param string $bgcolor (default: 'FFFFFF') |
| 319 | 319 | * @return void |
| 320 | 320 | */ |
| 321 | - public function get_realestate_stats_widget( $iframe_id = '', $cs, $did = 'rsw-wide', $dys, $mt, $region_id, $sid, $type = 'iframe', $wtype = 'rhv', $skinny_widget = 'true', $textcolor = '000000', $bgcolor = 'FFFFFF' ) { |
|
| 321 | + public function get_realestate_stats_widget($iframe_id = '', $cs, $did = 'rsw-wide', $dys, $mt, $region_id, $sid, $type = 'iframe', $wtype = 'rhv', $skinny_widget = 'true', $textcolor = '000000', $bgcolor = 'FFFFFF') { |
|
| 322 | 322 | |
| 323 | - echo '<iframe id="'. $this->zillow_iframe_id( $iframe_id ) .'" class="'. $this->zillow_iframe_class( 'realestate-stats' ) .'" title="'. __( 'Zillow Real Estate Stats', 're-pro' ) .'" scrolling="no" src="https://www.zillow.com/widgets/geo/RegionalStatsWidget.htm?cs='. $cs .'&did='. $did .'&dys='.$dys.'&mt='.$mt.'&rid='.$region_id.'&sid='.$sid.'&type='.$type.'&wtype='. $type .'&skinnyWidget='.$skinny_widget.'&textcolor='.$textcolor.'&backgroundColor='. $bgcolor .'" width="286" frameborder="0" height="280"></iframe>'; |
|
| 323 | + echo '<iframe id="' . $this->zillow_iframe_id($iframe_id) . '" class="' . $this->zillow_iframe_class('realestate-stats') . '" title="' . __('Zillow Real Estate Stats', 're-pro') . '" scrolling="no" src="https://www.zillow.com/widgets/geo/RegionalStatsWidget.htm?cs=' . $cs . '&did=' . $did . '&dys=' . $dys . '&mt=' . $mt . '&rid=' . $region_id . '&sid=' . $sid . '&type=' . $type . '&wtype=' . $type . '&skinnyWidget=' . $skinny_widget . '&textcolor=' . $textcolor . '&backgroundColor=' . $bgcolor . '" width="286" frameborder="0" height="280"></iframe>'; |
|
| 324 | 324 | } |
| 325 | 325 | |
| 326 | 326 | /** |
@@ -338,9 +338,9 @@ discard block |
||
| 338 | 338 | * @param string $bgcolor (default: 'FFFFF') |
| 339 | 339 | * @return void |
| 340 | 340 | */ |
| 341 | - public function get_rent_validation_widget($iframe_id = '', $type = 'iframe', $skinny_widget = 'true', $searchbox = 'yes', $for_rent = 'true', $address, $region, $textcolor = '000000', $bgcolor = 'FFFFF' ) { |
|
| 341 | + public function get_rent_validation_widget($iframe_id = '', $type = 'iframe', $skinny_widget = 'true', $searchbox = 'yes', $for_rent = 'true', $address, $region, $textcolor = '000000', $bgcolor = 'FFFFF') { |
|
| 342 | 342 | |
| 343 | - echo '<iframe id="'. $this->zillow_iframe_id( $iframe_id ) .'" class="'. $this->zillow_iframe_class( 'rent-validation' ) .'" title="'. __( 'Zillow Rent Validation', 're-pro' ) .'" scrolling="no" src="https://www.zillow.com/widgets/zestimate/ZestimateLargeWidget.htm?did=zillow-shv-large-iframe-widget&type='.$type.'&forRent='.$for_rent.'&tc='.$textcolor.'&bgc='.$bgcolor.'&address='. $address .'&searchbox='.$searchbox.'®ion='.$region.'&skinnyWidget='.$skinny_widget.'" frameborder="0" width="296" height="360"></iframe>'; |
|
| 343 | + echo '<iframe id="' . $this->zillow_iframe_id($iframe_id) . '" class="' . $this->zillow_iframe_class('rent-validation') . '" title="' . __('Zillow Rent Validation', 're-pro') . '" scrolling="no" src="https://www.zillow.com/widgets/zestimate/ZestimateLargeWidget.htm?did=zillow-shv-large-iframe-widget&type=' . $type . '&forRent=' . $for_rent . '&tc=' . $textcolor . '&bgc=' . $bgcolor . '&address=' . $address . '&searchbox=' . $searchbox . '®ion=' . $region . '&skinnyWidget=' . $skinny_widget . '" frameborder="0" width="296" height="360"></iframe>'; |
|
| 344 | 344 | } |
| 345 | 345 | |
| 346 | 346 | /* LISTINGS. */ |
@@ -355,7 +355,7 @@ discard block |
||
| 355 | 355 | * @param string $size (default: ' wide') |
| 356 | 356 | * @return void |
| 357 | 357 | */ |
| 358 | - public function get_expensive_homes_widget( $iframe_id = '', $location, $type = 'iframe', $size = ' wide' ) { |
|
| 358 | + public function get_expensive_homes_widget($iframe_id = '', $location, $type = 'iframe', $size = ' wide') { |
|
| 359 | 359 | |
| 360 | 360 | // TODO - Check for HTTPS, as this widget does not support it. |
| 361 | 361 | // TODO - Support JS Version. |
@@ -363,7 +363,7 @@ discard block |
||
| 363 | 363 | echo '<div class="zillow-listings-widget-container zillow-meh-widget-container">'; |
| 364 | 364 | echo '<h5>Most Expensive Homes in ' . $location . '</h5>'; |
| 365 | 365 | echo '<div class="zillow-meh-outer">'; |
| 366 | - echo '<iframe id="'. $this->zillow_iframe_id( $iframe_id ) .'" class="'. $this->zillow_iframe_class( 'expensive-homes' ) .'" title="'. __( 'Zillow Most Expensive Homes', 're-pro' ) .'" scrolling="no" src="https://www.zillow.com/widgets/fmr/FMRWidget.htm?did=meh-large-iframe-widget-container&type='. $type .'&size='.$size.'&rn='. $location .'&widgettype=meh" width="" height="121" frameborder="0" style="width:100%;"></iframe>'; |
|
| 366 | + echo '<iframe id="' . $this->zillow_iframe_id($iframe_id) . '" class="' . $this->zillow_iframe_class('expensive-homes') . '" title="' . __('Zillow Most Expensive Homes', 're-pro') . '" scrolling="no" src="https://www.zillow.com/widgets/fmr/FMRWidget.htm?did=meh-large-iframe-widget-container&type=' . $type . '&size=' . $size . '&rn=' . $location . '&widgettype=meh" width="" height="121" frameborder="0" style="width:100%;"></iframe>'; |
|
| 367 | 367 | echo '</div>'; |
| 368 | 368 | echo '<img alt="Zillow Real Estate" style="border:0;" src="http://www.zillow.com/widgets/GetVersionedResource.htm?path=%2Fstatic%2Fimages%2Fpowered-by-zillow.gif" />'; |
| 369 | 369 | echo '</div>'; |
@@ -379,14 +379,14 @@ discard block |
||
| 379 | 379 | * @param string $size (default: ' wide') |
| 380 | 380 | * @return void |
| 381 | 381 | */ |
| 382 | - public function get_newest_forsale_homes_widget( $iframe_id = '', $location, $type = 'iframe', $size = ' wide' ) { |
|
| 382 | + public function get_newest_forsale_homes_widget($iframe_id = '', $location, $type = 'iframe', $size = ' wide') { |
|
| 383 | 383 | |
| 384 | 384 | // TODO - Check for HTTPS, as this widget does not support it. |
| 385 | 385 | // TODO - Support JS Version. |
| 386 | 386 | |
| 387 | 387 | echo '<div class="zillow-listings-widget-container zillow-nfs-widget-container">'; |
| 388 | 388 | echo '<h5>Newest For Sale Homes in ' . $location . '</h5>'; |
| 389 | - echo '<iframe id="'. $this->zillow_iframe_id( $iframe_id ) .'" class="'. $this->zillow_iframe_class( 'newest-homes' ) .'" title="'. __( 'Zillow Newest For Sale Homes', 're-pro' ) .'" scrolling="no" src="https://www.zillow.com/widgets/fmr/FMRWidget.htm?did=nfs-large-iframe-widget-container&type='. $type .'&size='.$size.'&rn='. $location .'&widgettype=nfs" width="286" height="123" frameborder="0"></iframe>'; |
|
| 389 | + echo '<iframe id="' . $this->zillow_iframe_id($iframe_id) . '" class="' . $this->zillow_iframe_class('newest-homes') . '" title="' . __('Zillow Newest For Sale Homes', 're-pro') . '" scrolling="no" src="https://www.zillow.com/widgets/fmr/FMRWidget.htm?did=nfs-large-iframe-widget-container&type=' . $type . '&size=' . $size . '&rn=' . $location . '&widgettype=nfs" width="286" height="123" frameborder="0"></iframe>'; |
|
| 390 | 390 | echo '<img alt="Zillow Real Estate" style="border:0;" src="http://www.zillow.com/widgets/GetVersionedResource.htm?path=%2Fstatic%2Fimages%2Fpowered-by-zillow.gif" />'; |
| 391 | 391 | echo '</div>'; |
| 392 | 392 | } |
@@ -403,9 +403,9 @@ discard block |
||
| 403 | 403 | * @param mixed $region_id |
| 404 | 404 | * @return void |
| 405 | 405 | */ |
| 406 | - public function get_zillow_search_widget( $iframe_id = '', $use_user_location = 'false', $is_public = 'true', $bucket = 'map', $zillow_screenname, $region_id ) { |
|
| 406 | + public function get_zillow_search_widget($iframe_id = '', $use_user_location = 'false', $is_public = 'true', $bucket = 'map', $zillow_screenname, $region_id) { |
|
| 407 | 407 | |
| 408 | - echo '<iframe id="'. $this->zillow_iframe_id( $iframe_id ) .'" class="'. $this->zillow_iframe_class( 'search' ) .'" title="'. __( 'Zillow Search', 're-pro' ) .'" src="https://www.zillow.com/widgets/search/PartnerAdWidget.htm?ulbm='.$use_user_location.'&isPublic='.$is_public.'&bucket='.$bucket.'&pn='.$zillow_screenname.'&rid='.$region_id.'&style=default" scrolling="no" frameborder="0" width="298" height="272"></iframe>'; |
|
| 408 | + echo '<iframe id="' . $this->zillow_iframe_id($iframe_id) . '" class="' . $this->zillow_iframe_class('search') . '" title="' . __('Zillow Search', 're-pro') . '" src="https://www.zillow.com/widgets/search/PartnerAdWidget.htm?ulbm=' . $use_user_location . '&isPublic=' . $is_public . '&bucket=' . $bucket . '&pn=' . $zillow_screenname . '&rid=' . $region_id . '&style=default" scrolling="no" frameborder="0" width="298" height="272"></iframe>'; |
|
| 409 | 409 | |
| 410 | 410 | } |
| 411 | 411 | |
@@ -421,14 +421,14 @@ discard block |
||
| 421 | 421 | * @param string $include_home_val_info (default: 'yes') |
| 422 | 422 | * @return void |
| 423 | 423 | */ |
| 424 | - public function get_lg_zillow_search_widget( $iframe_id = '', $zillow_screenname, $type = 'iframe', $region_name, $include_home_val_info = 'yes' ) { |
|
| 424 | + public function get_lg_zillow_search_widget($iframe_id = '', $zillow_screenname, $type = 'iframe', $region_name, $include_home_val_info = 'yes') { |
|
| 425 | 425 | |
| 426 | 426 | echo '<div class="zillow-large-search-box-widget-container">'; |
| 427 | 427 | echo ' <h2>Find Homes</h2>'; |
| 428 | 428 | echo ' <div style="float:right;">'; |
| 429 | 429 | echo ' <img alt="Zillow Real Estate Information" style="border:0;" src="http://www.zillow.com/widgets/GetVersionedResource.htm?path=%2Fstatic%2Fimages%2Fpowered-by-zillow.gif" />'; |
| 430 | 430 | echo ' </div>'; |
| 431 | - echo ' <iframe id="'. $this->zillow_iframe_id( $iframe_id ) .'" class="'. $this->zillow_iframe_class( 'lg-search' ) .'" scrolling="no" title="'. __( 'Zillow Search', 're-pro' ) .'" src="https://www.zillow.com/widgets/search/LargeSearchBoxWidget.htm?did=zillow-large-search-box-iframe-widget&scrnname='.$zillow_screenname.'&type='.$type.'&rgname='.$region_name.'&shvi='.$include_home_val_info.'" width="430" frameborder="0" height="400"></iframe>'; |
|
| 431 | + echo ' <iframe id="' . $this->zillow_iframe_id($iframe_id) . '" class="' . $this->zillow_iframe_class('lg-search') . '" scrolling="no" title="' . __('Zillow Search', 're-pro') . '" src="https://www.zillow.com/widgets/search/LargeSearchBoxWidget.htm?did=zillow-large-search-box-iframe-widget&scrnname=' . $zillow_screenname . '&type=' . $type . '&rgname=' . $region_name . '&shvi=' . $include_home_val_info . '" width="430" frameborder="0" height="400"></iframe>'; |
|
| 432 | 432 | echo '</div>'; |
| 433 | 433 | } |
| 434 | 434 | |
@@ -445,9 +445,9 @@ discard block |
||
| 445 | 445 | * @param mixed $zillow_screenname |
| 446 | 446 | * @return void |
| 447 | 447 | */ |
| 448 | - public function get_refinance_quiz_widget( $widget_type = 'iframe', $iframe_id = '', $type = 'iframe', $widgetcode = 'refq', $zillow_screenname ) { |
|
| 448 | + public function get_refinance_quiz_widget($widget_type = 'iframe', $iframe_id = '', $type = 'iframe', $widgetcode = 'refq', $zillow_screenname) { |
|
| 449 | 449 | |
| 450 | - echo '<iframe id="'. $this->zillow_iframe_id( $iframe_id ) .'" class="'. $this->zillow_iframe_class( 'refinance-quiz' ) .'" title="'. __( 'Zillow Refinance Quiz', 're-pro' ) .'" scrolling="no" src="https://www.zillow.com/widgets/quiz/QuizWidget.htm?did=refinance-quiz-iframe-container&type=iframe&widgetcode=refq&scrnname='.$zillow_screenname.'" width="158" frameborder="0" height="317"></iframe>'; |
|
| 450 | + echo '<iframe id="' . $this->zillow_iframe_id($iframe_id) . '" class="' . $this->zillow_iframe_class('refinance-quiz') . '" title="' . __('Zillow Refinance Quiz', 're-pro') . '" scrolling="no" src="https://www.zillow.com/widgets/quiz/QuizWidget.htm?did=refinance-quiz-iframe-container&type=iframe&widgetcode=refq&scrnname=' . $zillow_screenname . '" width="158" frameborder="0" height="317"></iframe>'; |
|
| 451 | 451 | |
| 452 | 452 | } |
| 453 | 453 | |
@@ -462,9 +462,9 @@ discard block |
||
| 462 | 462 | * @param mixed $zillow_screenname |
| 463 | 463 | * @return void |
| 464 | 464 | */ |
| 465 | - public function get_kindofneighbor_quiz_widget( $widget_type = 'iframe', $iframe_id = '', $type = 'iframe', $widgetcode = 'konq', $zillow_screenname ) { |
|
| 465 | + public function get_kindofneighbor_quiz_widget($widget_type = 'iframe', $iframe_id = '', $type = 'iframe', $widgetcode = 'konq', $zillow_screenname) { |
|
| 466 | 466 | |
| 467 | - echo '<iframe id="'. $this->zillow_iframe_id( $iframe_id ) .'" class="'. $this->zillow_iframe_class( 'kindofneighbor-quiz' ) .'" title="'. __( 'Zillow Kind of Neighbor Quiz', 're-pro' ) .'" scrolling="no" src="httsp://www.zillow.com/widgets/quiz/QuizWidget.htm?did=neighbor-quiz-iframe-container&type=iframe&widgetcode=konq&scrnname='.$zillow_screenname.'" width="158" frameborder="0" height="317"></iframe>'; |
|
| 467 | + echo '<iframe id="' . $this->zillow_iframe_id($iframe_id) . '" class="' . $this->zillow_iframe_class('kindofneighbor-quiz') . '" title="' . __('Zillow Kind of Neighbor Quiz', 're-pro') . '" scrolling="no" src="httsp://www.zillow.com/widgets/quiz/QuizWidget.htm?did=neighbor-quiz-iframe-container&type=iframe&widgetcode=konq&scrnname=' . $zillow_screenname . '" width="158" frameborder="0" height="317"></iframe>'; |
|
| 468 | 468 | |
| 469 | 469 | } |
| 470 | 470 | |
@@ -479,9 +479,9 @@ discard block |
||
| 479 | 479 | * @param mixed $zillow_screenname |
| 480 | 480 | * @return void |
| 481 | 481 | */ |
| 482 | - public function get_mortgage_quiz( $widget_type = 'iframe', $iframe_id = '', $type = 'iframe', $widgetcode = 'mq', $zillow_screenname ) { |
|
| 482 | + public function get_mortgage_quiz($widget_type = 'iframe', $iframe_id = '', $type = 'iframe', $widgetcode = 'mq', $zillow_screenname) { |
|
| 483 | 483 | |
| 484 | - echo '<iframe id="'. $this->zillow_iframe_id( $iframe_id ) .'" class="'. $this->zillow_iframe_class( 'mortgage-quiz' ) .'" title="'. __( 'Zillow Mortgage Quiz', 're-pro' ) .'" scrolling="no" src="https://www.zillow.com/widgets/quiz/QuizWidget.htm?did=mortgage-iframe-container&type=iframe&widgetcode=mq&scrnname='.$zillow_screenname.'" width="158" frameborder="0" height="317"></iframe>'; |
|
| 484 | + echo '<iframe id="' . $this->zillow_iframe_id($iframe_id) . '" class="' . $this->zillow_iframe_class('mortgage-quiz') . '" title="' . __('Zillow Mortgage Quiz', 're-pro') . '" scrolling="no" src="https://www.zillow.com/widgets/quiz/QuizWidget.htm?did=mortgage-iframe-container&type=iframe&widgetcode=mq&scrnname=' . $zillow_screenname . '" width="158" frameborder="0" height="317"></iframe>'; |
|
| 485 | 485 | |
| 486 | 486 | } |
| 487 | 487 | |
@@ -496,9 +496,9 @@ discard block |
||
| 496 | 496 | * @param mixed $zillow_screenname |
| 497 | 497 | * @return void |
| 498 | 498 | */ |
| 499 | - public function get_mortgage_harp_quiz( $widget_type = 'iframe', $iframe_id = '', $type = 'iframe', $widgetcode = 'hec', $zillow_screenname ) { |
|
| 499 | + public function get_mortgage_harp_quiz($widget_type = 'iframe', $iframe_id = '', $type = 'iframe', $widgetcode = 'hec', $zillow_screenname) { |
|
| 500 | 500 | |
| 501 | - echo '<iframe id="'. $this->zillow_iframe_id( $iframe_id ) .'" class="'. $this->zillow_iframe_class( 'mortgage-harp-quiz' ) .'" title="'. __( 'Zillow Mortgage HARP Quiz', 're-pro' ) .'" scrolling="no" src="https://www.zillow.com/widgets/quiz/QuizWidget.htm?did=mortgage-iframe-container&type=iframe&widgetcode=hec&scrnname='.$zillow_screenname.'" width="158" frameborder="0" height="317"></iframe>'; |
|
| 501 | + echo '<iframe id="' . $this->zillow_iframe_id($iframe_id) . '" class="' . $this->zillow_iframe_class('mortgage-harp-quiz') . '" title="' . __('Zillow Mortgage HARP Quiz', 're-pro') . '" scrolling="no" src="https://www.zillow.com/widgets/quiz/QuizWidget.htm?did=mortgage-iframe-container&type=iframe&widgetcode=hec&scrnname=' . $zillow_screenname . '" width="158" frameborder="0" height="317"></iframe>'; |
|
| 502 | 502 | |
| 503 | 503 | } |
| 504 | 504 | |
@@ -513,9 +513,9 @@ discard block |
||
| 513 | 513 | * @param mixed $zillow_screenname |
| 514 | 514 | * @return void |
| 515 | 515 | */ |
| 516 | - public function get_buyeriq_quiz( $widget_type = 'iframe', $iframe_id = '', $type = 'iframe', $widgetcode = 'biq', $zillow_screenname ) { |
|
| 516 | + public function get_buyeriq_quiz($widget_type = 'iframe', $iframe_id = '', $type = 'iframe', $widgetcode = 'biq', $zillow_screenname) { |
|
| 517 | 517 | |
| 518 | - echo '<iframe id="'. $this->zillow_iframe_id( $iframe_id ) .'" class="'. $this->zillow_iframe_class( 'buyeriq-quiz' ) .'" title="'. __( 'Zillow Buyer IQ Quiz', 're-pro' ) .'" scrolling="no" src="https://www.zillow.com/widgets/quiz/QuizWidget.htm?did=buyer-iframe-container&type=iframe&widgetcode=biq&scrnname='.$zillow_screenname.'" width="158" frameborder="0" height="317"></iframe>'; |
|
| 518 | + echo '<iframe id="' . $this->zillow_iframe_id($iframe_id) . '" class="' . $this->zillow_iframe_class('buyeriq-quiz') . '" title="' . __('Zillow Buyer IQ Quiz', 're-pro') . '" scrolling="no" src="https://www.zillow.com/widgets/quiz/QuizWidget.htm?did=buyer-iframe-container&type=iframe&widgetcode=biq&scrnname=' . $zillow_screenname . '" width="158" frameborder="0" height="317"></iframe>'; |
|
| 519 | 519 | |
| 520 | 520 | } |
| 521 | 521 | |
@@ -532,9 +532,9 @@ discard block |
||
| 532 | 532 | * @param mixed $button_link |
| 533 | 533 | * @return void |
| 534 | 534 | */ |
| 535 | - public function get_moving_boxes_widget( $widget_type = 'iframe', $iframe_id = '', $zillow_city_id, $button_text, $custom_text, $button_link ) { |
|
| 535 | + public function get_moving_boxes_widget($widget_type = 'iframe', $iframe_id = '', $zillow_city_id, $button_text, $custom_text, $button_link) { |
|
| 536 | 536 | |
| 537 | - echo '<iframe id="'. $this->zillow_iframe_id( $iframe_id ) .'" class="'. $this->zillow_iframe_class( 'moving-boxes' ) .'" title="'. __( 'Zillow Moving Box Calculator', 're-pro' ) .'" scrolling="no" src="https://www.zillow.com/widgets/misc/MovingBoxEstimatorWidget.htm?bc='.$zillow_city_id.'&bt='.$button_text.'&cap='.$custom_text.'&bl='.$button_link.'" width="168" frameborder="0" height="315"></iframe>'; |
|
| 537 | + echo '<iframe id="' . $this->zillow_iframe_id($iframe_id) . '" class="' . $this->zillow_iframe_class('moving-boxes') . '" title="' . __('Zillow Moving Box Calculator', 're-pro') . '" scrolling="no" src="https://www.zillow.com/widgets/misc/MovingBoxEstimatorWidget.htm?bc=' . $zillow_city_id . '&bt=' . $button_text . '&cap=' . $custom_text . '&bl=' . $button_link . '" width="168" frameborder="0" height="315"></iframe>'; |
|
| 538 | 538 | |
| 539 | 539 | } |
| 540 | 540 | |
@@ -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 | * Zillow Review Widget (https://www.zillow.com/webtools/widgets/review-widget/) |
@@ -27,9 +27,9 @@ discard block |
||
| 27 | 27 | |
| 28 | 28 | parent::__construct( |
| 29 | 29 | 'zillow_review_widget', |
| 30 | - __( 'Zillow Reviews', 're-pro' ), |
|
| 30 | + __('Zillow Reviews', 're-pro'), |
|
| 31 | 31 | array( |
| 32 | - 'description' => __( 'Display a ratings link to your Zillow Reviews.', 're-pro' ), |
|
| 32 | + 'description' => __('Display a ratings link to your Zillow Reviews.', 're-pro'), |
|
| 33 | 33 | 'classname' => 're-pro re-pro-widget zillow-widget zillow-widget-reviews', |
| 34 | 34 | 'customize_selective_refresh' => true, |
| 35 | 35 | ) |
@@ -44,24 +44,24 @@ 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'] : ''; |
|
| 51 | - $screenname = ! empty( $instance['screenname'] ) ? $instance['screenname'] : ''; |
|
| 52 | - $zuid = ! empty( $instance['zuid'] ) ? $instance['zuid'] : ''; |
|
| 53 | - $size = ! empty( $instance['size'] ) ? $instance['size'] : 'wide'; |
|
| 54 | - $zmod = ! empty( $instance['zmod'] ) ? $instance['zmod'] : 'true'; |
|
| 55 | - $height = ! empty( $instance['height'] ) ? $instance['height'] : ''; |
|
| 56 | - $width = ! empty( $instance['width'] ) ? $instance['width'] : ''; |
|
| 49 | + $iframe_id = ! empty($args['widget_id']) ? $args['widget_id'] : ''; |
|
| 50 | + $title = ! empty($instance['title']) ? $instance['title'] : ''; |
|
| 51 | + $screenname = ! empty($instance['screenname']) ? $instance['screenname'] : ''; |
|
| 52 | + $zuid = ! empty($instance['zuid']) ? $instance['zuid'] : ''; |
|
| 53 | + $size = ! empty($instance['size']) ? $instance['size'] : 'wide'; |
|
| 54 | + $zmod = ! empty($instance['zmod']) ? $instance['zmod'] : 'true'; |
|
| 55 | + $height = ! empty($instance['height']) ? $instance['height'] : ''; |
|
| 56 | + $width = ! empty($instance['width']) ? $instance['width'] : ''; |
|
| 57 | 57 | |
| 58 | 58 | echo $args['before_widget']; |
| 59 | 59 | |
| 60 | - echo $args['before_title'] . esc_attr( $title ) . $args['after_title']; |
|
| 60 | + echo $args['before_title'] . esc_attr($title) . $args['after_title']; |
|
| 61 | 61 | |
| 62 | 62 | $zillow_widgets = new ZillowWidgets(); |
| 63 | 63 | |
| 64 | - $zillow_widgets->get_review_widget( $iframe_id, $zuid, $screenname, $size, $zmod, $width, $height ); |
|
| 64 | + $zillow_widgets->get_review_widget($iframe_id, $zuid, $screenname, $size, $zmod, $width, $height); |
|
| 65 | 65 | |
| 66 | 66 | echo $args['after_widget']; |
| 67 | 67 | } |
@@ -73,10 +73,10 @@ discard block |
||
| 73 | 73 | * @param mixed $instance Instance. |
| 74 | 74 | * @return void |
| 75 | 75 | */ |
| 76 | - public function form( $instance ) { |
|
| 76 | + public function form($instance) { |
|
| 77 | 77 | |
| 78 | 78 | // Set default values. |
| 79 | - $instance = wp_parse_args( (array) $instance, array( |
|
| 79 | + $instance = wp_parse_args((array) $instance, array( |
|
| 80 | 80 | 'title' => '', |
| 81 | 81 | 'screenname' => '', |
| 82 | 82 | 'zuid' => '', |
@@ -85,42 +85,42 @@ discard block |
||
| 85 | 85 | )); |
| 86 | 86 | |
| 87 | 87 | // Retrieve an existing value from the database. |
| 88 | - $title = ! empty( $instance['title'] ) ? $instance['title'] : ''; |
|
| 89 | - $screenname = ! empty( $instance['screenname'] ) ? $instance['screenname'] : ''; |
|
| 90 | - $zuid = ! empty( $instance['zuid'] ) ? $instance['zuid'] : ''; |
|
| 91 | - $size = ! empty( $instance['size'] ) ? $instance['size'] : ''; |
|
| 92 | - $zmod = ! empty( $instance['zmod'] ) ? $instance['zmod'] : ''; |
|
| 93 | - $height = ! empty( $instance['height'] ) ? $instance['height'] : ''; |
|
| 94 | - $width = ! empty( $instance['width'] ) ? $instance['width'] : ''; |
|
| 88 | + $title = ! empty($instance['title']) ? $instance['title'] : ''; |
|
| 89 | + $screenname = ! empty($instance['screenname']) ? $instance['screenname'] : ''; |
|
| 90 | + $zuid = ! empty($instance['zuid']) ? $instance['zuid'] : ''; |
|
| 91 | + $size = ! empty($instance['size']) ? $instance['size'] : ''; |
|
| 92 | + $zmod = ! empty($instance['zmod']) ? $instance['zmod'] : ''; |
|
| 93 | + $height = ! empty($instance['height']) ? $instance['height'] : ''; |
|
| 94 | + $width = ! empty($instance['width']) ? $instance['width'] : ''; |
|
| 95 | 95 | |
| 96 | 96 | // Title. |
| 97 | 97 | echo '<p>'; |
| 98 | - echo ' <label for="' . $this->get_field_id( 'title' ) . '" class="title-label">' . __( 'Tile:', 're-pro' ) . '</label>'; |
|
| 99 | - echo ' <input id="' . $this->get_field_id( 'title' ) . '" name="' . $this->get_field_name( 'title' ) . '" value="' . $title . '" class="widefat">'; |
|
| 98 | + echo ' <label for="' . $this->get_field_id('title') . '" class="title-label">' . __('Tile:', 're-pro') . '</label>'; |
|
| 99 | + echo ' <input id="' . $this->get_field_id('title') . '" name="' . $this->get_field_name('title') . '" value="' . $title . '" class="widefat">'; |
|
| 100 | 100 | echo '</p>'; |
| 101 | 101 | |
| 102 | 102 | // Zillow Screenname. |
| 103 | 103 | echo '<p>'; |
| 104 | - echo ' <label for="' . $this->get_field_id( 'screenname' ) . '" class="title-label">' . __( 'Zillow Screenname:', 're-pro' ) . '</label>'; |
|
| 105 | - echo ' <input id="' . $this->get_field_id( 'screenname' ) . '" name="' . $this->get_field_name( 'screenname' ) . '" value="' . $screenname . '" class="widefat">'; |
|
| 104 | + echo ' <label for="' . $this->get_field_id('screenname') . '" class="title-label">' . __('Zillow Screenname:', 're-pro') . '</label>'; |
|
| 105 | + echo ' <input id="' . $this->get_field_id('screenname') . '" name="' . $this->get_field_name('screenname') . '" value="' . $screenname . '" class="widefat">'; |
|
| 106 | 106 | echo '</p>'; |
| 107 | 107 | |
| 108 | 108 | // Zillow User ID. |
| 109 | 109 | echo '<p>'; |
| 110 | - echo ' <label for="' . $this->get_field_id( 'zuid' ) . '" class="title-label">' . __( 'Zillow User ID:', 're-pro' ) . '</label>'; |
|
| 111 | - echo ' <input id="' . $this->get_field_id( 'zuid' ) . '" name="' . $this->get_field_name( 'zuid' ) . '" value="' . $zuid . '" class="widefat">'; |
|
| 110 | + echo ' <label for="' . $this->get_field_id('zuid') . '" class="title-label">' . __('Zillow User ID:', 're-pro') . '</label>'; |
|
| 111 | + echo ' <input id="' . $this->get_field_id('zuid') . '" name="' . $this->get_field_name('zuid') . '" value="' . $zuid . '" class="widefat">'; |
|
| 112 | 112 | echo '</p>'; |
| 113 | 113 | |
| 114 | 114 | // Width Option. |
| 115 | 115 | echo '<p>'; |
| 116 | - echo ' <label for="' . $this->get_field_id( 'width' ) . '" class="title-label">' . __( 'Width:', 're-pro' ) . '</label>'; |
|
| 117 | - echo ' <input id="' . $this->get_field_id( 'width' ) . '" name="' . $this->get_field_name( 'width' ) . '" value="' . $width . '" class="widefat">'; |
|
| 116 | + echo ' <label for="' . $this->get_field_id('width') . '" class="title-label">' . __('Width:', 're-pro') . '</label>'; |
|
| 117 | + echo ' <input id="' . $this->get_field_id('width') . '" name="' . $this->get_field_name('width') . '" value="' . $width . '" class="widefat">'; |
|
| 118 | 118 | echo '</p>'; |
| 119 | 119 | |
| 120 | 120 | // Height Option |
| 121 | 121 | echo '<p>'; |
| 122 | - echo ' <label for="' . $this->get_field_id( 'height' ) . '" class="title-label">' . __( 'Height:', 're-pro' ) . '</label>'; |
|
| 123 | - echo ' <input id="' . $this->get_field_id( 'height' ) . '" name="' . $this->get_field_name( 'height' ) . '" value="' . $height . '" class="widefat">'; |
|
| 122 | + echo ' <label for="' . $this->get_field_id('height') . '" class="title-label">' . __('Height:', 're-pro') . '</label>'; |
|
| 123 | + echo ' <input id="' . $this->get_field_id('height') . '" name="' . $this->get_field_name('height') . '" value="' . $height . '" class="widefat">'; |
|
| 124 | 124 | echo '</p>'; |
| 125 | 125 | |
| 126 | 126 | } |
@@ -133,17 +133,17 @@ discard block |
||
| 133 | 133 | * @param mixed $old_instance Old Instance. |
| 134 | 134 | * @return $instance |
| 135 | 135 | */ |
| 136 | - public function update( $new_instance, $old_instance ) { |
|
| 136 | + public function update($new_instance, $old_instance) { |
|
| 137 | 137 | |
| 138 | 138 | $instance = $old_instance; |
| 139 | 139 | |
| 140 | - $instance['title'] = ! empty( $new_instance['title'] ) ? strip_tags( $new_instance['title'] ) : ''; |
|
| 141 | - $instance['screenname'] = ! empty( $new_instance['screenname'] ) ? strip_tags( $new_instance['screenname'] ) : ''; |
|
| 142 | - $instance['zuid'] = ! empty( $new_instance['zuid'] ) ? strip_tags( $new_instance['zuid'] ) : ''; |
|
| 143 | - $instance['size'] = ! empty( $new_instance['size'] ) ? strip_tags( $new_instance['size'] ) : ''; |
|
| 144 | - $instance['zmod'] = ! empty( $new_instance['zmod'] ) ? strip_tags( $new_instance['zmod'] ) : ''; |
|
| 145 | - $instance['height'] = ! empty( $new_instance['height'] ) ? strip_tags( $new_instance['height'] ) : ''; |
|
| 146 | - $instance['width'] = ! empty( $new_instance['width'] ) ? strip_tags( $new_instance['width'] ) : ''; |
|
| 140 | + $instance['title'] = ! empty($new_instance['title']) ? strip_tags($new_instance['title']) : ''; |
|
| 141 | + $instance['screenname'] = ! empty($new_instance['screenname']) ? strip_tags($new_instance['screenname']) : ''; |
|
| 142 | + $instance['zuid'] = ! empty($new_instance['zuid']) ? strip_tags($new_instance['zuid']) : ''; |
|
| 143 | + $instance['size'] = ! empty($new_instance['size']) ? strip_tags($new_instance['size']) : ''; |
|
| 144 | + $instance['zmod'] = ! empty($new_instance['zmod']) ? strip_tags($new_instance['zmod']) : ''; |
|
| 145 | + $instance['height'] = ! empty($new_instance['height']) ? strip_tags($new_instance['height']) : ''; |
|
| 146 | + $instance['width'] = ! empty($new_instance['width']) ? strip_tags($new_instance['width']) : ''; |
|
| 147 | 147 | |
| 148 | 148 | return $instance; |
| 149 | 149 | } |
@@ -157,6 +157,6 @@ discard block |
||
| 157 | 157 | */ |
| 158 | 158 | function repro_zillow_review_widget() { |
| 159 | 159 | |
| 160 | - register_widget( 'ZillowReviewWidget' ); |
|
| 160 | + register_widget('ZillowReviewWidget'); |
|
| 161 | 161 | } |
| 162 | -add_action( 'widgets_init', 'repro_zillow_review_widget' ); |
|
| 162 | +add_action('widgets_init', 'repro_zillow_review_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 | * Zillow Contact Widget (https://www.zillow.com/webtools/widgets/contact-form-widget.htm) |
@@ -27,9 +27,9 @@ discard block |
||
| 27 | 27 | |
| 28 | 28 | parent::__construct( |
| 29 | 29 | 'zillow_contact_widget', |
| 30 | - __( 'Zillow Contact Form', 're-pro' ), |
|
| 30 | + __('Zillow Contact Form', 're-pro'), |
|
| 31 | 31 | array( |
| 32 | - 'description' => __( 'Display a form to contact you on Zillow.', 're-pro' ), |
|
| 32 | + 'description' => __('Display a form to contact you on Zillow.', 're-pro'), |
|
| 33 | 33 | 'classname' => 're-pro re-pro-widget zillow-widget zillow-widget-contact', |
| 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'] : ''; |
|
| 51 | - $screenname = ! empty( $instance['screenname'] ) ? $instance['screenname'] : ''; |
|
| 52 | - $email = ! empty( $instance['email'] ) ? $instance['email'] : ''; |
|
| 53 | - $zuid = ! empty( $instance['zuid'] ) ? $instance['zuid'] : ''; |
|
| 49 | + $iframe_id = ! empty($args['widget_id']) ? $args['widget_id'] : ''; |
|
| 50 | + $title = ! empty($instance['title']) ? $instance['title'] : ''; |
|
| 51 | + $screenname = ! empty($instance['screenname']) ? $instance['screenname'] : ''; |
|
| 52 | + $email = ! empty($instance['email']) ? $instance['email'] : ''; |
|
| 53 | + $zuid = ! empty($instance['zuid']) ? $instance['zuid'] : ''; |
|
| 54 | 54 | |
| 55 | 55 | echo $args['before_widget']; |
| 56 | 56 | |
| 57 | - echo $args['before_title'] . esc_attr( $title ) . $args['after_title']; |
|
| 57 | + echo $args['before_title'] . esc_attr($title) . $args['after_title']; |
|
| 58 | 58 | |
| 59 | 59 | $zillow_widgets = new ZillowWidgets(); |
| 60 | 60 | |
| 61 | - return $zillow_widgets->get_contact_widget( $iframe_id, $email ); |
|
| 61 | + return $zillow_widgets->get_contact_widget($iframe_id, $email); |
|
| 62 | 62 | |
| 63 | 63 | echo $args['after_widget']; |
| 64 | 64 | } |
@@ -70,39 +70,39 @@ discard block |
||
| 70 | 70 | * @param mixed $instance Instance. |
| 71 | 71 | * @return void |
| 72 | 72 | */ |
| 73 | - public function form( $instance ) { |
|
| 73 | + public function form($instance) { |
|
| 74 | 74 | |
| 75 | 75 | // Set default values. |
| 76 | - $instance = wp_parse_args( (array) $instance, array( |
|
| 76 | + $instance = wp_parse_args((array) $instance, array( |
|
| 77 | 77 | 'title' => '', |
| 78 | 78 | 'screenname' => '', |
| 79 | 79 | 'zuid' => '', |
| 80 | 80 | )); |
| 81 | 81 | |
| 82 | 82 | // Retrieve an existing value from the database. |
| 83 | - $title = ! empty( $instance['title'] ) ? $instance['title'] : ''; |
|
| 84 | - $screenname = ! empty( $instance['screenname'] ) ? $instance['screenname'] : ''; |
|
| 85 | - $zuid = ! empty( $instance['zuid'] ) ? $instance['zuid'] : ''; |
|
| 86 | - $size = ! empty( $instance['size'] ) ? $instance['size'] : ''; |
|
| 87 | - $height = ! empty( $instance['height'] ) ? $instance['height'] : ''; |
|
| 88 | - $width = ! empty( $instance['width'] ) ? $instance['width'] : ''; |
|
| 83 | + $title = ! empty($instance['title']) ? $instance['title'] : ''; |
|
| 84 | + $screenname = ! empty($instance['screenname']) ? $instance['screenname'] : ''; |
|
| 85 | + $zuid = ! empty($instance['zuid']) ? $instance['zuid'] : ''; |
|
| 86 | + $size = ! empty($instance['size']) ? $instance['size'] : ''; |
|
| 87 | + $height = ! empty($instance['height']) ? $instance['height'] : ''; |
|
| 88 | + $width = ! empty($instance['width']) ? $instance['width'] : ''; |
|
| 89 | 89 | |
| 90 | 90 | // Title. |
| 91 | 91 | echo '<p>'; |
| 92 | - echo ' <label for="' . $this->get_field_id( 'title' ) . '" class="title-label">' . __( 'Tile:', 're-pro' ) . '</label>'; |
|
| 93 | - echo ' <input id="' . $this->get_field_id( 'title' ) . '" name="' . $this->get_field_name( 'title' ) . '" value="' . $title . '" class="widefat">'; |
|
| 92 | + echo ' <label for="' . $this->get_field_id('title') . '" class="title-label">' . __('Tile:', 're-pro') . '</label>'; |
|
| 93 | + echo ' <input id="' . $this->get_field_id('title') . '" name="' . $this->get_field_name('title') . '" value="' . $title . '" class="widefat">'; |
|
| 94 | 94 | echo '</p>'; |
| 95 | 95 | |
| 96 | 96 | // Zillow Screenname. |
| 97 | 97 | echo '<p>'; |
| 98 | - echo ' <label for="' . $this->get_field_id( 'screenname' ) . '" class="title-label">' . __( 'Zillow Screenname:', 're-pro' ) . '</label>'; |
|
| 99 | - echo ' <input id="' . $this->get_field_id( 'screenname' ) . '" name="' . $this->get_field_name( 'screenname' ) . '" value="' . $screenname . '" class="widefat">'; |
|
| 98 | + echo ' <label for="' . $this->get_field_id('screenname') . '" class="title-label">' . __('Zillow Screenname:', 're-pro') . '</label>'; |
|
| 99 | + echo ' <input id="' . $this->get_field_id('screenname') . '" name="' . $this->get_field_name('screenname') . '" value="' . $screenname . '" class="widefat">'; |
|
| 100 | 100 | echo '</p>'; |
| 101 | 101 | |
| 102 | 102 | // Zillow User ID. |
| 103 | 103 | echo '<p>'; |
| 104 | - echo ' <label for="' . $this->get_field_id( 'zuid' ) . '" class="title-label">' . __( 'Zillow User ID:', 're-pro' ) . '</label>'; |
|
| 105 | - echo ' <input id="' . $this->get_field_id( 'zuid' ) . '" name="' . $this->get_field_name( 'zuid' ) . '" value="' . $zuid . '" class="widefat">'; |
|
| 104 | + echo ' <label for="' . $this->get_field_id('zuid') . '" class="title-label">' . __('Zillow User ID:', 're-pro') . '</label>'; |
|
| 105 | + echo ' <input id="' . $this->get_field_id('zuid') . '" name="' . $this->get_field_name('zuid') . '" value="' . $zuid . '" class="widefat">'; |
|
| 106 | 106 | echo '</p>'; |
| 107 | 107 | |
| 108 | 108 | } |
@@ -115,14 +115,14 @@ discard block |
||
| 115 | 115 | * @param mixed $old_instance Old Instance. |
| 116 | 116 | * @return $instance |
| 117 | 117 | */ |
| 118 | - public function update( $new_instance, $old_instance ) { |
|
| 118 | + public function update($new_instance, $old_instance) { |
|
| 119 | 119 | |
| 120 | 120 | $instance = $old_instance; |
| 121 | 121 | |
| 122 | - $instance['title'] = ! empty( $new_instance['title'] ) ? strip_tags( $new_instance['title'] ) : ''; |
|
| 123 | - $instance['screenname'] = ! empty( $new_instance['screenname'] ) ? strip_tags( $new_instance['screenname'] ) : ''; |
|
| 124 | - $instance['zuid'] = ! empty( $new_instance['zuid'] ) ? strip_tags( $new_instance['zuid'] ) : ''; |
|
| 125 | - $instance['zmod'] = ! empty( $new_instance['zmod'] ) ? strip_tags( $new_instance['zmod'] ) : ''; |
|
| 122 | + $instance['title'] = ! empty($new_instance['title']) ? strip_tags($new_instance['title']) : ''; |
|
| 123 | + $instance['screenname'] = ! empty($new_instance['screenname']) ? strip_tags($new_instance['screenname']) : ''; |
|
| 124 | + $instance['zuid'] = ! empty($new_instance['zuid']) ? strip_tags($new_instance['zuid']) : ''; |
|
| 125 | + $instance['zmod'] = ! empty($new_instance['zmod']) ? strip_tags($new_instance['zmod']) : ''; |
|
| 126 | 126 | return $instance; |
| 127 | 127 | } |
| 128 | 128 | } |
@@ -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 | * Zillow Large Rate Table Widget (https://www.zillow.com/webtools/widgets/large-rate-table-widget/) |
@@ -27,9 +27,9 @@ discard block |
||
| 27 | 27 | |
| 28 | 28 | parent::__construct( |
| 29 | 29 | 'zillow_lg_ratetable_widget', |
| 30 | - __( 'Zillow Large Mortgage Rate Table', 're-pro' ), |
|
| 30 | + __('Zillow Large Mortgage Rate Table', 're-pro'), |
|
| 31 | 31 | array( |
| 32 | - 'description' => __( 'Display a large Mortgage Rate Table from Zillow.', 're-pro' ), |
|
| 32 | + 'description' => __('Display a large Mortgage Rate Table from Zillow.', 're-pro'), |
|
| 33 | 33 | 'classname' => 're-pro re-pro-widget zillow-widget zillow-widget-lg-rate-table', |
| 34 | 34 | 'customize_selective_refresh' => true, |
| 35 | 35 | ) |
@@ -44,19 +44,19 @@ 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 | $zillow_widgets = new ZillowWidgets(); |
| 58 | 58 | |
| 59 | - return $zillow_widgets->get_mortage_rate_widget( $iframe_id ); |
|
| 59 | + return $zillow_widgets->get_mortage_rate_widget($iframe_id); |
|
| 60 | 60 | |
| 61 | 61 | echo $args['after_widget']; |
| 62 | 62 | } |
@@ -68,20 +68,20 @@ discard block |
||
| 68 | 68 | * @param mixed $instance Instance. |
| 69 | 69 | * @return void |
| 70 | 70 | */ |
| 71 | - public function form( $instance ) { |
|
| 71 | + public function form($instance) { |
|
| 72 | 72 | |
| 73 | 73 | // Set default values. |
| 74 | - $instance = wp_parse_args( (array) $instance, array( |
|
| 74 | + $instance = wp_parse_args((array) $instance, array( |
|
| 75 | 75 | 'title' => '', |
| 76 | 76 | )); |
| 77 | 77 | |
| 78 | 78 | // Retrieve an existing value from the database. |
| 79 | - $title = ! empty( $instance['title'] ) ? $instance['title'] : ''; |
|
| 79 | + $title = ! empty($instance['title']) ? $instance['title'] : ''; |
|
| 80 | 80 | |
| 81 | 81 | // Title. |
| 82 | 82 | echo '<p>'; |
| 83 | - echo ' <label for="' . $this->get_field_id( 'title' ) . '" class="title-label">' . __( 'Tile:', 're-pro' ) . '</label>'; |
|
| 84 | - echo ' <input id="' . $this->get_field_id( 'title' ) . '" name="' . $this->get_field_name( 'title' ) . '" value="' . $title . '" class="widefat">'; |
|
| 83 | + echo ' <label for="' . $this->get_field_id('title') . '" class="title-label">' . __('Tile:', 're-pro') . '</label>'; |
|
| 84 | + echo ' <input id="' . $this->get_field_id('title') . '" name="' . $this->get_field_name('title') . '" value="' . $title . '" class="widefat">'; |
|
| 85 | 85 | echo '</p>'; |
| 86 | 86 | |
| 87 | 87 | } |
@@ -94,11 +94,11 @@ discard block |
||
| 94 | 94 | * @param mixed $old_instance Old Instance. |
| 95 | 95 | * @return $instance |
| 96 | 96 | */ |
| 97 | - public function update( $new_instance, $old_instance ) { |
|
| 97 | + public function update($new_instance, $old_instance) { |
|
| 98 | 98 | |
| 99 | 99 | $instance = $old_instance; |
| 100 | 100 | |
| 101 | - $instance['title'] = ! empty( $new_instance['title'] ) ? strip_tags( $new_instance['title'] ) : ''; |
|
| 101 | + $instance['title'] = ! empty($new_instance['title']) ? strip_tags($new_instance['title']) : ''; |
|
| 102 | 102 | |
| 103 | 103 | return $instance; |
| 104 | 104 | } |
@@ -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 | * Zillow Past Sales Widget (https://www.zillow.com/webtools/widgets/PastListingsWidget.htm) |
@@ -27,9 +27,9 @@ discard block |
||
| 27 | 27 | |
| 28 | 28 | parent::__construct( |
| 29 | 29 | 'zillow_past_sales_widget', |
| 30 | - __( 'Zillow Past Sales', 're-pro' ), |
|
| 30 | + __('Zillow Past Sales', 're-pro'), |
|
| 31 | 31 | array( |
| 32 | - 'description' => __( 'Display your past sales from Zillow.', 're-pro' ), |
|
| 32 | + 'description' => __('Display your past sales from Zillow.', 're-pro'), |
|
| 33 | 33 | 'classname' => 're-pro re-pro-widget zillow-widget zillow-widget-past-sales', |
| 34 | 34 | 'customize_selective_refresh' => true, |
| 35 | 35 | ) |
@@ -44,20 +44,20 @@ 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'] : ''; |
|
| 51 | - $zuid = ! empty( $instance['zuid'] ) ? $instance['zuid'] : ''; |
|
| 49 | + $iframe_id = ! empty($args['widget_id']) ? $args['widget_id'] : ''; |
|
| 50 | + $title = ! empty($instance['title']) ? $instance['title'] : ''; |
|
| 51 | + $zuid = ! empty($instance['zuid']) ? $instance['zuid'] : ''; |
|
| 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 | $zillow_widgets = new ZillowWidgets(); |
| 59 | 59 | |
| 60 | - return $zillow_widgets->get_past_listings_widget( $iframe_id, $zuid ); |
|
| 60 | + return $zillow_widgets->get_past_listings_widget($iframe_id, $zuid); |
|
| 61 | 61 | |
| 62 | 62 | echo $args['after_widget']; |
| 63 | 63 | } |
@@ -69,30 +69,30 @@ discard block |
||
| 69 | 69 | * @param mixed $instance Instance. |
| 70 | 70 | * @return void |
| 71 | 71 | */ |
| 72 | - public function form( $instance ) { |
|
| 72 | + public function form($instance) { |
|
| 73 | 73 | |
| 74 | 74 | // Set default values. |
| 75 | - $instance = wp_parse_args( (array) $instance, array( |
|
| 75 | + $instance = wp_parse_args((array) $instance, array( |
|
| 76 | 76 | 'title' => '', |
| 77 | 77 | 'zuid' => '', |
| 78 | 78 | )); |
| 79 | 79 | |
| 80 | 80 | // Retrieve an existing value from the database. |
| 81 | - $title = ! empty( $instance['title'] ) ? $instance['title'] : ''; |
|
| 82 | - $screenname = ! empty( $instance['screenname'] ) ? $instance['screenname'] : ''; |
|
| 83 | - $zuid = ! empty( $instance['zuid'] ) ? $instance['zuid'] : ''; |
|
| 84 | - $format = ! empty( $instance['format'] ) ? $instance['format'] : 'format'; |
|
| 81 | + $title = ! empty($instance['title']) ? $instance['title'] : ''; |
|
| 82 | + $screenname = ! empty($instance['screenname']) ? $instance['screenname'] : ''; |
|
| 83 | + $zuid = ! empty($instance['zuid']) ? $instance['zuid'] : ''; |
|
| 84 | + $format = ! empty($instance['format']) ? $instance['format'] : 'format'; |
|
| 85 | 85 | |
| 86 | 86 | // Title. |
| 87 | 87 | echo '<p>'; |
| 88 | - echo ' <label for="' . $this->get_field_id( 'title' ) . '" class="title-label">' . __( 'Tile:', 're-pro' ) . '</label>'; |
|
| 89 | - echo ' <input id="' . $this->get_field_id( 'title' ) . '" name="' . $this->get_field_name( 'title' ) . '" value="' . $title . '" class="widefat">'; |
|
| 88 | + echo ' <label for="' . $this->get_field_id('title') . '" class="title-label">' . __('Tile:', 're-pro') . '</label>'; |
|
| 89 | + echo ' <input id="' . $this->get_field_id('title') . '" name="' . $this->get_field_name('title') . '" value="' . $title . '" class="widefat">'; |
|
| 90 | 90 | echo '</p>'; |
| 91 | 91 | |
| 92 | 92 | // Zillow User ID. |
| 93 | 93 | echo '<p>'; |
| 94 | - echo ' <label for="' . $this->get_field_id( 'zuid' ) . '" class="title-label">' . __( 'Zillow User ID:', 're-pro' ) . '</label>'; |
|
| 95 | - echo ' <input id="' . $this->get_field_id( 'zuid' ) . '" name="' . $this->get_field_name( 'zuid' ) . '" value="' . $zuid . '" class="widefat">'; |
|
| 94 | + echo ' <label for="' . $this->get_field_id('zuid') . '" class="title-label">' . __('Zillow User ID:', 're-pro') . '</label>'; |
|
| 95 | + echo ' <input id="' . $this->get_field_id('zuid') . '" name="' . $this->get_field_name('zuid') . '" value="' . $zuid . '" class="widefat">'; |
|
| 96 | 96 | echo '</p>'; |
| 97 | 97 | |
| 98 | 98 | } |
@@ -105,12 +105,12 @@ discard block |
||
| 105 | 105 | * @param mixed $old_instance Old Instance. |
| 106 | 106 | * @return $instance |
| 107 | 107 | */ |
| 108 | - public function update( $new_instance, $old_instance ) { |
|
| 108 | + public function update($new_instance, $old_instance) { |
|
| 109 | 109 | |
| 110 | 110 | $instance = $old_instance; |
| 111 | 111 | |
| 112 | - $instance['title'] = ! empty( $new_instance['title'] ) ? strip_tags( $new_instance['title'] ) : ''; |
|
| 113 | - $instance['zuid'] = ! empty( $new_instance['zuid'] ) ? strip_tags( $new_instance['zuid'] ) : ''; |
|
| 112 | + $instance['title'] = ! empty($new_instance['title']) ? strip_tags($new_instance['title']) : ''; |
|
| 113 | + $instance['zuid'] = ! empty($new_instance['zuid']) ? strip_tags($new_instance['zuid']) : ''; |
|
| 114 | 114 | |
| 115 | 115 | return $instance; |
| 116 | 116 | } |
@@ -22,9 +22,9 @@ discard block |
||
| 22 | 22 | |
| 23 | 23 | parent::__construct( |
| 24 | 24 | 'zillow-badges', |
| 25 | - __( 'Zillow Badge', 're-pro' ), |
|
| 25 | + __('Zillow Badge', 're-pro'), |
|
| 26 | 26 | array( |
| 27 | - 'description' => __( 'Display a Zillow Badge which links to an agent profile page.', 're-pro' ), |
|
| 27 | + 'description' => __('Display a Zillow Badge which links to an agent profile page.', 're-pro'), |
|
| 28 | 28 | 'classname' => 'widget widget-zillow-badge', |
| 29 | 29 | ) |
| 30 | 30 | ); |
@@ -43,9 +43,9 @@ discard block |
||
| 43 | 43 | /* Premier Agent. */ |
| 44 | 44 | array( |
| 45 | 45 | 'id' => 'premier-agent', |
| 46 | - 'name' => __( 'Zillow Premier Agent', 're-pro' ), |
|
| 47 | - 'alt' => __( 'Zillow Premier Agent', 're-pro' ), |
|
| 48 | - 'title' => __( 'Zillow Premier Agent', 're-pro' ), |
|
| 46 | + 'name' => __('Zillow Premier Agent', 're-pro'), |
|
| 47 | + 'alt' => __('Zillow Premier Agent', 're-pro'), |
|
| 48 | + 'title' => __('Zillow Premier Agent', 're-pro'), |
|
| 49 | 49 | 'class' => 'zillow-badge', |
| 50 | 50 | 'url' => 'https://www.zillowstatic.com/static/images/badges/premier-agent.png', |
| 51 | 51 | 'width' => 100, |
@@ -54,9 +54,9 @@ discard block |
||
| 54 | 54 | /* Featured .*/ |
| 55 | 55 | array( |
| 56 | 56 | 'id' => 'feature-badge-sm', |
| 57 | - 'name' => __( 'Featured on Zillow - Small', 're-pro' ), |
|
| 58 | - 'alt' => __( 'Featured on Zillow', 're-pro' ), |
|
| 59 | - 'title' => __( 'Featured on Zillow', 're-pro' ), |
|
| 57 | + 'name' => __('Featured on Zillow - Small', 're-pro'), |
|
| 58 | + 'alt' => __('Featured on Zillow', 're-pro'), |
|
| 59 | + 'title' => __('Featured on Zillow', 're-pro'), |
|
| 60 | 60 | 'class' => 'zillow-badge', |
| 61 | 61 | 'url' => 'https://www.zillowstatic.com/static/images/badges/feature_badge_sm.png', |
| 62 | 62 | 'width' => 100, |
@@ -64,9 +64,9 @@ discard block |
||
| 64 | 64 | ), |
| 65 | 65 | array( |
| 66 | 66 | 'id' => 'feature-badge-lg', |
| 67 | - 'name' => __( 'Featured on Zillow - Large', 're-pro' ), |
|
| 68 | - 'alt' => __( 'Featured on Zillow', 're-pro' ), |
|
| 69 | - 'title' => __( 'Featured on Zillow', 're-pro' ), |
|
| 67 | + 'name' => __('Featured on Zillow - Large', 're-pro'), |
|
| 68 | + 'alt' => __('Featured on Zillow', 're-pro'), |
|
| 69 | + 'title' => __('Featured on Zillow', 're-pro'), |
|
| 70 | 70 | 'class' => 'zillow-badge', |
| 71 | 71 | 'url' => 'https://www.zillowstatic.com/static/images/badges/feature_badge_lg.png', |
| 72 | 72 | 'width' => 100, |
@@ -75,9 +75,9 @@ discard block |
||
| 75 | 75 | /* View My Profile. */ |
| 76 | 76 | array( |
| 77 | 77 | 'id' => 'view-my-profile', |
| 78 | - 'name' => __( 'View my Profile', 're-pro' ), |
|
| 79 | - 'alt' => __( 'View my Profile', 're-pro' ), |
|
| 80 | - 'title' => __( 'View my Profile', 're-pro' ), |
|
| 78 | + 'name' => __('View my Profile', 're-pro'), |
|
| 79 | + 'alt' => __('View my Profile', 're-pro'), |
|
| 80 | + 'title' => __('View my Profile', 're-pro'), |
|
| 81 | 81 | 'class' => 'zillow-badge', |
| 82 | 82 | 'url' => 'https://www.zillowstatic.com/static/images/badges/bdg_profile.gif', |
| 83 | 83 | 'width' => 160, |
@@ -86,9 +86,9 @@ discard block |
||
| 86 | 86 | /* Feature My Listings - 160 x 40. */ |
| 87 | 87 | array( |
| 88 | 88 | 'id' => 'my-listing-bllg', |
| 89 | - 'name' => __( 'Feature My Listings 1', 're-pro' ), |
|
| 90 | - 'alt' => __( 'I feature my listings on Zillow', 're-pro' ), |
|
| 91 | - 'title' => __( 'I feature my listings on Zillow', 're-pro' ), |
|
| 89 | + 'name' => __('Feature My Listings 1', 're-pro'), |
|
| 90 | + 'alt' => __('I feature my listings on Zillow', 're-pro'), |
|
| 91 | + 'title' => __('I feature my listings on Zillow', 're-pro'), |
|
| 92 | 92 | 'class' => 'zillow-badge', |
| 93 | 93 | 'url' => 'https://www.zillowstatic.com/static/images/badges/zillow-my-listing_bllg.gif', |
| 94 | 94 | 'width' => 160, |
@@ -96,9 +96,9 @@ discard block |
||
| 96 | 96 | ), |
| 97 | 97 | array( |
| 98 | 98 | 'id' => 'my-listing-trlg', |
| 99 | - 'name' => __( 'Feature My Listings 2', 're-pro' ), |
|
| 100 | - 'alt' => __( 'I feature my listings on Zillow', 're-pro' ), |
|
| 101 | - 'title' => __( 'I feature my listings on Zillow', 're-pro' ), |
|
| 99 | + 'name' => __('Feature My Listings 2', 're-pro'), |
|
| 100 | + 'alt' => __('I feature my listings on Zillow', 're-pro'), |
|
| 101 | + 'title' => __('I feature my listings on Zillow', 're-pro'), |
|
| 102 | 102 | 'class' => 'zillow-badge', |
| 103 | 103 | 'url' => 'https://www.zillowstatic.com/static/images/badges/zillow-my-listing_trlg.gif', |
| 104 | 104 | 'width' => 160, |
@@ -106,9 +106,9 @@ discard block |
||
| 106 | 106 | ), |
| 107 | 107 | array( |
| 108 | 108 | 'id' => 'my-listing-grlg', |
| 109 | - 'name' => __( 'Feature My Listings 3', 're-pro' ), |
|
| 110 | - 'alt' => __( 'I feature my listings on Zillow', 're-pro' ), |
|
| 111 | - 'title' => __( 'I feature my listings on Zillow', 're-pro' ), |
|
| 109 | + 'name' => __('Feature My Listings 3', 're-pro'), |
|
| 110 | + 'alt' => __('I feature my listings on Zillow', 're-pro'), |
|
| 111 | + 'title' => __('I feature my listings on Zillow', 're-pro'), |
|
| 112 | 112 | 'class' => 'zillow-badge', |
| 113 | 113 | 'url' => 'https://www.zillowstatic.com/static/images/badges/zillow-my-listing_grlg.gif', |
| 114 | 114 | 'width' => 160, |
@@ -117,9 +117,9 @@ discard block |
||
| 117 | 117 | /* ZILLOW ADDICT - 160 x 40 */ |
| 118 | 118 | array( |
| 119 | 119 | 'id' => 'addict-bllg', |
| 120 | - 'name' => __( 'Zillow Addict 1 (160X40)', 're-pro' ), |
|
| 121 | - 'alt' => __( 'Zillow Addict', 're-pro' ), |
|
| 122 | - 'title' => __( 'Zillow Addict', 're-pro' ), |
|
| 120 | + 'name' => __('Zillow Addict 1 (160X40)', 're-pro'), |
|
| 121 | + 'alt' => __('Zillow Addict', 're-pro'), |
|
| 122 | + 'title' => __('Zillow Addict', 're-pro'), |
|
| 123 | 123 | 'class' => 'zillow-badge', |
| 124 | 124 | 'url' => 'https://www.zillowstatic.com/static/images/badges/zillow-addict_bllg.gif', |
| 125 | 125 | 'width' => 160, |
@@ -127,9 +127,9 @@ discard block |
||
| 127 | 127 | ), |
| 128 | 128 | array( |
| 129 | 129 | 'id' => 'addict-trlg', |
| 130 | - 'name' => __( 'Zillow Addict 2 (160X40)', 're-pro' ), |
|
| 131 | - 'alt' => __( 'Zillow Addict', 're-pro' ), |
|
| 132 | - 'title' => __( 'Zillow Addict', 're-pro' ), |
|
| 130 | + 'name' => __('Zillow Addict 2 (160X40)', 're-pro'), |
|
| 131 | + 'alt' => __('Zillow Addict', 're-pro'), |
|
| 132 | + 'title' => __('Zillow Addict', 're-pro'), |
|
| 133 | 133 | 'class' => 'zillow-badge', |
| 134 | 134 | 'url' => 'https://www.zillowstatic.com/static/images/badges/zillow-addict_trlg.png', |
| 135 | 135 | 'width' => 160, |
@@ -137,9 +137,9 @@ discard block |
||
| 137 | 137 | ), |
| 138 | 138 | array( |
| 139 | 139 | 'id' => 'addict-grlg', |
| 140 | - 'name' => __( 'Zillow Addict 3 (160X40)', 're-pro' ), |
|
| 141 | - 'alt' => __( 'Zillow Addict', 're-pro' ), |
|
| 142 | - 'title' => __( 'Zillow Addict', 're-pro' ), |
|
| 140 | + 'name' => __('Zillow Addict 3 (160X40)', 're-pro'), |
|
| 141 | + 'alt' => __('Zillow Addict', 're-pro'), |
|
| 142 | + 'title' => __('Zillow Addict', 're-pro'), |
|
| 143 | 143 | 'class' => 'zillow-badge', |
| 144 | 144 | 'url' => 'https://www.zillowstatic.com/static/images/badges/zillow-addict_grlg.gif', |
| 145 | 145 | 'width' => 160, |
@@ -148,9 +148,9 @@ discard block |
||
| 148 | 148 | /* ZILLOW ADDICT - 100 x 40 */ |
| 149 | 149 | array( |
| 150 | 150 | 'id' => 'addict-blsm', |
| 151 | - 'name' => __( 'Zillow Addict 1 (100X40)', 're-pro' ), |
|
| 152 | - 'alt' => __( 'Zillow Addict', 're-pro' ), |
|
| 153 | - 'title' => __( 'Zillow Addict', 're-pro' ), |
|
| 151 | + 'name' => __('Zillow Addict 1 (100X40)', 're-pro'), |
|
| 152 | + 'alt' => __('Zillow Addict', 're-pro'), |
|
| 153 | + 'title' => __('Zillow Addict', 're-pro'), |
|
| 154 | 154 | 'class' => 'zillow-badge', |
| 155 | 155 | 'url' => 'https://www.zillowstatic.com/static/images/badges/zillow-addict_blsm.gif', |
| 156 | 156 | 'width' => 100, |
@@ -158,9 +158,9 @@ discard block |
||
| 158 | 158 | ), |
| 159 | 159 | array( |
| 160 | 160 | 'id' => 'addict-trsm', |
| 161 | - 'name' => __( 'Zillow Addict 2 (100X40)', 're-pro' ), |
|
| 162 | - 'alt' => __( 'Zillow Addict', 're-pro' ), |
|
| 163 | - 'title' => __( 'Zillow Addict', 're-pro' ), |
|
| 161 | + 'name' => __('Zillow Addict 2 (100X40)', 're-pro'), |
|
| 162 | + 'alt' => __('Zillow Addict', 're-pro'), |
|
| 163 | + 'title' => __('Zillow Addict', 're-pro'), |
|
| 164 | 164 | 'class' => 'zillow-badge', |
| 165 | 165 | 'url' => 'https://www.zillowstatic.com/static/images/badges/zillow-addict_trsm.png', |
| 166 | 166 | 'width' => 100, |
@@ -168,9 +168,9 @@ discard block |
||
| 168 | 168 | ), |
| 169 | 169 | array( |
| 170 | 170 | 'id' => 'addict-grsm', |
| 171 | - 'name' => __( 'Zillow Addict 3 (100X40)', 're-pro' ), |
|
| 172 | - 'alt' => __( 'Zillow Addict', 're-pro' ), |
|
| 173 | - 'title' => __( 'Zillow Addict', 're-pro' ), |
|
| 171 | + 'name' => __('Zillow Addict 3 (100X40)', 're-pro'), |
|
| 172 | + 'alt' => __('Zillow Addict', 're-pro'), |
|
| 173 | + 'title' => __('Zillow Addict', 're-pro'), |
|
| 174 | 174 | 'class' => 'zillow-badge', |
| 175 | 175 | 'url' => 'https://www.zillowstatic.com/static/images/badges/zillow-addict_grsm.gif', |
| 176 | 176 | 'width' => 100, |
@@ -179,9 +179,9 @@ discard block |
||
| 179 | 179 | /* REAL ESTATE FANATIC - 160 x 40 */ |
| 180 | 180 | array( |
| 181 | 181 | 'id' => 'fanatic-bllg', |
| 182 | - 'name' => __( 'Real Estate Fanatic 1 (160X40)', 're-pro' ), |
|
| 183 | - 'alt' => __( 'Real Estate Fanatic', 're-pro' ), |
|
| 184 | - 'title' => __( 'Real Estate Fanatic', 're-pro' ), |
|
| 182 | + 'name' => __('Real Estate Fanatic 1 (160X40)', 're-pro'), |
|
| 183 | + 'alt' => __('Real Estate Fanatic', 're-pro'), |
|
| 184 | + 'title' => __('Real Estate Fanatic', 're-pro'), |
|
| 185 | 185 | 'class' => 'zillow-badge', |
| 186 | 186 | 'url' => 'https://www.zillowstatic.com/static/images/badges/zillow-fanatic_bllg.gif', |
| 187 | 187 | 'width' => 160, |
@@ -189,9 +189,9 @@ discard block |
||
| 189 | 189 | ), |
| 190 | 190 | array( |
| 191 | 191 | 'id' => 'fanatic-trlg', |
| 192 | - 'name' => __( 'Real Estate Fanatic 2 (160X40)', 're-pro' ), |
|
| 193 | - 'alt' => __( 'Real Estate Fanatic', 're-pro' ), |
|
| 194 | - 'title' => __( 'Real Estate Fanatic', 're-pro' ), |
|
| 192 | + 'name' => __('Real Estate Fanatic 2 (160X40)', 're-pro'), |
|
| 193 | + 'alt' => __('Real Estate Fanatic', 're-pro'), |
|
| 194 | + 'title' => __('Real Estate Fanatic', 're-pro'), |
|
| 195 | 195 | 'class' => 'zillow-badge', |
| 196 | 196 | 'url' => 'https://www.zillowstatic.com/static/images/badges/zillow-fanatic_trlg.gif', |
| 197 | 197 | 'width' => 160, |
@@ -199,9 +199,9 @@ discard block |
||
| 199 | 199 | ), |
| 200 | 200 | array( |
| 201 | 201 | 'id' => 'fanatic-grlg', |
| 202 | - 'name' => __( 'Real Estate Fanatic 3 (160X40)', 're-pro' ), |
|
| 203 | - 'alt' => __( 'Real Estate Fanatic', 're-pro' ), |
|
| 204 | - 'title' => __( 'Real Estate Fanatic', 're-pro' ), |
|
| 202 | + 'name' => __('Real Estate Fanatic 3 (160X40)', 're-pro'), |
|
| 203 | + 'alt' => __('Real Estate Fanatic', 're-pro'), |
|
| 204 | + 'title' => __('Real Estate Fanatic', 're-pro'), |
|
| 205 | 205 | 'class' => 'zillow-badge', |
| 206 | 206 | 'url' => 'https://www.zillowstatic.com/static/images/badges/zillow-fanatic_grlg.gif', |
| 207 | 207 | 'width' => 160, |
@@ -210,9 +210,9 @@ discard block |
||
| 210 | 210 | /* REAL ESTATE FANATIC - 120X40 */ |
| 211 | 211 | array( |
| 212 | 212 | 'id' => 'fanatic-blsm', |
| 213 | - 'name' => __( 'Real Estate Fanatic 1 (120X40)', 're-pro' ), |
|
| 214 | - 'alt' => __( 'Real Estate Fanatic', 're-pro' ), |
|
| 215 | - 'title' => __( 'Real Estate Fanatic', 're-pro' ), |
|
| 213 | + 'name' => __('Real Estate Fanatic 1 (120X40)', 're-pro'), |
|
| 214 | + 'alt' => __('Real Estate Fanatic', 're-pro'), |
|
| 215 | + 'title' => __('Real Estate Fanatic', 're-pro'), |
|
| 216 | 216 | 'class' => 'zillow-badge', |
| 217 | 217 | 'url' => 'https://www.zillowstatic.com/static/images/badges/zillow-fanatic_blsm.gif', |
| 218 | 218 | 'width' => 120, |
@@ -220,9 +220,9 @@ discard block |
||
| 220 | 220 | ), |
| 221 | 221 | array( |
| 222 | 222 | 'id' => 'fanatic-trsm', |
| 223 | - 'name' => __( 'Real Estate Fanatic 2 (120X40)', 're-pro' ), |
|
| 224 | - 'alt' => __( 'Real Estate Fanatic', 're-pro' ), |
|
| 225 | - 'title' => __( 'Real Estate Fanatic', 're-pro' ), |
|
| 223 | + 'name' => __('Real Estate Fanatic 2 (120X40)', 're-pro'), |
|
| 224 | + 'alt' => __('Real Estate Fanatic', 're-pro'), |
|
| 225 | + 'title' => __('Real Estate Fanatic', 're-pro'), |
|
| 226 | 226 | 'class' => 'zillow-badge', |
| 227 | 227 | 'url' => 'https://www.zillowstatic.com/static/images/badges/zillow-fanatic_trsm.gif', |
| 228 | 228 | 'width' => 120, |
@@ -230,9 +230,9 @@ discard block |
||
| 230 | 230 | ), |
| 231 | 231 | array( |
| 232 | 232 | 'id' => 'fanatic-grsm', |
| 233 | - 'name' => __( 'Real Estate Fanatic 3 (120X40)', 're-pro' ), |
|
| 234 | - 'alt' => __( 'Real Estate Fanatic', 're-pro' ), |
|
| 235 | - 'title' => __( 'Real Estate Fanatic', 're-pro' ), |
|
| 233 | + 'name' => __('Real Estate Fanatic 3 (120X40)', 're-pro'), |
|
| 234 | + 'alt' => __('Real Estate Fanatic', 're-pro'), |
|
| 235 | + 'title' => __('Real Estate Fanatic', 're-pro'), |
|
| 236 | 236 | 'class' => 'zillow-badge', |
| 237 | 237 | 'url' => 'https://www.zillowstatic.com/static/images/badges/zillow-fanatic_grsm.gif', |
| 238 | 238 | 'width' => 120, |
@@ -241,9 +241,9 @@ discard block |
||
| 241 | 241 | /* Dig Influencer */ |
| 242 | 242 | array( |
| 243 | 243 | 'id' => 'dig-square-influencer', |
| 244 | - 'name' => __( 'Dig Influencer Square', 're-pro' ), |
|
| 245 | - 'alt' => __( 'Dig Influencer', 're-pro' ), |
|
| 246 | - 'title' => __( 'Dig Influencer', 're-pro' ), |
|
| 244 | + 'name' => __('Dig Influencer Square', 're-pro'), |
|
| 245 | + 'alt' => __('Dig Influencer', 're-pro'), |
|
| 246 | + 'title' => __('Dig Influencer', 're-pro'), |
|
| 247 | 247 | 'class' => 'zillow-badge', |
| 248 | 248 | 'url' => 'https://www.zillowstatic.com/static/images/badges/square-influencer.png', |
| 249 | 249 | 'width' => 72, |
@@ -251,9 +251,9 @@ discard block |
||
| 251 | 251 | ), |
| 252 | 252 | array( |
| 253 | 253 | 'id' => 'dig-rectangle-influencer', |
| 254 | - 'name' => __( 'Dig Rectangle Influencer', 're-pro' ), |
|
| 255 | - 'alt' => __( 'Dig Influencer', 're-pro' ), |
|
| 256 | - 'title' => __( 'Dig Influencer', 're-pro' ), |
|
| 254 | + 'name' => __('Dig Rectangle Influencer', 're-pro'), |
|
| 255 | + 'alt' => __('Dig Influencer', 're-pro'), |
|
| 256 | + 'title' => __('Dig Influencer', 're-pro'), |
|
| 257 | 257 | 'class' => 'zillow-badge', |
| 258 | 258 | 'url' => 'https://www.zillowstatic.com/static/images/badges/rectangle-influencer.png', |
| 259 | 259 | 'width' => 109, |
@@ -261,9 +261,9 @@ discard block |
||
| 261 | 261 | ), |
| 262 | 262 | array( |
| 263 | 263 | 'id' => 'dig-square-pro', |
| 264 | - 'name' => __( 'Dig Square Pro', 're-pro' ), |
|
| 265 | - 'alt' => __( 'Dig Influencer', 're-pro' ), |
|
| 266 | - 'title' => __( 'Dig Influencer', 're-pro' ), |
|
| 264 | + 'name' => __('Dig Square Pro', 're-pro'), |
|
| 265 | + 'alt' => __('Dig Influencer', 're-pro'), |
|
| 266 | + 'title' => __('Dig Influencer', 're-pro'), |
|
| 267 | 267 | 'class' => 'zillow-badge', |
| 268 | 268 | 'url' => 'https://www.zillowstatic.com/static/images/badges/square-pro.png', |
| 269 | 269 | 'width' => 72, |
@@ -271,9 +271,9 @@ discard block |
||
| 271 | 271 | ), |
| 272 | 272 | array( |
| 273 | 273 | 'id' => 'dig-rectangle-pro', |
| 274 | - 'name' => __( 'Dig Rectangle Pro', 're-pro' ), |
|
| 275 | - 'alt' => __( 'Dig Influencer', 're-pro' ), |
|
| 276 | - 'title' => __( 'Dig Influencer', 're-pro' ), |
|
| 274 | + 'name' => __('Dig Rectangle Pro', 're-pro'), |
|
| 275 | + 'alt' => __('Dig Influencer', 're-pro'), |
|
| 276 | + 'title' => __('Dig Influencer', 're-pro'), |
|
| 277 | 277 | 'class' => 'zillow-badge', |
| 278 | 278 | 'url' => 'https://www.zillowstatic.com/static/images/badges/rectangle-pro.png', |
| 279 | 279 | 'width' => 109, |
@@ -291,24 +291,24 @@ discard block |
||
| 291 | 291 | * @param mixed $instance Instance. |
| 292 | 292 | * @return void |
| 293 | 293 | */ |
| 294 | - public function widget( $args, $instance ) { |
|
| 294 | + public function widget($args, $instance) { |
|
| 295 | 295 | |
| 296 | 296 | // Retrieve any existing value from the database. |
| 297 | - $title = ! empty( $instance['title'] ) ? $instance['title'] : ''; |
|
| 298 | - $zid = ! empty( $instance['zid'] ) ? $instance['zid'] : ''; |
|
| 299 | - $badge_name = ! empty( $instance['badge_name'] ) ? $instance['badge_name'] : ''; |
|
| 300 | - $badge_alignment = ! empty( $instance['badge_alignment'] ) ? $instance['badge_alignment'] : ''; |
|
| 297 | + $title = ! empty($instance['title']) ? $instance['title'] : ''; |
|
| 298 | + $zid = ! empty($instance['zid']) ? $instance['zid'] : ''; |
|
| 299 | + $badge_name = ! empty($instance['badge_name']) ? $instance['badge_name'] : ''; |
|
| 300 | + $badge_alignment = ! empty($instance['badge_alignment']) ? $instance['badge_alignment'] : ''; |
|
| 301 | 301 | |
| 302 | 302 | $zillow_badges = $this->zillow_badges(); |
| 303 | 303 | |
| 304 | 304 | echo $args['before_widget']; |
| 305 | 305 | |
| 306 | - echo $args['before_title'] . esc_attr( $title ) . $args['after_title'] ; |
|
| 306 | + echo $args['before_title'] . esc_attr($title) . $args['after_title']; |
|
| 307 | 307 | |
| 308 | - foreach ( $zillow_badges as $zillow_badge ) { |
|
| 309 | - if ( $badge_name === $zillow_badge['id'] ) { |
|
| 308 | + foreach ($zillow_badges as $zillow_badge) { |
|
| 309 | + if ($badge_name === $zillow_badge['id']) { |
|
| 310 | 310 | |
| 311 | - echo '<a href="https://www.zillow.com/profile/'. $zid .'" ><img id="zillow-'. esc_attr( $zillow_badge['id'] ) .'-badge" class="'. sanitize_html_class( $zillow_badge['class'] ) . ' ' . sanitize_html_class( $badge_alignment ) .'" src="' . esc_url( apply_filters( 'jetpack_photon_url', $zillow_badge['url'] ) ) . '" alt="'. esc_attr( $zillow_badge['alt'] ) . '" height="'. esc_attr( $zillow_badge['height'] ) .'" width="'. esc_attr( $zillow_badge['width'] ) .'" title="'. esc_attr( $zillow_badge['alt'] ) .'" /></a>'; |
|
| 311 | + echo '<a href="https://www.zillow.com/profile/' . $zid . '" ><img id="zillow-' . esc_attr($zillow_badge['id']) . '-badge" class="' . sanitize_html_class($zillow_badge['class']) . ' ' . sanitize_html_class($badge_alignment) . '" src="' . esc_url(apply_filters('jetpack_photon_url', $zillow_badge['url'])) . '" alt="' . esc_attr($zillow_badge['alt']) . '" height="' . esc_attr($zillow_badge['height']) . '" width="' . esc_attr($zillow_badge['width']) . '" title="' . esc_attr($zillow_badge['alt']) . '" /></a>'; |
|
| 312 | 312 | |
| 313 | 313 | } |
| 314 | 314 | } |
@@ -324,10 +324,10 @@ discard block |
||
| 324 | 324 | * @param mixed $instance Instance. |
| 325 | 325 | * @return void |
| 326 | 326 | */ |
| 327 | - public function form( $instance ) { |
|
| 327 | + public function form($instance) { |
|
| 328 | 328 | |
| 329 | 329 | // Set default values. |
| 330 | - $instance = wp_parse_args( (array) $instance, array( |
|
| 330 | + $instance = wp_parse_args((array) $instance, array( |
|
| 331 | 331 | 'title' => '', |
| 332 | 332 | 'zid' => '', |
| 333 | 333 | 'badge_name' => '', |
@@ -335,46 +335,46 @@ discard block |
||
| 335 | 335 | )); |
| 336 | 336 | |
| 337 | 337 | // Retrieve an existing value from the database. |
| 338 | - $title = ! empty( $instance['title'] ) ? $instance['title'] : ''; |
|
| 339 | - $zid = ! empty( $instance['zid'] ) ? $instance['zid'] : ''; |
|
| 340 | - $badge_name = ! empty( $instance['badge_name'] ) ? $instance['badge_name'] : ''; |
|
| 341 | - $badge_alignment = ! empty( $instance['badge_alignment'] ) ? $instance['badge_alignment'] : ''; |
|
| 338 | + $title = ! empty($instance['title']) ? $instance['title'] : ''; |
|
| 339 | + $zid = ! empty($instance['zid']) ? $instance['zid'] : ''; |
|
| 340 | + $badge_name = ! empty($instance['badge_name']) ? $instance['badge_name'] : ''; |
|
| 341 | + $badge_alignment = ! empty($instance['badge_alignment']) ? $instance['badge_alignment'] : ''; |
|
| 342 | 342 | |
| 343 | 343 | $zillow_badges = $this->zillow_badges(); |
| 344 | 344 | |
| 345 | 345 | // Form fields. |
| 346 | 346 | echo '<p>'; |
| 347 | - echo ' <label for="' . esc_attr( $this->get_field_id( 'title' ) ) . '" class="title_label">' . esc_attr( 'Title', 're-pro' ) . '</label>'; |
|
| 348 | - echo ' <input type="text" id="' . esc_attr( $this->get_field_id( 'title' ) ) . '" name="' . esc_attr( $this->get_field_name( 'title' ) ) . '" class="widefat" placeholder="' . esc_attr__( 'Find me on Zillow', 're-pro' ) . '" value="' . esc_attr( $title ) . '">'; |
|
| 349 | - echo ' <span class="description">' . esc_attr( 'Add a title to your zillow badge.', 're-pro' ) . '</span>'; |
|
| 347 | + echo ' <label for="' . esc_attr($this->get_field_id('title')) . '" class="title_label">' . esc_attr('Title', 're-pro') . '</label>'; |
|
| 348 | + echo ' <input type="text" id="' . esc_attr($this->get_field_id('title')) . '" name="' . esc_attr($this->get_field_name('title')) . '" class="widefat" placeholder="' . esc_attr__('Find me on Zillow', 're-pro') . '" value="' . esc_attr($title) . '">'; |
|
| 349 | + echo ' <span class="description">' . esc_attr('Add a title to your zillow badge.', 're-pro') . '</span>'; |
|
| 350 | 350 | echo '</p>'; |
| 351 | 351 | |
| 352 | 352 | echo '<p>'; |
| 353 | - echo ' <label for="' . esc_attr( $this->get_field_id( 'zid' ) ) . '" class="zid_label">' . esc_attr( 'Zillow User ID', 're-pro' ) . '</label>'; |
|
| 354 | - echo ' <input type="text" id="' . esc_attr( $this->get_field_id( 'zid' ) ) . '" name="' . esc_attr( $this->get_field_name( 'zid' ) ) . '" class="widefat" placeholder="' . esc_attr__( 'ZID', 're-pro' ) . '" value="' . esc_attr( $zid ) . '">'; |
|
| 355 | - echo ' <span class="description">' . esc_attr( 'Please provide your Zillow User ID.', 're-pro' ) . '</span>'; |
|
| 353 | + echo ' <label for="' . esc_attr($this->get_field_id('zid')) . '" class="zid_label">' . esc_attr('Zillow User ID', 're-pro') . '</label>'; |
|
| 354 | + echo ' <input type="text" id="' . esc_attr($this->get_field_id('zid')) . '" name="' . esc_attr($this->get_field_name('zid')) . '" class="widefat" placeholder="' . esc_attr__('ZID', 're-pro') . '" value="' . esc_attr($zid) . '">'; |
|
| 355 | + echo ' <span class="description">' . esc_attr('Please provide your Zillow User ID.', 're-pro') . '</span>'; |
|
| 356 | 356 | echo '</p>'; |
| 357 | 357 | |
| 358 | 358 | echo '<p>'; |
| 359 | - echo ' <label for="' . esc_attr( $this->get_field_id( 'badge_name' ) ) . '" class="badge_name_label">' . esc_attr( 'Badge Type', 're-pro' ) . '</label><br />'; |
|
| 360 | - echo ' <select id="' . esc_attr( $this->get_field_id( 'badge_name' ) ) . '" name="' . esc_attr( $this->get_field_name( 'badge_name' ) ) . '" class="widefat">'; |
|
| 361 | - echo ' <option value="" '. selected( $badge_name, '', false ) .'>'. esc_attr( 'Choose', 're-pro' ) .'</option>'; |
|
| 362 | - foreach ( $zillow_badges as $zillow_badge ) { |
|
| 363 | - echo '<option value="'. esc_attr( $zillow_badge['id'] ) .'" ' . selected( $badge_name, $zillow_badge['id'], false ) . '> ' . esc_attr( $zillow_badge['name'] ) . '</option>'; |
|
| 359 | + echo ' <label for="' . esc_attr($this->get_field_id('badge_name')) . '" class="badge_name_label">' . esc_attr('Badge Type', 're-pro') . '</label><br />'; |
|
| 360 | + echo ' <select id="' . esc_attr($this->get_field_id('badge_name')) . '" name="' . esc_attr($this->get_field_name('badge_name')) . '" class="widefat">'; |
|
| 361 | + echo ' <option value="" ' . selected($badge_name, '', false) . '>' . esc_attr('Choose', 're-pro') . '</option>'; |
|
| 362 | + foreach ($zillow_badges as $zillow_badge) { |
|
| 363 | + echo '<option value="' . esc_attr($zillow_badge['id']) . '" ' . selected($badge_name, $zillow_badge['id'], false) . '> ' . esc_attr($zillow_badge['name']) . '</option>'; |
|
| 364 | 364 | } |
| 365 | 365 | |
| 366 | 366 | echo '</select>'; |
| 367 | - echo '<span class="description">' . __( 'Choose a badge type from the dropdown. Click Save to preview the badge. Full list of badges can be found on <a href="http://www.zillow.com/webtools/badges/" target="_blank" rel="nofollow">Zillow</a>.', 're-pro' ) . '</span>'; |
|
| 367 | + echo '<span class="description">' . __('Choose a badge type from the dropdown. Click Save to preview the badge. Full list of badges can be found on <a href="http://www.zillow.com/webtools/badges/" target="_blank" rel="nofollow">Zillow</a>.', 're-pro') . '</span>'; |
|
| 368 | 368 | echo '</p>'; |
| 369 | 369 | |
| 370 | 370 | echo '<p>'; |
| 371 | - echo ' <label for="' . esc_attr( $this->get_field_id( 'badge_alignment' ) ) . '" class="badge_alignment_label">' . esc_attr_e( 'Badge Alignment', 're-pro' ) . '</label>'; |
|
| 372 | - echo ' <select id="' . esc_attr( $this->get_field_id( 'badge_alignment' ) ) . '" name="' . esc_attr( $this->get_field_name( 'badge_alignment' ) ) . '" class="widefat">'; |
|
| 373 | - echo ' <option value="alignleft" ' . selected( $badge_alignment, 'alignleft', false ) . '> ' . esc_attr( 'Left', 're-pro' ) . '</option>'; |
|
| 374 | - echo ' <option value="aligncenter" ' . selected( $badge_alignment, 'aligncenter', false ) . '> ' . esc_attr( 'Center', 're-pro' ) . '</option>'; |
|
| 375 | - echo ' <option value="alignright" ' . selected( $badge_alignment, 'alignright', false ) . '> ' . esc_attr( 'Right', 're-pro' ) . '</option>'; |
|
| 371 | + echo ' <label for="' . esc_attr($this->get_field_id('badge_alignment')) . '" class="badge_alignment_label">' . esc_attr_e('Badge Alignment', 're-pro') . '</label>'; |
|
| 372 | + echo ' <select id="' . esc_attr($this->get_field_id('badge_alignment')) . '" name="' . esc_attr($this->get_field_name('badge_alignment')) . '" class="widefat">'; |
|
| 373 | + echo ' <option value="alignleft" ' . selected($badge_alignment, 'alignleft', false) . '> ' . esc_attr('Left', 're-pro') . '</option>'; |
|
| 374 | + echo ' <option value="aligncenter" ' . selected($badge_alignment, 'aligncenter', false) . '> ' . esc_attr('Center', 're-pro') . '</option>'; |
|
| 375 | + echo ' <option value="alignright" ' . selected($badge_alignment, 'alignright', false) . '> ' . esc_attr('Right', 're-pro') . '</option>'; |
|
| 376 | 376 | echo ' </select>'; |
| 377 | - echo ' <span class="description">' . esc_attr( 'Choose how to align your badge within the widget space.', 're-pro' ) . '</span>'; |
|
| 377 | + echo ' <span class="description">' . esc_attr('Choose how to align your badge within the widget space.', 're-pro') . '</span>'; |
|
| 378 | 378 | echo '</p>'; |
| 379 | 379 | |
| 380 | 380 | } |
@@ -387,15 +387,15 @@ discard block |
||
| 387 | 387 | * @param mixed $old_instance Old Instance. |
| 388 | 388 | * @return $instance Instance. |
| 389 | 389 | */ |
| 390 | - public function update( $new_instance, $old_instance ) { |
|
| 390 | + public function update($new_instance, $old_instance) { |
|
| 391 | 391 | |
| 392 | 392 | $instance = $old_instance; |
| 393 | 393 | |
| 394 | - $instance['title'] = ! empty( $new_instance['title'] ) ? strip_tags( $new_instance['title'] ) : ''; |
|
| 395 | - $instance['badge_name'] = ! empty( $new_instance['badge_name'] ) ? strip_tags( $new_instance['badge_name'] ) : ''; |
|
| 396 | - $instance['badge_alignment'] = ! empty( $new_instance['badge_alignment'] ) ? strip_tags( $new_instance['badge_alignment'] ) : ''; |
|
| 394 | + $instance['title'] = ! empty($new_instance['title']) ? strip_tags($new_instance['title']) : ''; |
|
| 395 | + $instance['badge_name'] = ! empty($new_instance['badge_name']) ? strip_tags($new_instance['badge_name']) : ''; |
|
| 396 | + $instance['badge_alignment'] = ! empty($new_instance['badge_alignment']) ? strip_tags($new_instance['badge_alignment']) : ''; |
|
| 397 | 397 | |
| 398 | - $instance['zid'] = ! empty( $new_instance['zid'] ) ? strip_tags( $new_instance['zid'] ) : ''; |
|
| 398 | + $instance['zid'] = ! empty($new_instance['zid']) ? strip_tags($new_instance['zid']) : ''; |
|
| 399 | 399 | |
| 400 | 400 | return $instance; |
| 401 | 401 | |
@@ -410,6 +410,6 @@ discard block |
||
| 410 | 410 | */ |
| 411 | 411 | function register_zillow_badge_widgets() { |
| 412 | 412 | |
| 413 | - register_widget( 'Zillow_Badges' ); |
|
| 413 | + register_widget('Zillow_Badges'); |
|
| 414 | 414 | } |
| 415 | -add_action( 'widgets_init', 'register_zillow_badge_widgets' ); |
|
| 415 | +add_action('widgets_init', 'register_zillow_badge_widgets'); |
|