[ Index ]

PHP Cross Reference of BuddyPress

title

Body

[close]

/src/bp-templates/bp-legacy/buddypress/activity/ -> entry.php (source)

   1  <?php
   2  /**
   3   * BuddyPress - Activity Stream (Single Item)
   4   *
   5   * This template is used by activity-loop.php and AJAX functions to show
   6   * each activity.
   7   *
   8   * @package BuddyPress
   9   * @subpackage bp-legacy
  10   * @version 3.0.0
  11   */
  12  
  13  /**
  14   * Fires before the display of an activity entry.
  15   *
  16   * @since 1.2.0
  17   */
  18  do_action( 'bp_before_activity_entry' ); ?>
  19  
  20  <li class="<?php bp_activity_css_class(); ?>" id="activity-<?php bp_activity_id(); ?>">
  21      <div class="activity-avatar">
  22          <a href="<?php bp_activity_user_link(); ?>">
  23  
  24              <?php bp_activity_avatar(); ?>
  25  
  26          </a>
  27      </div>
  28  
  29      <div class="activity-content">
  30  
  31          <div class="activity-header">
  32  
  33              <?php bp_activity_action(); ?>
  34  
  35          </div>
  36  
  37          <?php if ( bp_activity_has_content() ) : ?>
  38  
  39              <div class="activity-inner">
  40  
  41                  <?php bp_activity_content_body(); ?>
  42  
  43              </div>
  44  
  45          <?php endif; ?>
  46  
  47          <?php
  48  
  49          /**
  50           * Fires after the display of an activity entry content.
  51           *
  52           * @since 1.2.0
  53           */
  54          do_action( 'bp_activity_entry_content' ); ?>
  55  
  56          <div class="activity-meta">
  57  
  58              <?php if ( bp_get_activity_type() == 'activity_comment' ) : ?>
  59  
  60                  <a href="<?php bp_activity_thread_permalink(); ?>" class="button view bp-secondary-action"><?php _e( 'View Conversation', 'buddypress' ); ?></a>
  61  
  62              <?php endif; ?>
  63  
  64              <?php if ( is_user_logged_in() ) : ?>
  65  
  66                  <?php if ( bp_activity_can_comment() ) : ?>
  67  
  68                      <a href="<?php bp_activity_comment_link(); ?>" class="button acomment-reply bp-primary-action" id="acomment-comment-<?php bp_activity_id(); ?>"><?php printf( __( 'Comment %s', 'buddypress' ), '<span>' . bp_activity_get_comment_count() . '</span>' ); ?></a>
  69  
  70                  <?php endif; ?>
  71  
  72                  <?php if ( bp_activity_can_favorite() ) : ?>
  73  
  74                      <?php if ( !bp_get_activity_is_favorite() ) : ?>
  75  
  76                          <a href="<?php bp_activity_favorite_link(); ?>" class="button fav bp-secondary-action"><?php _e( 'Favorite', 'buddypress' ); ?></a>
  77  
  78                      <?php else : ?>
  79  
  80                          <a href="<?php bp_activity_unfavorite_link(); ?>" class="button unfav bp-secondary-action"><?php _e( 'Remove Favorite', 'buddypress' ); ?></a>
  81  
  82                      <?php endif; ?>
  83  
  84                  <?php endif; ?>
  85  
  86                  <?php if ( bp_activity_user_can_delete() ) bp_activity_delete_link(); ?>
  87  
  88                  <?php
  89  
  90                  /**
  91                   * Fires at the end of the activity entry meta data area.
  92                   *
  93                   * @since 1.2.0
  94                   */
  95                  do_action( 'bp_activity_entry_meta' ); ?>
  96  
  97              <?php endif; ?>
  98  
  99          </div>
 100  
 101      </div>
 102  
 103      <?php
 104  
 105      /**
 106       * Fires before the display of the activity entry comments.
 107       *
 108       * @since 1.2.0
 109       */
 110      do_action( 'bp_before_activity_entry_comments' ); ?>
 111  
 112      <?php if ( ( bp_activity_get_comment_count() || bp_activity_can_comment() ) || bp_is_single_activity() ) : ?>
 113  
 114          <div class="activity-comments">
 115  
 116              <?php bp_activity_comments(); ?>
 117  
 118              <?php if ( is_user_logged_in() && bp_activity_can_comment() ) : ?>
 119  
 120                  <form action="<?php bp_activity_comment_form_action(); ?>" method="post" id="ac-form-<?php bp_activity_id(); ?>" class="ac-form"<?php bp_activity_comment_form_nojs_display(); ?>>
 121                      <div class="ac-reply-avatar"><?php bp_loggedin_user_avatar( 'width=' . BP_AVATAR_THUMB_WIDTH . '&height=' . BP_AVATAR_THUMB_HEIGHT ); ?></div>
 122                      <div class="ac-reply-content">
 123                          <div class="ac-textarea">
 124                              <label for="ac-input-<?php bp_activity_id(); ?>" class="bp-screen-reader-text"><?php
 125                                  /* translators: accessibility text */
 126                                  _e( 'Comment', 'buddypress' );
 127                              ?></label>
 128                              <textarea id="ac-input-<?php bp_activity_id(); ?>" class="ac-input bp-suggestions" name="ac_input_<?php bp_activity_id(); ?>"></textarea>
 129                          </div>
 130                          <input type="submit" name="ac_form_submit" value="<?php esc_attr_e( 'Post', 'buddypress' ); ?>" /> &nbsp; <a href="#" class="ac-reply-cancel"><?php _e( 'Cancel', 'buddypress' ); ?></a>
 131                          <input type="hidden" name="comment_form_id" value="<?php bp_activity_id(); ?>" />
 132                      </div>
 133  
 134                      <?php
 135  
 136                      /**
 137                       * Fires after the activity entry comment form.
 138                       *
 139                       * @since 1.5.0
 140                       */
 141                      do_action( 'bp_activity_entry_comments' ); ?>
 142  
 143                      <?php wp_nonce_field( 'new_activity_comment', '_wpnonce_new_activity_comment' ); ?>
 144  
 145                  </form>
 146  
 147              <?php endif; ?>
 148  
 149          </div>
 150  
 151      <?php endif; ?>
 152  
 153      <?php
 154  
 155      /**
 156       * Fires after the display of the activity entry comments.
 157       *
 158       * @since 1.2.0
 159       */
 160      do_action( 'bp_after_activity_entry_comments' ); ?>
 161  
 162  </li>
 163  
 164  <?php
 165  
 166  /**
 167   * Fires after the display of an activity entry.
 168   *
 169   * @since 1.2.0
 170   */
 171  do_action( 'bp_after_activity_entry' );


Generated: Wed Oct 23 01:01:50 2019 Cross-referenced by PHPXref 0.7.1