<?php

/**
 * Plugin Name: Accordion
 * Description: Display customizable accordion in beautiful way.
 * Version: 2.0.3
 * Author: bPlugins
 * Author URI: https://bplugins.com
 * License: GPLv3
 * License URI: https://www.gnu.org/licenses/gpl-3.0.txt
 * Text Domain: b-accordion
 */
// ABS PATH
if ( !defined( 'ABSPATH' ) ) {
    exit;
}
if ( function_exists( 'ba_fs' ) ) {
    ba_fs()->set_basename( false, __FILE__ );
} else {
    define( 'BAB_PLUGIN_VERSION', ( isset( $_SERVER['HTTP_HOST'] ) && 'localhost' === $_SERVER['HTTP_HOST'] ? time() : '2.0.3' ) );
    define( 'BAB_DIR_URL', plugin_dir_url( __FILE__ ) );
    define( 'BAB_DIR_PATH', plugin_dir_path( __FILE__ ) );
    define( 'BAB_ASSETS_DIR', plugin_dir_url( __FILE__ ) . 'assets/' );
    define( 'BAB_HAS_PRO', file_exists( BAB_DIR_PATH . 'vendor/freemius/start.php' ) );
    if ( !function_exists( 'ba_fs' ) ) {
        function ba_fs() {
            global $ba_fs;
            if ( !isset( $ba_fs ) ) {
                $fsLitePath = BAB_DIR_PATH . 'vendor/freemius-lite/start.php';
                $fsPath = BAB_DIR_PATH . 'vendor/freemius/start.php';
                if ( BAB_HAS_PRO && file_exists( $fsPath ) ) {
                    require_once $fsPath;
                } else {
                    require_once $fsLitePath;
                }
                $config = array(
                    'id'                  => '20276',
                    'slug'                => 'b-accordion',
                    'premium_slug'        => 'b-accordion-pro',
                    'type'                => 'plugin',
                    'public_key'          => 'pk_b7b1c44311a178ce74e0f0520d830',
                    'is_premium'          => false,
                    'premium_suffix'      => 'Pro',
                    'has_premium_version' => true,
                    'has_addons'          => false,
                    'has_paid_plans'      => true,
                    'menu'                => array(
                        'slug'       => 'edit.php?post_type=accordion_block',
                        'first-path' => 'edit.php?post_type=accordion_block&page=bab_Dashboard',
                    ),
                );
                $ba_fs = ( BAB_HAS_PRO && file_exists( $fsPath ) ? fs_dynamic_init( $config ) : fs_lite_dynamic_init( $config ) );
            }
            return $ba_fs;
        }

        ba_fs();
        do_action( 'ba_fs_loaded' );
    }
    require_once BAB_DIR_PATH . 'includes/class_babPlugin.php';
    new babPlugin();
    if ( BAB_HAS_PRO ) {
        require_once BAB_DIR_PATH . 'includes/LicenseActivation.php';
    }
}