Skip to content

Instantly share code, notes, and snippets.

View garek007's full-sized avatar

Stan Alachniewicz garek007

  • Salesforce
  • San Diego
View GitHub Profile
@stevegrunwell
stevegrunwell / gist:2897997
Created June 8, 2012 20:29
Remove Contact Form 7 scripts and styles through the WordPress action hook API
/**
* Remove Contact Form 7's scripts and styles without having to add anything to wp-config.php (as described
* in the CF7 docs) by using the wpcf7_enqueue_styles and wpcf7_enqueue_scripts actions that Takayuki was
* nice enough to include in includes/controller.php
* @link http://contactform7.com/loading-javascript-and-stylesheet-only-when-it-is-necessary/
*/
add_action( 'wpcf7_enqueue_styles', function() { wp_deregister_style( 'contact-form-7' ); } );
add_action( 'wpcf7_enqueue_scripts', function() { wp_deregister_script( 'jquery-form' ); } );
@eduard-ungureanu
eduard-ungureanu / ccfm_functions.php
Created November 18, 2015 17:34
Load the Custom Contact Form Module in Divi 2.5.6
<?php
/*
=== Use the custom module ===
*/
function divi_child_theme_setup() {
if ( class_exists('ET_Builder_Module')) {
get_template_part( 'custom-modules/ccfm' );
$ccfm = new WPC_ET_Builder_Module_Contact_Form ();
remove_shortcode( 'et_pb_contact_form' );
add_shortcode( 'et_pb_contact_form', array($ccfm, '_shortcode_callback') );