<header class="entry-header"> <?php if (is_single()) { the_title('<h1 class="entry-title">', '</h1>'); } else { the_title(sprintf('<h2 class="entry-title"><a href="%s" rel="bookmark">', esc_url(get_permalink())), '</a></h2>'); } ?> </header><!-- .entry-header --> <div class="entry-content"> <div class="property-overview"> <dl> <?php $price = Realia_Price::get_property_price(); ?> <?php if (!empty($price)) { ?> <dt><?php echo __('Precio', 'realia'); ?> </dt><dd><?php echo wp_kses($price, wp_kses_allowed_html('post')); ?> </dd> <?php } ?>
<strong><?php echo esc_attr($type); ?> </strong> </div><!-- /.property-box-meta-item --> <?php } ?> <?php if (!empty($price)) { ?> <div class="property-row-meta-item"> <span><i class="fa fa-money"></i></span> <strong><?php echo Realia_Price::get_property_price(); ?> </strong> </div><!-- /.property-box-meta-item --> <?php } ?> <?php if (!empty($area)) { ?> <div class="property-row-meta-item"> <span><i class="fa fa-arrows"></i></span> <strong><?php echo esc_attr($area);
?> </tr> </thead> <tbody> <!-- PRICE --> <tr> <td class="compare-table-label"><?php echo __('Precio', 'realia'); ?> </td> <?php foreach ($query->posts as $post) { ?> <td class="compare-table-col"><?php echo Realia_Price::get_property_price($post->ID); ?> </td> <?php } ?> </tr> <!-- TYPE --> <tr> <td class="compare-table-label"><?php echo __('Tipo', 'realia'); ?> </td> <?php foreach ($query->posts as $post) { ?>
/** * Custom admin columns implementation * * @access public * @param string $column * @return array */ public static function custom_columns_manage($column) { switch ($column) { case 'thumbnail': if (has_post_thumbnail()) { the_post_thumbnail('thumbnail', array('class' => 'attachment-thumbnail attachment-thumbnail-small')); } else { echo '-'; } break; case 'price': $price = Realia_Price::get_property_price(get_the_ID()); if (!empty($price)) { echo wp_kses($price, wp_kses_allowed_html('post')); } else { echo '-'; } break; case 'location': $terms = get_the_terms(get_the_ID(), 'locations'); if (!empty($terms)) { $location = array_shift($terms); echo sprintf('<a href="?post_type=property&location=%s">%s</a>', $location->slug, $location->name); } else { echo '-'; } break; case 'type': $terms = get_the_terms(get_the_ID(), 'property_types'); if (is_array($terms)) { $property_type = array_shift($terms); echo sprintf('<a href="?post_type=property&property_type=%s">%s</a>', $property_type->slug, $property_type->name); } else { echo '-'; } break; case 'contract': $terms = get_the_terms(get_the_ID(), 'contracts'); if (!empty($terms)) { $contract_type = array_shift($terms); echo sprintf('<a href="?post_type=property&contract=%s">%s</a>', $contract_type->slug, $contract_type->name); } else { echo '-'; } break; case 'sticky': $sticky = get_post_meta(get_the_ID(), REALIA_PROPERTY_PREFIX . 'sticky', true); if (!empty($sticky)) { echo '<div class="dashicons-before dashicons-yes green"></div>'; } else { echo '<div class="dashicons-before dashicons-no red"></div>'; } break; case 'featured': $featured = get_post_meta(get_the_ID(), REALIA_PROPERTY_PREFIX . 'featured', true); if (!empty($featured)) { echo '<div class="dashicons-before dashicons-yes green"></div>'; } else { echo '<div class="dashicons-before dashicons-no red"></div>'; } break; case 'reduced': $featured = get_post_meta(get_the_ID(), REALIA_PROPERTY_PREFIX . 'reduced', true); if (!empty($featured)) { echo '<div class="dashicons-before dashicons-yes green"></div>'; } else { echo '<div class="dashicons-before dashicons-no red"></div>'; } break; case 'views': echo __('Total', 'realia') . ': ' . Realia_Statistics::property_views_get_total() . '<br>'; echo __('Weekly', 'realia') . ': '; $progress = Realia_Statistics::property_views_get_weekly_progress(); if ($progress < 0) { echo '<span class="red">' . $progress . '%</span>'; } elseif ($progress > 0) { echo '<span class="green">' . $progress . '%</span>'; } else { echo '<span>' . $progress . '%</span>'; } break; case 'paid': $paid = Realia_Query::is_property_paid(); if ($paid) { echo '<div class="dashicons-before dashicons-yes green"></div>'; } else { echo '<div class="dashicons-before dashicons-no red"></div>'; } break; } }