/bp-templates/bp-legacy/buddypress/blogs/index.php

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