Skip to:
Content

BuddyPress.org


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-templates/bp-legacy/buddypress/groups/index.php

    r10150 r13822  
    33 * BuddyPress - Groups
    44 *
    5  * @package    BuddyPress
     5 * @package BuddyPress
    66 * @subpackage bp-legacy
     7 * @version 12.0.0
    78 */
    89
     
    3435        do_action( 'bp_before_directory_groups_content' ); ?>
    3536
    36         <div id="group-dir-search" class="dir-search" role="search">
    37                 <?php bp_directory_groups_search_form(); ?>
    38         </div><!-- #group-dir-search -->
     37        <?php /* Backward compatibility for inline search form. Use template part instead. */ ?>
     38        <?php if ( has_filter( 'bp_directory_groups_search_form' ) ) : ?>
     39
     40                <div id="group-dir-search" class="dir-search" role="search">
     41                        <?php bp_directory_groups_search_form(); ?>
     42                </div><!-- #group-dir-search -->
     43
     44        <?php else: ?>
     45
     46                <?php bp_get_template_part( 'common/search/dir-search-form' ); ?>
     47
     48        <?php endif; ?>
    3949
    4050        <form action="" method="post" id="groups-directory-form" class="dir-form">
    4151
    42                 <?php
     52                <div id="template-notices" role="alert" aria-atomic="true">
     53                        <?php
    4354
    44                 /** This action is documented in bp-templates/bp-legacy/buddypress/activity/index.php */
    45                 do_action( 'template_notices' ); ?>
     55                        /** This action is documented in bp-templates/bp-legacy/buddypress/activity/index.php */
     56                        do_action( 'template_notices' ); ?>
    4657
    47                 <div class="item-list-tabs" role="navigation">
     58                </div>
     59
     60                <div class="item-list-tabs" aria-label="<?php esc_attr_e( 'Groups directory main navigation', 'buddypress' ); ?>">
    4861                        <ul>
    49                                 <li class="selected" id="groups-all"><a href="<?php bp_groups_directory_permalink(); ?>"><?php printf( __( 'All Groups <span>%s</span>', 'buddypress' ), bp_get_total_group_count() ); ?></a></li>
     62                                <li class="selected" id="groups-all">
     63                                        <a href="<?php bp_groups_directory_url(); ?>">
     64                                                <?php
     65                                                /* translators: %s: all groups count */
     66                                                printf( esc_html__( 'All Groups %s', 'buddypress' ), '<span>' . esc_html( bp_get_total_group_count() ) . '</span>' );
     67                                                ?>
     68                                        </a>
     69                                </li>
    5070
    5171                                <?php if ( is_user_logged_in() && bp_get_total_group_count_for_user( bp_loggedin_user_id() ) ) : ?>
    52                                         <li id="groups-personal"><a href="<?php echo bp_loggedin_user_domain() . bp_get_groups_slug() . '/my-groups/'; ?>"><?php printf( __( 'My Groups <span>%s</span>', 'buddypress' ), bp_get_total_group_count_for_user( bp_loggedin_user_id() ) ); ?></a></li>
     72                                        <li id="groups-personal">
     73                                                <a href="<?php bp_loggedin_user_link( array( bp_get_groups_slug(), 'my-groups' ) ); ?>">
     74                                                        <?php
     75                                                        /* translators: %s: current user groups count */
     76                                                        printf( esc_html__( 'My Groups %s', 'buddypress' ), '<span>' . esc_html( bp_get_total_group_count_for_user( bp_loggedin_user_id() ) ) . '</span>' );
     77                                                        ?>
     78                                                </a>
     79                                        </li>
    5380                                <?php endif; ?>
    5481
     
    6592                </div><!-- .item-list-tabs -->
    6693
    67                 <div class="item-list-tabs" id="subnav" role="navigation">
     94                <div class="item-list-tabs" id="subnav" aria-label="<?php esc_attr_e( 'Groups directory secondary navigation', 'buddypress' ); ?>" role="navigation">
    6895                        <ul>
    6996                                <?php
     
    78105                                <li id="groups-order-select" class="last filter">
    79106
    80                                         <label for="groups-order-by"><?php _e( 'Order By:', 'buddypress' ); ?></label>
     107                                        <label for="groups-order-by"><?php esc_html_e( 'Order By:', 'buddypress' ); ?></label>
    81108
    82109                                        <select id="groups-order-by">
    83                                                 <option value="active"><?php _e( 'Last Active', 'buddypress' ); ?></option>
    84                                                 <option value="popular"><?php _e( 'Most Members', 'buddypress' ); ?></option>
    85                                                 <option value="newest"><?php _e( 'Newly Created', 'buddypress' ); ?></option>
    86                                                 <option value="alphabetical"><?php _e( 'Alphabetical', 'buddypress' ); ?></option>
     110                                                <option value="active"><?php esc_html_e( 'Last Active', 'buddypress' ); ?></option>
     111                                                <option value="popular"><?php esc_html_e( 'Most Members', 'buddypress' ); ?></option>
     112                                                <option value="newest"><?php esc_html_e( 'Newly Created', 'buddypress' ); ?></option>
     113                                                <option value="alphabetical"><?php esc_html_e( 'Alphabetical', 'buddypress' ); ?></option>
    87114
    88115                                                <?php
     
    99126                </div>
    100127
     128                <h2 class="bp-screen-reader-text">
     129                        <?php
     130                                /* translators: accessibility text */
     131                                esc_html_e( 'Groups directory', 'buddypress' );
     132                        ?>
     133                </h2>
     134
    101135                <div id="groups-dir-list" class="groups dir-list">
    102136                        <?php bp_get_template_part( 'groups/groups-loop' ); ?>
     
    106140
    107141                /**
    108                  * Fires and displays the group content.
    109                  *
    110                  * @since 1.1.0
    111                  */
     142                 * Fires and displays the group content.
     143                 *
     144                 * @since 1.1.0
     145                 */
    112146                do_action( 'bp_directory_groups_content' ); ?>
    113147
     
    117151
    118152                /**
    119                  * Fires after the display of the groups content.
    120                  *
    121                  * @since 1.1.0
    122                  */
     153                 * Fires after the display of the groups content.
     154                 *
     155                 * @since 1.1.0
     156                 */
    123157                do_action( 'bp_after_directory_groups_content' ); ?>
    124158
     
    128162
    129163        /**
    130          * Fires after the display of the groups.
    131          *
    132          * @since 1.1.0
    133          */
     164         * Fires after the display of the groups.
     165         *
     166         * @since 1.1.0
     167         */
    134168        do_action( 'bp_after_directory_groups' ); ?>
    135169
Note: See TracChangeset for help on using the changeset viewer.