Changeset 4989 for trunk/bp-activity/bp-activity-filters.php
- Timestamp:
- 08/16/2011 11:33:09 AM (15 years ago)
- File:
-
- 1 edited
-
trunk/bp-activity/bp-activity-filters.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-activity/bp-activity-filters.php
r4961 r4989 189 189 $append_text = apply_filters( 'bp_activity_excerpt_append_text', __( '[Read more]', 'buddypress' ) ); 190 190 $excerpt_length = apply_filters( 'bp_activity_excerpt_length', 358 ); 191 $excerpt = $text; 192 193 $id = !empty( $activities_template->activity->current_comment->id ) ? 'acomment-read-more-' . $activities_template->activity->current_comment->id : 'activity-read-more-' . bp_get_activity_id(); 194 195 if ( strlen( $excerpt ) > $excerpt_length ) 196 $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 ); 191 192 // Run the text through the excerpt function. If it's too short, the original text will be 193 // returned. 194 $excerpt = bp_create_excerpt( $text, $excerpt_length, array( 'ending' => __( '…', 'buddypress' ) ) ); 195 196 // If the text returned by bp_create_excerpt() is different from the original text (ie it's 197 // been truncated), add the "Read More" link. 198 if ( $excerpt != $text ) { 199 $id = !empty( $activities_template->activity->current_comment->id ) ? 'acomment-read-more-' . $activities_template->activity->current_comment->id : 'activity-read-more-' . bp_get_activity_id(); 200 201 $excerpt = sprintf( '%1$s<span class="activity-read-more" id="%2$s"><a href="%3$s" rel="nofollow">%4$s</a></span>', $excerpt, $id, bp_get_activity_thread_permalink(), $append_text ); 202 } 197 203 198 204 return apply_filters( 'bp_activity_truncate_entry', $excerpt, $text, $append_text );
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)