Skip to:
Content

BuddyPress.org

Ticket #5763: 5763.diff

File 5763.diff, 1.1 KB (added by imath, 11 years ago)
  • src/bp-friends/bp-friends-widgets.php

    diff --git src/bp-friends/bp-friends-widgets.php src/bp-friends/bp-friends-widgets.php
    index 5116ca3..cabf00c 100644
    class BP_Core_Friends_Widget extends WP_Widget { 
    8484
    8585                echo $before_title . $title . $after_title;
    8686
    87                 $members_args = array(
     87                $members_args = apply_filters( 'bp_friends_widget_members_args', array(
    8888                        'user_id'         => absint( $user_id ),
    8989                        'type'            => sanitize_text_field( $instance['friend_default'] ),
    9090                        'max'             => absint( $instance['max_friends'] ),
    9191                        'populate_extras' => 1,
    92                 );
     92                ) );
    9393
    9494                ?>
    9595
    function bp_core_ajax_widget_friends() { 
    219219                        break;
    220220        }
    221221
    222         $members_args = array(
     222        $members_args = apply_filters( 'bp_friends_widget_members_args', array(
    223223                'user_id'         => bp_displayed_user_id(),
    224224                'type'            => $type,
    225225                'max'             => absint( $_POST['max-friends'] ),
    226226                'populate_extras' => 1,
    227         );
     227        ) );
    228228
    229229        if ( bp_has_members( $members_args ) ) : ?>
    230230                <?php echo '0[[SPLIT]]'; // return valid result. TODO: remove this. ?>