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 | |
/* | |
=== 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') ); |
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
/** | |
* 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' ); } ); |