Skip to:
Content

BuddyPress.org

Ticket #5262: default-vis-trump.patch

File default-vis-trump.patch, 903 bytes (added by dcavins, 11 years ago)

Patch for change

  • bp-xprofile/bp-xprofile-functions.php

    diff --git bp-xprofile/bp-xprofile-functions.php bp-xprofile/bp-xprofile-functions.php
    index accdd56..1d7ba24 100644
    function bp_xprofile_get_fields_by_visibility_levels( $user_id, $levels = array( 
    752752        foreach( (array) $default_visibility_levels as $d_field_id => $defaults ) {
    753753                // If the admin has forbidden custom visibility levels for this field, replace
    754754                // the user-provided setting with the default specified by the admin
    755                 if ( isset( $defaults['allow_custom'] ) && isset( $defaults['default'] ) && 'disabled' == $defaults['allow_custom'] && isset( $user_visibility_levels[$d_field_id] ) ) {
     755                if ( isset( $defaults['allow_custom'] ) && isset( $defaults['default'] ) && 'disabled' == $defaults['allow_custom'] ) {
    756756                        $user_visibility_levels[$d_field_id] = $defaults['default'];
    757757                }
    758758        }