Last active
August 29, 2015 13:57
-
-
Save peterwilsoncc/9357932 to your computer and use it in GitHub Desktop.
Using the Mailchimp WP plugin in DEV mode with basic fields
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 | |
function pwcc_mailchimp_fields( $fields ) { | |
unset ( $fields ); | |
$fields = array ( | |
0 => array ( | |
"name" => "Email Address", | |
"req" => 1, | |
"field_type" => "email", | |
"public" => 1, | |
"show" => 1, | |
"order" => 1, | |
"default" => '', | |
"helptext" => '', | |
"size" => 25, | |
"tag" => "EMAIL", | |
"id" => 0 | |
), | |
1 => array ( | |
"name" => "First Name", | |
"req" => 1, | |
"field_type" => "text", | |
"public" => 1, | |
"show" => 1, | |
"order" => 2, | |
"default" => "", | |
"helptext" => "", | |
"size" => 25, | |
"tag" => "FNAME", | |
"id" => 1 | |
), | |
2 => array ( | |
"name" => "Last Name", | |
"req" => 1, | |
"field_type" => "text", | |
"public" => 1, | |
"show" => 1, | |
"order" => 3, | |
"default" => "", | |
"helptext" => "", | |
"size" => 25, | |
"tag" => "LNAME", | |
"id" => 2 | |
) | |
); | |
return $fields; | |
} | |
add_filter ( 'mailchimp_dev_mode_fields', 'pwcc_mailchimp_fields'); | |
function pwcc_mailchimp_groups( $groups ) { | |
$groups = array(); | |
return $groups; | |
} | |
add_filter ( 'mailchimp_dev_mode_groups', 'pwcc_mailchimp_groups'); |
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 | |
define('MAILCHIMP_DEV_MODE', true); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment