Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
04/19/2013 06:48:03 PM (13 years ago)
Author:
boonebgorges
Message:

In BP_Button, make 'block_self' work in member loops

block_self is designed to make buttons invisible when a user is looking at his
own page. This changeset makes it so that block_self also hides block_self
buttons during a bp_has_members() loop on the iteration where the current user
id is the currently iterated users.

Note that BP does not currently put any such buttons in the members directory.
This patch is for plugins/themes that add their own custom buttons.

Fixes #4709

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-members/bp-members-template.php

    r6815 r6924  
    384384        function bp_get_member_user_id() {
    385385                global $members_template;
    386 
    387                 return apply_filters( 'bp_get_member_user_id', $members_template->member->id );
     386                $member_id = isset( $members_template->member->id ) ? (int) $members_template->member->id : false;
     387                return apply_filters( 'bp_get_member_user_id', $member_id );
    388388        }
    389389
Note: See TracChangeset for help on using the changeset viewer.