-
Notifications
You must be signed in to change notification settings - Fork 0
/
codedoctor-therealestateshowbiz.php
518 lines (429 loc) · 17.1 KB
/
codedoctor-therealestateshowbiz.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
<?php
/**
* Plugin Name: CodeDoctor TheRealEstateShowBiz
* Plugin URI: http://URI_Of_Page_Describing_Plugin_and_Updates
* Description: Private plugin
* Version: 1.0
* Author: Martin Wawrusch
* Author URI: http://URI_Of_The_Plugin_Author
* License: GPL2
*/
/* Copyright 2013 Martin Wawrusch (email : [email protected])
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2, as
published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
/* **********************************************************
* RESOURCE Shortcode
* **********************************************************/
function theme_resource_shortcode( $params, $content = null) {
extract( shortcode_atts( array(
'title' => '',
'description' => '',
'phone' => '',
'phone2' => '',
'email' => '',
'homepage' => '',
'subtitle' => '',
'address' => '',
), $params ) );
$result = '';
$result .= '<h4 class="resource">'.$title.'</h4>';
$result .= '<ul class="resource">';
if(strlen($subtitle) > 0) {
$result .= '<li>'.$subtitle.'</li>';
}
if(strlen($address) > 0) {
$result .= '<li>'.$address.'</li>';
}
if(strlen($phone) > 0) {
$result .= '<li>'.$phone.'</li>';
}
if(strlen($phone2) > 0) {
$result .= '<li>'.$phone2.'</li>';
}
if(strlen($email) > 0) {
$result .= '<li><a href="mailto:'.$email.'">'.$email.'</a></li>';
}
if(strlen($homepage) > 0) {
$result .= '<li><a href="http://'.$homepage.'">'.$homepage.'</a></li>';
}
if(strlen($description) > 0) {
$result .= '<li>'.$description.'</li>';
}
$result .= '</ul>';
return $result;
}
// WIDGETS
/**
* Creates widget with list of towns
*/
class TownList_Widget extends WP_Widget {
/**
* Widget constructor
*
* @desc sets default options and controls for widget
*/
function TownList_Widget () {
/* Widget settings */
$widget_ops = array (
'classname' => 'widget_townlist',
'description' => __( 'List of Towns' )
);
/* Create the widget */
$this->WP_Widget( 'townlist-widget', __( 'List of Towns' ), $widget_ops );
}
/**
* Displaying the widget
*
* Handle the display of the widget
* @param array
* @param array
*/
function widget( $args, $instance ) {
global $post;
$children=wp_list_pages( 'echo=0&child_of=' . $post->ID . '&title_li=' );
if ($children) {
$parent = $post->ID;
}else{
$parent = $post->post_parent;
if(!$parent){
$parent = $post->ID;
}
}
$parent_title = get_the_title($parent);
extract( $args );
$title = apply_filters('widget_title', empty($instance['title']) ? $parent_title : do_shortcode($instance['title']), $instance, $this->id_base);
echo $before_widget;
if ( $title)
echo $before_title . $title . $after_title;
?>
<div class="footer-town-list">
<ul class="list-left">
<li><a href="/towns/ardsley">Ardsley</a></li>
<li><a href="/towns/armonk">Armonk</a></li>
<li><a href="/towns/bedford">Bedford</a></li>
<li><a href="/towns/briarcliff">Briarcliff Manor</a></li>
<li><a href="/towns/bronxville">Bronxville</a></li>
<li><a href="/towns/chappaqua">Chappaqua</a></li>
<li><a href="/towns/cold-spring">Cold Spring</a></li>
<li><a href="/towns/cortlandt-manor">Cortlandt Manor</a></li>
<li><a href="/towns/croton-on-hudson">Croton-on-Hudson</a></li>
<li><a href="/towns/dobbs-ferry">Dobbs Ferry</a></li>
<li><a href="/towns/garrison">Garrison</a></li>
<li><a href="/towns/hastings-on-hudson">Hastings-on-Hudson</a></li>
<li><a href="/towns/irvington">Irvington</a></li>
<li><a href="/towns/katonah">Katonah</a></li>
<li><a href="/towns/larchmont">Larchmont</a></li>
<li><a href="/towns/mamaroneck">Mamaroneck</a></li>
<li><a href="/towns/mt-kisco">Mt. Kisco</a></li>
</ul>
<ul class="list-right">
<li><a href="/towns/new-rochelle">New Rochelle</a></li>
<li><a href="/towns/north-salem">North Salem</a></li>
<li><a href="/towns/ossining">Ossining</a></li>
<li><a href="/towns/peekskill">Peekskill</a></li>
<li><a href="/towns/pelham">Pelham</a></li>
<li><a href="/towns/pleasantville">Pleasantville</a></li>
<li><a href="/towns/pocantico">Pocantico Hills</a></li>
<li><a href="/towns/port-chester">Port Chester</a></li>
<li><a href="/towns/pound-ridge">Pound Ridge</a></li>
<li><a href="/towns/rye">Rye</a></li>
<li><a href="/towns/rye-brook">Rye Brook</a></li>
<li><a href="/towns/rye-neck">Rye Neck</a></li>
<li><a href="/towns/scarsdale">Scarsdale</a></li>
<li><a href="/towns/sleepy-hollow">Sleepy Hollow</a></li>
<li><a href="/towns/somers">Somers</a></li>
<li><a href="/towns/tarrytown">Tarrytown</a></li>
<li><a href="/towns/teatown">Teatown</a></li>
<li><a href="/towns/yorktown">Yorktown</a></li>
</ul>
<div class="clear clearfix"></div>
<p class="summary">
</Br>
</p>
</div>
<?php
echo $after_widget;
}
/**
* Update and save widget
*
* @param array $new_instance
* @param array $old_instance
* @return array New widget values
*/
function update ( $new_instance, $old_instance ) {
$old_instance['title'] = strip_tags( $new_instance['title'] );
return $old_instance;
}
/**
* Creates widget controls or settings
*
* @param array Return widget options form
*/
function form ( $instance ) { ?>
<p>
<label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php echo __( 'Title',"ait-theme" ); ?>:</label>
<input type="text" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" value="<?php echo $instance['title']; ?>"class="widefat" style="width:100%;" />
</p>
<?php
}
}
/*************
*************/
/**
* Creates widget with about jean
*/
class AboutJean_Widget extends WP_Widget {
/**
* Widget constructor
*
* @desc sets default options and controls for widget
*/
function AboutJean_Widget () {
/* Widget settings */
$widget_ops = array (
'classname' => 'widget_aboutjean',
'description' => __( 'About Jean' )
);
/* Create the widget */
$this->WP_Widget( 'aboutjean-widget', __( 'About Jean' ), $widget_ops );
}
/**
* Displaying the widget
*
* Handle the display of the widget
* @param array
* @param array
*/
function widget( $args, $instance ) {
global $post;
$children=wp_list_pages( 'echo=0&child_of=' . $post->ID . '&title_li=' );
if ($children) {
$parent = $post->ID;
}else{
$parent = $post->post_parent;
if(!$parent){
$parent = $post->ID;
}
}
$parent_title = get_the_title($parent);
extract( $args );
$title = apply_filters('widget_title', empty($instance['title']) ? $parent_title : do_shortcode($instance['title']), $instance, $this->id_base);
echo $before_widget;
if ( $title)
echo $before_title . $title . $after_title;
?>
<div class="footer-about-jean">
<p> <img class="thumb alignleft size-full wp-image-3542" title="Jean Cameron-Smith" src="/wp-content/jean-custom/other/JeanCameron.jpeg" alt="" width="180" height="120">
</p><p>
</Br>
</Br>
</Br>
</Br>
</Br>
</Br>
</Br>Seeing the jewel in the crown in every purchase and sale is the hallmark of Jean Cameron-Smith's career as a real estate broker. Believing the best gains are achieved through an expert, informed navigation of the buying and selling process, Jean uses her experience and unique knowledge of the area to provide her clients with optimal results. With the ability to access comprehensive luxury home archives, and armed with a myriad of top resources at her fingertips, Jean can lead you through a successful real estate transaction with ease.
</p><p>
This white-glove, 25-year comparative trademark service in sales, marketing and real estate has classified her as a highly sought-after realtor, marketer and real estate interpreter. Whether it is second nature to her or just an unwillingness to except anything less than stellar for her clients, Jean is serious about her clients' interests. She regularly provides complete historical, cultural and demographic information on the kinds of neighborhoods her clients are interested in, as well as providing quantitative analysis for both buyers and sellers, helping them make informed
purchasing decisions. This is all delivered in an approachable, encouraging manner, with an emphasis on personalized service each and every time.
</p>
<h4>Negotiate wisely. With Jean.</h4>
<p>
It's the home of your dreams, whether you are buying it, or selling it to another dreamer.
</p>
<h4>Current portfolio</h4>
<ul>
<li>Rates TOP 1% of Northern Westchester Realtor for deals closed & satisfied customers.</li>
<li>Awards: Multiple listings service DIAMOND, PLATINUM, and GOLD awards.</li>
<li>Co-produced and co-hosted "The Real-Estate Show of Westchester" on cable television.</li>
</ul>
<p>
O: 914.238.2486 M: 914-645-7157 Click <a href="mailto:[email protected]">here</a> to email Jean. </p>
<div class="clear clearfix"></div>
</div>
<?php
echo $after_widget;
}
/**
* Update and save widget
*
* @param array $new_instance
* @param array $old_instance
* @return array New widget values
*/
function update ( $new_instance, $old_instance ) {
$old_instance['title'] = strip_tags( $new_instance['title'] );
return $old_instance;
}
/**
* Creates widget controls or settings
*
* @param array Return widget options form
*/
function form ( $instance ) { ?>
<p>
<label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php echo __( 'Title',"ait-theme" ); ?>:</label>
<input type="text" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" value="<?php echo $instance['title']; ?>"class="widefat" style="width:100%;" />
</p>
<?php
}
}
/**
Listing short code
**/
/* **********************************************************
* LISTING Shortcode
* **********************************************************/
function theme_listing_shortcode( $params, $content = null) {
extract( shortcode_atts( array(
'title' => '',
'image' => '',
'beds' => '',
'sqft' => '',
'link' => ''
), $params ) );
$result = '<div class="home-listing">';
$result .= '<h4 class="listing">'.$title.'</h4>';
$result .= '<p class="image"><img src="'.$image.'" alt=""/></p>';
$result .= '<ul class="listing">';
$result .= '<li class="bed">'.$beds.'</li>';
$result .= '<li class="sqft">'.$sqft.'</li>';
$result .= '<li class="more-information"><a href="'.$link.'">More Information</a></li>';
$result .= '</ul></div>';
return $result;
}
/* **********************************************************
* LISTING SOLD Shortcode
* **********************************************************/
function theme_listing_sold_shortcode( $params, $content = null) {
extract( shortcode_atts( array(
'title' => '',
'image' => '',
'beds' => '',
'sqft' => '',
'link' => ''
), $params ) );
$result = '<div class="home-listing">';
$result .= '<h4 class="listing">'.$title.'</h4>';
$result .= '<p class="image"><img src="'.$image.'" alt=""/></p>';
$result .= '<ul class="listing">';
$result .= '<li class="bed">'.$beds.'</li>';
$result .= '<li class="sqft">'.$sqft.'</li>';
$result .= '</ul></div>';
return $result;
}
/* **********************************************************
* LISTING SOLD Shortcode
* **********************************************************/
function theme_listing_townbox_shortcode( $params, $content = null) {
$result = "
<div class=\"listings-comment-header\">
<ul class=\"list-column-a\">
<li><a href=\"/listings/#none\">Ardsley</a></li>
<li><a href=\"/listings/#none\">Armonk</a></li>
<li><a href=\"/listings/#none\">Bedford</a></li>
<li><a href=\"/listings/#none\">Briarcliff Manor</a></li>
<li><a href=\"/listings/#none\">Bronxville</a></li>
<li><strong><a href=\"/listings/#chappaqua\">Chappaqua</a></strong></li>
<li><strong><a href=\"/listings/#cold-spring\">Cold Spring</a></strong></li>
</ul>
<ul class=\"list-column-b\">
<li><a href=\"/listings/#none\">Cortlandt Manor</a></li>
<li><strong><a href=\"/listings/#croton-on-hudson\">Croton-on-Hudson</a></strong></li>
<li><a href=\"/listings/#none\">Dobbs Ferry</a></li>
<li><strong><a href=\"/listings/#garrison\">Garrison</a></strong></li>
<li><a href=\"/listings/#none\">Hastings-on-Hudson</a></li>
<li><a href=\"/listings/#none\">Irvington</a></li>
</ul>
<ul class=\"list-column-c\">
<li><a href=\"/listings/#none\">Katonah</a></li>
<li><a href=\"/listings/#none\">Larchmont</a></li>
<li><a href=\"/listings/#none\">Mamaronek</a></li>
<li><strong><a href=\"/listings/#mt-kisco\">Mt. Kisco</a></strong></li>
<li><a href=\"/listings/#none\">New Rochelle</a></li>
<li><a href=\"/listings/#none\">North Salem</a></li>
</ul>
<ul class=\"list-column-d\">
<li><strong><a href=\"/listings/#ossining\">Ossining</a></strong></li>
<li><a href=\"/listings/#none\">Peekskill</a></li>
<li><a href=\"/listings/#none\">Pelham</a></li>
<li><strong><a href=\"/listings/#pleasantville\">Pleasantville</a></strong></li>
<li><a href=\"/listings/#none\">Pocantico Hills</a></li>
<li><a href=\"/listings/#none\">Port Chester</a></li>
</ul>
<ul class=\"list-column-e\">
<li><a href=\"/listings/#none\">Pound Ridge</a></li>
<li><a href=\"/listings/#none\">Rye</a></li>
<li><a href=\"/listings/#none\">Rye Brook</a></li>
<li><a href=\"/listings/#none\">Rye Neck</a></li>
<li><a href=\"/listings/#none\">Scarsdale</a></li>
<li><a href=\"/listings/#none\">Sleepy Hollow</a></li>
<li><strong><a href=\"/listings/#south salem\">South Salem</a></strong></li>
</ul>
<ul class=\"list-column-f\">
<li><a href=\"/listings/#none\">Somers</a></li>
<li><a href=\"/listings/#none\">Tarrytown</a></li>
<li><a href=\"/listings/#none\">Yorktown</a></li>
</Br>
<li class=\"jean\">Jean was a real estate
columnist for the Patent
Trader and Provided
Real Estate Tips on radio
station WLNA 1420AM
</li>
</ul>
<div class=\"clearfix clear\"></div>
</div>
";
return $result;
}
function theme_listing_active_shortcode( $params, $content = null) {
$result = "
<h3 style=\"margin-top:60px\">More Listings</h3>
[one_fourth]
[listing title=\"Hudson River Views -Garrison- $699,000 PENDING\" beds=\"3 Bdrms 2 Full Bth \" sqft=\"1,175 Sq Ft\" link=\"/listings/hudson-river-views//\" image=\"/wp-content/uploads/2013/07/559rt9d-thumb.jpg\"]
[/one_fourth]
[one_fourth]
[listing title=\"Hudson River Views and Dream Lifestyle - Croton on Hudson- $1,299,000\" beds=\"4 Bdrms 4 Full Bth 1 Partial \" sqft=\"4,462 Sq Ft\" link=\"/listings//hudson-river-views-dream-lifestyle/\" image=\"/wp-content/uploads/2013/07/1212albanypost-thumb.jpg\"]
[/one_fourth]
[one_fourth]
[listing title=\"The Columns - Chappaqua -$2,795,000\" beds=\"9 Bdrms 6 Full Bth 2 Partial\" sqft=\"7,223 Sq Ft\" link=\"/listings/The-Columns/\" image=\"/wp-content/uploads/2013/06/780King-springThumb.jpg\"]
[/one_fourth]
[one_fourth_last]
[listing title=\"Open Floor Plan - Croton on Hudson -$649,000 \" beds=\"4 Bdrms 3 Full Bth\" sqft=\"2,233 Sq Ft\" link=\"/listings/open-floor-plan/\" image=\"/wp-content/uploads/2013/04/123NOldPost-Croton-thumb1.jpg\"]
[/one_fourth_last]
[one_fourth]
[listing title=\"Deal of the Century -Ossining - $489,000 PENDING\" beds=\"3 Bdrms 2 Full Bth\" sqft=\" 2,658 Sq Ft\" link=\"/listings/deal-of-the-century/\" image=\"/wp-content/uploads/2013/06/459Illingtonthumb.jpg\"]
[/one_fourth]
[one_fourth]
[listing title=\"Artfully expanded- $565,000 Ossining\" beds=\"3 Bdrms 3 Bth\" sqft=\"2,645 Sq Ft\" link=\"/listings/charming-farmhouse-has-been-artfully-expanded-over-the-years\" image=\"/wp-content/jean-custom/properties/Ossining-beautiful-houses-farmhouse-th.jpg\"]
[/one_fourth]
[one_fourth_last]
[listing title=\"On the Pond - Ossining - $685,000\" beds=\"3 Bdrms 2 Full Bth 1 partial\" sqft=\" 2,233 Sq Ft\" link=\"/listings/on-the-pond/\" image=\"/wp-content/uploads/2013/06/1364SpringValleythumb.jpg\"]
[/one_fourth_last]
";
return do_shortcode($result);
}
add_action('init', 'register_shortcodes');
function register_shortcodes() {
add_shortcode( 'listing', 'theme_listing_shortcode' );
add_shortcode( 'listing_sold', 'theme_listing_sold_shortcode' );
add_shortcode('listing_townbox','theme_listing_townbox_shortcode');
add_shortcode( 'listing_active', 'theme_listing_active_shortcode' );
add_shortcode( 'resource', 'theme_resource_shortcode' );
}
add_action('widgets_init', 'register_states_widget');
function register_states_widget() {
register_widget( 'TownList_Widget' );
register_widget( 'AboutJean_Widget' );
}
?>