Skip to:
Content

BuddyPress.org

Changeset 4958


Ignore:
Timestamp:
08/09/2011 07:32:28 PM (15 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

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-activity/bp-activity-classes.php

    r4911 r4958  
    255255                global $wpdb, $bp;
    256256
    257                 extract( $args );
    258 
    259257                $defaults = array(
    260258                        'id'                => false,
     
    270268                        'hide_sitewide'     => false
    271269                );
     270                $params = wp_parse_args( $args, $defaults );
     271                extract( $params );
    272272
    273273                $where_args = false;
  • 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.