<?php
/**
 * Plugin Name:      WeMeet for Webex
 * Description:      Power up your virtual meetings with Wemeet.
 * Version:          1.0.0
 * Author:           Sovlix
 * Author URI:       https://sovlix.com/
 * License:          GPL-2.0+
 * License URI:      http://www.gnu.org/licenses/gpl-2.0.txt
 * Text Domain:      wemeet
 * Requires at least: 5.0
 * Tested up to:     6.8
 *
 * @package WEMEET
 */

// Exit if accessed directly.
if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

require_once __DIR__ . '/vendor/autoload.php';

if ( ! function_exists( 'wemeet_fs' ) ) {
	// Create a helper function for easy SDK access.
	function wemeet_fs() {
		global $wemeet_fs;

		if ( ! isset( $wemeet_fs ) ) {
			// Activate multisite network integration.
			if ( ! defined( 'WP_FS__PRODUCT_22143_MULTISITE' ) ) {
				define( 'WP_FS__PRODUCT_22143_MULTISITE', true );
			}

			// Include Freemius SDK.
			require_once __DIR__ . '/vendor/freemius/wordpress-sdk/start.php';

			add_filter( 'fs_playground_anonymous_mode_meetinghub', '__return_false' );

			$wemeet_fs = fs_dynamic_init( array(
				'id'                  => '22143',
				'slug'                => 'wemeet',
				'type'                => 'plugin',
				'public_key'          => 'pk_fdb54cbe6d0fa7b7aadf1b450f079',
				'is_premium'          => false,
				'has_addons'          => false,
				'has_paid_plans'      => false,
				'menu'                => array(
					'slug'           => 'wemeet-settings',
					'first-path'     => 'admin.php?page=wemeet-settings',
					'support'        => false,
					'contact'    => false,
					'network'        => true,
				),
			) );
		}

		return $wemeet_fs;
	}

	// Init Freemius.
	wemeet_fs();
	// Signal that SDK was initiated.
	do_action( 'wemeet_fs_loaded' );
}

if ( ! defined( 'WEMEET_VERSION' ) ) {
	define( 'WEMEET_VERSION', '1.0.0' );
	define( 'WEMEET_FILE', __FILE__ );
	define( 'WEMEET_PATH', dirname( WEMEET_FILE ) );
	define( 'WEMEET_INCLUDES', WEMEET_PATH . '/includes' );
	define( 'WEMEET_FRONTEND', WEMEET_PATH . '/includes/Frontend' );
	define( 'WEMEET_TEMPLATES', WEMEET_PATH . '/templates' );
	define( 'WEMEET_URL', plugin_dir_url( WEMEET_FILE ) );
	define( 'WEMEET_ASSETS', WEMEET_URL . 'assets' );
	define( 'WEMEET_CSS_DIR', WEMEET_URL . 'assets/css/' );
	define( 'WEMEET_BUILD_CSS_DIR', WEMEET_URL . 'assets/dist/' );
	define( 'WEMEET_JS_DIR', WEMEET_URL . 'assets/dist/' );

	// Load plugin base file.
	include_once WEMEET_INCLUDES . '/wemeet-plugin.php';
}
