-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsmartemailing.php
More file actions
46 lines (34 loc) · 1.17 KB
/
Copy pathsmartemailing.php
File metadata and controls
46 lines (34 loc) · 1.17 KB
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
36
37
38
39
40
41
42
43
44
45
<?php
/*
Plugin Name: Smart Emailing Fluent Form Integration
Plugin URI:
Description: Integrate Smart Emailing with Fluent Form
Version: 1.0.1
Author: Jan Ranostaj
Author URI: https://ranostaj.com
Text Domain: smartemailing
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
*/
define( 'SMART_EMAILING_PATH', plugin_dir_path( __FILE__ ) );
define( 'SMART_EMAILING_URL', plugin_dir_url( __FILE__ ) );
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
}
require_once( SMART_EMAILING_PATH . 'FluentFormIntegration.php' );
require_once( SMART_EMAILING_PATH . 'Api.php' );
if ( ! is_plugin_active( 'fluentform/fluentform.php' ) ) {
add_action( 'admin_notices', 'smartemailing_fluentform_not_installed_notice' );
return;
}
function smartemailing_fluentform_not_installed_notice() {
?>
<div class="notice notice-error is-dismissible">
<p><?php _e( 'Smart Emailing Fluent Form Integration requires Fluent Form plugin to be installed and activated.', 'smartemailing' ); ?></p>
</div>
<?php
}
// Initialize the integration
add_action( 'init', function () {
new \SmartEmailing\FluentFormIntegration( wpFluentForm() );
} );