Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
11/25/2021 12:30:33 AM (2 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/admin/group-settings.php

    r12082 r13156  
    8181<?php endif; ?>
    8282
    83 <fieldset class="group-create-invitations">
    8483
    85     <legend><?php _e( 'Group Invitations', 'buddypress' ); ?></legend>
     84<?php if ( bp_is_active( 'groups', 'invitations' ) ): ?>
    8685
    87     <p><?php _e( 'Which members of this group are allowed to invite others?', 'buddypress' ); ?></p>
     86    <fieldset class="group-create-invitations">
    8887
    89     <div class="radio">
     88        <legend><?php _e( 'Group Invitations', 'buddypress' ); ?></legend>
    9089
    91         <label for="group-invite-status-members"><input type="radio" name="group-invite-status" id="group-invite-status-members" value="members"<?php bp_group_show_invite_status_setting( 'members' ); ?> /> <?php _e( 'All group members', 'buddypress' ); ?></label>
     90        <p><?php _e( 'Which members of this group are allowed to invite others?', 'buddypress' ); ?></p>
    9291
    93         <label for="group-invite-status-mods"><input type="radio" name="group-invite-status" id="group-invite-status-mods" value="mods"<?php bp_group_show_invite_status_setting( 'mods' ); ?> /> <?php _e( 'Group admins and mods only', 'buddypress' ); ?></label>
     92        <div class="radio">
    9493
    95         <label for="group-invite-status-admins"><input type="radio" name="group-invite-status" id="group-invite-status-admins" value="admins"<?php bp_group_show_invite_status_setting( 'admins' ); ?> /> <?php _e( 'Group admins only', 'buddypress' ); ?></label>
     94            <label for="group-invite-status-members"><input type="radio" name="group-invite-status" id="group-invite-status-members" value="members"<?php bp_group_show_invite_status_setting( 'members' ); ?> /> <?php _e( 'All group members', 'buddypress' ); ?></label>
    9695
    97     </div>
     96            <label for="group-invite-status-mods"><input type="radio" name="group-invite-status" id="group-invite-status-mods" value="mods"<?php bp_group_show_invite_status_setting( 'mods' ); ?> /> <?php _e( 'Group admins and mods only', 'buddypress' ); ?></label>
    9897
    99 </fieldset>
     98            <label for="group-invite-status-admins"><input type="radio" name="group-invite-status" id="group-invite-status-admins" value="admins"<?php bp_group_show_invite_status_setting( 'admins' ); ?> /> <?php _e( 'Group admins only', 'buddypress' ); ?></label>
     99
     100        </div>
     101
     102    </fieldset>
     103
     104<?php endif; ?>
    100105
    101106<?php
Note: See TracChangeset for help on using the changeset viewer.