-
Notifications
You must be signed in to change notification settings - Fork 0
/
property-history-search.php
55 lines (47 loc) · 1.95 KB
/
property-history-search.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
<?php
/*
Plugin Name: Property History Search
Description: Custom shortcode for Property History Search Widget. Use [property_history_search] in posts or pages.
Version: 1.0
Author: Gregg Franklin
Author URI: http://greggfranklin.com
*/
/*
* Provided by BuildFax
* URL: http://www.buildfax.com/widget/widget20121023.html
*/
/* Add stylesheet
* You can use your own style sheet
*/
function phs_css(){
echo apply_filters( 'reset', '<link rel="stylesheet" href="http://www.buildfax.com/media/css/reset_compressed.css" type="text/css" />' );
echo apply_filters( 'phs_css', '<link rel="stylesheet" href="http://www.buildfax.com/widget/widget_styles.css" type="text/css" />' );
}
add_action( 'wp_head', 'phs_css' );
// Add scripts
function phs_scripts(){
wp_enqueue_script('latest', 'http://www.buildfax.com/media/js/jquery.latest.js', __FILE__);
wp_enqueue_script('tools', 'http://www.buildfax.com/media/js/jquery.tools.min.js', __FILE__);
wp_enqueue_script('custom', plugins_url('/property-history-search/scripts/phs.js'), __FILE__);
}
add_action( 'wp_head', 'phs_scripts' );
// Create shortcode
function gf_property_history_search() {
$code ='<div id="singlereportwidget">
<h4>Property History Search</h4>
<div id="bfsearchwidget">
<p class="wdgt">Search an address below to determine whether a BuildFax Permitted Construction History Report™ is available for that property.</p>
<div id="bfreport"></div>
<p class="wdgt"><small>Enter the address and ZIP in this format: 16 Biltmore Ave, 28801</small></p>
</div><!-- #bfreport -->
</div><!-- #bfsearchwidget -->
<div id="bfoverlay">
<div id="bfoverlay_close" class="close">X</div>
<div id="bfoverlay_topcontent"> </div>
<div id="bfoverlay_bottomcontent"> </div>
</div><!-- #bfoverlay -->
</div><!-- #singlereportwidget -->';
return $code;
}
add_shortcode( 'property_history_search', 'gf_property_history_search' );
?>