PluginProbe
The Innovative Form Builder – IvyForms / 1.5
The Innovative Form Builder – IvyForms v1.5
1.5.1 1.5 1.4.1 1.4 trunk 0.1.2 0.2 0.2.1 0.3 0.3.1 0.4 0.5 0.6 0.6.1 0.6.1-backup 0.6.1.1 0.7 0.8 0.8.1 0.8.2 0.9 0.9.1 1.0 1.1 1.1.1 All 27 releases
← All changes | ivyforms.php +55 -10 0.2 → 1.5 View file →
@@ -2,12 +2,12 @@
2 2 /*
3 3 * Plugin Name: IvyForms - The innovative Contact Form Builder
4 4 * Plugin URI: https://ivyforms.com
5 5 * Description: Transform your WordPress site with IvyForms: a powerful, user-friendly plugin for creating and managing customizable forms effortlessly.
6 - * Version: 0.2
6 + * Version: 1.5
7 7 * Requires PHP: 7.4
8 - * Author: TMS-Plugins
9 - * Author URI: https://tmsproducts.io
8 + * Author: Melograno Ventures
9 + * Author URI: https://melograno.io/
10 10 * License: GPLv2 or later
11 11 * License URI: http://www.gnu.org/licenses/gpl-2.0.html
12 12 * Text Domain: ivyforms
13 13 * Domain Path: /languages
@@ -27,11 +27,12 @@
27 27 */
28 28 namespace IvyForms;
29 29
30 30 use Exception;
31 +use IvyForms\Infrastructure\WP\MCP\McpFeatureGate;
32 +use IvyForms\Plugin\Plugin;
33 +use WP\MCP\Core\McpAdapter;
31 34
32 -use IvyForms\Load\Plugin;
33 -
34 35 if ( ! defined( 'ABSPATH' ) )
35 36 {
36 37 exit; // Exit if accessed directly.
37 38 }
@@ -45,13 +46,26 @@
45 46 {
46 47 define('IVYFORMS_URL', plugin_dir_url(__FILE__));
47 48 }
48 49
50 +if (!defined('IVYFORMS_TEMPLATES_IMAGES_URL'))
51 +{
52 + define('IVYFORMS_TEMPLATES_IMAGES_URL', plugin_dir_url(__FILE__) . 'frontend/src/assets/images/templates/');
53 +}
54 +
49 55 if (!defined('IVYFORMS_DEV'))
50 56 {
51 57 define('IVYFORMS_DEV', false);
52 58 }
53 59
60 +// Google Sheets OAuth middleware (override in wp-config.php for hosted/staging).
61 +if (!defined('IVYFORMS_GOOGLE_SHEETS_MIDDLEWARE_URL')) {
62 + define(
63 + 'IVYFORMS_GOOGLE_SHEETS_MIDDLEWARE_URL',
64 + IVYFORMS_DEV ? 'http://localhost:8080' : 'https://middleware.ivyforms.com'
65 + );
66 +}
67 +
54 68 // Const for plugin slug
55 69 if (!defined('IVYFORMS_PLUGIN_SLUG'))
56 70 {
57 71 define('IVYFORMS_PLUGIN_SLUG', plugin_basename(__FILE__));
@@ -60,18 +74,49 @@
60 74 if (!defined('IVYFORMS_FILE'))
61 75 {
62 76 define('IVYFORMS_FILE', __FILE__);
63 77 }
78 +// Const for site URL
79 +if (!defined('IVYFORMS_SITE_URL')) {
80 + define('IVYFORMS_SITE_URL', get_site_url());
81 +}
64 82
65 83 if (!defined('IVYFORMS_VERSION')) {
66 - define('IVYFORMS_VERSION', '0.2');
84 + define('IVYFORMS_VERSION', '1.5');
67 85 }
68 86
87 +// Payments (Square / Stripe / PayPal) ship as "Coming soon" until the feature is released.
88 +// Flip to true (or define in wp-config.php) to expose the payment fields, settings and Payments page.
89 +if (!defined('IVYFORMS_PAYMENTS_ENABLED')) {
90 + define('IVYFORMS_PAYMENTS_ENABLED', false);
91 +}
92 +
93 +if (!defined('IVYFORMS_MCP_MIN_WP_VERSION')) {
94 + define('IVYFORMS_MCP_MIN_WP_VERSION', '6.9');
95 +}
96 +
97 +if (!defined('MELOGRANO_BI_GATE_URL')) {
98 + define('MELOGRANO_BI_GATE_URL', 'https://bi.melograno.io');
99 +}
100 +
101 +if (!defined('IVYFORMS_MIDDLEWARE_URL')) {
102 + define(
103 + 'IVYFORMS_MIDDLEWARE_URL',
104 + IVYFORMS_DEV ? 'https://middleware-dev.ivyforms.com' : 'https://middleware.ivyforms.com'
105 + );
106 +}
107 +
108 +require_once IVYFORMS_PATH . '/backend/scope-vendor/autoload.php';
69 109 require_once IVYFORMS_PATH . '/backend/vendor/autoload.php';
70 -$container = require IVYFORMS_PATH . '/backend/src/Config/container.php';
71 -require_once IVYFORMS_PATH . '/backend/src/load.php';
72 110
111 +if (class_exists(McpAdapter::class) && McpFeatureGate::isEnabled()) {
112 + McpAdapter::instance();
113 + add_action('mcp_adapter_init', array('\IvyForms\Infrastructure\WP\MCP\IvyFormsMcpServerRegistrar', 'init'));
114 + add_action('wp_abilities_api_categories_init', array('\IvyForms\Infrastructure\WP\MCP\IvyFormsAbilitiesRegistrar', 'registerCategories'));
115 + add_action('wp_abilities_api_init', array('\IvyForms\Infrastructure\WP\MCP\IvyFormsAbilitiesRegistrar', 'registerAbilities'));
116 +}
117 +
73 118 try {
74 - Plugin::getInstance($container);
119 + Plugin::getInstance();
75 120 } catch (Exception $e) {
76 121 echo 'ERROR: ' . esc_html($e->getMessage());
77 -}
122 +}