PluginProbe
Brizy – Page Builder / 2.8.16
Brizy – Page Builder v2.8.16
2.8.22 2.8.21 2.8.20 2.8.19 2.8.18 2.8.17 2.8.16 2.8.15 2.8.14 2.6.4 2.6.5 2.6.6 2.6.7 2.6.8 2.6.9 2.7.0 2.7.1 2.7.10 2.7.11 2.7.12 2.7.13 2.7.14 2.7.15 2.7.16 2.7.17 All 187 releases
brizy / brizy.php

brizy.php in Brizy – Page Builder 2.8.16, at brizy.php

114 lines 3.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Plugin Name: Brizy
4 * Description: A free drag & drop front-end page builder to help you create WordPress pages lightning fast. It's easy with Brizy.
5 * Plugin URI: https://brizy.io/
6 * Author: Brizy.io
7 * Author URI: https://brizy.io/
8 * Version: 2.8.16
9 * Text Domain: brizy
10 * License: GPLv3
11 * Domain Path: /languages
12 */
13 /**
14 * This will fix the url protocol for websites that are working behind a load balancer
15 */
16 if ( isset( $_SERVER['HTTP_X_FORWARDED_PROTO'] ) && stripos( $_SERVER['HTTP_X_FORWARDED_PROTO'], 'https' ) !== false ) {
17 $_SERVER['HTTPS'] = 'on';
18 }
19 define( 'BRIZY_DEVELOPMENT', false );
20 define( 'BRIZY_LOG', false );
21 define( 'BRIZY_VERSION', '2.8.16' );
22 define( 'BRIZY_MINIMUM_PRO_VERSION', '2.4.15' );
23 define( 'BRIZY_MINIMUM_COMPILER_VERSION', '353-wp' );
24 define( 'BRIZY_RECOMPILE_TAG', 1781013436 );
25 define( 'BRIZY_EDITOR_VERSION', BRIZY_DEVELOPMENT ? 'dev' : '363-wp' );
26 define( 'BRIZY_SYNC_VERSION', '363' );
27 define( 'BRIZY_FILE', __FILE__ );
28 define( 'BRIZY_PLUGIN_BASE', plugin_basename( BRIZY_FILE ) );
29 define( 'BRIZY_PLUGIN_PATH', dirname( BRIZY_FILE ) );
30 define( 'BRIZY_PLUGIN_URL', rtrim( plugin_dir_url( BRIZY_FILE ), "/" ) );
31 define( 'BRIZY_MAX_REVISIONS_TO_KEEP', 30 );
32 include_once rtrim( BRIZY_PLUGIN_PATH, "/" ) . '/autoload.php';
33 include_once rtrim( BRIZY_PLUGIN_PATH, "/" ) . '/languages/main.php';
34 require_once( ABSPATH . '/wp-admin/includes/file.php' );
35 require_once( ABSPATH . '/wp-admin/includes/media.php' );
36 require_once( ABSPATH . '/wp-admin/includes/image.php' );
37 if ( BRIZY_DEVELOPMENT ) {
38 $dotenv = new \Symfony\Component\Dotenv\Dotenv( 'APP_ENV' );
39 $dotenv->load( __DIR__ . '/.env' );
40 }
41 add_action( 'plugins_loaded', 'brizy_load' );
42 add_action( 'init', 'brizy_load_text_domain' );
43 add_action( 'upgrader_process_complete', 'brizy_upgrade_completed', 10, 2 );
44 add_action( 'activated_plugin', 'Brizy_Admin_GettingStarted::redirectAfterActivation' );
45 register_activation_hook( BRIZY_FILE, 'brizy_install' );
46 register_deactivation_hook( BRIZY_FILE, 'brizy_clean' );
47 function brizy_load() {
48
49 try {
50 $instance = Brizy_Editor::get();
51 } catch ( Exception $e ) {
52 add_action( 'admin_notices', 'brizy_fail_notices' );
53
54 return;
55 }
56 if ( apply_filters( 'brizy_allow_plugin_included', true ) ) {
57 do_action( 'brizy_plugin_included' );
58 }
59 }
60
61 function brizy_notices() {
62 ?>
63 <div class="notice notice-error is-dismissible">
64 <p>
65 <?php
66 printf( __( '%1$s requires PHP version 5.6+, your currently running PHP %2$s. <b>%3$s IS NOT RUNNING.</b>', 'brizy' ), __bt( 'brizy', 'Brizy' ), PHP_VERSION, strtoupper( __bt( 'brizy', 'Brizy' ) ) );
67 ?>
68 </p>
69 </div>
70 <?php
71 }
72
73 function brizy_fail_notices() {
74 ?>
75 <div class="notice notice-error is-dismissible">
76 <p>
77 <?php
78 printf( __( '%1$s failed to start. Please contact the support <a href="%s">here</a>.', 'brizy' ), __bt( 'brizy', 'Brizy' ), apply_filters( 'brizy_support_url', Brizy_Config::getSupportUrl() ), strtoupper( __bt( 'brizy', 'Brizy' ) ) );
79 ?>
80 </p>
81 </div>
82 <?php
83 }
84
85 function brizy_upgrade_completed( $upgrader_object, $options ) {
86 if ( $options['action'] == 'update' && $options['type'] == 'plugin' && isset( $options['plugins'] ) ) {
87 foreach ( $options['plugins'] as $plugin ) {
88 if ( $plugin == BRIZY_PLUGIN_BASE ) {
89 add_option( 'brizy-regenerate-permalinks', 1 );
90 do_action( 'brizy-updated' );
91 }
92 }
93 }
94 }
95
96 function brizy_install() {
97 Brizy_Logger::install();
98 add_option( 'brizy-regenerate-permalinks', 1 );
99 do_action( 'brizy-activated' );
100 set_transient( 'brizy_admin_notice', true, 7200 );
101 }
102
103 function brizy_clean() {
104 Brizy_Logger::clean();
105 add_option( 'brizy-regenerate-permalinks', 1 );
106 do_action( 'brizy-deactivated' );
107 }
108
109 function brizy_load_text_domain() {
110 load_plugin_textdomain( 'brizy', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );
111 }
112
113 new Brizy_Compatibilities_Init();
114