<?php
/**
 * Created by PhpStorm.
 * User: marco
 * Date: 29/11/17
 * Time: 17.39
 */
include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
if ( is_plugin_active( 'contact-form-7/wp-contact-form-7.php' ) ) {
	function mod_contact7_form_content( $template, $prop ) {
		if ( 'form' == $prop ) {
			return implode( "\n", array(
				'<div class=”row”>',
				'<div class=”col”>',
				'[text* your-name placeholder”Name”]',
				'[email* your-email placeholder”Email”]',
				'[text* your-subject placeholder”Subject”]',
				'</div>',
				'<div class=”col”>',
				'[textarea* your-message placeholder”Message”]',
				'</div>',
				'</div>',
				'<div class=”row”>',
				'[submit class:btn “Send Mail”]',
				'</div>'
			) );
		} else {
			return $template;
		}
	}

	add_filter('wpcf7_default_template','mod_contact7_form_content',
		10,
		2
	);
}
?>