| @@ -2,17 +2,17 @@ | ||
| 2 | 2 | |
| 3 | 3 | /** |
| 4 | 4 | * Plugin Name: Kubio |
| 5 | 5 | * Plugin URI: https://kubiobuilder.com |
| 6 | - * Description: Using the power of AI, Kubio gives you a head start by generating a first draft of your website, which you can further customize to your liking. | |
| 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 | 7 | * Author: ExtendThemes |
| 8 | 8 | * Author URI: https://extendthemes.com |
| 9 | - * Version: 2.9.1 | |
| 9 | + * Version: 1.7.0 | |
| 10 | 10 | * License: GPL3+ |
| 11 | 11 | * License URI: https://www.gnu.org/licenses/gpl-2.0.txt |
| 12 | 12 | * Text Domain: kubio |
| 13 | 13 | * Domain Path: /languages |
| 14 | - * Requires PHP: 7.4 | |
| 14 | + * Requires PHP: 7.1.3 | |
| 15 | 15 | * Requires at least: 5.8 |
| 16 | 16 | * |
| 17 | 17 | */ |
| 18 | 18 | |
| @@ -23,16 +23,16 @@ | ||
| 23 | 23 | |
| 24 | 24 | // skip loading free version if the Kubio Page Builder PRO is active |
| 25 | 25 | if ( ! function_exists( 'kubio_is_free_and_pro_already_active' ) ) { |
| 26 | 26 | |
| 27 | - function kubio_is_free_and_pro_already_active( $base_path ) { | |
| 28 | - $plugin_name = plugin_basename( $base_path ); | |
| 27 | + function kubio_is_free_and_pro_already_active() { | |
| 28 | + $plugin_name = plugin_basename( __FILE__ ); | |
| 29 | 29 | $is_free = strpos( $plugin_name, 'pro' ) === false; |
| 30 | 30 | |
| 31 | - // these two should be deleted? | |
| 32 | - // $flags_option = get_option( '__kubio_instance_flags' ); | |
| 33 | - // update_option( '__kubio_instance_flags', $flags_option ); | |
| 31 | + $flags_option = get_option( '__kubio_instance_flags' ); | |
| 34 | 32 | |
| 33 | + update_option( '__kubio_instance_flags', $flags_option ); | |
| 34 | + | |
| 35 | 35 | $pro_builder_is_active = false; |
| 36 | 36 | if ( $is_free ) { |
| 37 | 37 | $active_plugins = get_option( 'active_plugins' ); |
| 38 | 38 | $pro_builder_is_active = in_array( 'kubio-pro/plugin.php', $active_plugins ); |
| @@ -39,12 +39,13 @@ | ||
| 39 | 39 | } |
| 40 | 40 | |
| 41 | 41 | return $is_free && $pro_builder_is_active; |
| 42 | 42 | } |
| 43 | + | |
| 44 | + if ( kubio_is_free_and_pro_already_active() ) { | |
| 45 | + return; | |
| 46 | + } | |
| 43 | 47 | } |
| 44 | -if ( kubio_is_free_and_pro_already_active( __FILE__ ) ) { | |
| 45 | - return; | |
| 46 | -} | |
| 47 | 48 | |
| 48 | 49 | |
| 49 | 50 | if ( defined( 'KUBIO_VERSION' ) ) { |
| 50 | 51 | return; |
| @@ -49,53 +50,31 @@ | ||
| 49 | 50 | if ( defined( 'KUBIO_VERSION' ) ) { |
| 50 | 51 | return; |
| 51 | 52 | } |
| 52 | 53 | |
| 53 | -define( 'KUBIO_VERSION', '2.9.1' ); | |
| 54 | -define( 'KUBIO_BUILD_NUMBER', '521' ); | |
| 54 | +define( 'KUBIO_VERSION', '1.7.0' ); | |
| 55 | +define( 'KUBIO_BUILD_NUMBER', '163' ); | |
| 55 | 56 | |
| 56 | 57 | define( 'KUBIO_ENTRY_FILE', __FILE__ ); |
| 57 | 58 | define( 'KUBIO_ROOT_DIR', plugin_dir_path( __FILE__ ) ); |
| 58 | -define( 'KUBIO_ROOT_URL', untrailingslashit( plugin_dir_url( __FILE__ ) ) ); | |
| 59 | - | |
| 60 | 59 | define( 'KUBIO_BUILD_DIR', plugin_dir_path( __FILE__ ) . '/build' ); |
| 61 | 60 | define( 'KUBIO_LOGO_URL', plugins_url( '/static/kubio-logo.svg', __FILE__ ) ); |
| 62 | 61 | define( 'KUBIO_LOGO_PATH', plugin_dir_path( __FILE__ ) . '/static/kubio-logo.svg' ); |
| 63 | 62 | define( 'KUBIO_LOGO_SVG', file_get_contents( KUBIO_LOGO_PATH ) ); |
| 64 | 63 | |
| 65 | -define( 'KUBIO_WPML_BLOCK_DEFAULTS_ID', 'Kubio Defaults' ); | |
| 66 | - | |
| 67 | 64 | if ( ! defined( 'KUBIO_CLOUD_URL' ) ) { |
| 68 | 65 | define( 'KUBIO_CLOUD_URL', 'https://cloud.kubiobuilder.com' ); |
| 69 | 66 | } |
| 70 | 67 | |
| 71 | -if ( ! defined( 'KUBIO_INCLUDE_TEST_SNIPPETS' ) ) { | |
| 72 | - define( 'KUBIO_INCLUDE_TEST_SNIPPETS', false ); | |
| 68 | +if ( ! defined( 'KUBIO_CLOUD_SNIPPETS' ) ) { | |
| 69 | + define( 'KUBIO_CLOUD_SNIPPETS', false ); | |
| 73 | 70 | } |
| 74 | - | |
| 75 | -// Build time feature flags, the tokens are replaced by the build script ( see the set_version target in build.xml ). | |
| 76 | -// The tokens are kept inside strings so that an unreplaced token is still valid PHP. FILTER_VALIDATE_BOOLEAN | |
| 77 | -// resolves them to false, which is what happens when the plugin runs directly from the source folder. | |
| 78 | -// Note: wp_validate_boolean() cannot be used here, it returns true for any non empty string. | |
| 79 | -if ( ! defined( 'KUBIO_INTERNAL' ) ) { | |
| 80 | - define( 'KUBIO_INTERNAL', filter_var( 'false', FILTER_VALIDATE_BOOLEAN ) ); | |
| 81 | -} | |
| 82 | - | |
| 83 | -if ( ! defined( 'KUBIO_AI_INTERNALS' ) ) { | |
| 84 | - define( 'KUBIO_AI_INTERNALS', filter_var( 'false', FILTER_VALIDATE_BOOLEAN ) ); | |
| 85 | -} | |
| 86 | - | |
| 87 | -if ( ! defined( 'KUBIO_CLOUD_INTERNALS' ) ) { | |
| 88 | - define( 'KUBIO_CLOUD_INTERNALS', filter_var( 'false', FILTER_VALIDATE_BOOLEAN ) ); | |
| 89 | -} | |
| 90 | - | |
| 91 | - | |
| 92 | 71 | if ( ! defined( 'KUBIO_MINIMUM_WP_VERSION' ) ) { |
| 93 | - define( 'KUBIO_MINIMUM_WP_VERSION', '6.9' ); | |
| 72 | + define( 'KUBIO_MINIMUM_WP_VERSION', '6.0' ); | |
| 94 | 73 | } |
| 95 | 74 | |
| 96 | 75 | |
| 97 | -define( 'KUBIO_SLUG', str_replace( wp_normalize_path( WP_PLUGIN_DIR ) . '/', '', wp_normalize_path( __DIR__ ) ) ); | |
| 76 | +define( 'KUBIO_SLUG', str_replace( wp_normalize_path( WP_PLUGIN_DIR ) . '/', '', wp_normalize_path( dirname( __FILE__ ) ) ) ); | |
| 98 | 77 | |
| 99 | 78 | if ( ! function_exists( 'kubio_url' ) ) { |
| 100 | 79 | function kubio_url( $path = '' ) { |
| 101 | 80 | static $url; |
| @@ -101,9 +80,9 @@ | ||
| 101 | 80 | static $url; |
| 102 | 81 | if ( ! $url ) { |
| 103 | 82 | $url = plugins_url( '', __FILE__ ); |
| 104 | 83 | } |
| 105 | - return $url . '/' . ltrim( $path, '/' ); | |
| 84 | + return $url . '/' . $path; | |
| 106 | 85 | } |
| 107 | 86 | } |
| 108 | 87 | |
| 109 | 88 | /** |