-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathforminator-addon-yafa-plugin.php
44 lines (35 loc) · 1.32 KB
/
forminator-addon-yafa-plugin.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
40
41
42
<?php
/**
* Plugin Name: Yet Another Forminator Addon
* Version: 1.0-ALPHA.1
* Description: Allow Forminator edit / resume submissions
* Author: WPMU DEV
* Author URI: http://premium.wpmudev.org
* Text Domain: external_forminator
* Domain Path: /languages/
*/
//Direct Load
define( 'FORMINATOR_ADDON_YAFA_VERSION', '1.0' );
/**
* Make FORM with ID 260 have this addon auto connected
* it should go on form settings or any persistent storage you want
*/
define( 'FORMINATOR_ADDON_YAFA_AUTO_CONNECT_FORM_ID', 260 );
function forminator_addon_yafa_url() {
return trailingslashit( plugin_dir_url( __FILE__ ) );
}
function forminator_addon_yafa_dir() {
return trailingslashit( dirname( __FILE__ ) );
}
function forminator_addon_yafa_assets_url() {
return trailingslashit( forminator_addon_yafa_url() . '/addons/yafa/assets' );
}
add_action( 'forminator_addons_loaded', 'load_forminator_addon_yafa' );
function load_forminator_addon_yafa() {
require_once dirname( __FILE__ ) . '/addons/yafa/forminator-addon-yafa-exception.php';
require_once dirname( __FILE__ ) . '/addons/yafa/forminator-addon-yafa-form-hooks.php';
require_once dirname( __FILE__ ) . '/addons/yafa/forminator-addon-yafa.php';
if ( class_exists( 'Forminator_Addon_Loader' ) ) {
Forminator_Addon_Loader::get_instance()->register( 'Forminator_Addon_Yafa' );
}
}