Beispiel #1
0
			</div>
		</div>
		-->
		<div class="col-sm-8 col-sm-offset-2">
			<div class="well">

				<article class="entry-content">
					<?php 
        echo the_content();
        ?>
				</article>
				
				<!-- GeoMashup -->
				<div id="geomashup">
                	<?php 
        echo GeoMashup::map('width=100%');
        ?>
       			</div>

				<div class="labels pull-right">Archivado en: 
					<?php 
        $posttags = get_the_tags();
        if ($posttags) {
            foreach ($posttags as $tag) {
                echo "<a class='label' href=\"";
                echo get_tag_link($tag->term_id);
                echo "\">" . $tag->name . "</a>";
            }
        }
        ?>
				</div>
/**
 * Map template tag alias.
 *
 * Leave one old shortcode function in the global namespace, since Bruce used
 * it with function_exists() in his implementation guide.
 *
 * @since 1.0
 * @access public
 * @deprecated 1.2 Use GeoMashup::map()
 *
 * @param array $atts Shortcode arguments.
 */
function geo_mashup_map($atts)
{
    return GeoMashup::map($atts);
}
<div id="geo-mashup-search-results">

	<h2><?php 
_e('Search results near', 'GeoMashup');
?>
 "<?php 
echo $search_text;
?>
"</h2>
	
	<?php 
