-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmjforms.php
36 lines (31 loc) · 922 Bytes
/
mjforms.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?php
/**
* @package Mj Forms
* @version 1.0.1
*/
/*
Plugin Name: Mj Forms
Plugin URI: https://github.com/jonathandhn/mj-forms
Description: Manage your Mailjet subscribers with elementor forms.
Author: Jonathan DAHAN
Version: 1.0.1
Author URI: https://jonathanphoto.fr
Domain Path: /languages
*/
if (!defined('ABSPATH'))
{
exit; // Exit if accessed directly
}
define('MJ_FORMS_PATH', plugin_dir_path(__FILE__));
add_action('elementor_pro/init', function ()
{
// Here its safe to include our action class file
include_once (MJ_FORMS_PATH . 'ActionSubscriber.php');
// Instantiate the action class
$MJF_action_subscribe = new MJF_Subscribe_Action_After_Submit();
// Register the action with form widget
\ElementorPro\Plugin::instance()
->modules_manager
->get_modules('forms')
->add_form_action($MJF_action_subscribe->get_name() , $MJF_action_subscribe);
});