예제 #1
0
 /**
  * Cookie policy page
  *
  * @access public
  * @return void
  */
 public static function cookie_policy()
 {
     $cookie_policy_page_id = get_theme_mod('realia_general_cookie_policy_page', null);
     $under_construction = get_theme_mod('realia_general_enable_under_construction', false);
     if ($under_construction) {
         return;
     }
     if (!empty($_COOKIE['cookie-policy']) && $_COOKIE['cookie-policy'] == true) {
         return;
     }
     if (!empty($cookie_policy_page_id)) {
         include Realia_Template_Loader::locate('cookie-policy');
     }
 }
예제 #2
0
    ?>
			</header><!-- .page-header -->

			<?php 
    /**
     * realia_before_agency_archive
     */
    do_action('realia_before_agency_archive');
    ?>

			<?php 
    while (have_posts()) {
        the_post();
        ?>
				<?php 
        echo Realia_Template_Loader::load('agencies/row');
        ?>
			<?php 
    }
    ?>

			<?php 
    /**
     * realia_after_agency_archive
     */
    do_action('realia_after_agency_archive');
    ?>

			<?php 
    the_posts_pagination(array('prev_text' => __('Previous page', 'realia'), 'next_text' => __('Next page', 'realia'), 'before_page_number' => '<span class="meta-nav screen-reader-text">' . __('Page', 'realia') . ' </span>'));
    ?>
예제 #3
0
}
?>
">
		<?php 
dynamic_sidebar('sidebar-content-top');
?>

		<?php 
