Advertisement
rdusnr

Untitled

May 16th, 2017
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.18 KB | None | 0 0
  1. <?php
  2.  
  3. /**
  4. * BuddyPress - Activity Stream (Single Item)
  5. *
  6. * This template is used by activity-loop.php and AJAX functions to show
  7. * each activity.
  8. *
  9. * @package BuddyPress
  10. * @subpackage bp-legacy
  11. */
  12.  
  13. ?>
  14.  
  15. <?php
  16.  
  17. /**
  18. * Fires before the display of an activity entry.
  19. *
  20. * @since BuddyPress (1.2.0)
  21. */
  22. do_action( 'bp_before_activity_entry' ); ?>
  23.  
  24. <li class="<?php bp_activity_css_class(); ?>" id="activity-<?php bp_activity_id(); ?>">
  25. <div class="activity-avatar">
  26. <a href="<?php bp_activity_user_link(); ?>">
  27.  
  28. <?php bp_activity_avatar(); ?>
  29.  
  30. </a>
  31. </div>
  32.  
  33. <div class="activity-content">
  34.  
  35. <div class="activity-header">
  36.  
  37. <?php bp_activity_action(); ?>
  38.  
  39. </div>
  40.  
  41. <?php if ( bp_activity_has_content() ) : ?>
  42.  
  43. <div class="activity-inner">
  44.  
  45. <?php bp_activity_content_body(); ?>
  46.  
  47. </div>
  48.  
  49. <?php endif; ?>
  50.  
  51. <?php
  52.  
  53. /**
  54. * Fires after the display of an activity entry content.
  55. *
  56. * @since BuddyPress (1.2.0)
  57. */
  58. do_action( 'bp_activity_entry_content' ); ?>
  59.  
  60. <div class="activity-meta">
  61.  
  62. <?php if ( bp_get_activity_type() == 'activity_comment' ) : ?>
  63.  
  64. <a href="<?php bp_activity_thread_permalink(); ?>" class="button view bp-secondary-action" title="<?php esc_attr_e( 'View Conversation', 'buddypress' ); ?>"><?php _e( 'View Conversation', 'buddypress' ); ?></a>
  65.  
  66. <?php endif; ?>
  67.  
  68. <?php if ( is_user_logged_in() ) : ?>
  69.  
  70. <?php if ( bp_activity_can_comment() ) : ?>
  71.  
  72. <a href="<?php bp_activity_comment_link(); ?>" class="button acomment-reply bp-primary-action" id="acomment-comment-<?php bp_activity_id(); ?>">&nbsp;</a>
  73.  
  74. <?php endif; ?>
  75.  
  76. <?php if ( bp_activity_can_favorite() ) : ?>
  77.  
  78. <?php if ( !bp_get_activity_is_favorite() ) : ?>
  79.  
  80. <a href="<?php bp_activity_favorite_link(); ?>" class="button fav bp-secondary-action" title="<?php esc_attr_e( 'Mark as Favorite', 'buddypress' ); ?>">&nbsp;</a>
  81.  
  82. <?php else : ?>
  83.  
  84. <a href="<?php bp_activity_unfavorite_link(); ?>" class="button unfav bp-secondary-action" title="<?php esc_attr_e( 'Remove Favorite', 'buddypress' ); ?>">&nbsp;</a>
  85.  
  86. <?php endif; ?>
  87.  
  88. <?php endif; ?>
  89.  
  90. <?php if ( bp_activity_user_can_delete() ) bp_activity_delete_link(); ?>
  91.  
  92. <?php
  93.  
  94. /**
  95. * Fires at the end of the activity entry meta data area.
  96. *
  97. * @since BuddyPress (1.2.0)
  98. */
  99. do_action( 'bp_activity_entry_meta' ); ?>
  100.  
  101. <?php endif; ?>
  102.  
  103. </div>
  104.  
  105. </div>
  106.  
  107. <?php
  108.  
  109. /**
  110. * Fires before the display of the activity entry comments.
  111. *
  112. * @since BuddyPress (1.2.0)
  113. */
  114. do_action( 'bp_before_activity_entry_comments' ); ?>
  115.  
  116. <?php if ( ( bp_activity_get_comment_count() || bp_activity_can_comment() ) || bp_is_single_activity() ) : ?>
  117.  
  118. <div class="activity-comments">
  119.  
  120. <?php bp_activity_comments(); ?>
  121.  
  122. <?php if ( is_user_logged_in() && bp_activity_can_comment() ) : ?>
  123.  
  124. <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(); ?>>
  125. <div class="ac-reply-avatar"><?php bp_loggedin_user_avatar( 'width=' . BP_AVATAR_THUMB_WIDTH . '&height=' . BP_AVATAR_THUMB_HEIGHT ); ?></div>
  126. <div class="ac-reply-content">
  127. <div class="ac-textarea">
  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 BuddyPress (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 BuddyPress (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 BuddyPress (1.2.0)
  170. */
  171. do_action( 'bp_after_activity_entry' ); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement