<?php
/**
 * The plugin bootstrap file
 *
 * @link              https://codingfix.com/pluginer-wp-bulk-plugin-install-and-migrate/
 * @since             1.0.1
 * @package           Instalist
 *
 * @wordpress-plugin
 * Plugin Name:       Pluginer (formerly Instalist) - WP bulk plugin install & migrate
 * Plugin URI:        https://codingfix.com/pluginer-wp-bulk-plugin-install-and-migrate/
 * Description:       Create lists of favorite plugins and install/activate them all with just a click.
 * Version:           1.3.5
 * Author:            Codingfix
 * Author URI:        https://codingfix.com/
 * License:           GPL-2.0+
 * License URI:       http://www.gnu.org/licenses/gpl-2.0.txt
 * Text Domain:       instalist
 * Domain Path:       /languages
 */

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

/**
 * Currently plugin version.
 * Rename this for your plugin and update it as you release new versions.
 */
define( 'PLUGINER_VERSION', '1.3.5' );
define( 'PLUGINER_ADMIN_JS_URL', plugin_dir_url( __FILE__ ) . 'admin/js/pluginer-admin.js' );
define( 'PLUGINER_URL', plugin_dir_url( __FILE__ ) );

/**
 * The code that runs during plugin activation.
 * This action is documented in includes/class-pluginer-activator.php
 */
function plgnr_activate_pluginer() {
	require_once plugin_dir_path( __FILE__ ) . 'includes/class-pluginer-activator.php';
	Pluginer_Activator::activate();
}

/**
 * The code that runs during plugin deactivation.
 * This action is documented in includes/class-pluginer-deactivator.php
 */
function plgnr_deactivate_pluginer() {
	Pluginer_License_Manager::unschedule_cron();
	require_once plugin_dir_path( __FILE__ ) . 'includes/class-pluginer-deactivator.php';
	Pluginer_Deactivator::deactivate();
}

register_activation_hook( __FILE__, 'plgnr_activate_pluginer' );
register_deactivation_hook( __FILE__, 'plgnr_deactivate_pluginer' );

/**
 * The core plugin class that is used to define internationalization,
 * admin-specific hooks, and public-facing site hooks.
 */
require plugin_dir_path( __FILE__ ) . 'includes/class-pluginer.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.0
 */
function plgnr_run_pluginer() {
	$plugin = new Pluginer();
	$plugin->run();
}
plgnr_run_pluginer();
