Plugin Directory

Changeset 2343401


Ignore:
Timestamp:
07/20/2020 11:36:50 AM (6 years ago)
Author:
augustinfotech
Message:

Mailchimp 3 API integration

Location:
responsive-contact-form-mailchimp-extension/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • responsive-contact-form-mailchimp-extension/trunk/admin/includes/class-form.php

    r891075 r2343401  
    66*/
    77function get_lists(){
    8     require_once('AIMCAPI.class.php');
    9    
     8    require_once('MailChimp.php');
    109    $apikey = esc_attr(get_option('ai_me_contactform_api_key'));
    11    
    12     $api = new AIMCAPI($apikey);
    13    
    14     $lists = $api->lists();
    15 
     10    $api = new MailChimp($apikey);
     11    $lists = $api->get('lists');
     12   
    1613    return $lists;
    1714   
  • responsive-contact-form-mailchimp-extension/trunk/admin/views/admin.php

    r1033833 r2343401  
    2929            $options =  get_option('aimclists') ; ?>
    3030            <?php
    31             foreach($lists['data'] as $list) {?>
     31            if(isset($lists['lists']) && is_array($lists['lists'])) {
     32            foreach($lists['lists'] as $list) {?>
    3233                <li>
    3334                    <label>
    34                         <input type="checkbox" name="aimclists[<?php echo esc_attr($list['id']); ?>]" value="1" <?php if($options!=""):checked( 1 == $options[$list['id']] ); endif ?> /><?php echo $list['name'];?>
     35                        <input type="checkbox" name="aimclists[<?php echo esc_attr($list['id']); ?>]" value="1" <?php if(isset($options[$list['id']])):   checked( 1 == $options[$list['id']] ); endif ?> /><?php echo $list['name'];?>
    3536                    </label>
    3637                </li>
     38            <?php } ?>
    3739            <?php } ?>
    3840            </ul>
  • responsive-contact-form-mailchimp-extension/trunk/readme.txt

    r1298805 r2343401  
    33Tags: Responsive Contact Form,Contact Form, text, contact, form, contacts, contact form, request, contact me, feedback form, feedback, contact button, contact form plugin, contacts form plugin, attachment, send, copy, attachment, send copy
    44Requires at least: 3.6
    5 Tested up to: 4.0
     5Tested up to: 5.4.2
    66Stable tag: 1.2
    77License: GPLv2 or later
     
    5353* Compatible in wordpress 3.8
    5454* Backup languages folder.
     55* Mailchimp 3 API compatiable
Note: See TracChangeset for help on using the changeset viewer.