Skip to:
Content

BuddyPress.org

Changeset 1224 for trunk/bp-xprofile.php


Ignore:
Timestamp:
03/16/2009 03:12:01 PM (17 years ago)
Author:
apeatling
Message:

Changed get_field_data function to xprofile_get_field_data()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-xprofile.php

    r1215 r1224  
    809809
    810810/**
     811 * xprofile_get_field_data()
     812 *
     813 * Fetches profile data for a specific field for the user.
     814 *
     815 * @package BuddyPress Core
     816 * @param $field_name The name of the field to get data for.
     817 * @param $user_id The ID of the user
     818 * @global $bp The global BuddyPress settings variable created in bp_core_setup_globals()
     819 * @uses BP_XProfile_ProfileData::get_value_byfieldname() Fetches the value based on the params passed.
     820 * @return The profile field data.
     821 */
     822function xprofile_get_field_data( $field_name, $user_id = null ) {
     823        global $bp;
     824       
     825        if ( !$user_id )
     826                $user_id = $bp->displayed_user->id;
     827               
     828        return apply_filters( 'xprofile_get_field_data', BP_XProfile_ProfileData::get_value_byfieldname( $field_name, $user_id ) );
     829}
     830
     831/**
    811832 * xprofile_get_random_profile_data()
    812833 *
Note: See TracChangeset for help on using the changeset viewer.