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

Skip concat if logged in as admin #51

Open
jpbcx43 opened this issue Oct 24, 2019 · 2 comments
Open

Skip concat if logged in as admin #51

jpbcx43 opened this issue Oct 24, 2019 · 2 comments

Comments

@jpbcx43
Copy link

jpbcx43 commented Oct 24, 2019

This works great - however I use the Avada theme, and when this plugin is active, it breaks the Fusion Builder editor. Is there a way to apply logic that says if a user is logged into the back end, then do not concat / bypass?

Or, bypass concat anywhere inside wp-admin.

Thanks

@emrikol
Copy link
Contributor

emrikol commented Jan 27, 2020

You should be able to do something like this in functions.php or an mu-pluigin:

function nginx_http_concat_no_logged_in( $do_concat, $handle ) {
	if ( is_user_logged_in() ) {
		$do_concat = false;
	}

	return $do_concat;
}
add_filter( 'js_do_concat', 'nginx_http_concat_no_logged_in', 10, 2 );
add_filter( 'css_do_concat', 'nginx_http_concat_no_logged_in', 10, 2 );

@XVII
Copy link

XVII commented Feb 8, 2021

Should also skip wp-login page as well. Getting issues with third party SSO.

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