| 1 |
<?php |
| 2 |
/* |
| 3 |
Plugin Name: HTML Forms |
| 4 |
Plugin URI: https://www.htmlformsplugin.com/#utm_source=wp-plugin&utm_medium=html-forms&utm_campaign=plugins-page |
| 5 |
Description: Not just another forms plugin. Simple and flexible. |
| 6 |
Version: 1.3.26 |
| 7 |
Author: ibericode |
| 8 |
Author URI: https://ibericode.com/ |
| 9 |
License: GPL v3 |
| 10 |
Text Domain: html-forms |
| 11 |
|
| 12 |
HTML Forms |
| 13 |
Copyright (C) 2017-2022, Danny van Kooten, danny@ibericode.com |
| 14 |
|
| 15 |
This program is free software: you can redistribute it and/or modify |
| 16 |
it under the terms of the GNU General Public License as published by |
| 17 |
the Free Software Foundation, either version 3 of the License, or |
| 18 |
(at your option) any later version. |
| 19 |
|
| 20 |
This program is distributed in the hope that it will be useful, |
| 21 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 22 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 23 |
GNU General Public License for more details. |
| 24 |
|
| 25 |
You should have received a copy of the GNU General Public License |
| 26 |
along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 27 |
*/ |
| 28 |
|
| 29 |
namespace HTML_Forms; |
| 30 |
|
| 31 |
function _bootstrap() { |
| 32 |
$settings = hf_get_settings(); |
| 33 |
|
| 34 |
$forms = new Forms( __FILE__, $settings ); |
| 35 |
$forms->hook(); |
| 36 |
|
| 37 |
// hook actions |
| 38 |
$email_action = new Actions\Email(); |
| 39 |
$email_action->hook(); |
| 40 |
|
| 41 |
if( class_exists( 'MC4WP_MailChimp' ) ) { |
| 42 |
$mailchimp_action = new Actions\MailChimp(); |
| 43 |
$mailchimp_action->hook(); |
| 44 |
} |
| 45 |
|
| 46 |
if( is_admin() ) { |
| 47 |
if( ! defined( 'DOING_AJAX' ) || ! DOING_AJAX ) { |
| 48 |
$admin = new Admin\Admin( __FILE__ ); |
| 49 |
$admin->hook(); |
| 50 |
} |
| 51 |
|
| 52 |
$gdpr = new Admin\GDPR(); |
| 53 |
$gdpr->hook(); |
| 54 |
} |
| 55 |
} |
| 56 |
|
| 57 |
define('HTML_FORMS_VERSION', '1.3.26'); |
| 58 |
|
| 59 |
if( ! function_exists( 'hf_get_form' ) ) { |
| 60 |
require __DIR__ . '/vendor/autoload.php'; |
| 61 |
} |
| 62 |
add_action( 'plugins_loaded', 'HTML_Forms\\_bootstrap', 10 ); |
| 63 |
|
| 64 |
register_activation_hook( __FILE__, '_hf_on_plugin_activation'); |
| 65 |
|
| 66 |
// add cap to site admin after being added to blog |
| 67 |
add_action('add_user_to_blog', '_hf_on_add_user_to_blog', 10, 3); |
| 68 |
|
| 69 |
// install db table for newly added sites |
| 70 |
add_action('wp_insert_site', '_hf_on_wp_insert_site'); |
| 71 |
|