npm init -y
Create a folder called src and add an empty index.js file. The code that webpack compiles goes in here including any Javascript modules and the main Tailwind file.
<?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') ); |
/** | |
* 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' ); } ); |