[ Index ]

PHP Cross Reference of BuddyPress

title

Body

[close]

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

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


Generated: Mon Apr 29 01:01:07 2024 Cross-referenced by PHPXref 0.7.1