Rehook WP’s maybe_add_existing_user_to_blog with a later priority.

Description Description

WordPress catches add-user-to-blog requests at init:10. In some cases, this can precede BP’s Blogs component. This function bumps the priority of the core function, so that we can be sure that the Blogs component is loaded first. See https://buddypress.trac.wordpress.org/ticket/3916.

Source Source

File: bp-blogs/bp-blogs-functions.php

function bp_blogs_maybe_add_user_to_blog() {
	if ( ! is_multisite() )

	remove_action( 'init', 'maybe_add_existing_user_to_blog' );
	add_action( 'init', 'maybe_add_existing_user_to_blog', 20 );

Top ↑

Changelog Changelog

Version Description
1.6.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.