Skip to:
Content

BuddyPress.org

Ticket #6385: 6385.2.patch

File 6385.2.patch, 2.0 KB (added by dcavins, 9 years ago)

Adds a search box to the manage members screen, hooked to the new action introduced in #7249.

  • src/bp-templates/bp-legacy/buddypress-functions.php

    diff --git src/bp-templates/bp-legacy/buddypress-functions.php src/bp-templates/bp-legacy/buddypress-functions.php
    index af44656..499f6e3 100644
    class BP_Legacy extends BP_Theme_Compat { 
    105105
    106106                        // Group buttons.
    107107                        if ( bp_is_active( 'groups' ) ) {
    108                                 add_action( 'bp_group_header_actions',          'bp_group_join_button',               5      );
    109                                 add_action( 'bp_group_header_actions',          'bp_group_new_topic_button',         20      );
    110                                 add_action( 'bp_directory_groups_actions',      'bp_group_join_button'                       );
    111                                 add_action( 'bp_groups_directory_group_filter', 'bp_legacy_theme_group_create_nav', 999      );
    112                                 add_action( 'bp_after_group_admin_content',     'bp_legacy_groups_admin_screen_hidden_input' );
     108                                add_action( 'bp_group_header_actions',          'bp_group_join_button',               5           );
     109                                add_action( 'bp_group_header_actions',          'bp_group_new_topic_button',         20           );
     110                                add_action( 'bp_directory_groups_actions',      'bp_group_join_button'                            );
     111                                add_action( 'bp_groups_directory_group_filter', 'bp_legacy_theme_group_create_nav', 999           );
     112                                add_action( 'bp_after_group_admin_content',     'bp_legacy_groups_admin_screen_hidden_input'      );
     113                                add_action( 'bp_before_group_admin_form',       'bp_legacy_theme_group_manage_members_add_search' );
    113114                        }
    114115
    115116                        // Blog button.
    function bp_legacy_theme_cover_image( $params = array() ) { 
    19131914                }
    19141915        ';
    19151916}
     1917
     1918/**
     1919 * Add a search box to a single group's manage members screen.
     1920 *
     1921 * @since 2.7.0
     1922 *
     1923 * @return string HTML for the search form.
     1924 */
     1925function bp_legacy_theme_group_manage_members_add_search() {
     1926        if ( bp_is_action_variable( 'manage-members' ) ) :
     1927                ?>
     1928                <div id="members-dir-search" class="dir-search no-ajax" role="search">
     1929                        <?php bp_directory_members_search_form(); ?>
     1930                </div>
     1931                <?php
     1932        endif;
     1933}