jetformbuilder
Last commit date
assets
2 years ago
compatibility
2 years ago
components
2 years ago
includes
2 years ago
languages
2 years ago
modules
2 years ago
templates
2 years ago
index.php
2 years ago
jet-form-builder.php
2 years ago
readme.txt
2 years ago
uninstall.php
2 years ago
jet-form-builder.php
62 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Plugin Name: JetFormBuilder |
| 4 | * Plugin URI: https://jetformbuilder.com/ |
| 5 | * Description: Advanced form builder plugin for WordPress block editor. Create forms from the ground up, customize the existing ones, and style them up – all in one editor. |
| 6 | * Version: 3.2.0 |
| 7 | * Author: Crocoblock |
| 8 | * Author URI: https://crocoblock.com/ |
| 9 | * Text Domain: jet-form-builder |
| 10 | * License: GPL-3.0+ |
| 11 | * License URI: http://www.gnu.org/licenses/gpl-3.0.txt |
| 12 | * Domain Path: /languages |
| 13 | */ |
| 14 | |
| 15 | // If this file is called directly, abort. |
| 16 | if ( ! defined( 'WPINC' ) ) { |
| 17 | die(); |
| 18 | } |
| 19 | |
| 20 | function jet_form_builder_init() { |
| 21 | |
| 22 | define( 'JET_FORM_BUILDER_VERSION', '3.2.0' ); |
| 23 | |
| 24 | define( 'JET_FORM_BUILDER__FILE__', __FILE__ ); |
| 25 | define( 'JET_FORM_BUILDER_PLUGIN_BASE', plugin_basename( JET_FORM_BUILDER__FILE__ ) ); |
| 26 | define( 'JET_FORM_BUILDER_PATH', plugin_dir_path( JET_FORM_BUILDER__FILE__ ) ); |
| 27 | define( 'JET_FORM_BUILDER_URL', plugins_url( '/', JET_FORM_BUILDER__FILE__ ) ); |
| 28 | define( 'JET_FORM_BUILDER_SITE', 'https://jetformbuilder.com' ); |
| 29 | |
| 30 | require JET_FORM_BUILDER_PATH . 'includes/plugin.php'; |
| 31 | |
| 32 | jet_form_builder()->register_autoloader(); |
| 33 | jet_form_builder()->init_lang(); |
| 34 | |
| 35 | add_action( |
| 36 | 'after_setup_theme', |
| 37 | array( jet_form_builder(), 'init_plugin' ), |
| 38 | 0 |
| 39 | ); |
| 40 | |
| 41 | jet_form_builder()->get_modules()->install( new JFB_Modules\Cli\Module() ); |
| 42 | jet_form_builder()->get_modules()->install( new JFB_Modules\Framework\Module() ); |
| 43 | } |
| 44 | |
| 45 | if ( version_compare( PHP_VERSION, '7.0.0', '>=' ) ) { |
| 46 | add_action( 'plugins_loaded', 'jet_form_builder_init' ); |
| 47 | |
| 48 | require __DIR__ . '/includes/functions.php'; |
| 49 | } else { |
| 50 | add_action( |
| 51 | 'admin_notices', |
| 52 | function () { |
| 53 | $class = 'notice notice-error'; |
| 54 | $message = __( |
| 55 | '<b>Error:</b> <b>JetFormBuilder</b> plugin requires a PHP version ">= 7.0"', |
| 56 | 'jet-form-builder' |
| 57 | ); |
| 58 | printf( '<div class="%1$s"><p>%2$s</p></div>', esc_attr( $class ), wp_kses_post( $message ) ); |
| 59 | } |
| 60 | ); |
| 61 | } |
| 62 |