Ticket #4709: trac4709_bp_button_block_self.patch
File trac4709_bp_button_block_self.patch, 645 bytes (added by , 11 years ago) |
---|
-
bp-core/bp-core-classes.php
1045 1045 if ( true == $this->must_be_logged_in && !is_user_logged_in() ) 1046 1046 return false; 1047 1047 1048 // No button if viewing your own profile 1049 if ( true == $this->block_self && bp_is_my_profile() )1048 // No button if viewing your own profile or this is "self" in a listing 1049 if ( true == $this->block_self && (bp_is_my_profile() || bp_displayed_user_id() == bp_loggedin_user_id()) ) 1050 1050 return false; 1051 1051 1052 1052 // Wrapper properties