Skip to:
Content

Ticket #7493: 7493-01.patch

File 7493-01.patch, 2.3 KB (added by hnla, 9 months ago)

Reverse order of params to ensure any existing passed args aren't broken.

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

     
    12081208 * 
    12091209 * @since 1.0.0 
    12101210 * 
    1211  * @param object|bool $group Optional. The group being referenced. 
    1212  *                           Defaults to the group currently being 
    1213  *                           iterated on in the groups loop. 
     1211 * @param object|bool $group  Optional. The group being referenced. 
     1212 *                            Defaults to the group currently being 
     1213 *                            iterated on in the groups loop. 
     1214 * @param int         $length Optional. Length of returned string, including ellipsis. 
     1215 *                            Default: 225. 
    12141216 */ 
    1215 function bp_group_description_excerpt( $group = false ) { 
    1216         echo bp_get_group_description_excerpt( $group ); 
     1217function bp_group_description_excerpt( $group = false, $length = false ) { 
     1218        echo bp_get_group_description_excerpt( $group, $length ); 
    12171219} 
    12181220        /** 
    12191221         * Get an excerpt of a group description. 
     
    12201222         * 
    12211223         * @since 1.0.0 
    12221224         * 
    1223          * @param object|bool $group Optional. The group being referenced. 
    1224          *                           Defaults to the group currently being 
    1225          *                           iterated on in the groups loop. 
     1225         * @param object|bool $group  Optional. The group being referenced. 
     1226         *                            Defaults to the group currently being 
     1227         *                            iterated on in the groups loop. 
     1228         * @param int         $length Optional. Length of returned string, including ellipsis. 
     1229         *                            Default: 225. 
    12261230         * @return string Excerpt. 
    12271231         */ 
    1228         function bp_get_group_description_excerpt( $group = false ) { 
     1232        function bp_get_group_description_excerpt( $group = false, $length = false ) { 
    12291233                global $groups_template; 
    12301234 
    12311235                if ( empty( $group ) ) { 
     
    12401244                 * @param string $value Excerpt of a group description. 
    12411245                 * @param object $group Object for group whose description is made into an excerpt. 
    12421246                 */ 
    1243                 return apply_filters( 'bp_get_group_description_excerpt', bp_create_excerpt( $group->description ), $group ); 
     1247                return apply_filters( 'bp_get_group_description_excerpt', bp_create_excerpt( $group->description, $length ), $group ); 
    12441248        } 
    12451249 
    12461250/**