jet-form-builder.php
| 1 | <?php |
| 2 | /** |
| 3 | * Plugin Name: JetFormBuilder |
| 4 | * Plugin URI: https://crocoblock.com/ |
| 5 | * Description: Advanced form builder plugin for Gutenberg. Create forms from the ground up, customize the existing ones, and style them up – all in one editor |
| 6 | * Version: 1.0.2 |
| 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 | add_action( 'plugins_loaded', 'jet_form_builder_init' ); |
| 21 | |
| 22 | function jet_form_builder_init() { |
| 23 | |
| 24 | define( 'JET_FORM_BUILDER_VERSION', '1.0.2' ); |
| 25 | |
| 26 | define( 'JET_FORM_BUILDER__FILE__', __FILE__ ); |
| 27 | define( 'JET_FORM_BUILDER_PLUGIN_BASE', plugin_basename( JET_FORM_BUILDER__FILE__ ) ); |
| 28 | define( 'JET_FORM_BUILDER_PATH', plugin_dir_path( JET_FORM_BUILDER__FILE__ ) ); |
| 29 | define( 'JET_FORM_BUILDER_URL', plugins_url( '/', JET_FORM_BUILDER__FILE__ ) ); |
| 30 | |
| 31 | require JET_FORM_BUILDER_PATH . 'includes/plugin.php'; |
| 32 | |
| 33 | } |
| 34 | |
| 35 | function jet_form_builder() { |
| 36 | return Jet_Form_Builder\Plugin::instance(); |
| 37 | } |
| 38 | |
| 39 | if ( ! function_exists( 'jet_fb_render_form' ) ) { |
| 40 | function jet_fb_render_form( $settings ) { |
| 41 | return Jet_Form_Builder\Plugin::instance()->blocks->get_form_class()->render_callback_field( $settings ); |
| 42 | } |
| 43 | } |
| 44 |