Skip to:
Content

BuddyPress.org

Ticket #5393: bp-groups-template.php.patch

File bp-groups-template.php.patch, 839 bytes (added by lenasterg, 6 years ago)

New filter bp_group_description_excerpt_length

  • bp-groups/bp-groups-template.php

     
    622622function bp_group_description_excerpt( $group = false ) {
    623623        echo bp_get_group_description_excerpt( $group );
    624624}
     625
    625626        function bp_get_group_description_excerpt( $group = false ) {
    626627                global $groups_template;
    627628
    628629                if ( empty( $group ) )
    629630                        $group =& $groups_template->group;
    630 
    631                 return apply_filters( 'bp_get_group_description_excerpt', bp_create_excerpt( $group->description ) );
     631                       
     632                $excerpt_length = apply_filters( 'bp_group_description_excerpt_length' , 255 ) ;
     633                return apply_filters( 'bp_get_group_description_excerpt', bp_create_excerpt( $group->description, excerpt_length ) );
    632634        }
    633635
    634636