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

Feature request: custom branding as a multisite option #169

Open
oldfieldtc opened this issue Oct 8, 2024 · 2 comments
Open

Feature request: custom branding as a multisite option #169

oldfieldtc opened this issue Oct 8, 2024 · 2 comments

Comments

@oldfieldtc
Copy link

For multisites, would it be possible to change the 'Custom WordPress login branding' option to be a multisite option instead of being per individual site? We've got a lot of sites under our multisite and it would be a huge help if I could change the branding in one place rather than set the option on every site!

Thanks

@figureone
Copy link
Member

Would it be ok to add a filter to specify which branding option to choose, and that would override whatever is set in Authorizer settings on the individual subsites? Something like:

add_filter( 'authorizer_set_branding_option', function ( $branding_value, $branding_options ) {
	// Make sure the custom branding option exists in the list of branding options
	// before using it.
	if ( ! empty( array_filter( $branding_options, function( $branding_option ) { return ! empty( $branding_option['value'] ) && 'your-global-branding-option' === $branding_option['value']; } ) ) ) {
		$branding_value = 'your-global-branding-option';
	}

	return $branding_value;
} );

We can also add a wp-config.php constant, something like AUTHORIZER_BRANDING_OPTION that would do the same.

I think that's easier for us to implement instead of trying to handle folks that want custom branding on each subsite vs. consistent branding across all subsites.

@oldfieldtc
Copy link
Author

That could work! Happy to test this out if this gets added to a branch

@uhm-coe uhm-coe deleted a comment Oct 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@figureone @oldfieldtc and others