[ Index ]

PHP Cross Reference of BuddyPress

title

Body

[close]

/src/bp-templates/bp-legacy/buddypress/groups/ -> index.php (source)

   1  <?php
   2  /**
   3   * BuddyPress - Groups
   4   *
   5   * @package BuddyPress
   6   * @subpackage bp-legacy
   7   * @version 3.0.0
   8   */
   9  
  10  /**
  11   * Fires at the top of the groups directory template file.
  12   *
  13   * @since 1.5.0
  14   */
  15  do_action( 'bp_before_directory_groups_page' ); ?>
  16  
  17  <div id="buddypress">
  18  
  19      <?php
  20  
  21      /**
  22       * Fires before the display of the groups.
  23       *
  24       * @since 1.1.0
  25       */
  26      do_action( 'bp_before_directory_groups' ); ?>
  27  
  28      <?php
  29  
  30      /**
  31       * Fires before the display of the groups content.
  32       *
  33       * @since 1.1.0
  34       */
  35      do_action( 'bp_before_directory_groups_content' ); ?>
  36  
  37      <?php /* Backward compatibility for inline search form. Use template part instead. */ ?>
  38      <?php if ( has_filter( 'bp_directory_groups_search_form' ) ) : ?>
  39  
  40          <div id="group-dir-search" class="dir-search" role="search">
  41              <?php bp_directory_groups_search_form(); ?>
  42          </div><!-- #group-dir-search -->
  43  
  44      <?php else: ?>
  45  
  46          <?php bp_get_template_part( 'common/search/dir-search-form' ); ?>
  47  
  48      <?php endif; ?>
  49  
  50      <form action="" method="post" id="groups-directory-form" class="dir-form">
  51  
  52          <div id="template-notices" role="alert" aria-atomic="true">
  53              <?php
  54  
  55              /** This action is documented in bp-templates/bp-legacy/buddypress/activity/index.php */
  56              do_action( 'template_notices' ); ?>
  57  
  58          </div>
  59  
  60          <div class="item-list-tabs" aria-label="<?php esc_attr_e( 'Groups directory main navigation', 'buddypress' ); ?>">
  61              <ul>
  62                  <li class="selected" id="groups-all">
  63                      <a href="<?php bp_groups_directory_permalink(); ?>">
  64                          <?php
  65                          /* translators: %s: all groups count */
  66                          printf( __( 'All Groups %s', 'buddypress' ), '<span>' . bp_get_total_group_count() . '</span>' );
  67                          ?>
  68                      </a>
  69                  </li>
  70  
  71                  <?php if ( is_user_logged_in() && bp_get_total_group_count_for_user( bp_loggedin_user_id() ) ) : ?>
  72                      <li id="groups-personal">
  73                          <a href="<?php echo bp_loggedin_user_domain() . bp_get_groups_slug() . '/my-groups/'; ?>">
  74                              <?php
  75                              /* translators: %s: current user groups count */
  76                              printf( __( 'My Groups %s', 'buddypress' ), '<span>' . bp_get_total_group_count_for_user( bp_loggedin_user_id() ) . '</span>' );
  77                              ?>
  78                          </a>
  79                      </li>
  80                  <?php endif; ?>
  81  
  82                  <?php
  83  
  84                  /**
  85                   * Fires inside the groups directory group filter input.
  86                   *
  87                   * @since 1.5.0
  88                   */
  89                  do_action( 'bp_groups_directory_group_filter' ); ?>
  90  
  91              </ul>
  92          </div><!-- .item-list-tabs -->
  93  
  94          <div class="item-list-tabs" id="subnav" aria-label="<?php esc_attr_e( 'Groups directory secondary navigation', 'buddypress' ); ?>" role="navigation">
  95              <ul>
  96                  <?php
  97  
  98                  /**
  99                   * Fires inside the groups directory group types.
 100                   *
 101                   * @since 1.2.0
 102                   */
 103                  do_action( 'bp_groups_directory_group_types' ); ?>
 104  
 105                  <li id="groups-order-select" class="last filter">
 106  
 107                      <label for="groups-order-by"><?php _e( 'Order By:', 'buddypress' ); ?></label>
 108  
 109                      <select id="groups-order-by">
 110                          <option value="active"><?php _e( 'Last Active', 'buddypress' ); ?></option>
 111                          <option value="popular"><?php _e( 'Most Members', 'buddypress' ); ?></option>
 112                          <option value="newest"><?php _e( 'Newly Created', 'buddypress' ); ?></option>
 113                          <option value="alphabetical"><?php _e( 'Alphabetical', 'buddypress' ); ?></option>
 114  
 115                          <?php
 116  
 117                          /**
 118                           * Fires inside the groups directory group order options.
 119                           *
 120                           * @since 1.2.0
 121                           */
 122                          do_action( 'bp_groups_directory_order_options' ); ?>
 123                      </select>
 124                  </li>
 125              </ul>
 126          </div>
 127  
 128          <h2 class="bp-screen-reader-text"><?php
 129              /* translators: accessibility text */
 130              _e( 'Groups directory', 'buddypress' );
 131          ?></h2>
 132  
 133          <div id="groups-dir-list" class="groups dir-list">
 134              <?php bp_get_template_part( 'groups/groups-loop' ); ?>
 135          </div><!-- #groups-dir-list -->
 136  
 137          <?php
 138  
 139          /**
 140           * Fires and displays the group content.
 141           *
 142           * @since 1.1.0
 143           */
 144          do_action( 'bp_directory_groups_content' ); ?>
 145  
 146          <?php wp_nonce_field( 'directory_groups', '_wpnonce-groups-filter' ); ?>
 147  
 148          <?php
 149  
 150          /**
 151           * Fires after the display of the groups content.
 152           *
 153           * @since 1.1.0
 154           */
 155          do_action( 'bp_after_directory_groups_content' ); ?>
 156  
 157      </form><!-- #groups-directory-form -->
 158  
 159      <?php
 160  
 161      /**
 162       * Fires after the display of the groups.
 163       *
 164       * @since 1.1.0
 165       */
 166      do_action( 'bp_after_directory_groups' ); ?>
 167  
 168  </div><!-- #buddypress -->
 169  
 170  <?php
 171  
 172  /**
 173   * Fires at the bottom of the groups directory template file.
 174   *
 175   * @since 1.5.0
 176   */
 177  do_action( 'bp_after_directory_groups_page' );


Generated: Sat Dec 7 01:00:57 2024 Cross-referenced by PHPXref 0.7.1