-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathopen-builder.php
More file actions
50 lines (44 loc) · 1.74 KB
/
Copy pathopen-builder.php
File metadata and controls
50 lines (44 loc) · 1.74 KB
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
43
44
45
46
47
48
49
50
<?php
/**
* Plugin Name: Open Builder
* Plugin URI: https://example.com/open-builder
* Description: An original, open-source drag-and-drop visual website builder for WordPress. Live editor, responsive controls, global variables, widgets, and a form builder.
* Version: 1.22.1
* Requires at least: 6.2
* Requires PHP: 8.0
* Author: Open Builder
* License: GPL-2.0-or-later
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
* Text Domain: open-builder
* Domain Path: /languages
*
* Open Builder is original software. It is not affiliated with, derived from, or
* containing any code from Breakdance, Elementor, or any other commercial builder.
*/
defined( 'ABSPATH' ) || exit;
define( 'OPENB_VERSION', '1.22.1' );
define( 'OPENB_FILE', __FILE__ );
define( 'OPENB_DIR', plugin_dir_path( __FILE__ ) );
define( 'OPENB_URL', plugin_dir_url( __FILE__ ) );
define( 'OPENB_MIN_PHP', '8.0' );
// Hard stop on unsupported PHP rather than fataling on modern syntax.
if ( version_compare( PHP_VERSION, OPENB_MIN_PHP, '<' ) ) {
add_action( 'admin_notices', function () {
printf(
'<div class="notice notice-error"><p>%s</p></div>',
esc_html( sprintf(
/* translators: 1: required PHP version, 2: current PHP version */
__( 'Open Builder requires PHP %1$s or higher. You are running %2$s.', 'open-builder' ),
OPENB_MIN_PHP,
PHP_VERSION
) )
);
} );
return;
}
require_once OPENB_DIR . 'includes/class-plugin.php';
register_activation_hook( __FILE__, [ '\OpenBuilder\Plugin', 'activate' ] );
register_deactivation_hook( __FILE__, [ '\OpenBuilder\Plugin', 'deactivate' ] );
add_action( 'plugins_loaded', function () {
\OpenBuilder\Plugin::instance()->boot();
} );