public static function sendToAdmin(array $data) { // Define properties $data = self::sanitize($data); $site = get_option("blogname"); $from = "System Message <" . get_option("admin_email") . ">"; $to = get_option("admin_email"); // Create text $subject = "Customer used form on the site \"{$site}\""; $message = Template::renderPart("email/form", ['site' => $site, 'data' => $data]); // Send mail $Mailgun = new Mailgun(get_option("mailgun_key")); $result = $Mailgun->sendMessage(get_option("mailgun_domain"), ['from' => $from, 'to' => $to, 'subject' => $subject, 'html' => $message]); // Return sending result return $result; }
public static function show($params = null) { // Init libs $FeaturedProperties = new Structures\FeaturedProperties(); $Properties = new Structures\Properties(); // Define actual action $action = isset($_REQUEST['action']) && in_array($_REQUEST['action'], static::getAllowedActions()) ? $_REQUEST['action'] : "show"; // Do the action if ($action !== "show") { static::$action(); } // Get featured properties $featured_properties = $FeaturedProperties->getDetailed(); // Prepare vars $vars = (object) ['positive_messages' => static::getPositiveMessages(), 'negative_messages' => static::getNegativeMessages(), 'featured_properties' => $featured_properties, 'searched_mls_id' => isset($_POST['searched_mls_id']) ? $_POST['searched_mls_id'] : ""]; // Show content echo \Vividcrestrealestate\Core\Template::renderPart(static::getView(), $vars); }
public static function show($params = null) { // Define actual action $action = isset($_POST['action']) && in_array($_POST['action'], static::getAllowedActions()) ? $_POST['action'] : "show"; // Do the action if ($action !== "show") { static::$action(); } // Get options $options = static::getStoredOptions(); // Combine vars $vars = !empty($params) ? Ancillary::mergeObjects($params, $options) : $options; // Get messages $vars->positive_messages = static::getPositiveMessages(); $vars->negative_messages = static::getNegativeMessages(); // Show content echo \Vividcrestrealestate\Core\Template::renderPart(static::getView(), $vars); }
"> <h4><?php echo $post->post_title; ?> </h4> <p> <?php echo generate_excerpt(wp_strip_all_tags($post->post_content), "...", 500); ?> </p> </a> </div> <?php } ?> <?php } ?> </div> <?php echo \Vividcrestrealestate\Core\Template::renderPart("aside"); ?> </div> </section>
<section class="universal-wrapper map-block-wrapper clearfix"> <div id="map" class="map--wide map--main"></div> <div class="universal-wrapper--inner"> <?php echo \Vividcrestrealestate\Core\Template::renderPart("search_form", ['search' => $search]); ?> </div> </section> <section class="universal-wrapper content-block-wrapper"> <div class="universal-wrapper--inner clearfix two_cols"> <div class="title__border-bottom"> <h1>Recent Properties</h1> </div> <div class="universal_line-wrapper four__cols"> <?php foreach ($recent_properties as $i => $recent_property) { ?> <div class="universal__cell property slidered-property <?php echo $i == 0 ? "property--first" : ""; ?> " data-property-id="<?php echo $recent_property->id; ?> "> <div class="property__image"> <img src="<?php echo $recent_property->main_image; ?> " /> </div> <div class="property__info-line">
<section class="universal-wrapper breadcrumbs-block-wrapper"> <div class="universal-wrapper--inner"> <?php echo \Vividcrestrealestate\Core\Template::renderBreadcrumbs(); ?> </div> </section> <section class="universal-wrapper block-wrapper--light-grey"> <div class="universal-wrapper--inner search_form--wide"> <?php echo \Vividcrestrealestate\Core\Template::renderPart("search_form_horizontal", ['action' => "/map", 'search' => $search]); ?> </div> </section> <section class="universal-wrapper universal-wrapper--transparent"> <div class="universal-wrapper--inner clearfix two_cols"> <div class="col--right"> <ul> <li> <a href="/properties" class="view-toggle"> <i class="fa fa-th"></i> Gallery </a> </li> <li class="current"> <a href="/map" class="view-toggle" > <i class="fa fa-map-marker"></i>
<section id="menu-mobile"> <div class="menu-toggle">menu <i class="fa fa-bars"></i> </div> <nav class="menu-mobile"> <?php wp_nav_menu(['theme_location' => "top-menu"]); ?> </nav> </section> </header> <!-- Content --> <?php echo \Vividcrestrealestate\Core\Template::renderPart($part, $data); ?> <section class="universal-wrapper colored__line colored__line--blue"> <div class="universal-wrapper--inner"> <h1>Call us today! <a href="tel:416-939-6376">416-939-6376</a></h1> </div> </section> <footer class="universal-wrapper footer-block-wrapper"> <div class="universal-wrapper--inner"> <div class="universal_line-wrapper three__cols"> <div class="universal__cell footer footer--first"> <a href="<?php echo site_url(); ?>
} ?> </ul> <p class="property__description-city"> <strong><?php echo $property->address; ?> </strong> </p> <p> <?php echo generate_excerpt($property->description, "", 100); ?> </p> </a> </div> </div> <?php } ?> </div> </div> <!-- Bottom Pagination --> <?php echo \Vividcrestrealestate\Core\Template::renderPart("pagination", ['pagination' => $pagination]); ?> </section>