public static function determine_appropriate_tags() { // Check for memoized return value... if (!empty(self::$page_tags)) { return self::$page_tags; } global $post; $tags = array(); // get page template $page_template = self::determine_page_template(); // determine $meta_tag_designations switch ($page_template) { case 'neighborhood': // Neighborhood / City Page $term = get_term_by('slug', get_query_var('term'), get_query_var('taxonomy')); $tags['title'] = $term->name; $tags['address'] = ""; $descrip = strip_tags($term->description); $descrip_more = ''; if (strlen($descrip) > 155) { $descrip = substr($descrip, 0, 155); $descrip_more = ' ...'; } $descrip = str_replace('"', '', $descrip); $descrip = str_replace("'", '', $descrip); $descripwords = preg_split('/[\\n\\r\\t ]+/', $descrip, -1, PREG_SPLIT_NO_EMPTY); array_pop($descripwords); $tags['description'] = implode(' ', $descripwords) . $descrip_more; $image_array = get_tax_meta($term->term_id, 'image_1'); $tags['image'] = isset($image_array['src']) ? $image_array['src'] : ''; break; case 'search': $tags['itemtype'] = 'http://schema.org/LocalBusiness'; $tags['title'] = 'Search results for: ' . get_search_query(); break; case 'category': $category = get_the_category(); $tags['title'] = $category[0]->cat_name; $tags['description'] = $category[0]->description; break; case 'date': if (is_day()) { $tags['title'] = get_the_date() . ' Archives'; } elseif (is_month()) { $tags['title'] = get_the_date('F Y') . ' Archives'; } elseif (is_year()) { $tags['title'] = get_the_date('Y') . ' Archives'; } else { $tags['title'] = 'Blog Archives'; } break; case 'tag': $tag = single_tag_title('', false); $tags['title'] = $tag . ' tagged posts'; $tags['itemtype'] = 'http://schema.org/Blog'; $tags['description'] = tag_description(); break; case 'author': $tags['author'] = get_the_author(); $tags['itemtype'] = 'http://schema.org/Blog'; $tags['title'] = 'Author Archives: ' . get_the_author_meta('display_name', get_query_var('author')); // $image - should be author's face is one is set... could also check for same name in agent's list too. $tags['description'] = tag_description(); break; case 'property': $content = get_option('placester_listing_layout'); if (isset($content) && $content != '') { return $content; } $html = ''; $listing = PLS_Plugin_API::get_listing_in_loop(); if (is_null($listing)) { break; } // Single Property $tags['itemtype'] = 'http://schema.org/Offer'; if (isset($listing['location']['unit']) && $listing['location']['unit'] != null) { $tags['title'] = @$listing['location']['address'] . ', ' . $listing['location']['unit'] . ' ' . @$listing['location']['locality'] . ', ' . @$listing['location']['region']; $tags['address'] = @$listing['location']['address'] . ', ' . $listing['location']['unit'] . ' ' . @$listing['location']['locality'] . ', ' . @$listing['location']['region']; } else { $tags['title'] = @$listing['location']['address'] . ' ' . @$listing['location']['locality'] . ', ' . @$listing['location']['region']; $tags['address'] = @$listing['location']['address'] . ' ' . @$listing['location']['locality'] . ', ' . @$listing['location']['region']; } $tags['image'] = @$listing['images']['0']['url']; $tags['description'] = esc_html(strip_tags($listing['cur_data']['desc'])); break; case 'agent': $tags['itemtype'] = 'http://schema.org/RealEstateAgent'; $tags['title'] = $post->post_title; break; case 'service': $tags['itemtype'] = 'http://schema.org/ProfessionalService'; $tags['title'] = $post->post_title; break; case 'testimonial': $tags['itemtype'] = 'http://schema.org/Review'; $tags['title'] = $post->post_title; break; case 'community': $tags['title'] = $post->post_title; $tags['description'] = PLS_Format::shorten_excerpt($post, 155); break; case 'single': $tags['itemtype'] = 'http://schema.org/BlogPosting'; $tags['title'] = $post->post_title; if (has_post_thumbnail($post->ID)) { $post_image = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'thumbnail'); $tags['image'] = $post_image[0]; } $tags['description'] = PLS_Format::shorten_excerpt($post, 155); $tags['address'] = @pls_get_option('pls-company-street') . " " . @pls_get_option('pls-company-locality') . ", " . @pls_get_option('pls-company-region'); $tags['author'] = $post->post_author; break; case 'other': default: // Home and other pages $tags['itemtype'] = 'http://schema.org/LocalBusiness'; if (is_home()) { $tags['title'] = pls_get_option('pls-company-name'); } elseif (isset($post)) { $values = get_post_custom($post->ID); // give Yoast SEO a hand setting the title $tags['title'] = !empty($values['_yoast_wpseo_title'][0]) ? $values['_yoast_wpseo_title'][0] : $post->post_title; } else { $tags['title'] = ''; } break; } $meta_data = self::process_defaults($tags); // Memoize this output... self::$page_tags = $meta_data; return $meta_data; }
public function widget($args, $instance) { global $post; if (!empty($post) && isset($post->post_type) && $post->post_type == 'property') { $data = PLS_Plugin_API::get_listing_in_loop(); } else { $data = array(); } // Labels and Values $title = apply_filters('widget_title', empty($instance['title']) ? ' ' : $instance['title']); $success_message = apply_filters('success_message', empty($instance['success_message']) ? 'Thank you for the email, we\'ll get back to you shortly' : $instance['success_message']); $submit_value = apply_filters('button', empty($instance['button']) ? 'Send' : $instance['button']); $email_label = apply_filters('email_label', !isset($instance['email_label']) ? 'Email Address (required)' : $instance['email_label']); $email_value = apply_filters('email_value', !isset($instance['email_value']) ? 'Email Address' : $instance['email_value']); $phone_label = apply_filters('phone_label', !isset($instance['phone_label']) ? 'Phone Number (required)' : $instance['phone_label']); $phone_value = apply_filters('phone_value', !isset($instance['phone_value']) ? 'Phone Number' : $instance['phone_value']); $subject_label = apply_filters('subject_label', !isset($instance['subject_label']) ? 'Subject' : $instance['subject_label']); $subject_value = apply_filters('subject_value', !isset($instance['subject_value']) ? 'Subject' : $instance['subject_value']); $departments_label = apply_filters('departments_label', !isset($instance['departments_label']) ? 'Department' : $instance['departments_label']); $departments_value = apply_filters('departments_value', !isset($instance['departments_value']) ? 'Department' : $instance['departments_value']); $include_name = isset($instance['include_name']) && $instance['include_name'] == "false" ? false : true; $name_label = apply_filters('name_label', !isset($instance['name_label']) ? 'Name (required)' : $instance['name_label']); $name_value = apply_filters('name_value', !isset($instance['name_value']) ? 'Name' : $instance['name_value']); $question_label = apply_filters('question_label', !isset($instance['question_label']) ? 'Questions/Comments' : $instance['question_label']); $question_value = apply_filters('question_value', !isset($instance['question_value']) ? 'Any questions for us?' : $instance['question_value']); $custom_link = apply_filters('custom_link', !isset($instance['custom_link']) ? '' : $instance['custom_link']); $custom_link_target = apply_filters('custom_link_target', !isset($instance['custom_link_target']) ? '_blank' : $instance['custom_link_target']); $form_title = apply_filters('form_title', !isset($instance['form_title']) ? '' : $instance['form_title']); // Reguired Attribute $name_required = isset($instance['name_required']) && $instance['name_required'] == "false" ? false : true; $email_required = isset($instance['email_required']) && $instance['email_required'] == "false" ? true : true; $phone_required = isset($instance['phone_required']) && $instance['phone_required'] == "true" ? true : false; $subject_required = isset($instance['subject_required']) && $instance['subject_required'] == "true" ? true : false; $question_required = isset($instance['question_required']) && $instance['question_required'] == "false" ? false : true; // Error Messages $name_error = isset($instance['name_error']) && $instance['name_error'] != "" ? $instance['name_error'] : "Your name is required."; $email_error = isset($instance['email_error']) && $instance['email_error'] != "" ? $instance['email_error'] : "A valid email is required."; $phone_error = isset($instance['phone_error']) && $instance['phone_error'] != "" ? $instance['phone_error'] : "A valid phone is required."; $question_error = isset($instance['question_error']) && $instance['question_error'] != "" ? $instance['question_error'] : "Don't forget to leave a question or comment."; $subject_error = isset($instance['subject_error']) && $instance['subject_error'] != "" ? $instance['subject_error'] : "What subject would you like to speak about?"; // Classes $container_class = apply_filters('container_class', empty($instance['container_class']) ? '' : $instance['container_class']); $inner_class = apply_filters('inner_class', empty($instance['inner_class']) ? '' : $instance['inner_class']); $inner_containers = apply_filters('inner_containers', empty($instance['inner_containers']) ? '' : $instance['inner_containers']); $textarea_container = apply_filters('textarea_container', !isset($instance['textarea_container']) ? $inner_containers : $instance['textarea_container']); $button_class = apply_filters('button_class', !isset($instance['button_class']) ? 'button-primary' : $instance['button_class']); // Send To Options $email_confirmation = apply_filters('email_confirmation', empty($instance['email_confirmation']) ? false : $instance['email_confirmation']); $send_to_email = apply_filters('send_to_email', !isset($instance['send_to_email']) ? '' : $instance['send_to_email']); $cc_value = apply_filters('cc_value', !isset($instance['cc_value']) ? '' : $instance['cc_value']); $bcc_value = apply_filters('bcc_value', !isset($instance['bcc_value']) ? '' : $instance['bcc_value']); // Lead Capture Cookie $lead_capture_cookie = apply_filters('lead_capture_cookie', !isset($instance['lead_capture_cookie']) ? '' : $instance['lead_capture_cookie']); // Form Options // Get lead capture's force-back theme option from admin $back_on_lc_cancel_option = pls_get_option('pd-lc-force-back'); if (!empty($instance['back_on_lc_cancel'])) { // if option has been set in the contact form call $back_on_lc_cancel = apply_filters('back_on_lc_cancel', !isset($instance['back_on_lc_cancel']) ? '' : $instance['back_on_lc_cancel']); } elseif (isset($back_on_lc_cancel_option)) { // Elseif the theme option is set, let the theme option set the force-back for canceling the lead capture form $back_on_lc_cancel = $back_on_lc_cancel_option; } else { // else, don't force users back $back_on_lc_cancel = 0; } $show_property = isset($instance['show_property']) && !empty($instance['show_property']) ? 1 : 0; $template_url = get_template_directory_uri(); /** Define the default argument array. */ $defaults = array('before_widget' => '<section class="side-ctnr placester_contact ' . $container_class . ' widget">', 'after_widget' => '</section>', 'title' => '', 'before_title' => '<h3>', 'after_title' => '</h3>'); /** Merge the arguments with the defaults. */ $args = wp_parse_args($args, $defaults); extract($args, EXTR_SKIP); ?> <?php pls_do_atomic('contact_form_before_widget'); ?> <?php echo $before_widget; ?> <?php pls_do_atomic('contact_form_before_title'); ?> <?php echo $before_title . $title . $after_title; ?> <?php pls_do_atomic('contact_form_after_title'); ?> <section class="<?php echo $inner_class; ?> common-side-cont placester_contact_form clearfix"> <div class="success"><?php echo $success_message; ?> </div> <form name="widget_contact" action="" method="post"> <?php //this must be included to get additional user data; ?> <input type="hidden" name="ip" value="<?php print $ip = isset($_SERVER['HTTP_X_FORWARDED_FOR']) ? $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR']; ?> "/> <input type="hidden" name="user_agent" value="<?php print $_SERVER['HTTP_USER_AGENT']; ?> "/> <input type="hidden" name="url" value="<?php print 'https://' . $_SERVER["SERVER_NAME"] . $_SERVER["REQUEST_URI"]; ?> "/> <?php if (isset($lead_capture_cookie) && $lead_capture_cookie == true) { ?> <input type="hidden" name="lead_capture_cookie" value="true"> <?php } ?> <input type="hidden" name="id" value="<?php if (isset($data['id'])) { echo $data['id']; } ?> "> <input type="hidden" name="fullAddress" value="<?php echo @self::_get_full_address($data); ?> "> <input type="hidden" name="email_confirmation" value="<?php echo $email_confirmation; ?> "> <input type="hidden" name="send_to_email" value="<?php echo $send_to_email; ?> "> <input type="hidden" name="cc_value" value="<?php echo @$cc_value; ?> "> <input type="hidden" name="bcc_value" value="<?php echo @$bcc_value; ?> "> <input type="hidden" name="back_on_lc_cancel" value="<?php echo @$back_on_lc_cancel; ?> "> <input type="hidden" name="form_submitted" value="0"> <input type="hidden" name="custom_link" value="<?php echo @$custom_link; ?> "> <input type="hidden" name="custom_link_target" value="<?php echo @$custom_link_target; ?> "> <input type="hidden" name="form_title" value="<?php echo @$form_title; ?> "> <?php if (!empty($include_name)) { ?> <?php echo empty($instance['inner_containers']) ? '' : '<div class="' . $instance['inner_containers'] . '">'; ?> <label class="required" for="name"><?php echo $name_label; ?> </label> <input class="required" id="name" placeholder="<?php echo $name_value; ?> " type="text" name="name" <?php echo $name_required == true ? 'required="required"' : ''; ?> <?php echo !empty($name_error) ? 'data-message="' . $name_error . '"' : ''; ?> /> <?php echo empty($instance['inner_containers']) ? '' : '</div>'; ?> <?php } ?> <?php echo empty($instance['inner_containers']) ? '' : '<div class="' . $instance['inner_containers'] . '">'; ?> <label class="required" for="email"><?php echo $email_label; ?> </label><input class="required" id="email" placeholder="<?php echo $email_value; ?> " type="email" name="email" <?php echo $email_required == true ? 'required="required"' : ''; ?> <?php echo !empty($email_error) ? 'data-message="' . $email_error . '"' : ''; ?> /> <?php echo empty($instance['inner_containers']) ? '' : '</div>'; ?> <?php if (!empty($instance['phone_number'])) { ?> <?php echo empty($instance['inner_containers']) ? '' : '<div class="' . $instance['inner_containers'] . '">'; ?> <label class="required" for="phone"><?php echo $phone_label; ?> </label><input class="required" id="phone" placeholder="<?php echo $phone_value; ?> " type="text" name="phone" <?php echo $phone_required == true ? 'required="required"' : ''; ?> <?php echo !empty($phone_error) ? 'data-message="' . $phone_error . '"' : ''; ?> /> <?php echo empty($instance['inner_containers']) ? '' : '</div>'; ?> <?php } ?> <?php if (!empty($instance['subject'])) { ?> <?php echo empty($instance['inner_containers']) ? '' : '<div class="' . $instance['inner_containers'] . '">'; ?> <label class="required" for="subject"><?php echo $subject_label; ?> </label><input class="required" id="subject" placeholder="<?php echo $subject_value; ?> " type="text" name="subject" <?php echo $subject_required == true ? 'required="required"' : ''; ?> <?php echo !empty($subject_error) ? 'data-message="' . $subject_error . '"' : ''; ?> /> <?php echo empty($instance['inner_containers']) ? '' : '</div>'; ?> <?php } ?> <?php if (!empty($instance['departments'])) { ?> <?php echo empty($instance['inner_containers']) ? '' : '<div class="' . $instance['inner_containers'] . '">'; ?> <label class="required" for="department"><?php echo $departments_label; ?> </label> <?php $departments = explode(',', $instance['departments']); ?> <select id="department" placeholder="<?php echo $departments_value; ?> " name="department"> <?php foreach ($departments as $department) { ?> <option value="<?php echo $department; ?> "><?php echo $department; ?> </option> <?php } ?> </select> <?php echo empty($instance['inner_containers']) ? '' : '</div>'; ?> <?php } ?> <?php if ($show_property == 1) { ?> <?php $full_address = @self::_get_full_address($data); if (!empty($full_address)) { ?> <?php echo empty($instance['inner_containers']) ? '' : '<div class="' . $instance['inner_containers'] . '">'; ?> <label>Property</label><span class="info"><?php echo str_replace("\n", " ", $full_address); ?> </span> <?php echo empty($instance['inner_containers']) ? '' : '</div>'; ?> <?php } ?> <?php } ?> <?php echo empty($instance['textarea_container']) ? '' : '<div class="' . $instance['textarea_container'] . '">'; ?> <label for="question"><?php echo $question_label; ?> </label> <textarea rows="5" id="question" name="question" placeholder="<?php echo $question_value; ?> " <?php echo $question_required == true ? 'required="required"' : ''; ?> <?php echo !empty($question_error) ? 'data-message="' . $question_error . '"' : ''; ?> ></textarea> <?php echo empty($instance['textarea_container']) ? '' : '</div>'; ?> <input type="submit" value="<?php echo $submit_value; ?> " class="<?php echo $button_class; ?> " /> <div class="pls-contact-form-loading" style='display:none;'> <div id="medium-spinner"><div class="bar1"></div><div class="bar2"></div><div class="bar3"></div><div class="bar4"></div><div class="bar5"></div><div class="bar6"></div><div class="bar7"></div><div class="bar8"></div></div> </div> </form> </section> <div class="separator"></div> <?php echo $after_widget; ?> <?php pls_do_atomic('contact_form_after_widget'); ?> <?php }
public static function init($content) { global $post; if ($post->post_type == 'property') { $html = ''; $listing_data = PLS_Plugin_API::get_listing_in_loop(); // re-order images by assigned order $property_images = is_array($listing_data['images']) ? $listing_data['images'] : array(); usort($property_images, array('PLS_Partials_Property_Details', 'sort_images_by_order')); // reset the images $listing_data['images'] = $property_images; // Problems with API key or inconsistent data lead to notices due to null listings if (!is_null($listing_data)) { $listing_data['location']['full_address'] = $listing_data['location']['address'] . ' ' . $listing_data['location']['locality'] . ' ' . $listing_data['location']['region']; // This has to happen here to ensure it's not filtered out by whatever might be filtering this output... echo PLS_Plugin_API::log_snippet_js('listing_view', array('prop_id' => $listing_data['id'])); ob_start(); ?> <h2 itemprop="name" itemscope itemtype="http://schema.org/PostalAddress"> <span itemprop="streetAdress"><?php echo $listing_data['location']['address']; ?> </span> <span itemprop="addressLocality"><?php echo $listing_data['location']['locality']; ?> </span>, <span itemprop="addressRegion"><?php echo $listing_data['location']['region']; ?> </span> </h2> <?php echo PLS_Plugin_API::placester_favorite_link_toggle(array('property_id' => $listing_data['id'], 'add_text' => 'Add To Favorites', 'remove_text' => 'Remove From Favorites')); ?> <p itemprop="price"><?php echo PLS_Format::number($listing_data['cur_data']['price'], array('abbreviate' => false, 'add_currency_sign' => true)); ?> <span><?php echo PLS_Format::translate_lease_terms($listing_data); ?> </span></p> <p class="listing_type"><?php if (isset($listing_data['zoning_types'][0]) && isset($listing_data['purchase_types'][0])) { echo ucwords(@$listing_data['zoning_types'][0] . ' ' . @$listing_data['purchase_types'][0]); } ?> </p> <div class="clearfix"></div> <?php if ($listing_data['images']) { ?> <div class="theme-default property-details-slideshow"> <?php echo PLS_Image::load($listing_data['images'][0]['url'], array('resize' => array('w' => 590, 'h' => 300), 'fancybox' => false, 'as_html' => true, 'html' => array('itemprop' => 'image'))); ?> <?php // echo PLS_Slideshow::slideshow( array( 'anim_speed' => 1000, 'pause_time' => 15000, 'control_nav' => true, 'width' => 620, 'height' => 300, 'context' => 'home', 'data' => PLS_Slideshow::prepare_single_listing($listing_data) ) ); ?> </div> <div class="details-wrapper grid_8 alpha"> <div id="slideshow" class="clearfix theme-default left bottomborder"> <div class="grid_8 alpha"> <ul class="property-image-gallery grid_8 alpha"> <?php foreach ($listing_data['images'] as $images) { ?> <li><?php echo PLS_Image::load($images['url'], array('resize' => array('w' => 100, 'h' => 75), 'fancybox' => true, 'as_html' => true, 'html' => array('itemprop' => 'image'))); ?> </li> <?php } ?> </ul> </div> </div> </div> <?php } ?> <div class="basic-details grid_8 alpha"> <ul> <li><span>Beds: </span><?php echo $listing_data['cur_data']['beds']; ?> </li> <li><span>Baths: </span><?php echo $listing_data['cur_data']['baths']; ?> </li> <?php if (isset($listing_data['cur_data']['half_baths']) && $listing_data['cur_data']['half_baths'] != null) { ?> <li><span>Half Baths: </span><?php echo $listing_data['cur_data']['half_baths']; ?> </li> <?php } ?> <li><span>Square Feet: </span><?php echo PLS_Format::number($listing_data['cur_data']['sqft'], array('abbreviate' => false, 'add_currency_sign' => false)); ?> </li> <?php if (isset($listing_data['cur_data']['avail_on']) && $listing_data['cur_data']['avail_on'] != null) { ?> <li itemprop="availability"><span>Available: </span><?php echo @$listing_data['cur_data']['avail_on']; ?> </li> <?php } ?> <li>Property Type: <?php echo PLS_Format::translate_property_type($listing_data); ?> </li> <?php if (isset($listing_data['rets']) && isset($listing_data['rets']['mls_id'])) { ?> <li><span>MLS #: </span><?php echo $listing_data['rets']['mls_id']; ?> </li> <?php } ?> </ul> </div> <div class="details-wrapper grid_8 alpha"> <h3>Property Description</h3> <?php if (!empty($listing_data['cur_data']['desc'])) { ?> <p itemprop="description"><?php echo $listing_data['cur_data']['desc']; ?> </p> <?php } else { ?> <p> No description available </p> <?php } ?> </div> <?php $amenities = PLS_Format::amenities_but($listing_data, array('half_baths', 'beds', 'baths', 'url', 'sqft', 'avail_on', 'price', 'desc')); ?> <?php if (!empty($amenities['list'])) { ?> <div class="amenities-section grid_8 alpha"> <h3>Listing Amenities</h3> <ul> <?php $amenities['list'] = PLS_Format::translate_amenities($amenities['list']); ?> <?php foreach ($amenities['list'] as $amenity => $value) { ?> <li><span><?php echo $amenity; ?> </span> <?php echo $value; ?> </li> <?php } ?> </ul> </div> <?php } ?> <?php if (!empty($amenities['ngb'])) { ?> <div class="amenities-section grid_8 alpha"> <h3>Local Amenities</h3> <ul> <?php $amenities['ngb'] = PLS_Format::translate_amenities($amenities['ngb']); ?> <?php foreach ($amenities['ngb'] as $amenity => $value) { ?> <li><span><?php echo $amenity; ?> </span> <?php echo $value; ?> </li> <?php } ?> </ul> </div> <?php } ?> <?php if (!empty($amenities['uncur'])) { ?> <div class="amenities-section grid_8 alpha"> <h3>Custom Amenities</h3> <ul> <?php $amenities['uncur'] = PLS_Format::translate_amenities($amenities['uncur']); ?> <?php foreach ($amenities['uncur'] as $amenity => $value) { ?> <li><span><?php echo $amenity; ?> </span> <?php echo $value; ?> </li> <?php } ?> </ul> </div> <?php } ?> <div class="map-wrapper grid_8 alpha"> <h3>Property Map</h3> <script type="text/javascript"> jQuery(document).ready(function( $ ) { var map = new Map(); var listing = new Listings({ single_listing : <?php echo json_encode($listing_data); ?> , map: map }); map.init({ type: 'single_listing', listings: listing, lat : <?php echo json_encode($listing_data['location']['coords'][0]); ?> , lng : <?php echo json_encode($listing_data['location']['coords'][1]); ?> , zoom : 14 }); listing.init(); }); </script> <div class="map"> <?php echo PLS_Map::dynamic($listing_data, array('lat' => $listing_data['location']['coords'][0], 'lng' => $listing_data['location']['coords'][1], 'height' => 250, 'zoom' => 16)); ?> </div> </div> <?php PLS_Listing_Helper::get_compliance(array('context' => 'listings', 'agent_name' => @$listing_data['rets']['aname'], 'office_name' => @$listing_data['rets']['oname'])); ?> <?php // Store output... $html = ob_get_clean(); } // Enable Lead Capture $lead_capture_enable = pls_get_option('pd-lc-enable'); if ($lead_capture_enable == 1) { ob_start(); ?> <!-- Lead Capture Shortcode --> <div style="display:none;" href="#" id="property-details-lead-capture"> <?php do_shortcode('[lead_capture_template lead_capture_cookie="true" name_required="true" question_required="false" width="440"]'); ?> </div> <?php // Store output... $lead_capture_block = ob_get_clean(); } $html = apply_filters('property_details_filter', $html, $listing_data); // Add lead capture block to HTML if (isset($lead_capture_block)) { $html = $lead_capture_block . $html; } return $html; } // Post is not of type property, so just return what was initially passed in... return $content; }