[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

/wp-content/themes/twentynineteen/template-parts/post/ -> discussion-meta.php (source)

   1  <?php
   2  /**
   3   * The template for displaying Current Discussion on posts
   4   *
   5   * @package WordPress
   6   * @subpackage Twenty_Nineteen
   7   * @since Twenty Nineteen 1.0
   8   */
   9  
  10  /* Get data from current discussion on post. */
  11  $discussion    = twentynineteen_get_discussion_data();
  12  $has_responses = $discussion->responses > 0;
  13  
  14  if ( $has_responses ) {
  15      /* translators: %d: Number of comments. */
  16      $meta_label = sprintf( _n( '%d Comment', '%d Comments', $discussion->responses, 'twentynineteen' ), $discussion->responses );
  17  } else {
  18      $meta_label = __( 'No comments', 'twentynineteen' );
  19  }
  20  ?>
  21  
  22  <div class="discussion-meta">
  23      <?php
  24      if ( $has_responses ) {
  25          twentynineteen_discussion_avatars_list( $discussion->authors );
  26      }
  27      ?>
  28      <p class="discussion-meta-info">
  29          <?php echo twentynineteen_get_icon_svg( 'comment', 24 ); ?>
  30          <span><?php echo esc_html( $meta_label ); ?></span>
  31      </p>
  32  </div><!-- .discussion-meta -->


Generated: Wed Dec 25 01:00:02 2024 Cross-referenced by PHPXref 0.7.1