-
Notifications
You must be signed in to change notification settings - Fork 0
/
elementor-form-buildercms.php
39 lines (29 loc) · 1.16 KB
/
elementor-form-buildercms.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
36
37
38
39
<?php
/**
* Plugin Name: Elementor Form BuilderCMS Action
* Plugin URI:
* Description: An integration to add BuilderCMS action to Elementor Pro Forms
* Author: Compass Marketing
* Version: 2.0.2
* Text Domain: compassad
* Author URI: https://compassad.com
*/
function admin_notice_missing_main_plugin() {
if ( isset( $_GET['activate'] ) ) unset( $_GET['activate'] );
$message = sprintf(
/* translators: 1: Plugin Name 2: Elementor */
esc_html__( '"%1$s" requires "%2$s" to be installed and activated.', 'text-domain' ),
'<strong>' . esc_html__( 'Elementor Form BuilderCMS Action', 'compassad' ) . '</strong>',
'<strong>' . esc_html__( 'Elementor Pro', 'compassad' ) . '</strong>'
);
printf( '<div class="notice notice-warning is-dismissible"><p>%1$s</p></div>', $message );
}
// Check if Elementor Pro is installed and init, otherwise,
function check_for_elementor_pro(){
if ( in_array( 'elementor-pro/elementor-pro.php', get_option( 'active_plugins' ) ) ) {
require_once('builder-cms-action.php');
} else {
add_action( 'admin_notices', 'admin_notice_missing_main_plugin' );
}
}
add_action( 'elementor/init', 'check_for_elementor_pro' );