Hi keytastic,
I will check it. Maybe with the latest BuddyPress don’t work.
Kind regards
In my dev site it is shown.
May be the problem is the load order. Please make a test.
Open the file /wangguard/wangguard-buddypress.php in the last line, before php close ( ?> ), paste this code:
function wangguard_bp_report_button_header_2() {
global $bp;
if (!$bp) return;
$user_object = new WP_User($bp->displayed_user->id);
if (empty ($user_object->ID)) return;
if (wangguard_is_admin($user_object)) return;
echo bp_get_button( array( 'id' => 'wangguard_report_user',
'component' => 'members',
'must_be_logged_in' => true,
'block_self' => true,
'wrapper_id' => 'wangguard_report_user-button',
'link_href' => "javascript:void(0)",
'link_class' =>'wangguard-user-report wangguard-user-report-id-' . $user_object->ID,
'link_title' => __('Report user', 'wangguard'),
'link_text' => __('Report user', 'wangguard')) );
}
if (get_site_option ("wangguard-enable-bp-report-btn")==1) {
add_action( 'bp_member_header_actions', 'wangguard_bp_report_button_header_2' , 20 );
}
Please update me.
Kind regards
It didn’t work. I tried it and my site didn’t load at all. I made sure it was before the closing php, too.
Is your website don’t leading, or the button?
If is the button, do you use a theme with templates for BuddyPress?