<?php
/**
 * Plugin Name: ID Shortcodes
 * Plugin URI:  https://insightdezign.com/plugin/id-shortcodes
 * Description: Advanced content blocks as WordPress shortcodes. Works standalone or as visual blocks inside the Insight Dezign Visual Editor.
 * Version:     1.2.0
 * Author:      Insight Dezign
 * Author URI:  https://insightdezign.com
 * License:     GPL-2.0-or-later
 * License URI: https://www.gnu.org/licenses/gpl-2.0.html
 * Text Domain: idsc
 * Domain Path: /languages
 * Requires PHP: 7.4
 * Requires at least: 5.8
 */

if ( ! defined( 'ABSPATH' ) ) {
    exit;
}

define( 'IDSC_VERSION', '1.2.0' );
define( 'IDSC_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
define( 'IDSC_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
define( 'IDSC_PLUGIN_FILE', __FILE__ );

/* ------------------------------------------------------------------ */
/*  Freemius SDK integration                                           */
/* ------------------------------------------------------------------ */
if ( ! function_exists( 'idsc_fs' ) ) {
    function idsc_fs() {
        global $idsc_fs;

        if ( ! isset( $idsc_fs ) ) {
            require_once dirname( __FILE__ ) . '/vendor/freemius/wordpress-sdk/start.php';

            $idsc_fs = fs_dynamic_init( array(
                'id'                  => '24569',
                'slug'                => 'id-shortcodes',
                'type'                => 'plugin',
                'public_key'          => 'pk_5311e8b054dcd9f2eefc90900daa5',
                'is_premium'          => true,
                'has_addons'          => false,
                'has_paid_plans'      => true,
                'is_org_compliant'    => false,
                'menu'                => array(
                    'first-path'     => 'plugins.php',
                    'account'        => false,
                    'contact'        => false,
                    'support'        => false,
                ),
            ) );
        }

        return $idsc_fs;
    }

    // Init Freemius.
    idsc_fs();
    // Signal that SDK was initiated.
    do_action( 'idsc_fs_loaded' );
}

require_once IDSC_PLUGIN_DIR . 'includes/class-idsc-core.php';

IDSC_Core::instance();
