Skip to:
Content

BuddyPress.org

Ticket #7391: 7391-update-xprofile-caps.patch

File 7391-update-xprofile-caps.patch, 713 bytes (added by hnla, 8 years ago)
  • src/bp-xprofile/bp-xprofile-caps.php

     
    7777 * @return bool
    7878 */
    7979function bp_xprofile_grant_bp_xprofile_change_field_visibility_for_logged_out_users( $user_can, $user_id, $capability ) {
    80         if ( 'bp_xprofile_change_field_visibility' === $capability && 0 === $user_id ) {
     80        if ( 'bp_xprofile_change_field_visibility' === $capability
     81                    && 0 === $user_id
     82                     && 'disabled' !== bp_xprofile_get_meta( bp_get_the_profile_field_id(), 'field', 'allow_custom_visibility' ) ) {
     83
    8184                $user_can = true;
    8285        }
    8386