Skip to:
Content

BuddyPress.org


Ignore:
File:
1 edited

Legend:

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

    r10180 r13657  
    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( __( 'All Groups %s', 'buddypress' ), '<span>' . 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( __( 'My Groups %s', 'buddypress' ), '<span>' . 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
     
    99126        </div>
    100127
     128        <h2 class="bp-screen-reader-text"><?php
     129            /* translators: accessibility text */
     130            _e( 'Groups directory', 'buddypress' );
     131        ?></h2>
     132
    101133        <div id="groups-dir-list" class="groups dir-list">
    102134            <?php bp_get_template_part( 'groups/groups-loop' ); ?>
     
    106138
    107139        /**
    108          * Fires and displays the group content.
    109          *
    110          * @since 1.1.0
    111          */
     140         * Fires and displays the group content.
     141         *
     142         * @since 1.1.0
     143         */
    112144        do_action( 'bp_directory_groups_content' ); ?>
    113145
     
    117149
    118150        /**
    119          * Fires after the display of the groups content.
    120          *
    121          * @since 1.1.0
    122          */
     151         * Fires after the display of the groups content.
     152         *
     153         * @since 1.1.0
     154         */
    123155        do_action( 'bp_after_directory_groups_content' ); ?>
    124156
     
    128160
    129161    /**
    130      * Fires after the display of the groups.
    131      *
    132      * @since 1.1.0
    133      */
     162     * Fires after the display of the groups.
     163     *
     164     * @since 1.1.0
     165     */
    134166    do_action( 'bp_after_directory_groups' ); ?>
    135167
Note: See TracChangeset for help on using the changeset viewer.