function bp_new_group_invite_friend_list() { echo bp_get_new_group_invite_friend_list(); }
<?php do_action('bp_before_group_send_invites_content'); ?> <?php /* Does the user have friends that could be invited to the group? */ if (bp_get_new_group_invite_friend_list()) { ?> <?php /* 'send-invite-form' is important for AJAX support */ ?> <form action="<?php bp_group_send_invite_form_action(); ?> " method="post" id="send-invite-form" class="standard-form" role="main"> <div class="invite"> <?php bp_get_template_part('groups/single/invites-loop'); ?> </div> <?php /* This is important, don't forget it */ ?> <input type="hidden" name="group_id" id="group_id" value="<?php bp_group_id(); ?> " />
/** * Output a list of friends who can be invited to a group * * @since 1.0.0 * * @param array $args Array of arguments for friends list output. */ function bp_new_group_invite_friend_list($args = array()) { echo bp_get_new_group_invite_friend_list($args); }
/** * Modify the way checkboxes are rendered on the invite screen * @version 2.0 */ function apoc_new_group_invite_friend_list() { // Get the HTML from the BuddyPress function $html = bp_get_new_group_invite_friend_list(); // Wrap usernames in labels for our checkbox styling $html = str_replace('> ', '><label>', $html); $html = str_replace('</li>', '</label></li>', $html); // Output the HTML echo $html; }