Skip to:
Content

BuddyPress.org

Changeset 8405


Ignore:
Timestamp:
05/10/2014 12:53:01 AM (11 years ago)
Author:
boonebgorges
Message:

Specify logged-in user when getting first name for "What's new?" activity prompt

By default, BuddyPress only displays the post form in a context where
bp_get_user_fullname() would default to the logged-in user. However, if the
form is included elsewhere - such as on another user's profile - the first name
displayed would erroneously be that of the displayed user, rather than the
logged in user who is being prompted to post an update.

Fixes #5540

Props lenasterg

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-templates/bp-legacy/buddypress/activity/post-form.php

    r7965 r8405  
    1919        </a>
    2020    </div>
    21    
     21
    2222    <p class="activity-greeting"><?php if ( bp_is_group() )
    23         printf( __( "What's new in %s, %s?", 'buddypress' ), bp_get_group_name(), bp_get_user_firstname() );
     23        printf( __( "What's new in %s, %s?", 'buddypress' ), bp_get_group_name(), bp_get_user_firstname( bp_get_loggedin_user_fullname() ) );
    2424    else
    25         printf( __( "What's new, %s?", 'buddypress' ), bp_get_user_firstname() );
     25        printf( __( "What's new, %s?", 'buddypress' ), bp_get_user_firstname( bp_get_loggedin_user_fullname() ) );
    2626    ?></p>
    2727
Note: See TracChangeset for help on using the changeset viewer.