Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
08/09/2011 07:32:28 PM (14 years ago)
Author:
djpaul
Message:

Correct handling of default value of the profile field loop's hide_empty_fields.
Also correct potential PHP warnings.
Fixes #3447

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-xprofile/bp-xprofile-template.php

    r4880 r4958  
    156156    // Only show empty fields if we're on the Dashboard, or we're on a user's profile edit page,
    157157    // or this is a registration page
    158     $hide_empty_fields = ( !is_network_admin() && !is_admin() && !bp_is_user_profile_edit() && !bp_is_register_page() );
     158    $hide_empty_fields_default = ( !is_network_admin() && !is_admin() && !bp_is_user_profile_edit() && !bp_is_register_page() );
    159159
    160160    $defaults = array(
    161         'user_id' => $bp->displayed_user->id,
     161        'user_id'           => $bp->displayed_user->id,
    162162        'profile_group_id'  => false,
    163163        'hide_empty_groups' => true,
    164         'hide_empty_fields' => $hide_empty_fields,
     164        'hide_empty_fields' => $hide_empty_fields_default,
    165165        'fetch_fields'      => true,
    166166        'fetch_field_data'  => true,
Note: See TracChangeset for help on using the changeset viewer.