[ 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              <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>
 193  
 194              <?php
 195  
 196              /**
 197               * Fires before the display of the activity syndication options.
 198               *
 199               * @since 1.2.0
 200               */
 201              do_action( 'bp_activity_syndication_options' ); ?>
 202  
 203              <li id="activity-filter-select" class="last">
 204                  <label for="activity-filter-by"><?php _e( 'Show:', 'buddypress' ); ?></label>
 205                  <select id="activity-filter-by">
 206                      <option value="-1"><?php _e( '&mdash; Everything &mdash;', 'buddypress' ); ?></option>
 207  
 208                      <?php bp_activity_show_filters(); ?>
 209  
 210                      <?php
 211  
 212                      /**
 213                       * Fires inside the select input for activity filter by options.
 214                       *
 215                       * @since 1.2.0
 216                       */
 217                      do_action( 'bp_activity_filter_options' ); ?>
 218  
 219                  </select>
 220              </li>
 221          </ul>
 222      </div><!-- .item-list-tabs -->
 223  
 224      <?php
 225  
 226      /**
 227       * Fires before the display of the activity list.
 228       *
 229       * @since 1.5.0
 230       */
 231      do_action( 'bp_before_directory_activity_list' ); ?>
 232  
 233      <div class="activity" aria-live="polite" aria-atomic="true" aria-relevant="all">
 234  
 235          <?php bp_get_template_part( 'activity/activity-loop' ); ?>
 236  
 237      </div><!-- .activity -->
 238  
 239      <?php
 240  
 241      /**
 242       * Fires after the display of the activity list.
 243       *
 244       * @since 1.5.0
 245       */
 246      do_action( 'bp_after_directory_activity_list' ); ?>
 247  
 248      <?php
 249  
 250      /**
 251       * Fires inside and displays the activity directory display content.
 252       */
 253      do_action( 'bp_directory_activity_content' ); ?>
 254  
 255      <?php
 256  
 257      /**
 258       * Fires after the activity directory display content.
 259       *
 260       * @since 1.2.0
 261       */
 262      do_action( 'bp_after_directory_activity_content' ); ?>
 263  
 264      <?php
 265  
 266      /**
 267       * Fires after the activity directory listing.
 268       *
 269       * @since 1.5.0
 270       */
 271      do_action( 'bp_after_directory_activity' ); ?>
 272  
 273  </div>


Generated: Mon Sep 21 01:01:31 2020 Cross-referenced by PHPXref 0.7.1