Skip to:
Content

BuddyPress.org

Changeset 12789


Ignore:
Timestamp:
11/17/2020 07:31:44 PM (6 years ago)
Author:
imath
Message:

BP Nouveau: improve the way Groups template meta data are managed

Deprecate bp_nouveau_group_meta() and introduce bp_nouveau_the_group_meta() as a replacement. This function is used into BP Nouveau template parts to output specific Groups data mainly inside the .item-meta container of the Groups templates.

Stop using bp_nouveau_group_meta() to display Group Types inside the Group's header (and actually make sure the regular and cover image headers are outputting the Group Types if necessary). BP Nouveau is now directly using the BP Groups template tag bp_group_type_list().

Finally, make sure the Group's last activity .item-meta container always shows the "Active" word before the human time diff we're live updating using JavaScript.

Fixes #8391

Location:
trunk/src
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-groups/bp-groups-template.php

    r12744 r12789  
    228228                }
    229229
    230                 $r = bp_parse_args( $r, array(
    231                         'parent_element' => 'p',
    232                         'parent_attr'    => array(
    233                                  'class' => 'bp-group-type-list',
     230                $r = bp_parse_args(
     231                        $r,
     232                        array(
     233                                'parent_element'    => 'p',
     234                                'parent_attr'       => array(
     235                                        'class' => 'bp-group-type-list',
     236                                ),
     237                                'label'             => __( 'Group Types:', 'buddypress' ),
     238                                'label_element'     => 'strong',
     239                                'label_attr'        => array(),
     240                                'show_all'          => false,
     241                                'list_element'      => '',
     242                                'list_element_attr' => array(),
    234243                        ),
    235                         'label'          => __( 'Group Types:', 'buddypress' ),
    236                         'label_element'  => 'strong',
    237                         'label_attr'     => array(),
    238                         'show_all'       => false,
    239                 ), 'group_type_list' );
     244                        'group_type_list'
     245                );
    240246
    241247                $retval = '';
    … …  
    278284                        }
    279285
     286                        // The list of types.
     287                        $list = implode( ', ', array_map( 'bp_get_group_type_directory_link', $types ) );
     288
     289                        // Render the list of types element.
     290                        if ( ! empty( $r['list_element'] ) ) {
     291                                $list_element = new BP_Core_HTML_Element( array(
     292                                        'element'    => $r['list_element'],
     293                                        'attr'       => $r['list_element_attr'],
     294                                        'inner_html' => $list,
     295                                ) );
     296
     297                                $list = $list_element->contents();
     298                        }
     299
    280300                        // Comma-delimit each type into the group type directory link.
    281                         $label .= implode( ', ', array_map( 'bp_get_group_type_directory_link', $types ) );
     301                        $label .= $list;
    282302
    283303                        // Retval time!
    … …  
    20182038 *
    20192039 * @since 1.2.0
    2020  */
    2021 function bp_group_member_count() {
    2022         echo bp_get_group_member_count();
     2040 * @since 7.0.0 Adds the `$group` optional parameter.
     2041 *
     2042 * @param object|bool $group Optional. Group object. Default: current group in loop.
     2043 */
     2044function bp_group_member_count( $group = false ) {
     2045        echo bp_get_group_member_count( $group );
    20232046}
    20242047        /**
    … …  
    20272050         * @since 1.2.0
    20282051         *
     2052         * @since 7.0.0 Adds the `$group` optional parameter.
     2053         *
     2054         * @param object|bool $group Optional. Group object. Default: current group in loop.
    20292055         * @return string
    20302056         */
    2031         function bp_get_group_member_count() {
     2057        function bp_get_group_member_count( $group = false ) {
    20322058                global $groups_template;
    20332059
    2034                 if ( isset( $groups_template->group->total_member_count ) ) {
     2060                if ( isset( $group->total_member_count ) ) {
     2061                        $count = (int) $group->total_member_count;
     2062                } elseif ( isset( $groups_template->group->total_member_count ) ) {
    20352063                        $count = (int) $groups_template->group->total_member_count;
    20362064                } else {
  • trunk/src/bp-templates/bp-nouveau/buddypress/groups/groups-loop.php

    r12595 r12789  
    44 *
    55 * @since 3.0.0
    6  * @version 3.1.0
     6 * @version 7.0.0
    77 */
    88
    … …  
    1919        <ul id="groups-list" class="<?php bp_nouveau_loop_classes(); ?>">
    2020
    21         <?php
    22         while ( bp_groups() ) :
    23                 bp_the_group();
    24         ?>
     21                <?php while ( bp_groups() ) : bp_the_group(); ?>
    2522
    26                 <li <?php bp_group_class( array( 'item-entry' ) ); ?> data-bp-item-id="<?php bp_group_id(); ?>" data-bp-item-component="groups">
    27                         <div class="list-wrap">
     23                        <li <?php bp_group_class( array( 'item-entry' ) ); ?> data-bp-item-id="<?php bp_group_id(); ?>" data-bp-item-component="groups">
     24                                <div class="list-wrap">
    2825
    29                                 <?php if ( ! bp_disable_group_avatar_uploads() ) : ?>
    30                                         <div class="item-avatar">
    31                                                 <a href="<?php bp_group_permalink(); ?>"><?php bp_group_avatar( bp_nouveau_avatar_args() ); ?></a>
    32                                         </div>
    33                                 <?php endif; ?>
     26                                        <?php if ( ! bp_disable_group_avatar_uploads() ) : ?>
     27                                                <div class="item-avatar">
     28                                                        <a href="<?php bp_group_permalink(); ?>"><?php bp_group_avatar( bp_nouveau_avatar_args() ); ?></a>
     29                                                </div>
     30                                        <?php endif; ?>
    3431
    35                                 <div class="item">
     32                                        <div class="item">
    3633
    37                                         <div class="item-block">
     34                                                <div class="item-block">
    3835
    39                                                 <h2 class="list-title groups-title"><?php bp_group_link(); ?></h2>
     36                                                        <h2 class="list-title groups-title"><?php bp_group_link(); ?></h2>
    4037
    41                                                 <?php if ( bp_nouveau_group_has_meta() ) : ?>
     38                                                        <?php if ( bp_nouveau_group_has_meta() ) : ?>
    4239
    43                                                         <p class="item-meta group-details"><?php bp_nouveau_group_meta(); ?></p>
     40                                                                <p class="item-meta group-details"><?php bp_nouveau_the_group_meta( array( 'keys' => array( 'status', 'count' ) ) ); ?></p>
    4441
    45                                                 <?php endif; ?>
     42                                                        <?php endif; ?>
    4643
    47                                                 <p class="last-activity item-meta">
    48                                                         <?php
    49                                                         printf(
    50                                                                 /* translators: %s: last activity timestamp (e.g. "active 1 hour ago") */
    51                                                                 __( 'active %s', 'buddypress' ),
    52                                                                 bp_get_group_last_active()
    53                                                         );
    54                                                         ?>
    55                                                 </p>
     44                                                        <p class="last-activity item-meta">
     45                                                                <?php
     46                                                                        printf(
     47                                                                                /* translators: %s: last activity timestamp (e.g. "active 1 hour ago") */
     48                                                                                esc_html__( 'Active %s', 'buddypress' ),
     49                                                                                sprintf(
     50                                                                                        '<span data-livestamp="%1$s">%2$s</span>',
     51                                                                                        bp_core_get_iso8601_date( bp_get_group_last_active( 0, array( 'relative' => false ) ) ),
     52                                                                                        esc_html( bp_get_group_last_active() )
     53                                                                                )
     54                                                                        );
     55                                                                ?>
     56                                                        </p>
     57
     58                                                </div>
     59
     60                                                <div class="group-desc"><p><?php bp_nouveau_group_description_excerpt(); ?></p></div>
     61
     62                                                <?php bp_nouveau_groups_loop_item(); ?>
     63
     64                                                <?php bp_nouveau_groups_loop_buttons(); ?>
    5665
    5766                                        </div>
    5867
    59                                         <div class="group-desc"><p><?php bp_nouveau_group_description_excerpt(); ?></p></div>
    60 
    61                                         <?php bp_nouveau_groups_loop_item(); ?>
    62 
    63                                         <?php bp_nouveau_groups_loop_buttons(); ?>
    64 
    6568                                </div>
    6669
     70                        </li>
    6771
    68                         </div>
    69                 </li>
    70 
    71         <?php endwhile; ?>
     72                <?php endwhile; ?>
    7273
    7374        </ul>
  • trunk/src/bp-templates/bp-nouveau/buddypress/groups/single/cover-image-header.php

    r12595 r12789  
    44 *
    55 * @since 3.0.0
    6  * @version 3.2.0
     6 * @version 7.0.0
    77 */
    88?>
    … …  
    2222                <?php endif; ?>
    2323
    24 <?php   if ( ! bp_nouveau_groups_front_page_description() ) : ?>
    25                 <div id="item-header-content">
     24                <?php if ( ! bp_nouveau_groups_front_page_description() ) : ?>
     25                        <div id="item-header-content">
    2626
    27                         <p class="highlight group-status"><strong><?php echo esc_html( bp_nouveau_group_meta()->status ); ?></strong></p>
    28                         <p class="activity" data-livestamp="<?php bp_core_iso8601_date( bp_get_group_last_active( 0, array( 'relative' => false ) ) ); ?>">
     27                                <?php if ( bp_nouveau_group_has_meta( 'status' ) ) : ?>
     28                                        <p class="highlight group-status"><strong><?php echo esc_html( bp_nouveau_the_group_meta( array( 'keys' => 'status' ) ) ); ?></strong></p>
     29                                <?php endif; ?>
     30
     31                                <p class="activity">
     32                                        <?php
     33                                                printf(
     34                                                        /* translators: %s: last activity timestamp (e.g. "active 1 hour ago") */
     35                                                        esc_html__( 'Active %s', 'buddypress' ),
     36                                                        sprintf(
     37                                                                '<span data-livestamp="%1$s">%2$s</span>',
     38                                                                bp_core_get_iso8601_date( bp_get_group_last_active( 0, array( 'relative' => false ) ) ),
     39                                                                esc_html( bp_get_group_last_active() )
     40                                                        )
     41                                                );
     42                                        ?>
     43                                </p>
     44
    2945                                <?php
    30                                 /* translators: %s: last activity timestamp (e.g. "active 1 hour ago") */
    31                                 printf( __( 'active %s', 'buddypress' ), bp_get_group_last_active() );
     46                                bp_group_type_list(
     47                                        bp_get_group_id(),
     48                                        array(
     49                                                'label'        => __( 'Group Types', 'buddypress' ),
     50                                                'list_element' => 'span',
     51                                        )
     52                                );
    3253                                ?>
    33                         </p>
    3454
    35                         <?php echo bp_nouveau_group_meta()->group_type_list; ?>
    36                         <?php bp_nouveau_group_hook( 'before', 'header_meta' ); ?>
     55                                <?php bp_nouveau_group_hook( 'before', 'header_meta' ); ?>
    3756
    38                         <?php if ( bp_nouveau_group_has_meta_extra() ) : ?>
    39                                 <div class="item-meta">
     57                                <?php if ( bp_nouveau_group_has_meta_extra() ) : ?>
     58                                        <div class="item-meta">
    4059
    41                                         <?php echo bp_nouveau_group_meta()->extra; ?>
     60                                                <?php echo bp_nouveau_the_group_meta( array( 'keys' => 'extra' ) ); ?>
    4261
    43                                 </div><!-- .item-meta -->
    44                         <?php endif; ?>
     62                                        </div><!-- .item-meta -->
     63                                <?php endif; ?>
    4564
    46                         <?php bp_nouveau_group_header_buttons(); ?>
     65                                <?php bp_nouveau_group_header_buttons(); ?>
    4766
    48                 </div><!-- #item-header-content -->
    49 <?php endif; ?>
     67                        </div><!-- #item-header-content -->
     68                <?php endif; ?>
    5069
    5170                <?php bp_get_template_part( 'groups/single/parts/header-item-actions' ); ?>
  • trunk/src/bp-templates/bp-nouveau/buddypress/groups/single/group-header.php

    r12595 r12789  
    44 *
    55 * @since 3.0.0
    6  * @version 3.2.0
     6 * @version 7.0.0
    77 */
    88?>
    … …  
    2222<div id="item-header-content">
    2323
    24         <p class="highlight group-status"><strong><?php echo esc_html( bp_nouveau_group_meta()->status ); ?></strong></p>
     24        <?php if ( bp_nouveau_group_has_meta( 'status' ) ) : ?>
     25                <p class="highlight group-status"><strong><?php echo esc_html( bp_nouveau_the_group_meta( array( 'keys' => 'status' ) ) ); ?></strong></p>
     26        <?php endif; ?>
    2527
    26         <p class="activity" data-livestamp="<?php bp_core_iso8601_date( bp_get_group_last_active( 0, array( 'relative' => false ) ) ); ?>">
     28        <p class="activity">
    2729                <?php
    28                 echo esc_html(
    29                         sprintf(
     30                        printf(
    3031                                /* translators: %s: last activity timestamp (e.g. "active 1 hour ago") */
    31                                 __( 'active %s', 'buddypress' ),
    32                                 bp_get_group_last_active()
    33                         )
    34                 );
     32                                esc_html__( 'Active %s', 'buddypress' ),
     33                                sprintf(
     34                                        '<span data-livestamp="%1$s">%2$s</span>',
     35                                        bp_core_get_iso8601_date( bp_get_group_last_active( 0, array( 'relative' => false ) ) ),
     36                                        esc_html( bp_get_group_last_active() )
     37                                )
     38                        );
    3539                ?>
    3640        </p>
     41
     42        <?php
     43        bp_group_type_list(
     44                bp_get_group_id(),
     45                array(
     46                        'label'        => __( 'Group Types', 'buddypress' ),
     47                        'list_element' => 'span',
     48                )
     49        );
     50        ?>
    3751
    3852        <?php bp_nouveau_group_hook( 'before', 'header_meta' ); ?>
    … …  
    4155                <div class="item-meta">
    4256
    43                         <?php echo bp_nouveau_group_meta()->extra; ?>
     57                        <?php echo bp_nouveau_the_group_meta( array( 'keys' => 'extra' ) ); ?>
    4458
    4559                </div><!-- .item-meta -->
  • trunk/src/bp-templates/bp-nouveau/common-styles/_bp_group_header.scss

    r12215 r12789  
    11// BP Single Group Header Styles.
    2 // @version 3.0.0
     2// @since 3.0.0
     3// @version 7.0.0
    34
    45.groups-header {
    56
    67        .bp-group-type-list {
     8
     9                @include font-size(18);
    710                margin: 0;
     11                color: $black;
     12                display: flex;
     13
     14                strong {
     15                        padding-right: $pad-med;
     16                        white-space: nowrap;
     17                }
    818        }
    919
  • trunk/src/bp-templates/bp-nouveau/css/buddypress-rtl.css

    r12779 r12789  
    22Hello, this is the BuddyPress Nouveau stylesheet.
    33
    4 @version 4.0.0
     4@since 3.0.0
     5@version 7.0.0
    56
    67----------------------------------------------------------------
    … …  
    23022303*/
    23032304.groups-header .bp-group-type-list {
     2305        font-size: 18px;
    23042306        margin: 0;
     2307        color: #333;
     2308        display: flex;
     2309}
     2310
     2311.groups-header .bp-group-type-list strong {
     2312        padding-left: 1em;
     2313        white-space: nowrap;
    23052314}
    23062315
  • trunk/src/bp-templates/bp-nouveau/css/buddypress.css

    r12779 r12789  
    22Hello, this is the BuddyPress Nouveau stylesheet.
    33
    4 @version 4.0.0
     4@since 3.0.0
     5@version 7.0.0
    56
    67----------------------------------------------------------------
    … …  
    23022303*/
    23032304.groups-header .bp-group-type-list {
     2305        font-size: 18px;
    23042306        margin: 0;
     2307        color: #333;
     2308        display: flex;
     2309}
     2310
     2311.groups-header .bp-group-type-list strong {
     2312        padding-right: 1em;
     2313        white-space: nowrap;
    23052314}
    23062315
  • trunk/src/bp-templates/bp-nouveau/includes/groups/classes.php

    r12435 r12789  
    44 *
    55 * @since 3.0.0
    6  * @version 3.0.0
     6 * @version 7.0.0
    77 */
    88
    … …  
    377377        }
    378378}
     379
     380/**
     381 * Group template meta backwards compatibility class.
     382 *
     383 * @since 7.0.0
     384 */
     385class BP_Nouveau_Group_Meta {
     386        /**
     387         * Used to get the template meta used in Groups loop.
     388         *
     389         * @since 7.0.0
     390         * @var string $meta The template meta used in Groups loop.
     391         */
     392        public $meta = '';
     393
     394        /**
     395         * Magic getter.
     396         *
     397         * This exists specifically for supporting deprecated object vars.
     398         *
     399         * @since 7.0.0
     400         *
     401         * @param string $key
     402         * @return string
     403         */
     404        public function __get( $key = '' ) {
     405                /* translators: %s is the name of the function to use instead of the deprecated one */
     406                _doing_it_wrong( 'bp_nouveau_group_meta', sprintf( __( 'Please use %s instead', 'buddypress' ), 'bp_nouveau_the_group_meta( array( \'keys\' => \'' . $key . '\' ) )' ) , '7.0.0' );
     407
     408                // Backwards compatibility.
     409                return bp_nouveau_the_group_meta( array( 'keys' => $key, 'echo' => false ) );
     410        }
     411
     412        /**
     413         * Constructor
     414         *
     415         * @since 7.0.0
     416         */
     417        public function __construct() {
     418                // Backwards compatibility.
     419                $this->meta = bp_nouveau_the_group_meta( array( 'echo' => false ) );
     420        }
     421}
  • trunk/src/bp-templates/bp-nouveau/includes/groups/template-tags.php

    r12567 r12789  
    10681068 */
    10691069function bp_nouveau_group_has_meta( $meta_key = '' ) {
    1070         $group_meta = bp_nouveau_get_group_meta();
    1071 
    10721070        if ( ! $meta_key ) {
    1073                 return (bool) $group_meta;
    1074         }
    1075 
    1076         return ! empty( $group_meta[ $meta_key ] );
     1071                $meta_keys = array( 'status', 'count' );
     1072        } else {
     1073                $meta_keys = array( $meta_key );
     1074        }
     1075
     1076        $group_meta = bp_nouveau_get_group_meta( $meta_keys );
     1077        $group_meta = array_filter( $group_meta );
     1078
     1079        return ! empty( $group_meta );
    10771080}
    10781081
    … …  
    10851088 */
    10861089function bp_nouveau_group_has_meta_extra() {
    1087         return (bool) bp_nouveau_get_hooked_group_meta();
     1090        return false !== bp_nouveau_get_hooked_group_meta();
    10881091}
    10891092
    … …  
    10921095 *
    10931096 * @since 3.0.0
     1097 * @deprecated 7.0.0 Use bp_nouveau_the_group_meta()
     1098 * @see bp_nouveau_the_group_meta()
    10941099 *
    10951100 * @return string HTML Output.
    10961101 */
    10971102function bp_nouveau_group_meta() {
    1098         $meta = bp_nouveau_get_group_meta();
     1103        _deprecated_function( __FUNCTION__, '7.0.0', 'bp_nouveau_the_group_meta()' );
     1104        $group_meta = new BP_Nouveau_Group_Meta();
    10991105
    11001106        if ( ! bp_is_group() ) {
    1101                 echo join( ' / ', array_map( 'esc_html', (array) $meta ) );
     1107                echo $group_meta->meta;
    11021108        } else {
    1103 
    1104                 /*
    1105                  * Lets return an object not echo an array here for the single groups,
    1106                  * more flexible for the template!!?? ~hnla
     1109                return $group_meta;
     1110        }
     1111}
     1112
     1113/**
     1114 * Outputs or returns the group meta(s).
     1115 *
     1116 * @since 7.0.0
     1117 *
     1118 * @param array $args {
     1119 *     Optional. An array of arguments.
     1120 *
     1121 *     @type array   $keys      The list of template meta keys.
     1122 *     @type string  $delimeter The delimeter to use in case there is more than
     1123 *                              one key to output.
     1124 *     @type boolean $echo      True to output the template meta value. False otherwise.
     1125 * }
     1126 * @return string HTML Output.
     1127 */
     1128function bp_nouveau_the_group_meta( $args = array() ) {
     1129        $r = bp_parse_args( $args, array(
     1130                'keys'      => array(),
     1131                'delimeter' => '/',
     1132                'echo'      => true,
     1133        ), 'nouveau_the_group_meta' );
     1134
     1135        $group_meta = (array) bp_nouveau_get_group_meta( $r['keys'] );
     1136
     1137        if ( ! $group_meta ) {
     1138                return;
     1139        }
     1140
     1141        $meta = '';
     1142        if ( 1 < count( $group_meta ) ) {
     1143                $group_meta = array_filter( $group_meta );
     1144                $meta       = join( ' ' . $r['delimeter'] . ' ', array_map( 'esc_html', $group_meta ) );
     1145        } else {
     1146                $meta = reset( $group_meta );
     1147        }
     1148
     1149        if ( ! $r['echo'] ) {
     1150                return $meta;
     1151        }
     1152
     1153        echo $meta;
     1154}
     1155
     1156        /**
     1157         * Get the group template meta.
     1158         *
     1159         * @since 3.0.0
     1160         * @since 7.0.0 Adds the `$keys` parameter.
     1161         *
     1162         * @param array $keys One or more template meta keys to populate with their values.
     1163         *                    Possible keys are `status`, `count`, `group_type_list`, `description`, `extra`.
     1164         * @return array      The corresponding group template meta values.
     1165         */
     1166        function bp_nouveau_get_group_meta( $keys = array() ) {
     1167                $keys       = (array) $keys;
     1168                $group      = false;
     1169                $group_meta = array();
     1170                $is_group   = bp_is_group();
     1171
     1172                if ( isset( $GLOBALS['groups_template']->group ) ) {
     1173                        $group = $GLOBALS['groups_template']->group;
     1174                } else {
     1175                        $group = groups_get_current_group();
     1176                }
     1177
     1178                if ( ! $group ) {
     1179                        return '';
     1180                }
     1181
     1182                if ( ! $keys && ! $is_group ) {
     1183                        $keys = array( 'status', 'count' );
     1184                }
     1185
     1186                foreach ( $keys as $key ) {
     1187                        switch ( $key ) {
     1188                                case 'status' :
     1189                                        $group_meta['status'] = bp_get_group_type( $group );
     1190                                        break;
     1191
     1192                                case 'count' :
     1193                                        $group_meta['count'] = bp_get_group_member_count( $group );
     1194                                        break;
     1195
     1196                                case 'group_type_list' :
     1197                                        $group_meta['group_type_list'] = bp_get_group_type_list( $group->id );
     1198                                        break;
     1199
     1200                                case 'description' :
     1201                                        $group_meta['description'] = bp_get_group_description( $group );
     1202                                        break;
     1203
     1204                                case 'extra' :
     1205                                        $group_meta['extra'] = '';
     1206
     1207                                        if ( $is_group ) {
     1208                                                $group_meta['extra'] = bp_nouveau_get_hooked_group_meta();
     1209                                        }
     1210                                        break;
     1211                        }
     1212                }
     1213
     1214                /**
     1215                 * Filter to add/remove Group template meta.
    11071216                 *
    1108                  * @todo Paul says that a function that prints and/or returns a value,
    1109                  * depending on global state, is madness. This needs changing.
     1217                 * @since 3.0.0
     1218                 *
     1219                 * @param array  $group_meta The list of meta to output.
     1220                 * @param object $group      The current Group of the loop object.
     1221                 * @param bool   $is_group   True if a single group is displayed. False otherwise.
    11101222                 */
    1111                 return (object) bp_nouveau_get_group_meta();
    1112         }
    1113 }
    1114 
    1115         /**
    1116          * Get the group meta.
    1117          *
    1118          * @since 3.0.0
    1119          *
    1120          * @return array The group meta.
    1121          */
    1122         function bp_nouveau_get_group_meta() {
    1123                 /*
    1124                  * @todo For brevity required approapriate markup is added here as strings
    1125                  * this needs to be either filterable or the function needs to be able to accept
    1126                  * & parse args!
    1127                  */
    1128                 $meta     = array();
    1129                 $is_group = bp_is_group();
    1130 
    1131                 if ( ! empty( $GLOBALS['groups_template']->group ) ) {
    1132                         $group = $GLOBALS['groups_template']->group;
    1133                 }
    1134 
    1135                 if ( empty( $group->id ) ) {
    1136                         return $meta;
    1137                 }
    1138 
    1139                 if ( empty( $group->template_meta ) ) {
    1140                         // It's a single group
    1141                         if ( $is_group ) {
    1142                                         $meta = array(
    1143                                                 'status'          =>  bp_get_group_type(),
    1144                                                 'group_type_list' =>  bp_get_group_type_list(),
    1145                                                 'description'     =>  bp_get_group_description(),
    1146                                         );
    1147 
    1148                                 // Make sure to include hooked meta.
    1149                                 $extra_meta = bp_nouveau_get_hooked_group_meta();
    1150 
    1151                                 if ( $extra_meta ) {
    1152                                         $meta['extra'] = $extra_meta;
    1153                                 }
    1154 
    1155                         // We're in the groups loop
    1156                         } else {
    1157                                 $meta = array(
    1158                                         'status' => bp_get_group_type(),
    1159                                         'count'  => bp_get_group_member_count(),
    1160                                 );
    1161                         }
    1162 
    1163                         /**
    1164                          * Filter to add/remove Group meta.
    1165                          *
    1166                          * @since 3.0.0
    1167                          *
    1168                          * @param array  $meta     The list of meta to output.
    1169                          * @param object $group    The current Group of the loop object.
    1170                          * @param bool   $is_group True if a single group is displayed. False otherwise.
    1171                          */
    1172                         $group->template_meta = apply_filters( 'bp_nouveau_get_group_meta', $meta, $group, $is_group );
    1173                 }
    1174 
    1175                 return $group->template_meta;
     1223                return apply_filters( 'bp_nouveau_get_group_meta', $group_meta, $group, $is_group );
    11761224        }
    11771225
  • trunk/src/bp-templates/bp-nouveau/sass/buddypress.scss

    r12172 r12789  
    2727Hello, this is the BuddyPress Nouveau stylesheet.
    2828
    29 @version 4.0.0
     29@since 3.0.0
     30@version 7.0.0
    3031
    3132----------------------------------------------------------------
Note: See TracChangeset for help on using the changeset viewer.