Skip to:
Content

BuddyPress.org

Changeset 13645


Ignore:
Timestamp:
11/18/2023 05:44:51 AM (16 months ago)
Author:
imath
Message:

BP Nouveau: improve the group's description excerpt inside loops

Make sure the bp_nouveau_get_group_description_excerpt() is using the bp_create_excerpt() the right way sending it a valid $length parameter.

Fixes #9024
Closes https://github.com/buddypress/buddypress/pull/192

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-templates/bp-nouveau/includes/groups/template-tags.php

    r13504 r13645  
    14051405    }
    14061406
     1407    if ( $length ) {
     1408        $excerpt = bp_create_excerpt( $group->description, $length );
     1409    } else {
     1410        $excerpt = bp_create_excerpt( $group->description );
     1411    }
     1412
    14071413    /**
    14081414     * Filters the excerpt of a group description.
     
    14101416     * @since 3.0.0
    14111417     *
    1412      * @param string $value Excerpt of a group description.
    1413      * @param object $group Object for group whose description is made into an excerpt.
    1414      */
    1415     return apply_filters( 'bp_nouveau_get_group_description_excerpt', bp_create_excerpt( $group->description, $length ), $group );
     1418     * @param string $excerpt Excerpt of a group description.
     1419     * @param object $group   Object for group whose description is made into an excerpt.
     1420     */
     1421    return apply_filters( 'bp_nouveau_get_group_description_excerpt', $excerpt, $group );
    14161422}
    14171423
Note: See TracChangeset for help on using the changeset viewer.