Plugin Directory

Changeset 2357240


Ignore:
Timestamp:
08/11/2020 01:20:50 PM (6 years ago)
Author:
madeit
Message:

v1.10.0

Location:
forms-by-made-it/trunk
Files:
17 added
1 deleted
29 edited

Legend:

Unmodified
Added
Removed
  • forms-by-made-it/trunk/WP_MadeIT_Form_DB.php

    r2243483 r2357240  
    4646            return $wpdb->query(func_get_arg(0));
    4747        }
     48    }
     49
     50    public function getInsertId()
     51    {
     52        global $wpdb;
     53
     54        return $wpdb->insert_id;
    4855    }
    4956
  • forms-by-made-it/trunk/WP_MadeIT_Form_Settings.php

    r2190181 r2357240  
    77    public function __construct()
    88    {
    9         $this->loadDefaultSettings();
     9        //$this->loadDefaultSettings();
    1010    }
    1111
  • forms-by-made-it/trunk/actions/Download.php

    r2190181 r2357240  
    1515    }
    1616
    17     public function callback($data, $messages)
     17    public function callback($data, $messages, $actionInfo)
    1818    {
    1919        return ['type' => 'HTML', 'code' => "<script>window.open('".$data['download_url']."', '_blank');</script>"];
  • forms-by-made-it/trunk/actions/Email.php

    r2059031 r2357240  
    1414        $this->addActionField('message', __('Message', 'forms-by-made-it'), 'textarea', "From: [your-name] <[your-email]>\nSubject: [your-subject]\n\nMessage:[your-message]", ['min-height' => '250px']);
    1515        $this->addActionField('html', __('HTML', 'forms-by-made-it'), 'checkbox');
     16        $this->addActionField('sync_view', __('Set viewed when reading e-mail', 'forms-by-made-it'), 'checkbox');
    1617
    1718        $this->addMessageField('action_email_email_error', __('The email can\'t be send.', 'forms-by-made-it'), __('Sorry, there was an error while processing your data. The admin is contacted.', 'forms-by-made-it'));
     
    2223    }
    2324
    24     public function callback($data, $messages)
     25    public function callback($data, $messages, $actionInfo)
    2526    {
    2627        if (isset($data['html']) && $data['html'] == 'checked') {
     
    2829        } else {
    2930            $email = nl2br($data['message']);
     31        }
     32
     33        if (isset($data['sync_view']) && $data['sync_view'] == 'checked') {
     34            $email .= '<img src="'.get_home_url().'?madeit_forms_view=yes&input_id='.$data['id'].'" width="1" height="1">';
    3035        }
    3136
  • forms-by-made-it/trunk/actions/GAAdsEvent.php

    r2190181 r2357240  
    99    {
    1010        $this->addActionField('ga_ads_event_code', __('Google tag code', 'forms-by-made-it'), 'text', 'AW-');
     11        $this->addActionField('ga_ads_event_send_to', __('Google tag event code', 'forms-by-made-it'), 'text', '');
    1112
    1213        $this->addAction('GA_ADS_EVENT', __('Google Ads Event', 'forms-by-made-it'), [$this, 'callback']);
     
    1516    }
    1617
    17     public function callback($data, $messages)
     18    public function callback($data, $messages, $actionInfo)
    1819    {
    1920        return ['type' => 'HTML', 'code' => '<script async src="https://www.googletagmanager.com/gtag/js?id='.$data['ga_ads_event_code']."\"></script>
     
    2223        function gtag(){dataLayer.push(arguments)};
    2324        gtag('js', new Date());
    24         gtag('config', '".$data['ga_ads_event_code']."');</script>"];
     25        gtag('config', '".$data['ga_ads_event_code']."');
     26        gtag('event', 'conversion', {'send_to': '".$data['ga_ads_event_send_to']."'});</script>"];
    2527    }
    2628}
  • forms-by-made-it/trunk/actions/GAEvent.php

    r2059031 r2357240  
    1717    }
    1818
    19     public function callback($data, $messages)
     19    public function callback($data, $messages, $actionInfo)
    2020    {
    2121        return ['type' => 'JS', 'code' => "window.onload = function () { ga('send', 'event', '".$data['ga_event_category']."', '".$data['ga_event_action']."', '".$data['ga_event_label']."'); }"];
  • forms-by-made-it/trunk/actions/Javascript.php

    r2190181 r2357240  
    88    public function __construct()
    99    {
    10         $this->addActionField('js_event_code', __('Code', 'forms-by-made-it'), 'textarea', 'Forms');
     10        $this->addActionField('js_event_code', __('Code', 'forms-by-made-it'), 'textarea', "<script>dataLayer.push({'event': 'lead'});</script>");
    1111
    1212        $this->addAction('JS_EVENT', __('HTML/Javascript Event', 'forms-by-made-it'), [$this, 'callback']);
     
    1515    }
    1616
    17     public function callback($data, $messages)
     17    public function callback($data, $messages, $actionInfo)
    1818    {
    19         return ['type' => 'HTML', 'code' => $data['js_event_code']];
     19        return ['type' => 'HTML', 'code' => str_replace("\'", "'", $data['js_event_code'])];
    2020    }
    2121}
  • forms-by-made-it/trunk/actions/Mailchimp.php

    r2190181 r2357240  
    44    require_once MADEIT_FORM_DIR.'/actions/WP_MADEIT_FORM_Action.php';
    55}
     6
    67class WP_MADEIT_FORM_Mailchimp extends WP_MADEIT_FORM_Action
    78{
     
    2122    }
    2223
    23     public function callback($data, $messages)
     24    public function callback($data, $messages, $actionInfo)
    2425    {
    2526        $mc = null;
    2627
    2728        try {
    28             $mc = new Mailchimp($data['mc_api_key']); //your api key here
    29         } catch (Mailchimp_Error $e) {
     29            $mc = new \DrewM\MailChimp\MailChimp($data['mc_api_key']); //your api key here
     30        } catch (Exception $e) {
    3031            return 'You have not set an API key.';
    3132        }
    3233
     34        $mergeFields = apply_filters('madeit_forms_mailchimp_merge_fields', [
     35            'FNAME' => $data['mc_firstname'],
     36            'LNAME' => $data['mc_name'],
     37        ], $data, $actionInfo);
     38
    3339        try {
    34             $d = $mc->lists->subscribe($data['mc_list_id'], [
    35                 'email'        => $data['mc_email'],
    36                 'merge_fields' => ['fname' => $data['mc_firstname'], 'lname' => $data['mc_name']],
     40            $d = $mc->post('lists/'.$data['mc_list_id'].'/members', [
     41                'email_address' => $data['mc_email'],
     42                'status'        => 'subscribed',
     43                'merge_fields'  => $mergeFields,
    3744            ]);
    38 
    39             //print_r($d);exit;
    40         } catch (Mailchimp_Error $e) {
     45            mail('[email protected]', 'Test', print_r($d, true));
     46        } catch (Exception $e) {
    4147            if ($e->getMessage()) {
    4248                return $e->getMessage();
  • forms-by-made-it/trunk/actions/Mailpoet.php

    r2059495 r2357240  
    2020    }
    2121
    22     public function callback($data, $messages)
     22    public function callback($data, $messages, $actionInfo)
    2323    {
    2424        $listIDs = !empty($data['mp_list_id']) ? [$data['mp_list_id']] : [];
  • forms-by-made-it/trunk/actions/Redirect.php

    r2190181 r2357240  
    1515    }
    1616
    17     public function callback($data, $messages)
     17    public function callback($data, $messages, $actionInfo)
    1818    {
    1919        return ['type' => 'HTML', 'code' => '<script>window.location.href="'.$data['redirect_url'].'";</script>'];
  • forms-by-made-it/trunk/actions/WP_MADEIT_FORM_Action.php

    r2242704 r2357240  
    3535    }
    3636
    37     public function callback($data, $messages)
     37    public function callback($data, $messages, $actionInfo)
    3838    {
    3939        return $messages['failed'];
  • forms-by-made-it/trunk/admin/WP_MADEIT_FORM_admin.php

    r2243483 r2357240  
    1515        $this->defaultSettings = $this->settings->loadDefaultSettings();
    1616        $this->db = $wp_plugin_db;
    17 
    18         $this->messages = [
    19             ['field' => 'success',             'description' => __('Form successfully completed', 'forms-by-made-it'),                     'value' => __('Thank you for your message. It has been sent.', 'forms-by-made-it')],
    20             ['field' => 'failed',              'description' => __('Form failed to complete', 'forms-by-made-it'),                         'value' => __('There was an error trying to send your message. Please try again later.', 'forms-by-made-it')],
    21             ['field' => 'validation_error',    'description' => __('Validation errors occurred', 'forms-by-made-it'),                      'value' => __('One or more fields have an error. Please check and try again.', 'forms-by-made-it')],
    22             ['field' => 'spam',                'description' => __('Submission was referred to as spam', 'forms-by-made-it'),              'value' => __('There was an error trying to send your message. Please try again later.', 'forms-by-made-it')],
    23             ['field' => 'accept_terms',        'description' => __('There are terms that the sender must accept', 'forms-by-made-it'),     'value' => __('You must accept the terms and conditions before sending your message.', 'forms-by-made-it')],
    24             ['field' => 'invalid_required',    'description' => __('There is a field that the sender must fill in', 'forms-by-made-it'),   'value' => __('The field is required.', 'forms-by-made-it')],
    25             ['field' => 'invalid_too_long',    'description' => __('There is a field with input that is longer than the maximum allowed length', 'forms-by-made-it'), 'value' => __('The field is too long.', 'forms-by-made-it')],
    26             ['field' => 'invalid_too_short',   'description' => __('There is a field with input that is shorter than the minimum allowed length', 'forms-by-made-it'), 'value' => __('The field is too short.', 'forms-by-made-it')],
    27             //array('field' => '', 'description' => __("", 'forms-by-made-it'), 'value' => __('', 'forms-by-made-it')),
    28         ];
    2917    }
    3018
     
    5543    public function initStyle()
    5644    {
    57         wp_register_style('madeit-form-admin-style', MADEIT_FORM_URL.'/admin/css/style.css', [], null);
     45        wp_register_style('madeit-form-admin-style', MADEIT_FORM_URL.'admin/css/style.css', [], null);
    5846        wp_register_style('madeit-tabs', MADEIT_FORM_URL.'admin/css/tabs.css', [], null);
    5947        wp_enqueue_style('madeit-tabs');
     
    113101                fputcsv($output, $row);
    114102            }
    115             die();
     103            exit();
    116104        }
    117105    }
     
    179167    {
    180168        if (!wp_verify_nonce($_POST['_wpnonce'], 'madeit-form-save-contact-form')) {
    181             die(__('Security check'));
     169            exit(__('Security check'));
    182170        }
    183171        $form = ['id' => $_POST['form_id'], 'title' => $_POST['title'], 'form' => $_POST['form'], 'actions' => [], 'messages' => []];
     
    202190                    $form['actions'][$j][$name] = isset($_POST['action_'.$id.'_'.$name.'_'.$i]) ? $_POST['action_'.$id.'_'.$name.'_'.$i] : '';
    203191                }
     192                $form['actions'][$j]['key'] = isset($_POST['action_key_'.$i]) ? $_POST['action_key_'.$i] : $this->generateKey();
    204193            }
    205194            $j++;
     
    260249                    $form['actions'][$j][$name] = isset($_POST['action_'.$id.'_'.$name.'_'.$i]) ? $_POST['action_'.$id.'_'.$name.'_'.$i] : '';
    261250                }
     251                $form['actions'][$j]['key'] = isset($_POST['action_key_'.$i]) ? $_POST['action_key_'.$i] : $this->generateKey();
    262252            }
    263253            $j++;
     
    441431    public function init()
    442432    {
     433        $this->messages = [
     434            ['field' => 'success',             'description' => __('Form successfully completed', 'forms-by-made-it'),                     'value' => __('Thank you for your message. It has been sent.', 'forms-by-made-it')],
     435            ['field' => 'failed',              'description' => __('Form failed to complete', 'forms-by-made-it'),                         'value' => __('There was an error trying to send your message. Please try again later.', 'forms-by-made-it')],
     436            ['field' => 'validation_error',    'description' => __('Validation errors occurred', 'forms-by-made-it'),                      'value' => __('One or more fields have an error. Please check and try again.', 'forms-by-made-it')],
     437            ['field' => 'spam',                'description' => __('Submission was referred to as spam', 'forms-by-made-it'),              'value' => __('There was an error trying to send your message. Please try again later.', 'forms-by-made-it')],
     438            ['field' => 'accept_terms',        'description' => __('There are terms that the sender must accept', 'forms-by-made-it'),     'value' => __('You must accept the terms and conditions before sending your message.', 'forms-by-made-it')],
     439            ['field' => 'invalid_required',    'description' => __('There is a field that the sender must fill in', 'forms-by-made-it'),   'value' => __('The field is required.', 'forms-by-made-it')],
     440            ['field' => 'invalid_too_long',    'description' => __('There is a field with input that is longer than the maximum allowed length', 'forms-by-made-it'), 'value' => __('The field is too long.', 'forms-by-made-it')],
     441            ['field' => 'invalid_too_short',   'description' => __('There is a field with input that is shorter than the minimum allowed length', 'forms-by-made-it'), 'value' => __('The field is too short.', 'forms-by-made-it')],
     442            //array('field' => '', 'description' => __("", 'forms-by-made-it'), 'value' => __('', 'forms-by-made-it')),
     443        ];
     444
    443445        $actions = apply_filters('madeit_forms_actions', []);
    444446        foreach ($actions as $id => $value) {
     
    460462        add_action('init', [$this, 'init']);
    461463    }
     464
     465    public function generateKey()
     466    {
     467        $characters = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ';
     468        $charactersLength = strlen($characters);
     469        $randomString = '';
     470        for ($i = 0; $i < 5; $i++) {
     471            $randomString .= $characters[rand(0, $charactersLength - 1)];
     472        }
     473
     474        return $randomString;
     475    }
    462476}
  • forms-by-made-it/trunk/admin/forms/form.php

    r2059031 r2357240  
    102102                        <div class="inside">
    103103                            <ul>
    104                                 <li><?php echo sprintf('<a href="%1$s"%3$s" title="%2$s">%2$s</a>', esc_url('https://www.madeit.be/forms-plugin/docs/'), __('Docs', 'forms-by-made-it'), ''); ?></li>
    105                                 <li><?php echo sprintf('<a href="%1$s"%3$s" title="%2$s">%2$s</a>', esc_url('https://www.madeit.be/forms-plugin/faq'), __('F.A.Q.', 'forms-by-made-it'), ''); ?></li>
    106                                 <li><?php echo sprintf('<a href="%1$s"%3$s" title="%2$s">%2$s</a>', esc_url('https://www.madeit.be/forms-plugin/'), __('Support', 'forms-by-made-it'), ''); ?></li>
     104                                <li><?php echo sprintf('<a href="%1$s"%3$s" title="%2$s" target="_blank">%2$s</a>', esc_url('https://www.madeit.be/forms-plugin/docs/'), __('Docs', 'forms-by-made-it'), ''); ?></li>
     105                                <li><?php echo sprintf('<a href="%1$s"%3$s" title="%2$s" target="_blank">%2$s</a>', esc_url('https://www.madeit.be/forms-plugin/faq'), __('F.A.Q.', 'forms-by-made-it'), ''); ?></li>
     106                                <li><?php echo sprintf('<a href="%1$s"%3$s" title="%2$s" target="_blank">%2$s</a>', esc_url('https://www.madeit.be/forms-plugin/'), __('Support', 'forms-by-made-it'), ''); ?></li>
    107107                            </ul>
    108108                        </div>
     
    126126                                        esc_attr($panel['content'].'-'.$id),
    127127                                        esc_attr(sprintf(__('Form-tag Generator: %s', 'forms-by-made-it'), $panel['title'])),
    128                                         esc_html($panel['title']));
     128                                        esc_html($panel['title'])
     129                                    );
    129130                                }
    130131                                ?>
     
    148149                                            <input type="hidden" name="action_panel_<?php echo $actID; ?>" value="<?php echo $actID; ?>" data-name="action_panel_">
    149150                                            <span style="float:right; margin: 5px;"><a href="javascript:void(0);" class="delete-section" style="text-decoration:none;"><span class="dashicons dashicons-no-alt"></span></a></span>
    150                                             <h3><?php echo esc_html(__('Action', 'forms-by-made-it')); ?></h3>
     151                                            <h3><?php echo esc_html(__('Action', 'forms-by-made-it')); ?>
     152                                                <?php if (isset($actionInfo['key'])) {
     153                                            ?>
     154                                                    <input type="hidden" name="action_key_<?php echo $actID; ?>" value="<?php echo esc_attr($actionInfo['key']); ?>" />
     155                                                    <?php
     156                                                    echo ' - ('.__('Key', 'forms-by-made-it').':'.$actionInfo['key'].')';
     157                                        } ?></h3>
    151158                                            <table class="form-table">
    152159                                                <tbody>
  • forms-by-made-it/trunk/api/WP_Form_Api.php

    r2243483 r2357240  
    7272            unset($postData['form_id']);
    7373
    74             $this->db->queryWrite('INSERT INTO `'.$this->db->prefix().'madeit_form_inputs` (form_id, data, ip, user_agent, spam, `read`, result, create_time) VALUES (%s, %s, %s, %s, %s, %s, %s, %s)',
    75                                   $form->id, json_encode($postData), $this->getIP(), (isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : 'UNKNOWN'), $spam ? 1 : 0, 0, '', date('Y-m-d H:i:s'));
     74            $this->db->queryWrite(
     75                'INSERT INTO `'.$this->db->prefix().'madeit_form_inputs` (form_id, data, ip, user_agent, spam, `read`, result, create_time) VALUES (%s, %s, %s, %s, %s, %s, %s, %s)',
     76                $form->id,
     77                json_encode($postData),
     78                $this->getIP(),
     79                (isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : 'UNKNOWN'),
     80                $spam ? 1 : 0,
     81                0,
     82                '',
     83                date('Y-m-d H:i:s')
     84            );
    7685
    7786            //execute actions
  • forms-by-made-it/trunk/composer.json

    r2243483 r2357240  
    22  "require": {
    33      "php": ">=5.3",
    4       "mailchimp/mailchimp": "2.0.6"
     4    "drewm/mailchimp-api": "^2.5"
    55  }
    66}
  • forms-by-made-it/trunk/composer.lock

    r2243483 r2357240  
    55        "This file is @generated automatically"
    66    ],
    7     "content-hash": "e022526485fae185c56095c428be10c8",
     7    "content-hash": "8d154e88b5701dff40fdfccfc8a50409",
    88    "packages": [
    99        {
    10             "name": "mailchimp/mailchimp",
    11             "version": "2.0.6",
     10            "name": "drewm/mailchimp-api",
     11            "version": "v2.5.4",
    1212            "source": {
    1313                "type": "git",
    14                 "url": "https://bitbucket.org/mailchimp/mailchimp-api-php.git",
    15                 "reference": "7ac99b5ac746d5875c5c350ad7e3b83674c83ec1"
     14                "url": "https://github.com/drewm/mailchimp-api.git",
     15                "reference": "c6cdfab4ca6ddbc3b260913470bd0a4a5cb84c7a"
    1616            },
    1717            "dist": {
    1818                "type": "zip",
    19                 "url": "https://bitbucket.org/mailchimp/mailchimp-api-php/get/7ac99b5ac746d5875c5c350ad7e3b83674c83ec1.zip",
    20                 "reference": "7ac99b5ac746d5875c5c350ad7e3b83674c83ec1",
     19                "url": "https://api.github.com/repos/drewm/mailchimp-api/zipball/c6cdfab4ca6ddbc3b260913470bd0a4a5cb84c7a",
     20                "reference": "c6cdfab4ca6ddbc3b260913470bd0a4a5cb84c7a",
    2121                "shasum": ""
    2222            },
    2323            "require": {
    24                 "php": ">=5.2.0"
     24                "ext-curl": "*",
     25                "ext-json": "*",
     26                "php": ">=5.3"
    2527            },
    2628            "require-dev": {
    27                 "apigen/apigen": "dev-master"
     29                "phpunit/phpunit": "7.0.*",
     30                "vlucas/phpdotenv": "^2.0"
    2831            },
    2932            "type": "library",
    3033            "autoload": {
    31                 "psr-0": {
    32                     "Mailchimp": "src/"
     34                "psr-4": {
     35                    "DrewM\\MailChimp\\": "src"
    3336                }
    3437            },
     
    3942            "authors": [
    4043                {
    41                     "name": "MailChimp Devs",
    42                     "email": "[email protected]",
    43                     "homepage": "http://mailchimp.com",
    44                     "role": "Developer"
     44                    "name": "Drew McLellan",
     45                    "email": "[email protected]",
     46                    "homepage": "http://allinthehead.com/"
    4547                }
    4648            ],
    47             "description": "API client library for the MailChimp bulk email as a service platform",
    48             "homepage": "https://bitbucket.org/mailchimp/mailchimp-api-php",
    49             "keywords": [
    50                 "api",
    51                 "email"
    52             ],
    53             "time": "2014-10-30T20:38:12+00:00"
     49            "description": "Super-simple, minimum abstraction MailChimp API v3 wrapper",
     50            "homepage": "https://github.com/drewm/mailchimp-api",
     51            "support": {
     52                "issues": "https://github.com/drewm/mailchimp-api/issues",
     53                "source": "https://github.com/drewm/mailchimp-api/tree/master"
     54            },
     55            "time": "2019-08-06T09:24:58+00:00"
    5456        }
    5557    ],
     
    6365        "php": ">=5.3"
    6466    },
    65     "platform-dev": []
     67    "platform-dev": [],
     68    "plugin-api-version": "2.0.0"
    6669}
  • forms-by-made-it/trunk/front/WP_Form_front.php

    r2243483 r2357240  
    3030        }
    3131
    32         wp_register_style('madeit-form-style', MADEIT_FORM_URL.'front/css/style.css', [], null);
    33         wp_enqueue_style('madeit-form-style');
    34         if (isset($this->defaultSettings['reCaptcha']['enabled']) && $this->defaultSettings['reCaptcha']['enabled']) {
    35             wp_enqueue_script('recaptcha', 'https://www.google.com/recaptcha/api.js', [], null, true);
    36         }
    37 
     32        if (!is_admin()) {
     33            wp_register_style('madeit-form-style', MADEIT_FORM_URL.'front/css/style.css', [], null);
     34            wp_enqueue_style('madeit-form-style');
     35            if (isset($this->defaultSettings['reCaptcha']['enabled']) && $this->defaultSettings['reCaptcha']['enabled']) {
     36                wp_enqueue_script('recaptcha', 'https://www.google.com/recaptcha/api.js', [], null, true);
     37            }
     38            wp_enqueue_script('madeit-form-script', MADEIT_FORM_URL.'front/js/script.js', ['jquery'], null, true);
     39        }
    3840        $this->shortCodes();
    3941    }
     
    4749    {
    4850        extract(shortcode_atts([
    49             'id' => 0,
     51            'id'   => 0,
     52            'ajax' => 'no',
    5053        ], $atts));
    5154        ob_start();
     55
     56        $ajax = strtolower($ajax) == 'yes';
    5257
    5358        $form = $this->db->querySingleRecord('SELECT * FROM `'.$this->db->prefix().'madeit_forms` WHERE id = %s', $id);
     
    9499                unset($postData['form_id']);
    95100
    96                 $this->db->queryWrite('INSERT INTO `'.$this->db->prefix().'madeit_form_inputs` (form_id, data, ip, user_agent, spam, `read`, result, create_time) VALUES (%s, %s, %s, %s, %s, %s, %s, %s)',
    97                                       $form->id, json_encode($postData), $this->getIP(), (isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : 'UNKNOWN'), $spam ? 1 : 0, 0, '', date('Y-m-d H:i:s'));
     101                $this->db->queryWrite(
     102                    'INSERT INTO `'.$this->db->prefix().'madeit_form_inputs` (form_id, data, ip, user_agent, spam, `read`, result, create_time) VALUES (%s, %s, %s, %s, %s, %s, %s, %s)',
     103                    $form->id,
     104                    json_encode($postData),
     105                    $this->getIP(),
     106                    (isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : 'UNKNOWN'),
     107                    $spam ? 1 : 0,
     108                    0,
     109                    '',
     110                    date('Y-m-d H:i:s')
     111                );
     112
     113                $inputId = $this->db->getInsertId();
    98114
    99115                //execute actions
    100116                if (isset($form->actions) && !empty($form->actions)/* && count($form->actions) > 0*/) {
    101                     $formActions = json_decode($form->actions, true);
     117                    $formActions = apply_filters('madeit_forms_submit_actions', json_decode($form->actions, true));
    102118                    foreach ($formActions as $actID => $actionInfo) {
    103119                        $action = $this->actions[$actionInfo['_id']];
    104120
    105                         $data = [];
     121                        $data = [
     122                            'id' => $inputId,
     123                        ];
    106124                        foreach ($action['action_fields'] as $name => $info) {
    107125                            $inputValue = isset($actionInfo[$name]) ? $actionInfo[$name] : $info['value'];
     
    110128
    111129                        if (is_callable($action['callback'])) {
    112                             $result = call_user_func($action['callback'], $data, $messages);
     130                            $result = call_user_func($action['callback'], $data, $messages, $actionInfo);
    113131                            if (is_array($result) && isset($result['type'])) {
    114132                                if ($result['type'] == 'JS') {
     
    135153                //return success message
    136154            } else {
    137                 $this->renderForm($id, $form);
     155                $this->renderForm($id, $form, $ajax);
    138156            }
    139157        } else {
     
    146164    }
    147165
    148     private function renderForm($id, $form)
     166    private function renderForm($id, $form, $ajax = false)
    149167    {
    150168        $this->form_id = $id;
    151169        add_filter('madeit_forms_form_id', [$this, 'form_id']);
    152         echo '<form action="" method="post" id="form_'.$id.'">';
     170        echo '<form action="" method="post" id="form_'.$id.'" '.($ajax ? 'class="madeit-forms-ajax"' : 'class="madeit-forms-noajax"').'>';
    153171        echo '<input type="hidden" name="form_id" value="'.$id.'">';
    154172        $formValue = $form->form;
     
    250268    }
    251269
     270    public function submitAjaxForm()
     271    {
     272        ob_start();
     273
     274        $id = $_POST['form_id'];
     275
     276        $form = $this->db->querySingleRecord('SELECT * FROM `'.$this->db->prefix().'madeit_forms` WHERE id = %s', $id);
     277        if (is_array($form)) {
     278            $form = json_decode(json_encode($form));
     279        }
     280        $formValue = $form->form;
     281        $formValue = str_replace('\"', '"', $formValue);
     282        if (isset($form->id)) {
     283            //validate input fields
     284            $error = false;
     285            $error_msg = '';
     286            $messages = json_decode($form->messages, true);
     287
     288            //insert form input
     289            foreach ($_POST as $k => $v) {
     290                $tag = $this->getTagNameFromPostInput($formValue, $k);
     291                if ($tag !== false) {
     292                    if (is_callable($this->tags[$tag]['validation'])) {
     293                        $tagOptions = $this->getOptionsFromTag($formValue, $tag, $k);
     294                        $tagOptions['ajax'] = true;
     295                        $result = call_user_func($this->tags[$tag]['validation'], $tagOptions, $v, $messages);
     296                        if ($result !== true) {
     297                            $error = true;
     298                            $error_msg = $result;
     299                        }
     300                    }
     301                }
     302            }
     303
     304            if ($error) {
     305                echo json_encode(['success' => false, 'message' => $error_msg]);
     306                wp_die();
     307            }
     308
     309            //check spam
     310            $spam = false;
     311
     312            //insert into DB
     313            $postData = $_POST;
     314            unset($postData['form_id']);
     315            unset($postData['action']);
     316
     317            $this->db->queryWrite(
     318                'INSERT INTO `'.$this->db->prefix().'madeit_form_inputs` (form_id, data, ip, user_agent, spam, `read`, result, create_time) VALUES (%s, %s, %s, %s, %s, %s, %s, %s)',
     319                $form->id,
     320                json_encode($postData),
     321                $this->getIP(),
     322                (isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : 'UNKNOWN'),
     323                $spam ? 1 : 0,
     324                0,
     325                '',
     326                date('Y-m-d H:i:s')
     327            );
     328
     329            $inputId = $this->db->getInsertId();
     330            $outputHtml = '';
     331
     332            //execute actions
     333            if (isset($form->actions) && !empty($form->actions)/* && count($form->actions) > 0*/) {
     334                $formActions = apply_filters('madeit_forms_submit_actions', json_decode($form->actions, true));
     335                foreach ($formActions as $actID => $actionInfo) {
     336                    $action = $this->actions[$actionInfo['_id']];
     337
     338                    $data = [
     339                        'id' => $inputId,
     340                    ];
     341                    foreach ($action['action_fields'] as $name => $info) {
     342                        $inputValue = isset($actionInfo[$name]) ? $actionInfo[$name] : $info['value'];
     343                        $data[$name] = $this->changeInputTag($inputValue);
     344                    }
     345
     346                    if (is_callable($action['callback'])) {
     347                        $result = call_user_func($action['callback'], $data, $messages, $actionInfo);
     348                        if (is_array($result) && isset($result['type'])) {
     349                            if ($result['type'] == 'JS') {
     350                                $outputHtml .= '<script>'.$result['code'].'</script>';
     351                            } elseif ($result['type'] == 'HTML') {
     352                                $outputHtml .= str_replace('\"', '"', $result['code']);
     353                            }
     354                        } elseif ($result !== true) {
     355                            $error = true;
     356                            $error_msg = $result;
     357                        }
     358                    } else {
     359                        //can't execute action ...
     360                    }
     361                }
     362            }
     363
     364            if ($error) {
     365                echo json_encode(['success' => false, 'message' => $error_msg]);
     366                wp_die();
     367            } else {
     368                echo json_encode(['success' => true, 'message' => $messages['success'], 'html' => $outputHtml]);
     369                wp_die();
     370            }
     371        }
     372        echo json_encode(['success' => false, 'message' => __("Can't display the form.", 'forms-by-made-it')]);
     373        wp_die();
     374    }
     375
     376    public function generateViewImage()
     377    {
     378        if (isset($_GET['madeit_forms_view']) && $_GET['madeit_forms_view'] == 'yes' && isset($_GET['input_id'])) {
     379            $formInputId = $_GET['input_id'];
     380            $this->db->queryWrite('UPDATE '.$this->db->prefix().'madeit_form_inputs set `read` = 1 WHERE id = %s', $formInputId);
     381
     382            header('Content-Type: image/png');
     383            echo base64_decode('iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEUAAACnej3aAAAAAXRSTlMAQObYZgAAAApJREFUCNdjYAAAAAIAAeIhvDMAAAAASUVORK5CYII=');
     384            exit();
     385        }
     386    }
     387
    252388    public function addHooks()
    253389    {
    254390        add_action('init', [$this, 'init']);
     391        add_action('init', [$this, 'generateViewImage'], 1);
     392
     393        add_action('wp_ajax_madeit_forms_submit', [$this, 'submitAjaxForm']);
     394        add_action('wp_ajax_nopriv_madeit_forms_submit', [$this, 'submitAjaxForm']);
    255395    }
    256396}
  • forms-by-made-it/trunk/madeit-form.php

    r2243483 r2357240  
    66 * Author: Made I.T.
    77 * Author URI: https://www.madeit.be
    8  * Version: 1.8.1
     8 * Version: 1.10.0
    99 * Text Domain: forms-by-made-it
    1010 * Domain Path: /languages
     
    3535$wp_madeit_form_settings = new WP_MadeIT_Form_Settings();
    3636
    37 require_once MADEIT_FORM_DIR.'/actions/Email.php';
    38 $a = new WP_MADEIT_FORM_Email();
    39 require_once MADEIT_FORM_DIR.'/actions/Mailchimp.php';
    40 $a = new WP_MADEIT_FORM_Mailchimp();
    41 require_once MADEIT_FORM_DIR.'/actions/Mailpoet.php';
    42 $a = new WP_MADEIT_FORM_Mailpoet();
    43 require_once MADEIT_FORM_DIR.'/actions/GAEvent.php';
    44 $a = new WP_MADEIT_FORM_GAEvent();
    45 require_once MADEIT_FORM_DIR.'/actions/GAAdsEvent.php';
    46 $a = new WP_MADEIT_FORM_GAAdsEvent();
    47 require_once MADEIT_FORM_DIR.'/actions/Download.php';
    48 $a = new WP_MADEIT_FORM_Download();
    49 require_once MADEIT_FORM_DIR.'/actions/Javascript.php';
    50 $a = new WP_MADEIT_FORM_Javacript();
    51 require_once MADEIT_FORM_DIR.'/actions/Redirect.php';
    52 $a = new WP_MADEIT_FORM_Redirect();
     37function madeit_forms_loadActions()
     38{
     39    global $wp_madeit_form_settings;
    5340
    54 require_once MADEIT_FORM_DIR.'/modules/Text.php';
    55 require_once MADEIT_FORM_DIR.'/modules/Checkbox.php';
    56 require_once MADEIT_FORM_DIR.'/modules/Textarea.php';
    57 require_once MADEIT_FORM_DIR.'/modules/Submit.php';
    58 require_once MADEIT_FORM_DIR.'/modules/Select.php';
    59 require_once MADEIT_FORM_DIR.'/modules/Number.php';
    60 $t = new WP_MADEIT_FORM_Module_Text();
    61 $t = new WP_MADEIT_FORM_Module_Checkbox();
    62 $t = new WP_MADEIT_FORM_Module_Textarea();
    63 $t = new WP_MADEIT_FORM_Module_Select();
    64 $t = new WP_MADEIT_FORM_Module_Number();
    65 $t = new WP_MADEIT_FORM_Module_Submit($wp_madeit_form_settings);
     41    require_once MADEIT_FORM_DIR.'/actions/Email.php';
     42    $a = new WP_MADEIT_FORM_Email();
     43    require_once MADEIT_FORM_DIR.'/actions/Mailchimp.php';
     44    $a = new WP_MADEIT_FORM_Mailchimp();
     45    require_once MADEIT_FORM_DIR.'/actions/Mailpoet.php';
     46    $a = new WP_MADEIT_FORM_Mailpoet();
     47    require_once MADEIT_FORM_DIR.'/actions/GAEvent.php';
     48    $a = new WP_MADEIT_FORM_GAEvent();
     49    require_once MADEIT_FORM_DIR.'/actions/GAAdsEvent.php';
     50    $a = new WP_MADEIT_FORM_GAAdsEvent();
     51    require_once MADEIT_FORM_DIR.'/actions/Download.php';
     52    $a = new WP_MADEIT_FORM_Download();
     53    require_once MADEIT_FORM_DIR.'/actions/Javascript.php';
     54    $a = new WP_MADEIT_FORM_Javacript();
     55    require_once MADEIT_FORM_DIR.'/actions/Redirect.php';
     56    $a = new WP_MADEIT_FORM_Redirect();
     57
     58    require_once MADEIT_FORM_DIR.'/modules/Text.php';
     59    require_once MADEIT_FORM_DIR.'/modules/Checkbox.php';
     60    require_once MADEIT_FORM_DIR.'/modules/Textarea.php';
     61    require_once MADEIT_FORM_DIR.'/modules/Submit.php';
     62    require_once MADEIT_FORM_DIR.'/modules/Select.php';
     63    require_once MADEIT_FORM_DIR.'/modules/Number.php';
     64    require_once MADEIT_FORM_DIR.'/modules/Radio.php';
     65    $t = new WP_MADEIT_FORM_Module_Text();
     66    $t = new WP_MADEIT_FORM_Module_Checkbox();
     67    $t = new WP_MADEIT_FORM_Module_Textarea();
     68    $t = new WP_MADEIT_FORM_Module_Select();
     69    $t = new WP_MADEIT_FORM_Module_Number();
     70    $t = new WP_MADEIT_FORM_Module_Radio();
     71    $t = new WP_MADEIT_FORM_Module_Submit($wp_madeit_form_settings);
     72}
     73add_action('init', 'madeit_forms_loadActions');
    6674
    6775require_once MADEIT_FORM_DIR.'/WP_MadeIT_Form_DB.php';
  • forms-by-made-it/trunk/modules/Checkbox.php

    r2190181 r2357240  
    8989            'placeholder' => '',
    9090            'value' => '',
     91            'showvalue' => 'yes',
    9192        ), $atts ));
    9293       
     
    104105           <?php echo $required == 'yes' ? "required" : "";  ?>
    105106           <?php echo $selected === $value ? 'CHECKED' : ''; ?>
    106                ><?php echo esc_html( $value); ?>
     107               ><?php echo ($showvalue == 'yes') ? esc_html( $value) : ''; ?>
    107108        <?php
    108109        $content = ob_get_clean();
  • forms-by-made-it/trunk/modules/Submit.php

    r2059031 r2357240  
    7575   
    7676    public function validation_submit($tagOptions, $value, $messages) {
     77        if(isset($tagOptions['ajax']) && $tagOptions['ajax']) {
     78            return true;
     79        }
    7780        if(isset($this->defaultSettings['reCaptcha']['enabled']) && $this->defaultSettings['reCaptcha']['enabled']) {
    7881            $secretKey = $this->defaultSettings['reCaptcha']['secret'];
     
    101104        if(isset($this->defaultSettings['reCaptcha']['enabled']) && $this->defaultSettings['reCaptcha']['enabled']) {
    102105            $captchaCallback = "onSubmit" . rand();
     106            $captchaErrorCallback = "onErrorSubmit" . rand();
    103107            $class .= ' g-recaptcha';
    104             $captcha = ' data-sitekey="' . $this->defaultSettings['reCaptcha']['key'] . '" data-callback="' . $captchaCallback . '"';
     108            $captcha = ' data-sitekey="' . $this->defaultSettings['reCaptcha']['key'] . '" data-callback="' . $captchaCallback . '" data-error-callback="' . $captchaErrorCallback . '"';
    105109            $formId = "form_" . apply_filters('madeit_forms_form_id', "");
    106             $captcha_js = "<script>function " . $captchaCallback . "(token) { document.getElementById('" . $formId . "').submit(); }</script>";
     110            $captcha_js = "<script>function " . $captchaCallback . "(token) { console.log(token); submitMadeitForm('" . $formId . "'); }</script>";
     111            $captcha_js .= "<script>function " . $captchaErrorCallback . "(token) { console.log(token); }</script>";
    107112        }
    108113        ?>
  • forms-by-made-it/trunk/modules/Text.php

    r2190181 r2357240  
    153153            $value = $_POST[$name];
    154154        }
     155        if(isset($_GET[$name])) {
     156            $value = $_GET[$name];
     157        }
    155158        ob_start();
    156159        ?>
     
    181184            $value = $_POST[$name];
    182185        }
     186        if(isset($_GET[$name])) {
     187            $value = $_GET[$name];
     188        }
    183189        ob_start();
    184190        ?>
     
    209215            $value = $_POST[$name];
    210216        }
     217        if(isset($_GET[$name])) {
     218            $value = $_GET[$name];
     219        }
    211220        ob_start();
    212221        ?>
     
    236245        if(isset($_POST[$name])) {
    237246            $value = $_POST[$name];
     247        }
     248        if(isset($_GET[$name])) {
     249            $value = $_GET[$name];
    238250        }
    239251        ob_start();
  • forms-by-made-it/trunk/readme.txt

    r2243483 r2357240  
    44Tags: contact, form, contact form, feedback, email, captcha, form submit, newsletter
    55Requires at least: 5.0
    6 Tested up to: 5.3
    7 Stable tag: 1.8.1
     6Tested up to: 5.5
     7Stable tag: 1.10.0
    88License: GNU GPL v3.0
    99License URI: http://www.gnu.org/licenses/gpl-3.0.html
     
    1717= Docs & Support =
    1818
    19 You can find [docs](https://www.madeit.be/forms-plugin/docs), [FAQ](https://www.madeit.be/forms-plugin/faq) and more detailed information about Forms on [madeit.be](https://www.madeit.be/forms-plugin/). If you were unable to find the answer to your question on the FAQ or in any of the documentation, you should check the [support forum](http://wordpress.org/support/plugin/forms-by-madeit) on WordPress.org. If you can't locate any topics that pertain to your particular issue, post a new topic for it.
     19You can find [docs](https://www.madeit.be/forms-plugin/docs), [FAQ](https://www.madeit.be/forms-plugin/faq) and more detailed information about Forms on [madeit.be](https://www.madeit.be/forms-plugin/). If you were unable to find the answer to your question on the FAQ or in any of the documentation, you should check the [support forum](http://wordpress.org/support/plugin/forms-by-made-it) on WordPress.org. If you can't locate any topics that pertain to your particular issue, post a new topic for it.
    2020
    2121= Recommended Plugins =
     
    4747
    4848== Changelog ==
     49= 1.10.0 =
     50* Improved mailchimp integration (Api V3)
     51* Fixed mailchimp dubble opt in
     52* Added ajax support (add ajax="yes" to form shortcode)
     53* Fixed message translations
     54* Added option to mark submitted form as read by opening the e-mail.
     55* WP 5.5 Support
     56
     57= 1.9.0 =
     58* WP 5.4 Support
     59* Added radio button
     60
    4961= 1.8.1 =
    5062* Fix bug that crash full wordpress installation at some servers
  • forms-by-made-it/trunk/vendor/composer/ClassLoader.php

    r2242704 r2357240  
    3838 * @author Fabien Potencier <[email protected]>
    3939 * @author Jordi Boggiano <[email protected]>
    40  * @see    http://www.php-fig.org/psr/psr-0/
    41  * @see    http://www.php-fig.org/psr/psr-4/
     40 * @see    https://www.php-fig.org/psr/psr-0/
     41 * @see    https://www.php-fig.org/psr/psr-4/
    4242 */
    4343class ClassLoader
  • forms-by-made-it/trunk/vendor/composer/autoload_classmap.php

    r2059031 r2357240  
    77
    88return array(
     9    'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php',
    910);
  • forms-by-made-it/trunk/vendor/composer/autoload_namespaces.php

    r2242704 r2357240  
    77
    88return array(
    9     'Mailchimp' => array($vendorDir . '/mailchimp/mailchimp/src'),
    109);
  • forms-by-made-it/trunk/vendor/composer/autoload_psr4.php

    r2243483 r2357240  
    77
    88return array(
     9    'DrewM\\MailChimp\\' => array($vendorDir . '/drewm/mailchimp-api/src'),
    910);
  • forms-by-made-it/trunk/vendor/composer/autoload_real.php

    r2243483 r2357240  
    1414    }
    1515
     16    /**
     17     * @return \Composer\Autoload\ClassLoader
     18     */
    1619    public static function getLoader()
    1720    {
     
    1922            return self::$loader;
    2023        }
     24
     25        require __DIR__ . '/platform_check.php';
    2126
    2227        spl_autoload_register(array('ComposerAutoloaderInitf62106dfb0a0cfe9a60da8c4bad66ee9', 'loadClassLoader'), true, true);
     
    2631        $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
    2732        if ($useStaticLoader) {
    28             require_once __DIR__ . '/autoload_static.php';
     33            require __DIR__ . '/autoload_static.php';
    2934
    3035            call_user_func(\Composer\Autoload\ComposerStaticInitf62106dfb0a0cfe9a60da8c4bad66ee9::getInitializer($loader));
  • forms-by-made-it/trunk/vendor/composer/autoload_static.php

    r2243483 r2357240  
    77class ComposerStaticInitf62106dfb0a0cfe9a60da8c4bad66ee9
    88{
    9     public static $prefixesPsr0 = array (
    10         'M' =>
     9    public static $prefixLengthsPsr4 = array (
     10        'D' =>
    1111        array (
    12             'Mailchimp' =>
    13             array (
    14                 0 => __DIR__ . '/..' . '/mailchimp/mailchimp/src',
    15             ),
     12            'DrewM\\MailChimp\\' => 16,
    1613        ),
     14    );
     15
     16    public static $prefixDirsPsr4 = array (
     17        'DrewM\\MailChimp\\' =>
     18        array (
     19            0 => __DIR__ . '/..' . '/drewm/mailchimp-api/src',
     20        ),
     21    );
     22
     23    public static $classMap = array (
     24        'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php',
    1725    );
    1826
     
    2028    {
    2129        return \Closure::bind(function () use ($loader) {
    22             $loader->prefixesPsr0 = ComposerStaticInitf62106dfb0a0cfe9a60da8c4bad66ee9::$prefixesPsr0;
     30            $loader->prefixLengthsPsr4 = ComposerStaticInitf62106dfb0a0cfe9a60da8c4bad66ee9::$prefixLengthsPsr4;
     31            $loader->prefixDirsPsr4 = ComposerStaticInitf62106dfb0a0cfe9a60da8c4bad66ee9::$prefixDirsPsr4;
     32            $loader->classMap = ComposerStaticInitf62106dfb0a0cfe9a60da8c4bad66ee9::$classMap;
    2333
    2434        }, null, ClassLoader::class);
  • forms-by-made-it/trunk/vendor/composer/installed.json

    r2243483 r2357240  
    1 [
    2     {
    3         "name": "mailchimp/mailchimp",
    4         "version": "2.0.6",
    5         "version_normalized": "2.0.6.0",
    6         "source": {
    7             "type": "git",
    8             "url": "https://bitbucket.org/mailchimp/mailchimp-api-php.git",
    9             "reference": "7ac99b5ac746d5875c5c350ad7e3b83674c83ec1"
    10         },
    11         "dist": {
    12             "type": "zip",
    13             "url": "https://bitbucket.org/mailchimp/mailchimp-api-php/get/7ac99b5ac746d5875c5c350ad7e3b83674c83ec1.zip",
    14             "reference": "7ac99b5ac746d5875c5c350ad7e3b83674c83ec1",
    15             "shasum": ""
    16         },
    17         "require": {
    18             "php": ">=5.2.0"
    19         },
    20         "require-dev": {
    21             "apigen/apigen": "dev-master"
    22         },
    23         "time": "2014-10-30T20:38:12+00:00",
    24         "type": "library",
    25         "installation-source": "dist",
    26         "autoload": {
    27             "psr-0": {
    28                 "Mailchimp": "src/"
    29             }
    30         },
    31         "notification-url": "https://packagist.org/downloads/",
    32         "license": [
    33             "MIT"
    34         ],
    35         "authors": [
    36             {
    37                 "name": "MailChimp Devs",
    38                 "email": "[email protected]",
    39                 "homepage": "http://mailchimp.com",
    40                 "role": "Developer"
    41             }
    42         ],
    43         "description": "API client library for the MailChimp bulk email as a service platform",
    44         "homepage": "https://bitbucket.org/mailchimp/mailchimp-api-php",
    45         "keywords": [
    46             "api",
    47             "email"
    48         ]
    49     }
    50 ]
     1{
     2    "packages": [
     3        {
     4            "name": "drewm/mailchimp-api",
     5            "version": "v2.5.4",
     6            "version_normalized": "2.5.4.0",
     7            "source": {
     8                "type": "git",
     9                "url": "https://github.com/drewm/mailchimp-api.git",
     10                "reference": "c6cdfab4ca6ddbc3b260913470bd0a4a5cb84c7a"
     11            },
     12            "dist": {
     13                "type": "zip",
     14                "url": "https://api.github.com/repos/drewm/mailchimp-api/zipball/c6cdfab4ca6ddbc3b260913470bd0a4a5cb84c7a",
     15                "reference": "c6cdfab4ca6ddbc3b260913470bd0a4a5cb84c7a",
     16                "shasum": ""
     17            },
     18            "require": {
     19                "ext-curl": "*",
     20                "ext-json": "*",
     21                "php": ">=5.3"
     22            },
     23            "require-dev": {
     24                "phpunit/phpunit": "7.0.*",
     25                "vlucas/phpdotenv": "^2.0"
     26            },
     27            "time": "2019-08-06T09:24:58+00:00",
     28            "type": "library",
     29            "installation-source": "dist",
     30            "autoload": {
     31                "psr-4": {
     32                    "DrewM\\MailChimp\\": "src"
     33                }
     34            },
     35            "notification-url": "https://packagist.org/downloads/",
     36            "license": [
     37                "MIT"
     38            ],
     39            "authors": [
     40                {
     41                    "name": "Drew McLellan",
     42                    "email": "[email protected]",
     43                    "homepage": "http://allinthehead.com/"
     44                }
     45            ],
     46            "description": "Super-simple, minimum abstraction MailChimp API v3 wrapper",
     47            "homepage": "https://github.com/drewm/mailchimp-api",
     48            "support": {
     49                "issues": "https://github.com/drewm/mailchimp-api/issues",
     50                "source": "https://github.com/drewm/mailchimp-api/tree/master"
     51            },
     52            "install-path": "../drewm/mailchimp-api"
     53        }
     54    ],
     55    "dev": true
     56}
Note: See TracChangeset for help on using the changeset viewer.