. */ namespace HTML_Forms; function _bootstrap() { $settings = hf_get_settings(); $forms = new Forms( __FILE__, $settings ); $forms->hook(); // hook actions $email_action = new Actions\Email(); $email_action->hook(); if( class_exists( 'MC4WP_MailChimp' ) ) { $mailchimp_action = new Actions\MailChimp(); $mailchimp_action->hook(); } if( is_admin() ) { if( ! defined( 'DOING_AJAX' ) || ! DOING_AJAX ) { $admin = new Admin\Admin( __FILE__ ); $admin->hook(); } $gdpr = new Admin\GDPR(); $gdpr->hook(); } } define('HTML_FORMS_VERSION', '1.3.21'); if( ! function_exists( 'hf_get_form' ) ) { require __DIR__ . '/vendor/autoload.php'; } add_action( 'plugins_loaded', 'HTML_Forms\\_bootstrap', 10 ); register_activation_hook( __FILE__, '_hf_on_plugin_activation'); // add cap to site admin after being added to blog add_action('add_user_to_blog', '_hf_on_add_user_to_blog', 10, 3); // install db table for newly added sites add_action('wp_insert_site', '_hf_on_wp_insert_site');