<?php

/**
 * Plugin Name:       Craft Addons for WPBakery
 * Plugin URI:        https://craftaddons.com
 * Description:       A lightweight collection of custom content elements for the WPBakery Page Builder.
 * Version:           1.2.0
 * Requires at least: 6.0
 * Requires PHP:      7.4
 * Author:            jques
 * Author URI:        https://craftaddons.com
 * License:           GPL-2.0-or-later
 * License URI:       https://www.gnu.org/licenses/gpl-2.0.html
 * Text Domain:       craft-addons-for-wpbakery
 * Domain Path:       /languages
 *
 * @package CraftAddonsForWPBakery
 */
if ( !defined( 'ABSPATH' ) ) {
    exit;
}
if ( function_exists( 'cafw_fs' ) ) {
    cafw_fs()->set_basename( false, __FILE__ );
} else {
    if ( !function_exists( 'cafw_fs' ) ) {
        /**
         * Create a helper function for easy Freemius SDK access.
         *
         * @return Freemius
         */
        function cafw_fs() {
            global $cafw_fs;
            if ( !isset( $cafw_fs ) ) {
                require_once __DIR__ . '/vendor/freemius/wordpress-sdk/start.php';
                $cafw_fs = fs_dynamic_init( array(
                    'id'               => '32190',
                    'slug'             => 'craft-addons-for-wpbakery',
                    'premium_slug'     => 'craft-addons-for-wpbakery-pro',
                    'type'             => 'plugin',
                    'public_key'       => 'pk_46ead4ceb943b1095bb04bc11887c',
                    'is_premium'       => false,
                    'premium_suffix'   => 'Pro',
                    'has_addons'       => false,
                    'has_paid_plans'   => true,
                    'menu'             => array(
                        'slug'    => 'craft-addons-for-wpbakery',
                        'support' => false,
                        'contact' => true,
                    ),
                    'is_live'          => true,
                    'is_org_compliant' => true,
                ) );
            }
            return $cafw_fs;
        }

        // Init Freemius.
        cafw_fs();
        // Signal that the SDK was initiated.
        do_action( 'cafw_fs_loaded' );
    }
    /**
     * Core plugin constants.
     */
    define( 'CAFW_VERSION', '1.2.0' );
    define( 'CAFW_FILE', __FILE__ );
    define( 'CAFW_PATH', plugin_dir_path( __FILE__ ) );
    define( 'CAFW_URL', plugin_dir_url( __FILE__ ) );
    define( 'CAFW_BASENAME', plugin_basename( __FILE__ ) );
    /**
     * Load the main plugin class and boot it.
     */
    require_once CAFW_PATH . 'includes/class-cafw-settings.php';
    require_once CAFW_PATH . 'includes/class-cafw-modules.php';
    require_once CAFW_PATH . 'includes/class-cafw-params.php';
    require_once CAFW_PATH . 'includes/class-cafw-preview.php';
    require_once CAFW_PATH . 'includes/class-cafw-breakpoints.php';
    require_once CAFW_PATH . 'includes/class-cafw-responsive.php';
    require_once CAFW_PATH . 'includes/class-cafw-responsive-settings.php';
    require_once CAFW_PATH . 'includes/class-cafw-dynamic.php';
    require_once CAFW_PATH . 'includes/class-cafw-element-base.php';
    require_once CAFW_PATH . 'includes/class-cafw-loader.php';
    require_once CAFW_PATH . 'includes/class-cafw-admin.php';
    require_once CAFW_PATH . 'includes/class-cafw-pricing.php';
    require_once CAFW_PATH . 'includes/class-cafw-plugin.php';
    /**
     * Returns the main plugin instance.
     *
     * @return CAFW_Plugin
     */
    function cafw() {
        return CAFW_Plugin::instance();
    }

    cafw();
}