GeoMashup
[ class tree: GeoMashup ] [ index: GeoMashup ] [ all elements ]

Source for file comment.php

Documentation is available at comment.php

  1. <?php
  2. /**
  3.  * This is the default template for the comment info window in Geo Mashup maps.
  4.  *
  5.  * Don't modify this file! It will be overwritten by upgrades.
  6.  *
  7.  * Instead, copy this file to "geo-mashup-comment.php" in your theme directory,
  8.  * or "comment.php" in the Geo Mashup Custom plugin directory, if you have that
  9.  * installed. Those files take precedence over this one.
  10.  *
  11.  * For styling of the info window, see map-style-default.css.
  12.  *
  13.  * @package GeoMashup
  14.  */
  15. ?>
  16. <div class="locationinfo comment-location-info">
  17. <?php if GeoMashupQuery::have_comments() ) ?>
  18.  
  19.     <?php GeoMashupQuery::list_comments'callback=geo_mashup_comment_default' )?>
  20.  
  21. <?php else ?>
  22.  
  23.     <h2 class="center">Not Found</h2>
  24.     <p class="center">Sorry, but you are looking for something that isn't here.</p>
  25.  
  26. <?php endif?>
  27.  
  28. </div>
  29. <?php 
  30. /**
  31.  * Template callback for GeoMashupQuery::list_comments()
  32.  *
  33.  * Use the newer form of template, where the individual comment template goes in
  34.  * a function that matches the callback argument to list_comments
  35.  *
  36.  * @since 1.3
  37.  * @access public
  38.  *
  39.  * @param object $comment The comment to display
  40.  * @param array $args Arguments from wp_list_comments
  41.  * @param mixed $depth Nested depth
  42.  */
  43. function geo_mashup_comment_default$comment$args$depth {
  44.     // Enable the WordPress comment functions
  45.     GeoMashupQuery::set_the_comment$comment );
  46.     // From here to the closing curly brace should look like a familiar template
  47. ?>
  48.     <div id="div-comment-<?php comment_ID(?>" class="<?php comment_class('')?>">
  49.         <div class="comment-author vcard">
  50.         <?php printf(__('<cite class="fn">%s</cite> <span class="says">says:</span>')get_comment_author_link()) ?>
  51.         </div>
  52.         <div class="comment-meta commentmetadata">
  53.             <a href="<?php echo esc_htmlget_comment_link$comment->comment_ID ) ) ?>"><?php printf(__('%1$s at %2$s')get_comment_date(),  get_comment_time()) ?></a>
  54.         </div>
  55.         <?php comment_text(?>
  56.  
  57.     </div>
  58. <?php ?>

Documentation generated on Sat, 09 Jul 2011 21:54:29 -0700 by phpDocumentor 1.4.3