Created
November 18, 2015 17:34
-
-
Save eduard-un/f5f57ae74964aff6f89c to your computer and use it in GitHub Desktop.
Load the Custom Contact Form Module in Divi 2.5.6
This file contains hidden or 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') ); | |
} | |
} | |
add_action('wp', 'divi_child_theme_setup', 9999); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks this helped me out!