Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
04/28/2019 11:10:31 PM (5 years ago)
Author:
imath
Message:

Make sure custom visibility is disabled for the default profile field

props venutius

Fixes #8042

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-core/admin/bp-core-admin-schema.php

    r11787 r12390  
    383383    if ( ! $wpdb->get_var( "SELECT id FROM {$bp_prefix}bp_xprofile_fields WHERE id = 1" ) ) {
    384384        $insert_sql[] = "INSERT INTO {$bp_prefix}bp_xprofile_fields ( group_id, parent_id, type, name, description, is_required, can_delete ) VALUES ( 1, 0, 'textbox', " . $wpdb->prepare( '%s', stripslashes( bp_get_option( 'bp-xprofile-fullname-field-name' ) ) ) . ", '', 1, 0 );";
     385
     386        // Make sure the custom visibility is disabled for the default field.
     387        if ( ! $wpdb->get_var( "SELECT id FROM {$bp_prefix}bp_xprofile_meta WHERE id = 1" ) ) {
     388            $insert_sql[] = "INSERT INTO {$bp_prefix}bp_xprofile_meta ( object_id, object_type, meta_key, meta_value ) VALUES ( 1, 'field', 'allow_custom_visibility', 'disabled' );";
     389        }
    385390    }
    386391
Note: See TracChangeset for help on using the changeset viewer.