Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
11/25/2021 12:30:33 AM (3 years ago)
Author:
dcavins
Message:

Declare invitations as feature of groups component.

Centralize the logic which determines whether
group invitations are active by declaring
invitations as a feature of the groups
component. This also makes it easy for
developers to filter that value using the
bp_is_groups_invitations_active filter hook.

Props imath.

Fixes #8550.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-templates/bp-legacy/buddypress/groups/single/send-invites.php

    r12082 r13156  
    1515do_action( 'bp_before_group_send_invites_content' ); ?>
    1616
     17<?php if ( ! bp_is_active( 'friends' ) ) : ?>
     18    <div id="message" class="info">
     19        <p class="notice"><?php esc_html_e( 'Group invitations can only be extended to friends.', 'buddypress' ); ?></p>
     20    </div>
    1721<?php
    1822/* Does the user have friends that could be invited to the group? */
    19 if ( bp_get_new_group_invite_friend_list() ) : ?>
     23elseif ( bp_get_new_group_invite_friend_list() ) : ?>
    2024
    2125    <h2 class="bp-screen-reader-text"><?php _e( 'Send invites', 'buddypress' ); ?></h2>
Note: See TracChangeset for help on using the changeset viewer.