Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs: Add documentation on how to prevent the Global Media Library site from being created #235

Open
ntwb opened this issue May 13, 2022 · 1 comment
Labels
could have Could be done, or nice to have, low priority for now

Comments

@ntwb
Copy link

ntwb commented May 13, 2022

Add documentation on how to prevent the Global Media Library site from being created

// Disallow Altis from creating a Global Content Repository site
add_filter( 'muplugins_loaded', function() { 
	if ( defined( 'WP_INSTALLING' ) && WP_INSTALLING ) {
		remove_action( 'plugins_loaded', 'Altis\\Enhanced_Search\\load_elasticpress', 4 );
	}
	remove_action( 'altis.migrate', 'Altis\\Global_Content\\maybe_create_site' );
} );

Note: The above code is untested by my, I copied the source from another internal HM project, this source can be looked up for further reference/context

@roborourke
Copy link
Contributor

Why do you need to do this? Just thinking If there is any context for this we may want to document to make it more searchable. Or perhaps we need to consider making it a config option?

I'm not really keen on encouraging doing this at the moment but I'd prefer to use a config option so we could at least determine whether to load any other features that may rely on it in future and warn appropriately.

@roborourke roborourke added to refine Issues needing refinement. could have Could be done, or nice to have, low priority for now labels May 13, 2022
@veselala veselala removed the to refine Issues needing refinement. label Jun 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
could have Could be done, or nice to have, low priority for now
Projects
None yet
Development

No branches or pull requests

3 participants