PluginProbe
FormGent – Next-Gen AI Form Builder for WordPress with Multi-Step, Quizzes, Payments & More / 1.9.2
FormGent – Next-Gen AI Form Builder for WordPress with Multi-Step, Quizzes, Payments & More v1.9.2
1.12.1 1.12.0 1.11.0 1.10.0 1.9.2 1.9.1 1.9.0 1.8.1 1.8.0 trunk 0.0.4 0.0.5 0.0.6 0.0.7 0.0.8 0.0.9 0.1.0 0.1.1 0.2.0 0.2.1 0.2.2 0.2.3 0.3.0 0.4.0 0.4.1 All 75 releases
formgent / formgent.php

formgent.php in FormGent – Next-Gen AI Form Builder for WordPress with Multi-Step, Quizzes, Payments & More 1.9.2, at formgent.php

75 lines 2.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 defined( 'ABSPATH' ) || exit;
4
5 use FormGent\App\Providers\PostTypeServiceProvider;
6 use FormGent\WpMVC\App;
7
8 /**
9 * Plugin Name: FormGent
10 * Description: Next-Gen AI Form Builder for WordPress with Multi-Step, Quizzes, Payments & More.
11 * Version: 1.9.2
12 * Requires at least: 6.6
13 * Requires PHP: 7.4
14 * Tested up to: 7.0
15 * Author: wpWax - Contact Form Plugin & WP Form Builder
16 * Author URI: http://wpwax.com
17 * License: GPL v3 or later
18 * License URI: http://www.gnu.org/licenses/gpl-3.0.html
19 * Text Domain: formgent
20 * Domain Path: /languages
21 */
22
23 require_once __DIR__ . '/vendor/vendor-src/autoload.php';
24 require_once __DIR__ . '/app/Helpers/helper.php';
25
26 define( 'FORMGENT_DEPENDENCY_VERSION', '1.0.0' );
27
28 final class FormGent {
29 private static ?FormGent $instance = null;
30
31 public static function instance(): FormGent {
32 if ( is_null( self::$instance ) ) {
33 self::$instance = new self();
34 }
35 return self::$instance;
36 }
37
38 public function load(): void {
39 register_activation_hook( __FILE__, [$this, 'on_activation'] );
40 register_deactivation_hook( __FILE__, [$this, 'on_deactivation'] );
41
42 $application = App::instance();
43
44 $application->boot( __FILE__, __DIR__ );
45
46 /**
47 * Fires once activated plugins have loaded.
48 */
49 add_action(
50 'plugins_loaded', function () use ( $application ): void {
51
52 do_action( 'formgent_before_load' );
53
54 $application->load();
55
56 do_action( 'formgent_after_load' );
57 }
58 );
59 }
60
61 public function on_activation(): void {
62 new FormGent\App\Setup\Activation();
63 PostTypeServiceProvider::register_post_type();
64 flush_rewrite_rules();
65 add_option( 'formgent_activation_redirect', true );
66 }
67
68 public function on_deactivation(): void {
69 flush_rewrite_rules();
70 wp_clear_scheduled_hook( 'formgent_cleanup_old_pdfs' );
71 }
72 }
73
74 FormGent::instance()->load();
75