Plugin Directory

source: html-forms/trunk/html-forms.php

Last change on this file was 3419926, checked in by linksoftware, 5 weeks ago

1.6.1

File size: 2.4 KB
Line 
1<?php
2/*
3Plugin Name: HTML Forms
4Plugin URI: https://htmlformsplugin.com/
5Description: A simpler, faster, and smarter WordPress forms plugin.
6Version: 1.6.1
7Author: HTML Forms
8Author URI: https://htmlformsplugin.com/
9License: GPL v3
10Text Domain: html-forms
11
12HTML Forms
13Copyright (C) 2017-2024, Link Software LLC <support@linksoftwarellc.com>
14
15This program is free software: you can redistribute it and/or modify
16it under the terms of the GNU General Public License as published by
17the Free Software Foundation, either version 3 of the License, or
18(at your option) any later version.
19
20This program is distributed in the hope that it will be useful,
21but WITHOUT ANY WARRANTY; without even the implied warranty of
22MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
23GNU General Public License for more details.
24
25You should have received a copy of the GNU General Public License
26along with this program.  If not, see <http://www.gnu.org/licenses/>.
27*/
28
29namespace HTML_Forms;
30
31function _bootstrap() {
32    $settings = hf_get_settings();
33
34    $forms = new Forms( __FILE__, $settings );
35    $forms->hook();
36
37    if( is_admin() ) {
38        if( ! \defined( 'DOING_AJAX' ) || ! DOING_AJAX ) {
39            $admin = new Admin\Admin( __FILE__ );
40            $admin->hook();
41        }
42
43        $gdpr = new Admin\GDPR();
44        $gdpr->hook();
45
46        if( function_exists('hcaptcha') ) {
47            $hcaptcha = new Admin\Hcaptcha();
48            $hcaptcha->hook();
49        }
50    }
51
52    // Initialize Google reCAPTCHA v3 (needs to run on both frontend and backend)
53    if( \class_exists( 'HTML_Forms\Admin\Recaptcha' ) ) {
54        $recaptcha = new Admin\Recaptcha();
55        $recaptcha->hook();
56    }
57}
58
59function _hf_actions() {
60    $email_action = new Actions\Email();
61    $email_action->hook();
62
63    if( \class_exists( 'MC4WP_MailChimp' ) ) {
64        $mailchimp_action = new Actions\MailChimp();
65        $mailchimp_action->hook();
66    }
67}
68
69define('HTML_FORMS_VERSION', '1.6.1');
70
71if( ! function_exists( 'hf_get_form' ) ) {
72    require __DIR__ . '/vendor/autoload.php';
73}
74
75add_action( 'plugins_loaded', 'HTML_Forms\\_bootstrap', 10 );
76add_action( 'init', 'HTML_Forms\\_hf_actions', 10 );
77
78register_activation_hook( __FILE__, '_hf_on_plugin_activation');
79
80// add cap to site admin after being added to blog
81add_action('add_user_to_blog', '_hf_on_add_user_to_blog', 10, 3);
82
83// install db table for newly added sites
84add_action('wp_insert_site', '_hf_on_wp_insert_site');
Note: See TracBrowser for help on using the repository browser.