Skip to:
Content

BuddyPress.org

Ticket #7106: 7106.patch

File 7106.patch, 988 bytes (added by imath, 9 years ago)
  • src/bp-activity/bp-activity-filters.php

    diff --git src/bp-activity/bp-activity-filters.php src/bp-activity/bp-activity-filters.php
    index 8a0e347..1582288 100644
    function bp_activity_truncate_entry( $text, $args = array() ) { 
    444444         * been truncated), add the "Read More" link. Note that bp_create_excerpt() is stripping
    445445         * shortcodes, so we have strip them from the $text before the comparison.
    446446         */
    447         if ( strlen( $excerpt ) > strlen( strip_shortcodes( $text ) ) ) {
     447        if ( strlen( $excerpt ) < strlen( strip_shortcodes( $text ) ) ) {
    448448                $id = !empty( $activities_template->activity->current_comment->id ) ? 'acomment-read-more-' . $activities_template->activity->current_comment->id : 'activity-read-more-' . bp_get_activity_id();
    449449
    450450                $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 );