Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
08/16/2011 11:33:09 AM (14 years ago)
Author:
boonebgorges
Message:

Modifies bp_create_excerpt() to take account of HTML tag length when truncating long texts. Thanks to CakePHP for the function. Refactors BP use of bp_create_excerpt(), where necessary, to account for new function argument structure. Reworks bp_activity_truncate_entry() so that already-truncated activity items (like blog posts) do not get a Read More link when they contain HTML. Introduces fallback functions for some multibyte string functions, to make bp_create_excerpt() work properly. Thanks to MediaWiki for these fallbacks. Fixes #3452. Props DJPaul for all the help with this patch.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-activity/bp-activity-template.php

    r4961 r4989  
    15371537
    15381538        if ( 'activity_update' == $activities_template->activity->type )
    1539             $title .= ': ' . strip_tags( ent2ncr( trim( convert_chars( bp_create_excerpt( $activities_template->activity->content, 70, true, " […]" ) ) ) ) );
     1539            $title .= ': ' . strip_tags( ent2ncr( trim( convert_chars( bp_create_excerpt( $activities_template->activity->content, 70, array( 'ending' => " […]" ) ) ) ) ) );
    15401540
    15411541        return apply_filters( 'bp_get_activity_feed_item_title', $title );
Note: See TracChangeset for help on using the changeset viewer.