Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
02/12/2010 12:48:30 PM (16 years ago)
Author:
apeatling
Message:

Moving the firstname template function into the core so that template files are not tied to functions in functions.php of the default. Remove deprecated code and added to back compat plugin.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-core/bp-core-templatetags.php

    r2695 r2696  
    685685        return apply_filters( 'bp_last_activity', $last_activity );
    686686}
     687
     688function bp_user_firstname() {
     689    echo bp_get_user_firstname();
     690}
     691    function bp_get_user_firstname( $name = false ) {
     692        global $bp;
     693
     694        if ( !$name )
     695            $name = $bp->loggedin_user->fullname;
     696
     697        $fullname = (array)explode( ' ', $name );
     698
     699        return apply_filters( 'bp_get_user_firstname', $fullname[0], $fullname );
     700    }
    687701
    688702function bp_user_link() {
Note: See TracChangeset for help on using the changeset viewer.