[ Index ]

PHP Cross Reference of BuddyPress

title

Body

[close]

/src/bp-templates/bp-legacy/buddypress/groups/single/ -> send-invites.php (source)

   1  <?php
   2  /**
   3   * BuddyPress - Groups Send Invites
   4   *
   5   * @package BuddyPress
   6   * @subpackage bp-legacy
   7   * @version 3.0.0
   8   */
   9  
  10  /**
  11   * Fires before the send invites content.
  12   *
  13   * @since 1.1.0
  14   */
  15  do_action( 'bp_before_group_send_invites_content' ); ?>
  16  
  17  <?php
  18  /* Does the user have friends that could be invited to the group? */
  19  if ( bp_get_new_group_invite_friend_list() ) : ?>
  20  
  21      <h2 class="bp-screen-reader-text"><?php _e( 'Send invites', 'buddypress' ); ?></h2>
  22  
  23      <?php /* 'send-invite-form' is important for AJAX support */ ?>
  24      <form action="<?php bp_group_send_invite_form_action(); ?>" method="post" id="send-invite-form" class="standard-form">
  25  
  26          <div class="invite" aria-live="polite" aria-atomic="false" aria-relevant="all">
  27              <?php bp_get_template_part( 'groups/single/invites-loop' ); ?>
  28          </div>
  29  
  30          <div class="submit">
  31              <input type="submit" name="submit" id="submit" value="<?php esc_attr_e( 'Send Invites', 'buddypress' ); ?>" />
  32          </div>
  33  
  34          <?php wp_nonce_field( 'groups_send_invites', '_wpnonce_send_invites' ); ?>
  35  
  36          <?php /* This is important, don't forget it */ ?>
  37          <input type="hidden" name="group_id" id="group_id" value="<?php bp_group_id(); ?>" />
  38  
  39      </form><!-- #send-invite-form -->
  40  
  41  <?php
  42  /* No eligible friends? Maybe the user doesn't have any friends yet. */
  43  elseif ( 0 == bp_get_total_friend_count( bp_loggedin_user_id() ) ) : ?>
  44  
  45      <div id="message" class="info">
  46          <p class="notice"><?php _e( 'Group invitations can only be extended to friends.', 'buddypress' ); ?></p>
  47          <p class="message-body"><?php _e( "Once you've made some friendships, you'll be able to invite those members to this group.", 'buddypress' ); ?></p>
  48      </div>
  49  
  50  <?php
  51  /* The user does have friends, but none are eligible to be invited to this group. */
  52  else : ?>
  53  
  54      <div id="message" class="info">
  55          <p class="notice"><?php _e( 'All of your friends already belong to this group.', 'buddypress' ); ?></p>
  56      </div>
  57  
  58  <?php endif; ?>
  59  
  60  <?php
  61  
  62  /**
  63   * Fires after the send invites content.
  64   *
  65   * @since 1.2.0
  66   */
  67  do_action( 'bp_after_group_send_invites_content' );


Generated: Tue Dec 10 01:01:39 2019 Cross-referenced by PHPXref 0.7.1