Skip to:
Content
Pages
Categories
Search
Top
Bottom

I need to display pending friends request name in top admin bar menu.


  • Kishores
    Participant

    @kishores

    Right now I have copied the while ( bp_members() ) : bp_the_member(); from request template. and It’s working only on this page http://mysite/members/admin/friends/requests/, In other page result is empty.

    if ( bp_has_members( 'type=alphabetical&include=' . bp_get_friendship_requests() ) ):
    		while ( bp_members() ) : bp_the_member();
    		$html .= '<li>';
    		$html .= '<span class="thread-avatar">';
    		$html .= bp_get_member_avatar();
    		$html .= '</span>';
    		$html .= '<span class="thread-from">';
    		$html .= bp_get_member_name();
    		$html .= '<div class="action">';
    		$html .= '<a class="button accept" href="'.bp_get_friend_accept_request_link().'">' .__( 'Accept', 'buddypress' ).'</a>';
    		$html .= '<a class="button reject" href="' .bp_get_friend_reject_request_link() .'">' .__( 'Reject', 'buddypress' ).'</a>';
    
    	    $html .= do_action( 'bp_friend_requests_item_action' );
    		$html .= '</div>';
    		$html .= bp_get_message_thread_excerpt();
    		$html .= '</span>';
    		$html .= '</li>';
    		endwhile;
    		$html .= '</ul><!-- #message-threads -->';
    		$html .= '</div>';
    	else:
    		$html .= '<div class="messages" role="main">';
    		$html .= '<ul id="message-threads" class="messages-notices">';
    		$html .= '<li>';
    		$html .= '</li>';
    		$html .= '</ul><!-- #message-threads -->';
    		$html .= '<p>Sorry, no requests were found.</p>';
    		$html .= '</div>';
    	endif;

    Here is the code of the function block. It shows lists of pending friend request in request page, but in other page resukt is empty. I’m using all latest version of plugins and WP

    Thanks
    Kishore

  • The topic ‘I need to display pending friends request name in top admin bar menu.’ is closed to new replies.
Skip to toolbar