Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
11/19/2020 09:21:19 PM (5 years ago)
Author:
imath
Message:

Introduce a new template tag to list a user's member types

Just like Group Types can be listed into the displayed Group's header thanks to a specific template tag, Member types now have their own template tag bp_member_type_list() to do the same into the displayed user's header.

BP Nouveau is using this tag. Its header templates and styles has been updated to optimize the output of this list.

By default Member Types will not be displayed, their corresponding object will need to have their show_in_list property set to true.

Fixes #8394

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-templates/bp-nouveau/buddypress/members/single/cover-image-header.php

    r12082 r12797  
    3434                )
    3535            );
    36 ?>
     36            ?>
    3737
    3838            <?php bp_nouveau_member_hook( 'before', 'header_meta' ); ?>
     
    4646            <?php endif; ?>
    4747
     48            <?php
     49            bp_member_type_list(
     50                bp_displayed_user_id(),
     51                array(
     52                    'label'        => array(
     53                        'plural'   => __( 'Member Types', 'buddypress' ),
     54                        'singular' => __( 'Member Type', 'buddypress' ),
     55                    ),
     56                    'list_element' => 'span',
     57                )
     58            );
     59            ?>
     60
    4861        </div><!-- #item-header-content -->
    4962
Note: See TracChangeset for help on using the changeset viewer.