<?php

/**
 * Plugin Name: Code Snippets Block
 * Description: The Code Snippets block plugin lets you easily copy, style, and view beautifully highlighted code.
 * Version: 1.1.3
 * Author: bPlugins
 * Author URI: http://bplugins.com
 * Requires at least: 6.5
 * License: GPLv3
 * License URI: https://www.gnu.org/licenses/gpl-3.0.txt
 * Text Domain: code-snippets-block
 */
// ABS PATH
if ( !defined( 'ABSPATH' ) ) {
    exit;
}
if ( function_exists( 'csb_fs' ) ) {
    csb_fs()->set_basename( false, __FILE__ );
} else {
    // Constant
    define( 'CSBCH_PLUGIN_VERSION', ( isset( $_SERVER['HTTP_HOST'] ) && 'localhost' === $_SERVER['HTTP_HOST'] ? time() : '1.1.3' ) );
    define( 'CSBCH_ASSETS_DIR', plugin_dir_url( __FILE__ ) . 'assets/' );
    define( 'CSBCH_DIR_URL', plugin_dir_url( __FILE__ ) );
    define( 'CSBCH_DIR_PATH', plugin_dir_path( __FILE__ ) );
    define( 'CSBCH_HAS_PRO', file_exists( CSBCH_DIR_PATH . 'vendor/freemius/start.php' ) );
    if ( !function_exists( 'csb_fs' ) ) {
        function csb_fs() {
            global $csb_fs;
            if ( !isset( $csb_fs ) ) {
                $fsLitePath = CSBCH_DIR_PATH . 'vendor/freemius-lite/start.php';
                $fsPath = CSBCH_DIR_PATH . 'vendor/freemius/start.php';
                if ( CSBCH_HAS_PRO && file_exists( $fsPath ) ) {
                    require_once $fsPath;
                } else {
                    require_once $fsLitePath;
                }
                $config = array(
                    'id'                  => '24583',
                    'slug'                => 'code-snippets-block',
                    'premium_slug'        => 'code-snippets-block-pro',
                    'type'                => 'plugin',
                    'public_key'          => 'pk_31a8b989ce6605bfb035d176e63b2',
                    'is_premium'          => false,
                    'premium_suffix'      => 'Pro',
                    'has_premium_version' => true,
                    'has_addons'          => false,
                    'has_paid_plans'      => true,
                    'is_org_compliant'    => true,
                    'wp_org_gatekeeper'   => 'OA7#BoRiBNqdf52FvzEf!!074aRLPs8fspif$7K1#4u4Csys1fQlCecVcUTOs2mcpeVHi#C2j9d09fOTvbC0HloPT7f Fee5WdS3G',
                    'menu'                => array(
                        'slug'       => 'edit.php?post_type=bch_block',
                        'first-path' => 'edit.php?post_type=bch_block&page=bch_Dashboard',
                        'contact'    => false,
                    ),
                );
                $csb_fs = ( CSBCH_HAS_PRO && file_exists( $fsPath ) ? fs_dynamic_init( $config ) : fs_lite_dynamic_init( $config ) );
            }
            return $csb_fs;
        }

        csb_fs();
        do_action( 'csb_fs_loaded' );
    }
    require_once CSBCH_DIR_PATH . 'inc/class_bchPlugin.php';
    new \CSB\bchCodePlugin();
    if ( CSBCH_HAS_PRO ) {
        require_once CSBCH_DIR_PATH . 'inc/LicenseActivation.php';
    }
}