Disable CMB2 styles on front end forms
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Disable CMB2 styles on front end forms. | |
* | |
* @return bool $enabled Whether to enable (enqueue) styles. | |
*/ | |
function km_disable_cmb2_front_end_styles( $enabled ) { | |
if ( ! is_admin() ) { | |
$enabled = false; | |
} | |
return $enabled; | |
} | |
add_filter( 'cmb2_enqueue_css', 'km_disable_cmb2_front_end_styles' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment