Changeset 1575 for trunk/bp-activity/bp-activity-widgets.php
- Timestamp:
- 06/23/2009 11:46:50 PM (16 years ago)
- File:
-
- 1 edited
-
trunk/bp-activity/bp-activity-widgets.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-activity/bp-activity-widgets.php
r1520 r1575 31 31 $options['max_items'] = 20; 32 32 ?> 33 34 <?php35 if ( !$activity = wp_cache_get( 'sitewide_activity', 'bp' ) ) {36 $activity = bp_activity_get_sitewide_activity( $options['max_items'] );37 wp_cache_set( 'sitewide_activity', $activity, 'bp' );38 }39 ?>40 33 41 <?php if ( $activity['activities'] ) : ?> 34 <?php if ( bp_has_activities( 'type=sitewide&max=' . $options['max_items'] ) ) : ?> 35 42 36 <div class="item-options" id="activity-list-options"> 43 37 <img src="<?php echo $bp->activity->image_base; ?>/rss.png" alt="<?php _e( 'RSS Feed', 'buddypress' ) ?>" /> <a href="<?php bp_sitewide_activity_feed_link() ?>" title="<?php _e( 'Site Wide Activity RSS Feed', 'buddypress' ) ?>"><?php _e( 'RSS Feed', 'buddypress' ) ?></a> 44 38 </div> 39 45 40 <ul id="site-wide-stream" class="activity-list"> 46 <?php foreach( $activity['activities'] as $item ) :?>47 <li class="<?php echo $item['component_name']?>">48 <?php echo apply_filters( 'bp_get_activity_content', bp_activity_content_filter( $item['content'], $item['date_recorded'], '', true, false, true ) );?>41 <?php while ( bp_activities() ) : bp_the_activity(); ?> 42 <li class="<?php bp_activity_css_class() ?>"> 43 <?php bp_activity_content() ?> 49 44 </li> 50 <?php end foreach; ?>45 <?php endwhile; ?> 51 46 </ul> 47 52 48 <?php else: ?> 49 53 50 <div class="widget-error"> 54 51 <?php _e('There has been no recent site activity.', 'buddypress') ?> 55 52 </div> 56 <?php endif; ?> 53 54 <?php endif;?> 57 55 58 56 <?php echo $after_widget; ?>
Note: See TracChangeset
for help on using the changeset viewer.