if ($geo_mashup_search->have_posts()) {
    ?>

	<?php 
    echo GeoMashup::map(array('name' => 'search-results-map', 'search_text' => $search_text, 'object_ids' => $geo_mashup_search->get_the_ID_list(), 'center_lat' => $near_location['lat'], 'center_lng' => $near_location['lng'], 'search_lat' => $near_location['lat'], 'search_lng' => $near_location['lng'], 'object_name' => $object_name, 'zoom' => $approximate_zoom + 1));
    ?>

		<?php 
    if ($object_name == 'post') {
        ?>

			<?php 
        while ($geo_mashup_search->have_posts()) {
            $geo_mashup_search->the_post();
            ?>
					<div class="search-result">
						<h3><a href="<?php 
            the_permalink();
            ?>
" title=""><?php 
    /**
     * Fuction to show the single post content.
     */
    function interface_theloop_for_single()
    {
        global $post;
        if (have_posts()) {
            while (have_posts()) {
                the_post();
                do_action('interface_before_post');
                ?>
<section id="post-<?php 
                the_ID();
                ?>
" <?php 
                post_class();
                ?>
>
  <article>
    <header class="entry-header">
      <?php 
                if (get_the_time(get_option('date_format'))) {
                    ?>
      <div class="entry-meta"> 
<span class="cat-links">
        <?php 
                    the_category(', ');
                    ?>
        </span>
<h1 class="entry-title"><?php 
                    the_title();
                    ?>
</h1>

<div class="entry-meta clearfix">
        <div class="by-author vcard author"><span class="fn"><a href="<?php 
                    echo get_author_posts_url(get_the_author_meta('ID'));
                    ?>
" title="<?php 
                    esc_attr(the_author());
                    ?>
">
          <?php 
                    the_author();
                    ?>
          </a></span></div>
        <div class="date updated"><a href="<?php 
                    the_permalink();
                    ?>
" title="<?php 
                    echo esc_attr(get_the_time());
                    ?>
">
          <?php 
                    the_time(get_option('date_format'));
                    ?>
          </a></div>
        <?php 
                    if (comments_open()) {
                        ?>
        <div class="comments">
          <?php 
                        comments_popup_link(__('Sin comentarios', 'interface'), __('1 Comentario', 'interface'), __('% Comentarios', 'interface'), '', __('Comments Off', 'interface'));
                        ?>
        </div>
        <?php 
                    }
                    ?>
      </div>

      <!-- .entry-title -->

<?php 
                    $term_list = get_the_term_list(get_the_ID(), array('localidad', 'region', 'fecha', 'responsable'));
                    if (!empty($term_list)) {
                        ?>

<center>
<?php 
                        $images =& get_children(array('post_parent' => $post->ID, 'post_type' => 'attachment', 'post_mime_type' => 'image'));
                        if (empty($images)) {
                            // no attachments here
                        } else {
                            echo '<br>';
                            foreach ($images as $attachment_id => $attachment) {
                                echo wp_get_attachment_link($attachment_id, 'icon') . ' ';
                            }
                            echo '<br><br>';
                        }
                        ?>
</center>

<blockquote>
<?php 
                        $my_meta = get_post_meta($post->ID, '_my_meta', TRUE);
                        if (!empty($my_meta['description'])) {
                            echo '<b>' . $my_meta['description'] . '</b><br><br>';
                        }
                        if (!empty($my_meta['name'])) {
                            echo '<strong>Dirección:</strong> ' . $my_meta['name'] . '<br>';
                        }
                        ?>

<?php 
                        $term_list = get_the_term_list(get_the_ID(), 'localidad');
                        if (!empty($term_list)) {
                            ?>
<strong>Localidad:</strong> <?php 
                            echo get_the_term_list($post->ID, 'localidad', '', ', ');
                        }
                        ?>


<?php 
                        $term_list = get_the_term_list(get_the_ID(), 'region');
                        if (!empty($term_list)) {
                            ?>
(<?php 
                            echo get_the_term_list($post->ID, 'region', '', ', ');
                            ?>
)<?php 
                        }
                        ?>
 <?php 
                        echo get_the_term_list($post->ID, 'responsable', '<br><strong>Autoría:</strong> ', ' | ');
                        ?>
 <?php 
                        echo get_the_term_list($post->ID, 'fecha', '<br><strong>Fecha:</strong> ', ', ');
                        ?>
 <br>

<?php 
                        if (function_exists('geo_mashup_map')) {
                            $coords = GeoMashup::post_coordinates();
                        }
                        if ($coords) {
                            echo '<strong>Coordenadas:</strong> ';
                            echo $coords['lat'];
                            echo ' / ';
                            echo $coords['lng'];
                            echo ' <a href="http://maps.google.com/maps?q=';
                            echo $coords['lat'];
                            echo ',';
                            echo $coords['lng'];
                            echo '" title="Ver en Google Maps" target="_blank">  →</a>';
                        }
                        ?>
<br>

<?php 
                        $my_meta = get_post_meta($post->ID, '_my_meta', TRUE);
                        if (!empty($my_meta['fuente'])) {
                            echo '[<a target="_blank" title="Información complementaria en nueva pestaña" href="' . $my_meta['fuente'] . '"><strong>+ info</strong></a>]<br>';
                        }
                        ?>

</blockquote>

<?php 
                        echo GeoMashup::map("width=100%&height=350&zoom=16");
                        ?>
<br>
<?php 
                    }
                    ?>


	<!-- .cat-links --> 
      </div>
      <!-- .entry-meta -->
     
      
      <div class="entry-meta clearfix">



      <div class="entry-meta clearfix">





<?php 
                    $term_list = get_the_term_list(get_the_ID(), array('localidad', 'region', 'fecha', 'responsable'));
                    if (empty($term_list)) {
                        if (has_post_thumbnail()) {
                            $image = '';
                            $title_attribute = apply_filters('the_title', get_the_title($post->ID));
                            $image .= '<figure class="">';
                            $image .= get_the_post_thumbnail($post->ID, 'featured', array('alt' => esc_attr($title_attribute))) . '';
                            $image .= '</figure>';
                            echo $image;
                        }
                        ?>




<?php 
                    }
                    ?>
        
      <!-- .entry-meta --> 
    </header>
    <!-- .entry-header -->
    <?php 
                }
                ?>


        
   





  


    <div class="entry-content clearfix">


      <?php 
                the_content();
                wp_link_pages(array('before' => '<div style="clear: both;"></div><div class="pagination clearfix">' . __('Pages:', 'interface'), 'after' => '</div>', 'link_before' => '<span>', 'link_after' => '</span>', 'pagelink' => '%', 'echo' => 1));
                ?>
    </div>
    <?php 
                if (get_the_time(get_option('date_format'))) {
                    ?>
  </header>
  <?php 
                }
                ?>

    <!-- entry content clearfix -->
    
    <?php 
                if (is_single()) {
                    $tag_list = get_the_tag_list('', __(' ', 'interface'));
                    if (!empty($tag_list)) {
                        ?>
    <footer class="entry-meta clearfix"> <span class="tag-links">
      <?php 
                        echo $tag_list;
                        ?>
      </span><!-- .tag-links --> 
    </footer>
    <!-- .entry-meta -->
    <?php 
                    }
                    do_action('interface_after_post_content');
                }
                do_action('interface_before_comments_template');
                comments_template();
                do_action('interface_after_comments_template');
                ?>
  </article>
</section>
<!-- .post -->
<?php 
                do_action('interface_after_post');
            }
        } else {
            ?>
<h1 class="entry-title">
  <?php 
            _e('No hay resultados para la búsqueda.', 'interface');
            ?>
</h1>
<?php 
        }
    }
 /**
  * Issue 691
  */
 function test_map_content_with_object_ids()
 {
     $post_ids = $this->generate_rand_located_posts(3);
     $html = GeoMashup::map(array('object_name' => 'post', 'object_ids' => implode(',', $post_ids)));
     $this->assertContains('map_content=global', $html, 'Expected global map content when object_ids are passed.');
 }
    echo GeoMashup::term_legend("check_all=true&format=ul&check_all=false");
    ?>
</div> 

<?php 
}
?>




<?php 
if (is_search() || is_archive()) {
    ?>
 <div style="height:400px;"><?php 
    echo GeoMashup::map("width=100%&height=400&zoom=auto");
    ?>
</div>
<div style="background:black; text-align:center"><?php 
    echo GeoMashup::term_legend("check_all=true&format=ul&check_all=false");
    ?>
</div> 
<?php 
}
?>




<div id="main">
<div class="container clearfix">