• I just installed WangGuard and so far it looks pretty sweet. I’ve checked the configuration option to “Show the ‘report user’ button on BuddyPress.” and it shows on the Activity Stream, but it won’t display on the User Profile page. How can I fix it?

    https://ww.wp.xz.cn/plugins/wangguard/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Jose Conti

    (@jconti)

    Hi keytastic,

    I will check it. Maybe with the latest BuddyPress don’t work.

    Kind regards

    Plugin Author Jose Conti

    (@jconti)

    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

    Thread Starter keytastic

    (@keytastic)

    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.

    Plugin Author Jose Conti

    (@jconti)

    Is your website don’t leading, or the button?

    If is the button, do you use a theme with templates for BuddyPress?

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘BuddyPress user profile missing "report user" button’ is closed to new replies.