Skip to:
Content

Ticket #7493: 7493.patch

File 7493.patch, 2.3 KB (added by hnla, 14 months ago)
  • src/bp-groups/bp-groups-template.php

     
    11621162 *
    11631163 * @since 1.0.0
    11641164 *
    1165  * @param object|bool $group Optional. The group being referenced.
    1166  *                           Defaults to the group currently being
    1167  *                           iterated on in the groups loop.
     1165 * @param object|bool $group  Optional. The group being referenced.
     1166 *                            Defaults to the group currently being
     1167 *                            iterated on in the groups loop.
     1168 * @param Int         $length Optional. Length of returned string, including ellipsis.
     1169 *                            Default: 225.
    11681170 */
    1169 function bp_group_description_excerpt( $group = false ) {
    1170         echo bp_get_group_description_excerpt( $group );
     1171function bp_group_description_excerpt( $length = false, $group = false ) {
     1172        echo bp_get_group_description_excerpt( $length, $group );
    11711173}
    11721174        /**
    11731175         * Get an excerpt of a group description.
     
    11741176         *
    11751177         * @since 1.0.0
    11761178         *
    1177          * @param object|bool $group Optional. The group being referenced.
    1178          *                           Defaults to the group currently being
    1179          *                           iterated on in the groups loop.
     1179         * @param object|bool $group  Optional. The group being referenced.
     1180         *                            Defaults to the group currently being
     1181         *                            iterated on in the groups loop.
     1182         * @param Int         $length Optional. Length of returned string, including ellipsis.
     1183         *                            Default: 225.
    11801184         * @return string Excerpt.
    11811185         */
    1182         function bp_get_group_description_excerpt( $group = false ) {
     1186        function bp_get_group_description_excerpt( $length = false, $group = false ) {
    11831187                global $groups_template;
    11841188
    11851189                if ( empty( $group ) ) {
     
    11941198                 * @param string $value Excerpt of a group description.
    11951199                 * @param object $group Object for group whose description is made into an excerpt.
    11961200                 */
    1197                 return apply_filters( 'bp_get_group_description_excerpt', bp_create_excerpt( $group->description ), $group );
     1201                return apply_filters( 'bp_get_group_description_excerpt', bp_create_excerpt( $group->description, $length ), $group );
    11981202        }
    11991203
    12001204/**