Skip to content

Instantly share code, notes, and snippets.

@forgeandsmith
Last active August 29, 2015 14:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save forgeandsmith/ad71dcd751d98e883d8f to your computer and use it in GitHub Desktop.
Save forgeandsmith/ad71dcd751d98e883d8f to your computer and use it in GitHub Desktop.
Gravity Forms Disable Output CSS Functions
// this function disables GF CSS on theme activation
function gravity_css_off_theme_activate() {
update_option( 'rg_gforms_disable_css', '1' );
update_option( 'rg_gforms_enable_html5', '1' );
}
add_action('after_switch_theme','gravity_css_off_theme_activate');
// this functiona disables GC CSS on the GF plugin activation
function gravityform_activate() {
update_option( 'rg_gforms_disable_css', '1' );
update_option( 'rg_gforms_enable_html5', '1' );
}
register_activation_hook(__FILE__,'gravityform_activate');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment