Skip to:
Content

Changeset 8975


Ignore:
Timestamp:
09/03/2014 06:33:41 PM (4 years ago)
Author:
johnjamesjacoby
Message:

Introduce template functions for returning and outputting member display-name for activity stream entry authors.

File:
1 edited

Legend:

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

    r8955 r8975  
    10481048
    10491049/**
     1050 * Output the display name of the member who posted the activity
     1051 *
     1052 * @since BuddyPress (2.1.0)
     1053 *
     1054 * @uses bp_get_activity_member_display_name()
     1055 */
     1056function bp_activity_member_display_name() {
     1057    echo bp_get_activity_member_display_name();
     1058}
     1059
     1060    /**
     1061     * Return the display name of the member who posted the activity
     1062     *
     1063     * @since BuddyPress (2.1.0)
     1064     *
     1065     * @global object $activities_template {@link BP_Activity_Template}
     1066     * @uses apply_filters() To call the 'bp_get_activity_member_display_name' hook.
     1067     *
     1068     * @return string The date the activity was recorded.
     1069     */
     1070    function bp_get_activity_member_display_name() {
     1071        global $activities_template;
     1072
     1073        $retval = isset( $activities_template->activity->display_name )
     1074            ? $activities_template->activity->display_name
     1075            : '';
     1076
     1077        return apply_filters( 'bp_get_activity_member_display_name', $retval );
     1078    }
     1079
     1080/**
    10501081 * Output the activity object name.
    10511082 *
Note: See TracChangeset for help on using the changeset viewer.