[ Index ]

PHP Cross Reference of BuddyPress

title

Body

[close]

/src/bp-templates/bp-legacy/buddypress/groups/single/admin/ -> group-settings.php (source)

   1  <?php
   2  /**
   3   * BuddyPress - Groups Admin - Group Settings
   4   *
   5   * @package BuddyPress
   6   * @subpackage bp-legacy
   7   * @version 3.0.0
   8   */
   9  
  10  ?>
  11  
  12  <h2 class="bp-screen-reader-text"><?php _e( 'Manage Group Settings', 'buddypress' ); ?></h2>
  13  
  14  <?php
  15  
  16  /**
  17   * Fires before the group settings admin display.
  18   *
  19   * @since 1.1.0
  20   */
  21  do_action( 'bp_before_group_settings_admin' ); ?>
  22  
  23  <fieldset class="group-create-privacy">
  24  
  25      <legend><?php _e( 'Privacy Options', 'buddypress' ); ?></legend>
  26  
  27      <div class="radio">
  28  
  29          <label for="group-status-public"><input type="radio" name="group-status" id="group-status-public" value="public"<?php if ( 'public' == bp_get_new_group_status() || !bp_get_new_group_status() ) { ?> checked="checked"<?php } ?> aria-describedby="public-group-description" /> <?php _e( 'This is a public group', 'buddypress' ); ?></label>
  30  
  31          <ul id="public-group-description">
  32              <li><?php _e( 'Any site member can join this group.', 'buddypress' ); ?></li>
  33              <li><?php _e( 'This group will be listed in the groups directory and in search results.', 'buddypress' ); ?></li>
  34              <li><?php _e( 'Group content and activity will be visible to any site member.', 'buddypress' ); ?></li>
  35          </ul>
  36  
  37          <label for="group-status-private"><input type="radio" name="group-status" id="group-status-private" value="private"<?php if ( 'private' == bp_get_new_group_status() ) { ?> checked="checked"<?php } ?> aria-describedby="private-group-description" /> <?php _e( 'This is a private group', 'buddypress' ); ?></label>
  38  
  39          <ul id="private-group-description">
  40              <li><?php _e( 'Only users who request membership and are accepted can join the group.', 'buddypress' ); ?></li>
  41              <li><?php _e( 'This group will be listed in the groups directory and in search results.', 'buddypress' ); ?></li>
  42              <li><?php _e( 'Group content and activity will only be visible to members of the group.', 'buddypress' ); ?></li>
  43          </ul>
  44  
  45          <label for="group-status-hidden"><input type="radio" name="group-status" id="group-status-hidden" value="hidden"<?php if ( 'hidden' == bp_get_new_group_status() ) { ?> checked="checked"<?php } ?> aria-describedby="hidden-group-description" /> <?php _e('This is a hidden group', 'buddypress' ); ?></label>
  46  
  47          <ul id="hidden-group-description">
  48              <li><?php _e( 'Only users who are invited can join the group.', 'buddypress' ); ?></li>
  49              <li><?php _e( 'This group will not be listed in the groups directory or search results.', 'buddypress' ); ?></li>
  50              <li><?php _e( 'Group content and activity will only be visible to members of the group.', 'buddypress' ); ?></li>
  51          </ul>
  52  
  53      </div>
  54  
  55  </fieldset>
  56  
  57  <?php // Group type selection ?>
  58  <?php if ( $group_types = bp_groups_get_group_types( array( 'show_in_create_screen' => true ), 'objects' ) ): ?>
  59  
  60      <fieldset class="group-create-types">
  61          <legend><?php _e( 'Group Types', 'buddypress' ); ?></legend>
  62  
  63          <p><?php _e( 'Select the types this group should be a part of.', 'buddypress' ); ?></p>
  64  
  65          <?php foreach ( $group_types as $type ) : ?>
  66              <div class="checkbox">
  67                  <label for="<?php printf( 'group-type-%s', $type->name ); ?>">
  68                      <input type="checkbox" name="group-types[]" id="<?php printf( 'group-type-%s', $type->name ); ?>" value="<?php echo esc_attr( $type->name ); ?>" <?php checked( bp_groups_has_group_type( bp_get_current_group_id(), $type->name ) ); ?>/> <?php echo esc_html( $type->labels['name'] ); ?>
  69                      <?php
  70                          if ( ! empty( $type->description ) ) {
  71                              printf( __( '&ndash; %s', 'buddypress' ), '<span class="bp-group-type-desc">' . esc_html( $type->description ) . '</span>' );
  72                          }
  73                      ?>
  74                  </label>
  75              </div>
  76  
  77          <?php endforeach; ?>
  78  
  79      </fieldset>
  80  
  81  <?php endif; ?>
  82  
  83  <fieldset class="group-create-invitations">
  84  
  85      <legend><?php _e( 'Group Invitations', 'buddypress' ); ?></legend>
  86  
  87      <p><?php _e( 'Which members of this group are allowed to invite others?', 'buddypress' ); ?></p>
  88  
  89      <div class="radio">
  90  
  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>
  92  
  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>
  94  
  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>
  96  
  97      </div>
  98  
  99  </fieldset>
 100  
 101  <?php
 102  
 103  /**
 104   * Fires after the group settings admin display.
 105   *
 106   * @since 1.1.0
 107   */
 108  do_action( 'bp_after_group_settings_admin' ); ?>
 109  
 110  <p><input type="submit" value="<?php esc_attr_e( 'Save Changes', 'buddypress' ); ?>" id="save" name="save" /></p>
 111  <?php wp_nonce_field( 'groups_edit_group_settings' );


Generated: Wed Nov 20 01:01:38 2019 Cross-referenced by PHPXref 0.7.1