I'm creating a wordpress widget based on buddypress 2.0. This widget will simply output displayed user's progress bar and percentage in a side bar.
I've already written the main code for the widget and I'm using this function bppp_progression_block($user_id)
to output the progress bar in a side bar. The function is from another plugin called buddypress-profile-progression. The function is defined in this plugin.
How can I make that function work outside a member's profile page?
Here is the main code for my wordpress widget:
$user_id = bp_loggedin_user_id(); // Get the logged in user's id
echo bppp_get_progression_block($user_id); // Output the progress bar
This is what worked for me:
In bppp-template.php change lines 50-52 from:
to:
On line 67 change:
to:
On lines 71-73 change:
to just:
Change 118 from:
to: