forked from ThemeFuse/Brizy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
brizy.php
executable file
·65 lines (53 loc) · 1.73 KB
/
brizy.php
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<?php
/**
* Plugin Name: Brizy
* Description: A free drag & drop front-end page builder to help you create WordPress pages lightning fast. It's easy with Brizy.
* Plugin URI: https://brizy.io/
* Author: Brizy.io
* Author URI: https://brizy.io/
* Version: 1.0.21
* Text Domain: brizy
* License: GPLv3
* Domain Path: /languages
*/
/**
* This will fix the url protocol for websites that are working behind a load balancer
*/
if ( isset( $_SERVER['HTTP_X_FORWARDED_PROTO'] ) && stripos( $_SERVER['HTTP_X_FORWARDED_PROTO'], 'https' ) !== false ) {
$_SERVER['HTTPS'] = 'on';
}
define( 'BRIZY_DEVELOPMENT', false );
define( 'BRIZY_LOG', false );
define( 'BRIZY_VERSION', '1.0.21' );
define( 'BRIZY_EDITOR_VERSION', '1.0.48' );
define( 'BRIZY_FILE', __FILE__ );
define( 'BRIZY_PLUGIN_BASE', plugin_basename( BRIZY_FILE ) );
define( 'BRIZY_PLUGIN_PATH', dirname( BRIZY_FILE ) );
define( 'BRIZY_PLUGIN_URL', rtrim( plugin_dir_url( BRIZY_FILE ), "/" ) );
include_once 'autoload.php';
function brizy_install() {
Brizy_Logger::install();
}
function brizy_clean() {
Brizy_Logger::clean();
}
register_activation_hook( __FILE__, 'brizy_install' );
register_deactivation_hook( __FILE__, 'brizy_clean' );
add_action( 'plugins_loaded', 'brizy_load' );
function brizy_load() {
if ( version_compare( PHP_VERSION, '5.4.0' ) < 0 ) {
add_action( 'admin_notices', 'brizy_notices' );
return;
}
include_once 'editor/load.php';
include_once 'shortcode/load.php';
include_once 'public/hooks.php';
include_once 'admin/load.php';
}
function brizy_notices() {
?>
<div class="notice notice-error is-dismissible">
<p>Brizy requires PHP version 5.4+, you currently running PHP <?php echo PHP_VERSION?>. <b>BRIZY IS NOT RUNNING. </b></p>
</div>
<?php
}