[ Index ]

PHP Cross Reference of BuddyPress

title

Body

[close]

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

   1  <?php
   2  /**
   3   * BuddyPress Activity templates
   4   *
   5   * @since 2.3.0
   6   *
   7   * @package BuddyPress
   8   * @subpackage bp-legacy
   9   * @version 3.0.0
  10   */
  11  
  12  /**
  13   * Fires before the activity directory listing.
  14   *
  15   * @since 1.5.0
  16   */
  17  do_action( 'bp_before_directory_activity' ); ?>
  18  
  19  <div id="buddypress">
  20  
  21      <?php
  22  
  23      /**
  24       * Fires before the activity directory display content.
  25       *
  26       * @since 1.2.0
  27       */
  28      do_action( 'bp_before_directory_activity_content' ); ?>
  29  
  30      <?php if ( is_user_logged_in() ) : ?>
  31  
  32          <?php bp_get_template_part( 'activity/post-form' ); ?>
  33  
  34      <?php endif; ?>
  35  
  36      <div id="template-notices" role="alert" aria-atomic="true">
  37          <?php
  38  
  39          /**
  40           * Fires towards the top of template pages for notice display.
  41           *
  42           * @since 1.0.0
  43           */
  44          do_action( 'template_notices' ); ?>
  45  
  46      </div>
  47  
  48      <div class="item-list-tabs activity-type-tabs" aria-label="<?php esc_attr_e( 'Sitewide activities navigation', 'buddypress' ); ?>" role="navigation">
  49          <ul>
  50              <?php
  51  
  52              /**
  53               * Fires before the listing of activity type tabs.
  54               *
  55               * @since 1.2.0
  56               */
  57              do_action( 'bp_before_activity_type_tab_all' ); ?>
  58  
  59              <li class="selected" id="activity-all"><a href="<?php bp_activity_directory_permalink(); ?>"><?php printf( __( 'All Members %s', 'buddypress' ), '<span>' . bp_get_total_member_count() . '</span>' ); ?></a></li>
  60  
  61              <?php if ( is_user_logged_in() ) : ?>
  62  
  63                  <?php
  64  
  65                  /**
  66                   * Fires before the listing of friends activity type tab.
  67                   *
  68                   * @since 1.2.0
  69                   */
  70                  do_action( 'bp_before_activity_type_tab_friends' ); ?>
  71  
  72                  <?php if ( bp_is_active( 'friends' ) ) : ?>
  73  
  74                      <?php if ( bp_get_total_friend_count( bp_loggedin_user_id() ) ) : ?>
  75  
  76                          <li id="activity-friends"><a href="<?php echo bp_loggedin_user_domain() . bp_get_activity_slug() . '/' . bp_get_friends_slug() . '/'; ?>"><?php printf( __( 'My Friends %s', 'buddypress' ), '<span>' . bp_get_total_friend_count( bp_loggedin_user_id() ) . '</span>' ); ?></a></li>
  77  
  78                      <?php endif; ?>
  79  
  80                  <?php endif; ?>
  81  
  82                  <?php
  83  
  84                  /**
  85                   * Fires before the listing of groups activity type tab.
  86                   *
  87                   * @since 1.2.0
  88                   */
  89                  do_action( 'bp_before_activity_type_tab_groups' ); ?>
  90  
  91                  <?php if ( bp_is_active( 'groups' ) ) : ?>
  92  
  93                      <?php if ( bp_get_total_group_count_for_user( bp_loggedin_user_id() ) ) : ?>
  94  
  95                          <?php
  96                          printf(
  97                              '<li id="activity-groups"><a href="%1$s">%2$s</a></li>',
  98                              esc_url( bp_loggedin_user_domain() . bp_get_activity_slug() . '/' . bp_get_groups_slug() . '/' ),
  99                              sprintf(
 100                                  /* translators: %s: total joined groups count for the current user */
 101                                  __( 'My Groups %s', 'buddypress' ),
 102                                  '<span>' . bp_get_total_group_count_for_user( bp_loggedin_user_id() ) . '</span>'
 103                              )
 104                          );
 105                          ?>
 106  
 107                      <?php endif; ?>
 108  
 109                  <?php endif; ?>
 110  
 111                  <?php
 112  
 113                  /**
 114                   * Fires before the listing of favorites activity type tab.
 115                   *
 116                   * @since 1.2.0
 117                   */
 118                  do_action( 'bp_before_activity_type_tab_favorites' ); ?>
 119  
 120                  <?php if ( bp_get_total_favorite_count_for_user( bp_loggedin_user_id() ) ) : ?>
 121  
 122                      <li id="activity-favorites"><a href="<?php echo bp_loggedin_user_domain() . bp_get_activity_slug() . '/favorites/'; ?>"><?php printf( __( 'My Favorites %s', 'buddypress' ), '<span>' . bp_get_total_favorite_count_for_user( bp_loggedin_user_id() ) . '</span>' ); ?></a></li>
 123  
 124                  <?php endif; ?>
 125  
 126                  <?php if ( bp_activity_do_mentions() ) : ?>
 127  
 128                      <?php
 129  
 130                      /**
 131                       * Fires before the listing of mentions activity type tab.
 132                       *
 133                       * @since 1.2.0
 134                       */
 135                      do_action( 'bp_before_activity_type_tab_mentions' ); ?>
 136  
 137                      <li id="activity-mentions"><a href="<?php echo bp_loggedin_user_domain() . bp_get_activity_slug() . '/mentions/'; ?>"><?php _e( 'Mentions', 'buddypress' ); ?><?php if ( bp_get_total_mention_count_for_user( bp_loggedin_user_id() ) ) : ?> <strong><span><?php printf( _nx( '%s new', '%s new', bp_get_total_mention_count_for_user( bp_loggedin_user_id() ), 'Number of new activity mentions', 'buddypress' ), bp_get_total_mention_count_for_user( bp_loggedin_user_id() ) ); ?></span></strong><?php endif; ?></a></li>
 138  
 139                  <?php endif; ?>
 140  
 141              <?php endif; ?>
 142  
 143              <?php
 144  
 145              /**
 146               * Fires after the listing of activity type tabs.
 147               *
 148               * @since 1.2.0
 149               */
 150              do_action( 'bp_activity_type_tabs' ); ?>
 151          </ul>
 152      </div><!-- .item-list-tabs -->
 153  
 154      <div class="item-list-tabs no-ajax" id="subnav" aria-label="<?php esc_attr_e( 'Activity secondary navigation', 'buddypress' ); ?>" role="navigation">
 155          <ul>
 156              <li class="feed"><a href="<?php bp_sitewide_activity_feed_link(); ?>" class="bp-tooltip" data-bp-tooltip="<?php esc_attr_e( 'RSS Feed', 'buddypress' ); ?>" aria-label="<?php esc_attr_e( 'RSS Feed', 'buddypress' ); ?>"><?php _e( 'RSS', 'buddypress' ); ?></a></li>
 157  
 158              <?php
 159  
 160              /**
 161               * Fires before the display of the activity syndication options.
 162               *
 163               * @since 1.2.0
 164               */
 165              do_action( 'bp_activity_syndication_options' ); ?>
 166  
 167              <li id="activity-filter-select" class="last">
 168                  <label for="activity-filter-by"><?php _e( 'Show:', 'buddypress' ); ?></label>
 169                  <select id="activity-filter-by">
 170                      <option value="-1"><?php _e( '&mdash; Everything &mdash;', 'buddypress' ); ?></option>
 171  
 172                      <?php bp_activity_show_filters(); ?>
 173  
 174                      <?php
 175  
 176                      /**
 177                       * Fires inside the select input for activity filter by options.
 178                       *
 179                       * @since 1.2.0
 180                       */
 181                      do_action( 'bp_activity_filter_options' ); ?>
 182  
 183                  </select>
 184              </li>
 185          </ul>
 186      </div><!-- .item-list-tabs -->
 187  
 188      <?php
 189  
 190      /**
 191       * Fires before the display of the activity list.
 192       *
 193       * @since 1.5.0
 194       */
 195      do_action( 'bp_before_directory_activity_list' ); ?>
 196  
 197      <div class="activity" aria-live="polite" aria-atomic="true" aria-relevant="all">
 198  
 199          <?php bp_get_template_part( 'activity/activity-loop' ); ?>
 200  
 201      </div><!-- .activity -->
 202  
 203      <?php
 204  
 205      /**
 206       * Fires after the display of the activity list.
 207       *
 208       * @since 1.5.0
 209       */
 210      do_action( 'bp_after_directory_activity_list' ); ?>
 211  
 212      <?php
 213  
 214      /**
 215       * Fires inside and displays the activity directory display content.
 216       */
 217      do_action( 'bp_directory_activity_content' ); ?>
 218  
 219      <?php
 220  
 221      /**
 222       * Fires after the activity directory display content.
 223       *
 224       * @since 1.2.0
 225       */
 226      do_action( 'bp_after_directory_activity_content' ); ?>
 227  
 228      <?php
 229  
 230      /**
 231       * Fires after the activity directory listing.
 232       *
 233       * @since 1.5.0
 234       */
 235      do_action( 'bp_after_directory_activity' ); ?>
 236  
 237  </div>


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