<?php

/**
 * The plugin bootstrap file
 *
 * This file is read by WordPress to generate the plugin information in the plugin
 * admin area. This file also includes all of the dependencies used by the plugin,
 * registers the activation and deactivation functions, and defines a function
 * that starts the plugin.
 *
 * @link              https://www.linknacional.com.br/
 * @since             1.0.0
 * @package           Lkn_Wp_Crowdfunding_Extension
 *
 * @wordpress-plugin
 * Plugin Name:       Link Nacional Crowdfunding Extension
 * Plugin URI:        https://www.linknacional.com.br/wordpress/plugins/
 * Description:       A Link Nacional extension of the WP Crowdfunding plugin
 * Requires Plugins:  wp-crowdfunding
 * Version:           1.7.7
 * Author:            Link Nacional
 * Author URI:        https://linknacional.com.br/wordpress
 * License:           GPL-2.0+
 * License URI:       http://www.gnu.org/licenses/gpl-2.0.txt
 * Text Domain:       link-nacional-wp-crowdfunding-extension
 * Domain Path:       /Languages
 */

use Lknwp\CrowdfundingExtension\Includes\LknwpCrowdfundingExtension;
use Lknwp\CrowdfundingExtension\Includes\LknwpCrowdfundingExtensionActivator;
use Lknwp\CrowdfundingExtension\Includes\LknwpCrowdfundingExtensionDeactivator;

// If this file is called directly, abort.
if (! defined('WPINC')) {
    die;
}

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

/**
 * Currently plugin version.
 * Start at version 1.0.0 and use SemVer - https://semver.org
 * Rename this for your plugin and update it as you release new versions.
 */
define('LKNWP_CROWDFUNDING_EXTENSION_VERSION', '1.7.7');

if (! defined('LKNWP_CROWDFUNDING_EXTENSION_UPDATER_PLUGIN')) {
    define('LKNWP_CROWDFUNDING_EXTENSION', __FILE__);
}

if (! defined('LKNWP_CROWDFUNDING_EXTENSION_MIN_CROWDFUNDING_VERSION')) {
    define('LKNWP_CROWDFUNDING_EXTENSION_MIN_CROWDFUNDING_VERSION', '2.1.10');
}

if (! defined('LKNWP_CROWDFUNDING_EXTENSION_FILE')) {
    define('LKNWP_CROWDFUNDING_EXTENSION_FILE', __DIR__ . '/lkn-wp-crowdfunding-extension.php');
}

if (! defined('LKNWP_CROWDFUNDING_EXTENSION_DIR')) {
    define('LKNWP_CROWDFUNDING_EXTENSION_DIR', plugin_dir_path(LKNWP_CROWDFUNDING_EXTENSION_FILE));
}

if (! defined('LKNWP_CROWDFUNDING_EXTENSION_URL')) {
    define('LKNWP_CROWDFUNDING_EXTENSION_URL', plugin_dir_url(LKNWP_CROWDFUNDING_EXTENSION_FILE));
}

if (! defined('LKNWP_CROWDFUNDING_EXTENSION_BASENAME')) {
    define('LKNWP_CROWDFUNDING_EXTENSION_BASENAME', plugin_basename(LKNWP_CROWDFUNDING_EXTENSION_FILE));
}

/**
 * The code that runs during plugin activation.
 * This action is documented in includes/class-lkn-wp-crowdfunding-extension-activator.php
 */
function activate_lkn_wp_crowdfunding_extension(): void
{
    LknwpCrowdfundingExtensionActivator::activate();
}

/**
 * The code that runs during plugin deactivation.
 * This action is documented in includes/class-lkn-wp-crowdfunding-extension-deactivator.php
 */
function deactivate_lkn_wp_crowdfunding_extension(): void
{
    LknwpCrowdfundingExtensionDeactivator::deactivate();
}

register_activation_hook(__FILE__, 'activate_lkn_wp_crowdfunding_extension');
register_deactivation_hook(__FILE__, 'deactivate_lkn_wp_crowdfunding_extension');

/**
 * The core plugin class that is used to define internationalization,
 * admin-specific hooks, and public-facing site hooks.
 */
require plugin_dir_path(__FILE__) . 'Includes/LknwpCrowdfundingExtension.php';

/**
 * Begins execution of the plugin.
 *
 * Since everything within the plugin is registered via hooks,
 * then kicking off the plugin from this point in the file does
 * not affect the page life cycle.
 *
 * @since    1.0.1
 */
function run_lkn_wp_crowdfunding_extension(): void
{
    $plugin = new LknwpCrowdfundingExtension();
    $plugin->run();
}
run_lkn_wp_crowdfunding_extension();
