bbpress: disable the possibility an admin can see others private-messages

/* in plugin-file: buddypress/bp-members/bp-membersfunctions.php#1485
 * Check whether the logged-in user can edit settings for the displayed user.
 * function: bp_core_can_edit_settings()
 * bp_moderate has the capacity 'manage_options', so all roles with 'manage_options' (admin)
 * can see private-messages unless it is filtered out by this filter
 */

	function custom_bp_core_can_edit_settings() {
		$status = false;
		if ( bp_is_my_profile() ) {
			$status = true;
		} 
	return $status;
	}
	add_filter( 'bp_core_can_edit_settings', 'custom_bp_core_can_edit_settings');

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

© 2020 Jakob Helmer - Powered by WordPress - @trails&tribulations