<?php
/**
 * Plugin Name:       Lantern Span People Directory
 * Description:       Create a searchable photo and contact directory for organizations of any kind.
 * Version:           1.0.1
 * Requires at least: 6.5
 * Requires PHP:      7.4
 * Author:            Lantern Span Software LLC
 * License:           GPL-2.0-or-later
 * License URI:       https://www.gnu.org/licenses/gpl-2.0.html
 * Text Domain:       lantern-span-people-directory
 * Domain Path:       /languages
 *
 * @package LanternSpanPeopleDirectory
 */

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

if ( function_exists( 'lpd_fs' ) ) {
	lpd_fs()->set_basename( false, __FILE__ );
} else {
	if ( ! function_exists( 'lpd_fs' ) ) {
		/**
		 * Returns the Freemius SDK instance for Lantern Span People Directory.
		 *
		 * @return Freemius
		 */
		function lpd_fs() {
			global $lpd_fs;

			if ( ! isset( $lpd_fs ) ) {
				require_once dirname( __FILE__ ) . '/vendor/freemius/start.php';

				$lpd_fs = fs_dynamic_init(
					array(
						'id'                  => '36701',
						'slug'                => 'lantern-span-people-directory',
						'premium_slug'        => 'lantern-span-people-directory-pro',
						'type'                => 'plugin',
						'public_key'          => 'pk_0312a7eb1cfea8681765d584b5784',
						'is_premium'          => false,
						'premium_suffix'      => 'Pro',
						'has_premium_version' => true,
						'has_addons'          => false,
						'has_paid_plans'      => true,
						'is_org_compliant'    => true,
						'trial'               => array(
							'days'               => 10,
							'is_require_payment' => true,
						),
						'parallel_activation' => array(
							'enabled'                  => true,
							'premium_version_basename' => 'lantern-span-people-directory-pro/lantern-span-people-directory-pro.php',
						),
						'menu'                => array(
							'support' => false,
						),
					)
				);
			}

			return $lpd_fs;
		}
	}

	lpd_fs();
	do_action( 'lpd_fs_loaded' );
}

define( 'LSPD_VERSION', '1.0.1' );
define( 'LSPD_FILE', __FILE__ );
define( 'LSPD_PATH', plugin_dir_path( __FILE__ ) );
define( 'LSPD_URL', plugin_dir_url( __FILE__ ) );

if ( ! defined( 'LSPD_PRO_URL' ) ) {
	define( 'LSPD_PRO_URL', '' );
}

require_once LSPD_PATH . 'includes/freemius.php';
require_once LSPD_PATH . 'includes/functions.php';
require_once LSPD_PATH . 'includes/class-lspd-activator.php';
require_once LSPD_PATH . 'includes/class-lspd-post-type.php';
require_once LSPD_PATH . 'includes/class-lspd-admin.php';
require_once LSPD_PATH . 'includes/class-lspd-settings.php';
require_once LSPD_PATH . 'includes/class-lspd-directory.php';
require_once LSPD_PATH . 'includes/class-lspd-block.php';
require_once LSPD_PATH . 'includes/class-lspd-plugin.php';

register_activation_hook( __FILE__, array( 'LSPD_Activator', 'activate' ) );

add_action( 'plugins_loaded', array( 'LSPD_Plugin', 'instance' ) );
