Advertisement
rdusnr

Untitled

Jun 21st, 2017
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.71 KB | None | 0 0
  1. <?php
  2.  
  3. /**
  4. * BuddyPress - Activity Loop
  5. *
  6. * Querystring is set via AJAX in _inc/ajax.php - bp_dtheme_object_filter()
  7. *
  8. * @package BuddyPress
  9. * @subpackage bp-default
  10. */
  11.  
  12. ?>
  13.  
  14. <?php do_action( 'bp_before_activity_loop' ); ?>
  15.  
  16. <?php
  17. if (bp_is_group_single()){
  18. $my_custom_query = '&action=activity_update';
  19. }else {
  20. $my_custom_query = '';
  21. }
  22. ?>
  23.  
  24. <?php if ( bp_has_activities( bp_ajax_querystring( 'activity'. $my_custom_query) ) ) : ?>
  25.  
  26. <?php /* Show pagination if JS is not enabled, since the "Load More" link will do nothing */ ?>
  27. <noscript>
  28. <div class="pagination">
  29. <div class="pag-count"><?php bp_activity_pagination_count(); ?></div>
  30. <div class="pagination-links"><?php bp_activity_pagination_links(); ?></div>
  31. </div>
  32. </noscript>
  33.  
  34. <?php if ( empty( $_POST['page'] ) ) : ?>
  35.  
  36. <ul id="activity-stream" class="activity-list item-list">
  37.  
  38. <?php endif; ?>
  39.  
  40. <?php while ( bp_activities() ) : bp_the_activity(); ?>
  41.  
  42. <?php locate_template( array( 'activity/entry.php' ), true, false ); ?>
  43.  
  44. <?php endwhile; ?>
  45.  
  46. <?php if ( bp_activity_has_more_items() ) : ?>
  47.  
  48. <li class="load-more">
  49. <a href="#more"><?php _e( 'Load More', 'buddypress' ); ?></a>
  50. </li>
  51.  
  52. <?php endif; ?>
  53.  
  54. <?php if ( empty( $_POST['page'] ) ) : ?>
  55.  
  56. </ul>
  57.  
  58. <?php endif; ?>
  59.  
  60. <?php else : ?>
  61.  
  62. <div id="message" data-alert class="alert-box">
  63. <?php _e( 'Sorry, there was no activity found. Please try a different filter.', 'buddypress' ); ?>
  64. </div>
  65.  
  66. <?php endif; ?>
  67.  
  68. <?php do_action( 'bp_after_activity_loop' ); ?>
  69.  
  70. <form action="#" name="activity-loop-form" id="activity-loop-form" method="post">
  71.  
  72. <?php wp_nonce_field( 'activity_filter', '_wpnonce_activity_filter' ); ?>
  73.  
  74. </form>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement