[ 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">
  60                  <a href="<?php bp_activity_directory_permalink(); ?>">
  61                      <?php
  62                      /* translators: %s: number of members */
  63                      printf( __( 'All Members %s', 'buddypress' ), '<span>' . bp_get_total_member_count() . '</span>' );
  64                      ?>
  65                  </a>
  66              </li>
  67  
  68              <?php if ( is_user_logged_in() ) : ?>
  69  
  70                  <?php
  71  
  72                  /**
  73                   * Fires before the listing of friends activity type tab.
  74                   *
  75                   * @since 1.2.0
  76                   */
  77                  do_action( 'bp_before_activity_type_tab_friends' ); ?>
  78  
  79                  <?php if ( bp_is_active( 'friends' ) ) : ?>
  80  
  81                      <?php if ( bp_get_total_friend_count( bp_loggedin_user_id() ) ) : ?>
  82  
  83                          <li id="activity-friends">
  84                              <a href="<?php echo bp_loggedin_user_domain() . bp_get_activity_slug() . '/' . bp_get_friends_slug() . '/'; ?>">
  85                                  <?php
  86                                  /* translators: %s: number of friends */
  87                                  printf( __( 'My Friends %s', 'buddypress' ), '<span>' . bp_get_total_friend_count( bp_loggedin_user_id() ) . '</span>' );
  88                                  ?>
  89                              </a>
  90                          </li>
  91  
  92                      <?php endif; ?>
  93  
  94                  <?php endif; ?>
  95  
  96                  <?php
  97  
  98                  /**
  99                   * Fires before the listing of groups activity type tab.
 100                   *
 101                   * @since 1.2.0
 102                   */
 103                  do_action( 'bp_before_activity_type_tab_groups' ); ?>
 104  
 105                  <?php if ( bp_is_active( 'groups' ) ) : ?>
 106  
 107                      <?php if ( bp_get_total_group_count_for_user( bp_loggedin_user_id() ) ) : ?>
 108  
 109                          <?php
 110                          printf(
 111                              '<li id="activity-groups"><a href="%1$s">%2$s</a></li>',
 112                              esc_url( bp_loggedin_user_domain() . bp_get_activity_slug() . '/' . bp_get_groups_slug() . '/' ),
 113                              sprintf(
 114                                  /* translators: %s: current user groups count */
 115                                  __( 'My Groups %s', 'buddypress' ),
 116                                  '<span>' . bp_get_total_group_count_for_user( bp_loggedin_user_id() ) . '</span>'
 117                              )
 118                          );
 119                          ?>
 120  
 121                      <?php endif; ?>
 122  
 123                  <?php endif; ?>
 124  
 125                  <?php
 126  
 127                  /**
 128                   * Fires before the listing of favorites activity type tab.
 129                   *
 130                   * @since 1.2.0
 131                   */
 132                  do_action( 'bp_before_activity_type_tab_favorites' ); ?>
 133  
 134                  <?php if ( bp_get_total_favorite_count_for_user( bp_loggedin_user_id() ) ) : ?>
 135  
 136                      <li id="activity-favorites">
 137                          <a href="<?php echo bp_loggedin_user_domain() . bp_get_activity_slug() . '/favorites/'; ?>">
 138                              <?php
 139                              /* translators: %s: number of favorites */
 140                              printf( __( 'My Favorites %s', 'buddypress' ), '<span>' . bp_get_total_favorite_count_for_user( bp_loggedin_user_id() ) . '</span>' );
 141                              ?>
 142                          </a>
 143                      </li>
 144  
 145                  <?php endif; ?>
 146  
 147                  <?php if ( bp_activity_do_mentions() ) : ?>
 148  
 149                      <?php
 150  
 151                      /**
 152                       * Fires before the listing of mentions activity type tab.
 153                       *
 154                       * @since 1.2.0
 155                       */
 156                      do_action( 'bp_before_activity_type_tab_mentions' ); ?>
 157  
 158                      <li id="activity-mentions">
 159                          <a href="<?php echo bp_loggedin_user_domain() . bp_get_activity_slug() . '/mentions/'; ?>">
 160                              <?php _e( 'Mentions', 'buddypress' ); ?>
 161                              <?php if ( bp_get_total_mention_count_for_user( bp_loggedin_user_id() ) ) : ?>
 162                                  &nbsp;
 163                                  <strong>
 164                                      <span>
 165                                          <?php
 166                                          /* translators: %s: new mentions count */
 167                                          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() ) );
 168                                          ?>
 169                                      </span>
 170                                  </strong>
 171                              <?php endif; ?>
 172                          </a>
 173                      </li>
 174  
 175                  <?php endif; ?>
 176  
 177              <?php endif; ?>
 178  
 179              <?php
 180  
 181              /**
 182               * Fires after the listing of activity type tabs.
 183               *
 184               * @since 1.2.0
 185               */
 186              do_action( 'bp_activity_type_tabs' ); ?>
 187          </ul>
 188      </div><!-- .item-list-tabs -->
 189  
 190      <div class="item-list-tabs no-ajax" id="subnav" aria-label="<?php esc_attr_e( 'Activity secondary navigation', 'buddypress' ); ?>" role="navigation">
 191          <ul>
 192              <?php if ( bp_activity_is_feed_enable( 'sitewide' ) ) : ?>
 193                  <li class="feed">
 194                      <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' ); ?>">
 195                          <?php esc_html_e( 'RSS', 'buddypress' ); ?>
 196                      </a>
 197                  </li>
 198              <?php endif; ?>
 199  
 200              <?php
 201  
 202              /**
 203               * Fires before the display of the activity syndication options.
 204               *
 205               * @since 1.2.0
 206               */
 207              do_action( 'bp_activity_syndication_options' ); ?>
 208  
 209              <li id="activity-filter-select" class="last">
 210                  <label for="activity-filter-by"><?php _e( 'Show:', 'buddypress' ); ?></label>
 211                  <select id="activity-filter-by">
 212                      <option value="-1"><?php _e( '&mdash; Everything &mdash;', 'buddypress' ); ?></option>
 213  
 214                      <?php bp_activity_show_filters(); ?>
 215  
 216                      <?php
 217  
 218                      /**
 219                       * Fires inside the select input for activity filter by options.
 220                       *
 221                       * @since 1.2.0
 222                       */
 223                      do_action( 'bp_activity_filter_options' ); ?>
 224  
 225                  </select>
 226              </li>
 227          </ul>
 228      </div><!-- .item-list-tabs -->
 229  
 230      <?php
 231  
 232      /**
 233       * Fires before the display of the activity list.
 234       *
 235       * @since 1.5.0
 236       */
 237      do_action( 'bp_before_directory_activity_list' ); ?>
 238  
 239      <div class="activity" aria-live="polite" aria-atomic="true" aria-relevant="all">
 240  
 241          <?php bp_get_template_part( 'activity/activity-loop' ); ?>
 242  
 243      </div><!-- .activity -->
 244  
 245      <?php
 246  
 247      /**
 248       * Fires after the display of the activity list.
 249       *
 250       * @since 1.5.0
 251       */
 252      do_action( 'bp_after_directory_activity_list' ); ?>
 253  
 254      <?php
 255  
 256      /**
 257       * Fires inside and displays the activity directory display content.
 258       */
 259      do_action( 'bp_directory_activity_content' ); ?>
 260  
 261      <?php
 262  
 263      /**
 264       * Fires after the activity directory display content.
 265       *
 266       * @since 1.2.0
 267       */
 268      do_action( 'bp_after_directory_activity_content' ); ?>
 269  
 270      <?php
 271  
 272      /**
 273       * Fires after the activity directory listing.
 274       *
 275       * @since 1.5.0
 276       */
 277      do_action( 'bp_after_directory_activity' ); ?>
 278  
 279  </div>


Generated: Tue Mar 19 01:01:09 2024 Cross-referenced by PHPXref 0.7.1