<?php

/**
 * Plugin Name: Soft Multimedia Player
 * Plugin URI:  https://softlabbd.com/soft-multimedia-player
 * Description: Play audio, video, and podcast easily in WordPress. Supports major media sources, including local files, direct URLs, YouTube, and more.
 * Version:     1.0.0
 * Author:      Prince
 * Author URI:  http://softlabbd.com
 * Text Domain: soft-multimedia-player
 * Domain Path: /languages/
 * License: GPLv2 or later
 */
defined( 'ABSPATH' ) || exit;
if ( function_exists( 'smp_fs' ) ) {
    smp_fs()->set_basename( false, __FILE__ );
} else {
    /**
     * DO NOT REMOVE THIS IF, IT IS ESSENTIAL FOR THE
     * `function_exists` CALL ABOVE TO PROPERLY WORK.
     */
    if ( !function_exists( 'smp_fs' ) ) {
        // Create a helper function for easy SDK access.
        function smp_fs() {
            global $smp_fs;
            if ( !isset( $smp_fs ) ) {
                // Include Freemius SDK.
                require_once dirname( __FILE__ ) . '/freemius/start.php';
                $smp_fs = fs_dynamic_init( array(
                    'id'             => '19544',
                    'slug'           => 'soft-multimedia-player',
                    'type'           => 'plugin',
                    'public_key'     => 'pk_748528da58fc7c9adc04c7db011a1',
                    'is_premium'     => false,
                    'premium_suffix' => 'PRO',
                    'has_addons'     => false,
                    'has_paid_plans' => true,
                    'trial'          => array(
                        'days'               => 3,
                        'is_require_payment' => false,
                    ),
                    'menu'           => array(
                        'slug'       => 'soft-multimedia-player',
                        'first-path' => 'admin.php?page=soft-multimedia-player-getting-started',
                        'contact'    => false,
                        'support'    => false,
                    ),
                    'is_live'        => true,
                ) );
            }
            return $smp_fs;
        }

        // Init Freemius.
        smp_fs();
        // Signal that SDK was initiated.
        do_action( 'smp_fs_loaded' );
    }
    /**
     * Define constant
     */
    define( 'SOFT_MULTIMEDIA_PLAYER_VERSION', '1.0.0' );
    define( 'SOFT_MULTIMEDIA_PLAYER_DB_VERSION', '1.0.0' );
    define( 'SOFT_MULTIMEDIA_PLAYER_FILE', __FILE__ );
    define( 'SOFT_MULTIMEDIA_PLAYER_PATH', dirname( SOFT_MULTIMEDIA_PLAYER_FILE ) );
    define( 'SOFT_MULTIMEDIA_PLAYER_INCLUDES', SOFT_MULTIMEDIA_PLAYER_PATH . '/includes' );
    define( 'SOFT_MULTIMEDIA_PLAYER_URL', plugins_url( '', SOFT_MULTIMEDIA_PLAYER_FILE ) );
    define( 'SOFT_MULTIMEDIA_PLAYER_ASSETS', SOFT_MULTIMEDIA_PLAYER_URL . '/assets' );
    /**
     * The core plugin class that is used to define internationalization,
     * admin-specific hooks, and public-facing site hooks.
     *
     * @since 1.0.0
     */
    include_once SOFT_MULTIMEDIA_PLAYER_INCLUDES . '/Main.php';
}