if (have_posts()) {
    ?>
			<?php 
    while (have_posts()) {
        the_post();
        ?>
				<?php 
        echo Realia_Template_Loader::load('content-agency');
        ?>
			<?php 
    }
    ?>

			<?php 
    the_posts_pagination(array('prev_text' => __('Previous page', 'realia'), 'next_text' => __('Next page', 'realia'), 'before_page_number' => '<span class="meta-nav screen-reader-text">' . __('Page', 'realia') . ' </span>'));
    ?>
		<?php 
} else {
    ?>
			<?php 
    get_template_part('content', 'none');
    ?>
		<?php 
예제 #4
0
 /**
  * Import template
  *
  * @access public
  * @return void
  */
 public static function import()
 {
     echo Realia_Template_Loader::load('misc/import');
 }
예제 #5
0
                $index++;
                ?>
					<?php 
            }
            ?>
				</div><!-- /.row -->
			<?php 
        } elseif ($instance['display'] == 'small') {
            ?>
				<?php 
            while (have_posts()) {
                the_post();
                ?>
				
					<?php 
                include Realia_Template_Loader::locate('properties/small');
                ?>
				<?php 
            }
            ?>
			<?php 
        }
        ?>
		</div>
	<?php 
    } else {
        ?>
		<div class="alert alert-warning">
			<?php 
        echo __('No se encontraron inmuebles.', 'realia');
        ?>
예제 #6
0
<?php

if (!post_password_required()) {
    ?>
    <div id="reviews" class="reviews-area">
        <?php 
    comment_form(array('title_reply' => __('Post New Review', 'realia'), 'label_submit' => __('Submit Review', 'realia'), 'comment_notes_before' => false, 'comment_notes_after' => false, 'comment_field' => Realia_Template_Loader::load('reviews/review-field-comment')));
    ?>

        <?php 
    if (have_comments()) {
        ?>
            <h2 class="review-title"><?php 
        echo __('User Reviews', 'realia');
        ?>
</h2>

            <ol class="review-list">
                <?php 
        wp_list_comments(array('style' => 'ol', 'short_ping' => true, 'avatar_size' => 70, 'callback' => 'Realia_Reviews::get_review_template'));
        ?>
            </ol><!-- /.comment-list -->

            <?php 
        if (get_comment_pages_count() > 1 && get_option('page_comments')) {
            ?>
                <nav id="comment-nav-below" class="navigation review-navigation" role="navigation">
                    <div class="nav-previous"><?php 
            previous_comments_link(__('Older Reviews', 'realia'));
            ?>
</div>
 /**
  * Backend
  *
  * @access public
  * @param array $instance
  * @return void
  */
 function form($instance)
 {
     include Realia_Template_Loader::locate('widgets/cover-admin');
 }
예제 #8
0
 /**
  * Additional fields for logged in user
  *
  * @access public
  * @return void
  */
 public static function additional_fields()
 {
     if (in_array(get_post_type(), Realia_Reviews::$allowed_post_types)) {
         $commenter = wp_get_current_commenter();
         echo Realia_Template_Loader::load('reviews/review-field-rating', array('commenter' => $commenter));
     }
 }
예제 #9
0
}
?>
">
		<?php 
dynamic_sidebar('sidebar-content-top');
?>

		<?php 
if (have_posts()) {
    ?>
			<?php 
    while (have_posts()) {
        the_post();
        ?>
				<?php 
        echo Realia_Template_Loader::load('content-property');
        ?>
			<?php 
    }
    ?>

			<?php 
    the_posts_pagination(array('prev_text' => __('Previous page', 'realia'), 'next_text' => __('Next page', 'realia'), 'before_page_number' => '<span class="meta-nav screen-reader-text">' . __('Page', 'realia') . ' </span>'));
    ?>
		<?php 
} else {
    ?>
			<?php 
    get_template_part('content', 'none');
    ?>
		<?php 
 /**
  * Catch template and render JSON output
  *
  * @access public
  * @return string
  */
 public static function catch_template()
 {
     if (get_query_var('properties-feed')) {
         header('HTTP/1.0 200 OK');
         header('Content-Type: application/json');
         $property_groups = array();
         $data = array();
         Realia_Query::loop_properties_all();
         Realia_Query::loop_properties_filter();
         if (have_posts()) {
             while (have_posts()) {
                 the_post();
                 // Property GPS positions. We will use these values
                 // for genearating unique md5 hash for property groups.
                 $location = get_post_meta(get_the_ID(), REALIA_PROPERTY_PREFIX . 'map_location', true);
                 $latitude = $location['latitude'];
                 $longitude = $location['longitude'];
                 // Build on array of property groups. We need to know how
                 // many and which properties are at the same position.
                 if (!empty($latitude) && !empty($longitude)) {
                     $hash = sha1($latitude . $longitude);
                     $property_groups[$hash][] = get_the_ID();
                 }
             }
         }
         wp_reset_query();
         foreach ($property_groups as $group) {
             $args = array('post_type' => 'property', 'posts_per_page' => -1, 'post_status' => 'publish', 'post__in' => $group);
             query_posts($args);
             if (have_posts()) {
                 // Group of properties at the same position so we will process
                 // property loop inside the template.
                 if (count($group) > 1) {
                     $location = get_post_meta($group[0], REALIA_PROPERTY_PREFIX . 'map_location', true);
                     $latitude = $location['latitude'];
                     $longitude = $location['longitude'];
                     // Marker
                     ob_start();
                     $template = Realia_Template_Loader::locate('google-map-infowindow-group');
                     include $template;
                     $output = ob_get_contents();
                     ob_end_clean();
                     $content = str_replace(array("\r\n", "\n", "\t"), '', $output);
                     // Infowindow
                     ob_start();
                     $template = Realia_Template_Loader::locate('google-map-marker-group');
                     include $template;
                     $output = ob_get_contents();
                     ob_end_clean();
                     $marker_content = str_replace(array("\r\n", "\n", "\t"), '', $output);
                     // Just one property. We can get current post here.
                 } else {
                     the_post();
                     $location = get_post_meta(get_the_ID(), REALIA_PROPERTY_PREFIX . 'map_location', true);
                     $latitude = $location['latitude'];
                     $longitude = $location['longitude'];
                     $content = str_replace(array("\r\n", "\n", "\t"), '', Realia_Template_Loader::load('google-map-infowindow'));
                     $marker_content = str_replace(array("\r\n", "\n", "\t"), '', Realia_Template_Loader::load('google-map-marker'));
                 }
                 // Array of values passed into markers[] array in jquery-google-map.js library
                 $data[] = array('latitude' => $latitude, 'longitude' => $longitude, 'content' => $content, 'marker_content' => $marker_content);
             }
             wp_reset_query();
         }
         echo json_encode($data);
         exit;
     }
 }
 /**
  * Backend
  *
  * @access public
  * @param array $instance
  * @return void
  */
 function form($instance)
 {
     include Realia_Template_Loader::locate('widgets/properties-map-admin');
 }
 /**
  * Backend
  *
  * @access public
  * @param array $instance
  * @return void
  */
 function form($instance)
 {
     include Realia_Template_Loader::locate('widgets/agent-assigned-admin');
 }
            $template = REALIA_DIR . "/templates/{$name}.php";
        }
        // Nothing found
        if (empty($template)) {
            throw new Exception("Template {$name}.php not found.");
        }
        return $template;
    }
    /**
     * Loads template content
     *
     * @param string $name
     * @param array $args
     * @return string
     * @throws Exception
     */
    public static function load($name, $args = array())
    {
        if (is_array($args) && count($args) > 0) {
            extract($args, EXTR_SKIP);
        }
        $path = self::locate($name);
        ob_start();
        include $path;
        $result = ob_get_contents();
        ob_end_clean();
        return $result;
    }
}
Realia_Template_Loader::init();
 /**
  * Backend
  *
  * @access public
  * @param array $instance
  * @return void
  */
 function form($instance)
 {
     include Realia_Template_Loader::locate('widgets/carousel-small-admin');
 }
예제 #15
0
			
			</div><!-- /.row -->
		<?php 
        } elseif ($instance['display'] == 'large') {
            ?>
			<?php 
            while (have_posts()) {
                the_post();
                ?>
			
				<div class="col-sm-<?php 
                echo 12 / $instance['per_row'];
                ?>
">
					<?php 
                include Realia_Template_Loader::locate('agents/simple');
                ?>
				</div><!-- /.col-* -->
			<?php 
            }
            ?>
			
		<?php 
        }
        ?>
		
	<?php 
    } else {
        ?>
		<div class="alert alert-warning">
			<?php 
예제 #16
0
<?php 
$agent = Realia_Query::get_property_agent();
if (!empty($agent)) {
    ?>
    <?php 
    query_posts(array('post_type' => 'agent', 'post__in' => array($agent->ID)));
    ?>
    <?php 
    if (have_posts()) {
        ?>
        <?php 
        while (have_posts()) {
            the_post();
            ?>
            <?php 
            include Realia_Template_Loader::locate('agents/small');
            ?>
        <?php 
        }
        ?>
    <?php 
    }
    ?>
    <?php 
    wp_reset_query();
}
?>

<?php 
echo wp_kses($args['after_widget'], wp_kses_allowed_html('post'));
 /**
  * Backend
  *
  * @access public
  * @param array $instance
  * @return void
  */
 function form($instance)
 {
     include Realia_Template_Loader::locate('widgets/horizontal-filter-admin');
 }
예제 #18
0
 /**
  * Favorites
  *
  * @access public
  * @param $atts
  * @return void
  */
 public static function favorites($atts)
 {
     if (!is_user_logged_in()) {
         echo Realia_Template_Loader::load('misc/not-allowed');
         return;
     }
     echo Realia_Template_Loader::load('misc/favorites');
 }
예제 #19
0
    ?>
			<header class="page-header">
				<?php 
    the_archive_title('<h1 class="page-title">', '</h1>');
    ?>
				<?php 
    the_archive_description('<div class="taxonomy-description">', '</div>');
    ?>
			</header><!-- .page-header -->

			<?php 
    while (have_posts()) {
        the_post();
        ?>
				<?php 
        echo Realia_Template_Loader::load('properties/row');
        ?>
			<?php 
    }
    ?>

			<?php 
    the_posts_pagination(array('prev_text' => __('Previous page', 'realia'), 'next_text' => __('Next page', 'realia'), 'before_page_number' => '<span class="meta-nav screen-reader-text">' . __('Page', 'realia') . ' </span>'));
    ?>
		<?php 
} else {
    ?>
			<?php 
    get_template_part('content', 'none');
    ?>
		<?php 
예제 #20
0
 /**
  * Property views template
  *
  * @access public
  * @return void
  */
 public static function property_views_template()
 {
     echo Realia_Template_Loader::load('statistics/property-views');
 }
예제 #21
0
파일: row.php 프로젝트: jhonrsalcedo/sitio
				<header class="entry-header">
					<h2 class="property-row-title entry-title">
						<a href="<?php 
the_permalink();
?>
"><?php 
the_title();
?>
</a>

			            <span class="property-row-title-actions">
			                <?php 
include Realia_Template_Loader::locate('favorites-action');
?>
			                <?php 
include Realia_Template_Loader::locate('compare-action');
?>
			            </span><!-- /.property-row-title-actions -->
					</h2>
				</header>

				<div class="entry-content">
					<div class="property-row-location">
						<?php 
echo Realia_Query::get_property_location_name();
?>
					</div>

					<div class="property-row-body">
						<p><?php 
the_excerpt();