Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
04/19/2013 06:48:03 PM (12 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-core/bp-core-classes.php

    r6654 r6924  
    15731573            return false;
    15741574
     1575        // No button if you are the current user in a loop
     1576        if ( true === $this->block_self && is_user_logged_in() && bp_loggedin_user_id() === bp_get_member_user_id() )
     1577            return false;
     1578
    15751579        // Wrapper properties
    15761580        if ( false !== $this->wrapper ) {
Note: See TracChangeset for help on using the changeset viewer.