kubio
Last commit date
build
3 years ago
defaults
4 years ago
languages
3 years ago
lib
3 years ago
migrations
4 years ago
static
4 years ago
vendor
3 years ago
LICENSE.txt
4 years ago
license-endpoints.php
4 years ago
plugin.php
3 years ago
readme.txt
3 years ago
plugin.php
84 lines
| 1 | <?php |
| 2 | |
| 3 | /** |
| 4 | * Plugin Name: Kubio |
| 5 | * Plugin URI: https://kubiobuilder.com |
| 6 | * Description: Kubio is an innovative block-based WordPress website builder that enriches the block editor with new blocks and gives its users endless styling options. |
| 7 | * Author: ExtendThemes |
| 8 | * Author URI: https://extendthemes.com |
| 9 | * Version: 1.4.1 |
| 10 | * License: GPL3+ |
| 11 | * License URI: https://www.gnu.org/licenses/gpl-2.0.txt |
| 12 | * Text Domain: kubio |
| 13 | * Domain Path: /languages |
| 14 | * Requires PHP: 7.1.3 |
| 15 | * Requires at least: 5.8 |
| 16 | * |
| 17 | */ |
| 18 | |
| 19 | // Exit if accessed directly. |
| 20 | if ( ! defined( 'ABSPATH' ) ) { |
| 21 | exit; |
| 22 | } |
| 23 | |
| 24 | // skip loading free version if the Kubio Page Builder PRO is active |
| 25 | if ( ! function_exists( 'kubio_is_free_and_pro_already_active' ) ) { |
| 26 | |
| 27 | function kubio_is_free_and_pro_already_active() { |
| 28 | $plugin_name = plugin_basename( __FILE__ ); |
| 29 | $is_free = strpos( $plugin_name, 'pro' ) === false; |
| 30 | |
| 31 | $flags_option = get_option( '__kubio_instance_flags' ); |
| 32 | |
| 33 | update_option( '__kubio_instance_flags', $flags_option ); |
| 34 | |
| 35 | $pro_builder_is_active = false; |
| 36 | if ( $is_free ) { |
| 37 | $active_plugins = get_option( 'active_plugins' ); |
| 38 | $pro_builder_is_active = in_array( 'kubio-pro/plugin.php', $active_plugins ); |
| 39 | } |
| 40 | |
| 41 | return $is_free && $pro_builder_is_active; |
| 42 | } |
| 43 | |
| 44 | if ( kubio_is_free_and_pro_already_active() ) { |
| 45 | return; |
| 46 | } |
| 47 | } |
| 48 | |
| 49 | |
| 50 | if ( defined( 'KUBIO_VERSION' ) ) { |
| 51 | return; |
| 52 | } |
| 53 | |
| 54 | define( 'KUBIO_VERSION', '1.4.1' ); |
| 55 | define( 'KUBIO_BUILD_NUMBER', '91' ); |
| 56 | |
| 57 | define( 'KUBIO_ENTRY_FILE', __FILE__ ); |
| 58 | define( 'KUBIO_ROOT_DIR', plugin_dir_path( __FILE__ ) ); |
| 59 | define( 'KUBIO_BUILD_DIR', plugin_dir_path( __FILE__ ) . '/build' ); |
| 60 | define( 'KUBIO_LOGO_URL', plugins_url( '/static/kubio-logo.svg', __FILE__ ) ); |
| 61 | define( 'KUBIO_LOGO_PATH', plugin_dir_path( __FILE__ ) . '/static/kubio-logo.svg' ); |
| 62 | define( 'KUBIO_LOGO_SVG', file_get_contents( KUBIO_LOGO_PATH ) ); |
| 63 | |
| 64 | if ( ! defined( 'KUBIO_MINIMUM_WP_VERSION' ) ) { |
| 65 | define( 'KUBIO_MINIMUM_WP_VERSION', '5.9' ); |
| 66 | } |
| 67 | |
| 68 | |
| 69 | define( 'KUBIO_SLUG', str_replace( wp_normalize_path( WP_PLUGIN_DIR ) . '/', '', wp_normalize_path( dirname( __FILE__ ) ) ) ); |
| 70 | |
| 71 | if ( ! function_exists( 'kubio_url' ) ) { |
| 72 | function kubio_url( $path = '') { |
| 73 | return plugins_url( $path, __FILE__ ); |
| 74 | } |
| 75 | } |
| 76 | |
| 77 | /** |
| 78 | * @var \Composer\Autoload\ClassLoader $kubio_autoloader ; |
| 79 | */ |
| 80 | global $kubio_autoloader; |
| 81 | $kubio_autoloader = require_once plugin_dir_path( __FILE__ ) . 'vendor/autoload.php'; |
| 82 | |
| 83 | require_once 'lib/init.php'; |
| 84 |