<?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://revivedesignstudios.com
 * @since             1.0.0
 * @package           Rds_Bt50_Scorecard
 *
 * @wordpress-plugin
 * Plugin Name:       BillTrack50 Scorecard
 * Plugin URI:        https://legislativescorecard.us
 * Description:       Displays your BillTrack50 Scorecard on a page
 * Version:           1.0.35
 * Author:            Revive Design Studios
 * Author URI:        https://revivedesignstudios.com
 * License:           GPL-2.0+
 * License URI:       http://www.gnu.org/licenses/gpl-2.0.txt
 * Text Domain:       rds-bt50-scorecard
 * Domain Path:       /languages
 */

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

/**
 * 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( 'RDS_BT50_SCORECARD_VERSION', '1.0.35' );

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

/**
 * The code that runs during plugin deactivation.
 * This action is documented in includes/class-rds-bt50-scorecard-deactivator.php
 */
function deactivate_rds_bt50_scorecard() {
	require_once plugin_dir_path( __FILE__ ) . 'includes/class-rds-bt50-scorecard-deactivator.php';
	Rds_Bt50_Scorecard_Deactivator::deactivate();
}

register_activation_hook( __FILE__, 'activate_rds_bt50_scorecard' );
register_deactivation_hook( __FILE__, 'deactivate_rds_bt50_scorecard' );

/**
 * 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-rds-bt50-scorecard.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 run_rds_bt50_scorecard() {
	$plugin = new Rds_Bt50_Scorecard();
	$plugin->run();
}

/**
 *This should execute a plugin update checker that will check for plugin updates
 *
 */

 // TODO: update the link associate with the plugin and correct the full path to the file or functions.php
// require 'plugin-update-checker/plugin-update-checker.php';
// $myUpdateChecker = Puc_v4_Factory::buildUpdateChecker(
// 	'http://example.com/path/to/details.json',
// 	__FILE__ . 'plugin.json', //Full path to the main plugin file or functions.php.
// 	'bill-track50-scorecard'
// );

run_rds_bt50_scorecard();
