Changeset 4239 for trunk/bp-activity/bp-activity-filters.php
- Timestamp:
- 04/22/2011 08:30:22 PM (15 years ago)
- File:
-
- 1 edited
-
trunk/bp-activity/bp-activity-filters.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-activity/bp-activity-filters.php
r4229 r4239 157 157 */ 158 158 function bp_activity_truncate_entry( $text ) { 159 global $activities_template; 160 159 161 // The full text of the activity update should always show on the single activity screen 160 162 if ( bp_is_single_activity() ) … … 164 166 $excerpt_length = apply_filters( 'bp_activity_excerpt_length', 358 ); 165 167 $excerpt = $text; 166 168 169 $id = !empty( $activities_template->activity->current_comment->id ) ? 'acomment-read-more-' . $activities_template->activity->current_comment->id : 'activity-read-more-' . bp_get_activity_id(); 170 167 171 if ( strlen( $excerpt ) > $excerpt_length ) 168 $excerpt = sprintf( '%1$s<span class="activity-read-more" ><a href="%2$s" rel="nofollow">%3$s</a></span>', bp_create_excerpt( $excerpt, $excerpt_length, true, '…' ), bp_get_activity_thread_permalink(), $append_text );172 $excerpt = sprintf( '%1$s<span class="activity-read-more" id="%2$s"><a href="%3$s" rel="nofollow">%4$s</a></span>', bp_create_excerpt( $excerpt, $excerpt_length, true, '…' ), $id, bp_get_activity_thread_permalink(), $append_text ); 169 173 170 174 return apply_filters( 'bp_activity_truncate_entry', $excerpt, $text, $append_text ); 171 175 } 172 176 add_filter( 'bp_get_activity_content_body', 'bp_activity_truncate_entry', 5 ); 177 add_filter( 'bp_get_activity_content', 'bp_activity_truncate_entry', 5 ); 173 178 ?>
Note: See TracChangeset
for help on using the changeset viewer.