Skip to:
Content

BuddyPress.org

Changeset 11011


Ignore:
Timestamp:
08/10/2016 06:52:12 PM (3 years ago)
Author:
tw2113
Message:

Adds new field type specific filter to bp_get_member_profile_data function for conditional filtering. Fixes #6165.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-members/bp-members-template.php

    r11008 r11011  
    11521152         * @param array       $r    Array of parsed arguments.
    11531153         */
    1154         return apply_filters( 'bp_get_member_profile_data', $data, $r );
     1154        $data = apply_filters( 'bp_get_member_profile_data', $data, $r );
     1155
     1156        /**
     1157         * Filters the resulting piece of member profile data by field type.
     1158         *
     1159         * This is a dynamic filter based on field type of the current field requested.
     1160         *
     1161         * @since 2.7.0
     1162         *
     1163         * @param string|bool $data Profile data if found, otherwise false.
     1164         * @param array       $r    Array of parsed arguments.
     1165         */
     1166        $data = apply_filters( 'bp_get_member_profile_data_' . $profile_data[ $r['field'] ]['field_type'], $data, $r );
     1167
     1168        return $data;
    11551169    }
    11561170
Note: See TracChangeset for help on using the changeset viewer.