bp_group_list_admins( object|bool $group = false )

Output markup listing group admins.


Parameters Parameters

$group

(object|bool) (Optional) Group object. Default: current group in loop.

Default value: false


Source Source

File: bp-groups/bp-groups-template.php

function bp_group_list_admins( $group = false ) {
	global $groups_template;

	if ( empty( $group ) ) {
		$group =& $groups_template->group;
	}

	if ( ! empty( $group->admins ) ) { ?>
		<ul id="group-admins">
			<?php foreach( (array) $group->admins as $admin ) { ?>
				<li>
					<a href="<?php echo bp_core_get_user_domain( $admin->user_id, $admin->user_nicename, $admin->user_login ) ?>" class="bp-tooltip" data-bp-tooltip="<?php printf( ('%s'),  bp_core_get_user_displayname( $admin->user_id ) ); ?>">
						<?php
						echo bp_core_fetch_avatar(
							array(
								'item_id' => $admin->user_id,
								'email'   => $admin->user_email,
								'alt'     => sprintf(
									/* translators: %s: member name */
									__( 'Profile picture of %s', 'buddypress' ),
									bp_core_get_user_displayname( $admin->user_id )
								),
							)
						);
						?>
					</a>
				</li>
			<?php } ?>
		</ul>
	<?php } else { ?>
		<span class="activity"><?php _e( 'No Admins', 'buddypress' ) ?></span>
	<?php } ?>
<?php
}


Top ↑

Changelog Changelog

Changelog
Version Description
1.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.